Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37376 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,27 +6,31 @@
|
||||
* Ithamar R. Adema <[email protected]>
|
||||
*/
|
||||
|
||||
|
||||
#include "FilterIO.h"
|
||||
|
||||
#include <String.h>
|
||||
#include <image.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <image.h>
|
||||
|
||||
#include <String.h>
|
||||
|
||||
|
||||
FilterIO::FilterIO(const BString& cmdline)
|
||||
: BDataIO()
|
||||
:
|
||||
BDataIO()
|
||||
{
|
||||
BString cmd(cmdline);
|
||||
const char *argv[4];
|
||||
const char* argv[4];
|
||||
|
||||
argv[0] = strdup("/bin/sh");
|
||||
argv[1] = strdup("-c");
|
||||
argv[2] = strdup(cmd.String());
|
||||
argv[3] = NULL;
|
||||
|
||||
InitData(3,argv);
|
||||
InitData(3, argv);
|
||||
|
||||
free((void*)argv[0]);
|
||||
free((void*)argv[1]);
|
||||
@@ -35,18 +39,17 @@ FilterIO::FilterIO(const BString& cmdline)
|
||||
|
||||
|
||||
FilterIO::FilterIO(int argc, const char **argv, const char **envp)
|
||||
: BDataIO()
|
||||
:
|
||||
BDataIO()
|
||||
{
|
||||
InitData(argc,argv,envp);
|
||||
InitData(argc, argv, envp);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
FilterIO::InitData(int argc, const char **argv, const char **envp)
|
||||
FilterIO::InitData(int argc, const char** argv, const char** envp)
|
||||
{
|
||||
fStdIn =
|
||||
fStdOut =
|
||||
fStdErr = -1;
|
||||
fStdIn = fStdOut = fStdErr = -1;
|
||||
fInitErr = B_OK;
|
||||
|
||||
fThreadId = PipeCommand(argc, argv, fStdIn, fStdOut, fStdErr, envp);
|
||||
@@ -70,21 +73,22 @@ FilterIO::~FilterIO()
|
||||
|
||||
|
||||
ssize_t
|
||||
FilterIO::Read(void *buffer, size_t size)
|
||||
FilterIO::Read(void* buffer, size_t size)
|
||||
{
|
||||
return ::read(fStdOut, buffer, size);
|
||||
}
|
||||
|
||||
|
||||
ssize_t
|
||||
FilterIO::Write(const void *buffer, size_t size)
|
||||
FilterIO::Write(const void* buffer, size_t size)
|
||||
{
|
||||
return ::write(fStdIn, buffer, size);
|
||||
}
|
||||
|
||||
|
||||
thread_id
|
||||
FilterIO::PipeCommand(int argc, const char **argv, int &in, int &out, int &err, const char **envp)
|
||||
FilterIO::PipeCommand(int argc, const char** argv, int& in, int& out, int& err,
|
||||
const char** envp)
|
||||
{
|
||||
// This function written by Peter Folk <[email protected]>
|
||||
// and published in the BeDevTalk FAQ
|
||||
@@ -100,7 +104,7 @@ FilterIO::PipeCommand(int argc, const char **argv, int &in, int &out, int &err,
|
||||
|
||||
int filedes[2];
|
||||
|
||||
/* Create new pipe FDs as stdin, stdout, stderr */
|
||||
// Create new pipe FDs as stdin, stdout, stderr
|
||||
pipe(filedes); dup2(filedes[0], 0); close(filedes[0]);
|
||||
in = filedes[1]; // Write to in, appears on cmd's stdin
|
||||
pipe(filedes); dup2(filedes[1], 1); close(filedes[1]);
|
||||
|
||||
@@ -5,36 +5,41 @@
|
||||
* Authors:
|
||||
* Ithamar R. Adema <[email protected]>
|
||||
*/
|
||||
|
||||
#ifndef FILTERIO_H
|
||||
#define FILTERIO_H
|
||||
|
||||
|
||||
#include <DataIO.h>
|
||||
#include <OS.h>
|
||||
|
||||
|
||||
class BString;
|
||||
|
||||
|
||||
class FilterIO : public BDataIO
|
||||
{
|
||||
public:
|
||||
FilterIO(int argc, const char **argv, const char **envp = NULL);
|
||||
FilterIO(const BString& cmdline);
|
||||
~FilterIO();
|
||||
FilterIO(int argc, const char** argv,
|
||||
const char** envp = NULL);
|
||||
FilterIO(const BString& cmdline);
|
||||
~FilterIO();
|
||||
|
||||
status_t InitCheck() const
|
||||
{
|
||||
return fInitErr;
|
||||
}
|
||||
status_t InitCheck() const
|
||||
{
|
||||
return fInitErr;
|
||||
}
|
||||
|
||||
ssize_t Read(void *buffer, size_t size);
|
||||
ssize_t Write(const void *buffer, size_t size);
|
||||
ssize_t Read(void* buffer, size_t size);
|
||||
ssize_t Write(const void* buffer, size_t size);
|
||||
private:
|
||||
int fStdIn, fStdOut, fStdErr;
|
||||
thread_id fThreadId;
|
||||
status_t fInitErr;
|
||||
int fStdIn, fStdOut, fStdErr;
|
||||
thread_id fThreadId;
|
||||
status_t fInitErr;
|
||||
|
||||
status_t InitData(int argc, const char **argv, const char **envp = NULL);
|
||||
thread_id PipeCommand(int argc, const char **argv, int &in, int &out, int &err, const char **envp = NULL);
|
||||
status_t InitData(int argc, const char** argv,
|
||||
const char** envp = NULL);
|
||||
thread_id PipeCommand(int argc, const char** argv, int& in,
|
||||
int& out, int& err, const char** envp = NULL);
|
||||
};
|
||||
|
||||
#endif /* FILTERIO_H */
|
||||
#endif // FILTERIO_H
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
* Ithamar R. Adema <[email protected]>
|
||||
*/
|
||||
|
||||
|
||||
#include "PPDParser.h"
|
||||
|
||||
#include <Path.h>
|
||||
#include <File.h>
|
||||
#include <Path.h>
|
||||
|
||||
|
||||
PPDParser::PPDParser(BFile& file)
|
||||
@@ -18,9 +19,9 @@ PPDParser::PPDParser(BFile& file)
|
||||
}
|
||||
|
||||
|
||||
PPDParser::PPDParser(const BDirectory& dir, const char *fname)
|
||||
PPDParser::PPDParser(const BDirectory& dir, const char* fname)
|
||||
{
|
||||
BFile file(&dir,fname, B_READ_ONLY);
|
||||
BFile file(&dir, fname, B_READ_ONLY);
|
||||
InitData(file);
|
||||
}
|
||||
|
||||
@@ -36,13 +37,13 @@ status_t
|
||||
PPDParser::InitData(BFile& file)
|
||||
{
|
||||
// Check if file exists...
|
||||
if ((fInitErr=file.InitCheck()) != B_OK)
|
||||
if ((fInitErr = file.InitCheck()) != B_OK)
|
||||
return fInitErr;
|
||||
|
||||
// Read entire file into BString
|
||||
ssize_t len;
|
||||
char buffer[1025];
|
||||
while ((len=file.Read(buffer,sizeof(buffer)-1)) > 0) {
|
||||
while ((len = file.Read(buffer, sizeof(buffer)-1)) > 0) {
|
||||
buffer[len] = '\0';
|
||||
fContent << buffer;
|
||||
}
|
||||
@@ -67,17 +68,18 @@ PPDParser::GetParameter(const BString& param)
|
||||
|
||||
pattern << "*" << param << ":";
|
||||
|
||||
while ((next=fContent.FindFirst('\n', pos)) > 0) {
|
||||
while ((next = fContent.FindFirst('\n', pos)) > 0) {
|
||||
// Grab line (without newline)
|
||||
fContent.CopyInto(line, pos, next-pos);
|
||||
fContent.CopyInto(line, pos, next - pos);
|
||||
// Found our parameter?
|
||||
if (line.Compare(pattern,pattern.Length()) == 0) {
|
||||
if (line.Compare(pattern, pattern.Length()) == 0) {
|
||||
// Copy result
|
||||
line.CopyInto(result, pattern.Length(), line.Length() - pattern.Length()).Trim();
|
||||
line.CopyInto(result, pattern.Length(),
|
||||
line.Length() - pattern.Length()).Trim();
|
||||
// If result is quoted, remove quotes
|
||||
if (result[0] == '"') {
|
||||
result.Truncate(result.Length() -1);
|
||||
result.Remove(0,1);
|
||||
result.Remove(0, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,31 +1,35 @@
|
||||
#ifndef PPDPARSER_H
|
||||
#define PPDPARSER_H
|
||||
|
||||
|
||||
#include <String.h>
|
||||
|
||||
|
||||
class BPath;
|
||||
class BFile;
|
||||
class BDirectory;
|
||||
|
||||
|
||||
class PPDParser
|
||||
{
|
||||
public:
|
||||
PPDParser(const BDirectory& dir, const char *fname);
|
||||
PPDParser(const BPath& path);
|
||||
PPDParser(BFile& file);
|
||||
~PPDParser();
|
||||
PPDParser(const BDirectory& dir, const char* fname);
|
||||
PPDParser(const BPath& path);
|
||||
PPDParser(BFile& file);
|
||||
~PPDParser();
|
||||
|
||||
status_t InitCheck() const
|
||||
{
|
||||
return fInitErr;
|
||||
}
|
||||
status_t InitCheck() const
|
||||
{
|
||||
return fInitErr;
|
||||
}
|
||||
|
||||
BString GetParameter(const BString& param);
|
||||
|
||||
BString GetParameter(const BString& param);
|
||||
private:
|
||||
status_t InitData(BFile& file);
|
||||
status_t InitData(BFile& file);
|
||||
|
||||
BString fContent;
|
||||
status_t fInitErr;
|
||||
BString fContent;
|
||||
status_t fInitErr;
|
||||
};
|
||||
|
||||
#endif /* PPDPARSER_H */
|
||||
#endif // PPDPARSER_H
|
||||
|
||||
@@ -5,26 +5,29 @@
|
||||
* Copyright 2010 Ithamar Adema.
|
||||
*/
|
||||
|
||||
|
||||
#include "PS.h"
|
||||
|
||||
#include <memory.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Bitmap.h>
|
||||
#include <File.h>
|
||||
#include <Path.h>
|
||||
#include <memory>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "PS.h"
|
||||
#include "UIDriver.h"
|
||||
|
||||
#include "DbgMsg.h"
|
||||
#include "FilterIO.h"
|
||||
#include "Halftone.h"
|
||||
#include "JobData.h"
|
||||
#include "PackBits.h"
|
||||
#include "PPDParser.h"
|
||||
#include "PrinterData.h"
|
||||
#include "PSCap.h"
|
||||
#include "PackBits.h"
|
||||
#include "Halftone.h"
|
||||
#include "ValidRect.h"
|
||||
#include "DbgMsg.h"
|
||||
#include "PSData.h"
|
||||
#include "FilterIO.h"
|
||||
#include "PPDParser.h"
|
||||
|
||||
#include "UIDriver.h"
|
||||
#include "ValidRect.h"
|
||||
|
||||
#if (!__MWERKS__ || defined(MSIPL_USING_NAMESPACE))
|
||||
using namespace std;
|
||||
@@ -33,8 +36,10 @@ using namespace std;
|
||||
#endif
|
||||
|
||||
|
||||
PSDriver::PSDriver(BMessage *msg, PrinterData *printer_data, const PrinterCap *printer_cap)
|
||||
: GraphicsDriver(msg, printer_data, printer_cap)
|
||||
PSDriver::PSDriver(BMessage* msg, PrinterData* printer_data,
|
||||
const PrinterCap* printer_cap)
|
||||
:
|
||||
GraphicsDriver(msg, printer_data, printer_cap)
|
||||
{
|
||||
fPrintedPages = 0;
|
||||
fHalftone = NULL;
|
||||
@@ -45,7 +50,7 @@ PSDriver::PSDriver(BMessage *msg, PrinterData *printer_data, const PrinterCap *p
|
||||
void
|
||||
PSDriver::StartFilterIfNeeded()
|
||||
{
|
||||
const PSData *data = dynamic_cast<const PSData*>(getPrinterData());
|
||||
const PSData* data = dynamic_cast<const PSData*>(getPrinterData());
|
||||
PPDParser parser(BPath(data->fPPD.String()));
|
||||
if (parser.InitCheck() == B_OK) {
|
||||
BString param = parser.GetParameter("FoomaticRIPCommandLine");
|
||||
@@ -73,14 +78,14 @@ PSDriver::FlushFilterIfNeeded()
|
||||
char buffer[1024];
|
||||
ssize_t len;
|
||||
|
||||
while ((len = fFilterIO->Read(buffer,sizeof(buffer))) > 0)
|
||||
while ((len = fFilterIO->Read(buffer, sizeof(buffer))) > 0)
|
||||
writeSpoolData(buffer, len);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PSDriver::writePSString(const char *format, ...)
|
||||
PSDriver::writePSString(const char* format, ...)
|
||||
{
|
||||
char str[256];
|
||||
va_list ap;
|
||||
@@ -97,12 +102,12 @@ PSDriver::writePSString(const char *format, ...)
|
||||
|
||||
|
||||
void
|
||||
PSDriver::writePSData(const void *data, size_t size)
|
||||
PSDriver::writePSData(const void* data, size_t size)
|
||||
{
|
||||
if (fFilterIO)
|
||||
fFilterIO->Write(data, size);
|
||||
else
|
||||
writeSpoolData(data,size);
|
||||
writeSpoolData(data, size);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,10 +118,12 @@ PSDriver::startDoc()
|
||||
StartFilterIfNeeded();
|
||||
|
||||
jobStart();
|
||||
fHalftone = new Halftone(getJobData()->getSurfaceType(), getJobData()->getGamma(), getJobData()->getInkDensity(), getJobData()->getDitherType());
|
||||
fHalftone = new Halftone(getJobData()->getSurfaceType(),
|
||||
getJobData()->getGamma(), getJobData()->getInkDensity(),
|
||||
getJobData()->getDitherType());
|
||||
return true;
|
||||
}
|
||||
catch (TransportException &err) {
|
||||
catch (TransportException& err) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -145,7 +152,7 @@ PSDriver::endPage(int)
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (TransportException &err) {
|
||||
catch (TransportException& err) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -159,7 +166,8 @@ PSDriver::setupCTM()
|
||||
if (getJobData()->getOrientation() == JobData::kPortrait) {
|
||||
// move origin from bottom left to top left
|
||||
// and set margin
|
||||
writePSString("%f %f translate\n", leftMargin, getJobData()->getPaperRect().Height()-topMargin);
|
||||
writePSString("%f %f translate\n", leftMargin,
|
||||
getJobData()->getPaperRect().Height()-topMargin);
|
||||
} else {
|
||||
// landscape:
|
||||
// move origin from bottom left to margin top and left
|
||||
@@ -169,7 +177,8 @@ PSDriver::setupCTM()
|
||||
}
|
||||
// y values increase from top to bottom
|
||||
// units of measure is dpi
|
||||
writePSString("72 %d div 72 -%d div scale\n", getJobData()->getXres(), getJobData()->getYres());
|
||||
writePSString("72 %d div 72 -%d div scale\n", getJobData()->getXres(),
|
||||
getJobData()->getYres());
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +192,7 @@ PSDriver::endDoc(bool)
|
||||
jobEnd();
|
||||
return true;
|
||||
}
|
||||
catch (TransportException &err) {
|
||||
catch (TransportException& err) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -192,13 +201,13 @@ PSDriver::endDoc(bool)
|
||||
inline uchar
|
||||
hex_digit(uchar value)
|
||||
{
|
||||
if (value <= 9) return '0'+value;
|
||||
else return 'a'+(value-10);
|
||||
if (value <= 9) return '0' + value;
|
||||
else return 'a' + (value - 10);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
PSDriver::nextBand(BBitmap *bitmap, BPoint *offset)
|
||||
PSDriver::nextBand(BBitmap* bitmap, BPoint* offset)
|
||||
{
|
||||
DBGMSG(("> nextBand\n"));
|
||||
|
||||
@@ -206,9 +215,9 @@ PSDriver::nextBand(BBitmap *bitmap, BPoint *offset)
|
||||
BRect bounds = bitmap->Bounds();
|
||||
|
||||
RECT rc;
|
||||
rc.left = (int)bounds.left;
|
||||
rc.top = (int)bounds.top;
|
||||
rc.right = (int)bounds.right;
|
||||
rc.left = (int)bounds.left;
|
||||
rc.top = (int)bounds.top;
|
||||
rc.right = (int)bounds.right;
|
||||
rc.bottom = (int)bounds.bottom;
|
||||
|
||||
int height = rc.bottom - rc.top + 1;
|
||||
@@ -238,36 +247,40 @@ PSDriver::nextBand(BBitmap *bitmap, BPoint *offset)
|
||||
|
||||
bool color = getJobData()->getColor() == JobData::kColor;
|
||||
int width = rc.right - rc.left + 1;
|
||||
int widthByte = (width + 7) / 8; /* byte boundary */
|
||||
int height = rc.bottom - rc.top + 1;
|
||||
int in_size = color ? width : widthByte;
|
||||
int out_size = color ? width * 6: widthByte * 2;
|
||||
int delta = bitmap->BytesPerRow();
|
||||
int widthByte = (width + 7) / 8;
|
||||
// byte boundary
|
||||
int height = rc.bottom - rc.top + 1;
|
||||
int in_size = color ? width : widthByte;
|
||||
int out_size = color ? width * 6: widthByte * 2;
|
||||
int delta = bitmap->BytesPerRow();
|
||||
|
||||
DBGMSG(("width = %d\n", width));
|
||||
DBGMSG(("widthByte = %d\n", widthByte));
|
||||
DBGMSG(("height = %d\n", height));
|
||||
DBGMSG(("out_size = %d\n", out_size));
|
||||
DBGMSG(("delta = %d\n", delta));
|
||||
DBGMSG(("renderobj->get_pixel_depth() = %d\n", fHalftone->getPixelDepth()));
|
||||
DBGMSG(("renderobj->get_pixel_depth() = %d\n",
|
||||
fHalftone->getPixelDepth()));
|
||||
|
||||
uchar *ptr = (uchar *)bitmap->Bits()
|
||||
uchar* ptr = static_cast<uchar*>(bitmap->Bits())
|
||||
+ rc.top * delta
|
||||
+ (rc.left * fHalftone->getPixelDepth()) / 8;
|
||||
|
||||
int compression_method;
|
||||
int compressed_size;
|
||||
const uchar *buffer;
|
||||
const uchar* buffer;
|
||||
|
||||
uchar *in_buffer = new uchar[in_size]; // gray values
|
||||
uchar *out_buffer = new uchar[out_size]; // gray values in hexadecimal
|
||||
uchar* in_buffer = new uchar[in_size];
|
||||
// gray values
|
||||
uchar* out_buffer = new uchar[out_size];
|
||||
// gray values in hexadecimal
|
||||
|
||||
auto_ptr<uchar> _in_buffer(in_buffer);
|
||||
auto_ptr<uchar> _out_buffer(out_buffer);
|
||||
|
||||
DBGMSG(("move\n"));
|
||||
|
||||
int size = color ? width*3 : in_size;
|
||||
int size = color ? width * 3 : in_size;
|
||||
startRasterGraphics(x, y, width, height, size);
|
||||
|
||||
for (int i = rc.top; i <= rc.bottom; i++) {
|
||||
@@ -313,23 +326,20 @@ PSDriver::nextBand(BBitmap *bitmap, BPoint *offset)
|
||||
|
||||
endRasterGraphics();
|
||||
|
||||
} else {
|
||||
} else
|
||||
DBGMSG(("band bitmap is clean.\n"));
|
||||
}
|
||||
|
||||
if (y >= page_height) {
|
||||
offset->x = -1.0;
|
||||
offset->y = -1.0;
|
||||
} else {
|
||||
} else
|
||||
offset->y += height;
|
||||
}
|
||||
|
||||
|
||||
DBGMSG(("< nextBand\n"));
|
||||
return true;
|
||||
}
|
||||
catch (TransportException &err) {
|
||||
BAlert *alert = new BAlert("", err.what(), "OK");
|
||||
catch (TransportException& err) {
|
||||
BAlert* alert = new BAlert("", err.what(), "OK");
|
||||
alert->Go();
|
||||
return false;
|
||||
}
|
||||
@@ -342,10 +352,15 @@ PSDriver::jobStart()
|
||||
// PostScript header
|
||||
writePSString("%%!PS-Adobe-3.0\n");
|
||||
writePSString("%%%%LanguageLevel: 1\n");
|
||||
writePSString("%%%%Title: %s\n", getSpoolMetaData()->getDescription().c_str());
|
||||
writePSString("%%%%Creator: %s\n", getSpoolMetaData()->getMimeType().c_str());
|
||||
writePSString("%%%%CreationDate: %s", getSpoolMetaData()->getCreationTime().c_str());
|
||||
writePSString("%%%%DocumentMedia: Plain %d %d white 0 ( )\n", getJobData()->getPaperRect().IntegerWidth(), getJobData()->getPaperRect().IntegerHeight());
|
||||
writePSString("%%%%Title: %s\n",
|
||||
getSpoolMetaData()->getDescription().c_str());
|
||||
writePSString("%%%%Creator: %s\n",
|
||||
getSpoolMetaData()->getMimeType().c_str());
|
||||
writePSString("%%%%CreationDate: %s",
|
||||
getSpoolMetaData()->getCreationTime().c_str());
|
||||
writePSString("%%%%DocumentMedia: Plain %d %d white 0 ( )\n",
|
||||
getJobData()->getPaperRect().IntegerWidth(),
|
||||
getJobData()->getPaperRect().IntegerHeight());
|
||||
writePSString("%%%%Pages: (atend)\n");
|
||||
writePSString("%%%%EndComments\n");
|
||||
|
||||
@@ -356,7 +371,8 @@ PSDriver::jobStart()
|
||||
|
||||
|
||||
void
|
||||
PSDriver::startRasterGraphics(int x, int y, int width, int height, int widthByte)
|
||||
PSDriver::startRasterGraphics(int x, int y, int width, int height,
|
||||
int widthByte)
|
||||
{
|
||||
bool color = getJobData()->getColor() == JobData::kColor;
|
||||
fCompressionMethod = -1;
|
||||
@@ -364,19 +380,17 @@ PSDriver::startRasterGraphics(int x, int y, int width, int height, int widthByte
|
||||
writePSString("/s %d string def\n", widthByte);
|
||||
writePSString("%d %d translate\n", x, y);
|
||||
writePSString("%d %d scale\n", width, height);
|
||||
if (color) {
|
||||
if (color)
|
||||
writePSString("%d %d 8\n", width, height); // 8 bpp
|
||||
} else {
|
||||
else
|
||||
writePSString("%d %d 1\n", width, height); // 1 bpp
|
||||
}
|
||||
writePSString("[%d 0 0 %d 0 0]\n", width, height);
|
||||
writePSString("{ currentfile s readhexstring pop }\n");
|
||||
if (color) {
|
||||
writePSString("false 3\n"); // single data source, 3 color components
|
||||
writePSString("colorimage\n");
|
||||
} else {
|
||||
} else
|
||||
writePSString("image\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -390,7 +404,7 @@ PSDriver::endRasterGraphics()
|
||||
void
|
||||
PSDriver::rasterGraphics(
|
||||
int compression_method,
|
||||
const uchar *buffer,
|
||||
const uchar* buffer,
|
||||
int size)
|
||||
{
|
||||
if (fCompressionMethod != compression_method) {
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
* PS.h
|
||||
* Copyright 1999-2000 Y.Takagi. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#ifndef __PS_H
|
||||
#define __PS_H
|
||||
|
||||
|
||||
#include "GraphicsDriver.h"
|
||||
|
||||
|
||||
@@ -15,35 +15,35 @@ class Halftone;
|
||||
|
||||
class PSDriver : public GraphicsDriver {
|
||||
public:
|
||||
PSDriver(BMessage *msg, PrinterData *printer_data, const PrinterCap *printer_cap);
|
||||
PSDriver(BMessage* msg, PrinterData* printer_data,
|
||||
const PrinterCap* printer_cap);
|
||||
|
||||
protected:
|
||||
virtual bool startDoc();
|
||||
virtual bool startPage(int page);
|
||||
virtual bool nextBand(BBitmap *bitmap, BPoint *offset);
|
||||
virtual bool endPage(int page);
|
||||
virtual bool endDoc(bool success);
|
||||
virtual bool startDoc();
|
||||
virtual bool startPage(int page);
|
||||
virtual bool nextBand(BBitmap* bitmap, BPoint* offset);
|
||||
virtual bool endPage(int page);
|
||||
virtual bool endDoc(bool success);
|
||||
|
||||
private:
|
||||
void setupCTM();
|
||||
void jobStart();
|
||||
void startRasterGraphics(int x, int y, int width, int height, int widthByte);
|
||||
void endRasterGraphics();
|
||||
void rasterGraphics(
|
||||
int compression_method,
|
||||
const uchar *buffer,
|
||||
int size);
|
||||
void jobEnd();
|
||||
void setupCTM();
|
||||
void jobStart();
|
||||
void startRasterGraphics(int x, int y, int width,
|
||||
int height, int widthByte);
|
||||
void endRasterGraphics();
|
||||
void rasterGraphics(int compression_method,
|
||||
const uchar* buffer, int size);
|
||||
void jobEnd();
|
||||
|
||||
void StartFilterIfNeeded();
|
||||
void FlushFilterIfNeeded();
|
||||
void writePSString(const char *format, ...);
|
||||
void writePSData(const void *data, size_t size);
|
||||
void StartFilterIfNeeded();
|
||||
void FlushFilterIfNeeded();
|
||||
void writePSString(const char* format, ...);
|
||||
void writePSData(const void* data, size_t size);
|
||||
|
||||
int fPrintedPages;
|
||||
int fCompressionMethod;
|
||||
Halftone *fHalftone;
|
||||
FilterIO *fFilterIO;
|
||||
int fPrintedPages;
|
||||
int fCompressionMethod;
|
||||
Halftone* fHalftone;
|
||||
FilterIO* fFilterIO;
|
||||
};
|
||||
|
||||
#endif /* __PS_H */
|
||||
#endif // __PS_H
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
* Copyright 1999-2000 Y.Takagi. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#include "PrinterData.h"
|
||||
|
||||
#include "PSCap.h"
|
||||
|
||||
#include "PrinterData.h"
|
||||
|
||||
#define TO72DPI(a) (a * 72.0f / 600.0f)
|
||||
|
||||
const PaperCap a3(
|
||||
@@ -66,11 +68,11 @@ const PaperCap legal(
|
||||
|
||||
const PaperSourceCap autobin("Auto", true, JobData::kAuto);
|
||||
|
||||
const ResolutionCap dpi300("300dpi", true, 300, 300);
|
||||
const ResolutionCap dpi600("600dpi", false, 600, 600);
|
||||
const ResolutionCap dpi300("300dpi", true, 300, 300);
|
||||
const ResolutionCap dpi600("600dpi", false, 600, 600);
|
||||
const ResolutionCap dpi1200("1200dpi", false, 1200, 1200);
|
||||
|
||||
const PaperCap *papers[] = {
|
||||
const PaperCap* papers[] = {
|
||||
&a4,
|
||||
&a3,
|
||||
&a5,
|
||||
@@ -80,11 +82,11 @@ const PaperCap *papers[] = {
|
||||
&legal
|
||||
};
|
||||
|
||||
const PaperSourceCap *papersources[] = {
|
||||
const PaperSourceCap* papersources[] = {
|
||||
&autobin,
|
||||
};
|
||||
|
||||
const ResolutionCap *resolutions[] = {
|
||||
const ResolutionCap* resolutions[] = {
|
||||
&dpi300,
|
||||
&dpi600,
|
||||
&dpi1200,
|
||||
@@ -93,57 +95,64 @@ const ResolutionCap *resolutions[] = {
|
||||
const ColorCap color("Color", false, JobData::kColor);
|
||||
const ColorCap monochrome("Monochrome", true, JobData::kMonochrome);
|
||||
|
||||
const ColorCap *colors[] = {
|
||||
const ColorCap* colors[] = {
|
||||
&color,
|
||||
&monochrome
|
||||
};
|
||||
|
||||
PSCap::PSCap(const PrinterData *printer_data)
|
||||
: PrinterCap(printer_data)
|
||||
PSCap::PSCap(const PrinterData* printer_data)
|
||||
:
|
||||
PrinterCap(printer_data)
|
||||
{
|
||||
}
|
||||
|
||||
int PSCap::countCap(CapID capid) const
|
||||
|
||||
int
|
||||
PSCap::countCap(CapID capid) const
|
||||
{
|
||||
switch (capid) {
|
||||
case kPaper:
|
||||
return sizeof(papers) / sizeof(papers[0]);
|
||||
case kPaperSource:
|
||||
return sizeof(papersources) / sizeof(papersources[0]);
|
||||
case kResolution:
|
||||
return sizeof(resolutions) / sizeof(resolutions[0]);
|
||||
case kColor:
|
||||
return sizeof(colors) / sizeof(colors[0]);
|
||||
default:
|
||||
return 0;
|
||||
case kPaper:
|
||||
return sizeof(papers) / sizeof(papers[0]);
|
||||
case kPaperSource:
|
||||
return sizeof(papersources) / sizeof(papersources[0]);
|
||||
case kResolution:
|
||||
return sizeof(resolutions) / sizeof(resolutions[0]);
|
||||
case kColor:
|
||||
return sizeof(colors) / sizeof(colors[0]);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
const BaseCap **PSCap::enumCap(CapID capid) const
|
||||
|
||||
const BaseCap**
|
||||
PSCap::enumCap(CapID capid) const
|
||||
{
|
||||
switch (capid) {
|
||||
case kPaper:
|
||||
return (const BaseCap **)papers;
|
||||
case kPaperSource:
|
||||
return (const BaseCap **)papersources;
|
||||
case kResolution:
|
||||
return (const BaseCap **)resolutions;
|
||||
case kColor:
|
||||
return (const BaseCap **)colors;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
case kPaper:
|
||||
return (const BaseCap **)papers;
|
||||
case kPaperSource:
|
||||
return (const BaseCap **)papersources;
|
||||
case kResolution:
|
||||
return (const BaseCap **)resolutions;
|
||||
case kColor:
|
||||
return (const BaseCap **)colors;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool PSCap::isSupport(CapID capid) const
|
||||
|
||||
bool
|
||||
PSCap::isSupport(CapID capid) const
|
||||
{
|
||||
switch (capid) {
|
||||
case kPaper:
|
||||
case kPaperSource:
|
||||
case kResolution:
|
||||
case kColor:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
case kPaper:
|
||||
case kPaperSource:
|
||||
case kResolution:
|
||||
case kColor:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,19 @@
|
||||
* PSCap.h
|
||||
* Copyright 1999-2000 Y.Takagi. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#ifndef __PSCAP_H
|
||||
#define __PSCAP_H
|
||||
|
||||
|
||||
#include "PrinterCap.h"
|
||||
|
||||
|
||||
class PSCap : public PrinterCap {
|
||||
public:
|
||||
PSCap(const PrinterData *printer_data);
|
||||
virtual int countCap(CapID) const;
|
||||
virtual bool isSupport(CapID) const;
|
||||
virtual const BaseCap **enumCap(CapID) const;
|
||||
PSCap(const PrinterData* printer_data);
|
||||
virtual int countCap(CapID) const;
|
||||
virtual bool isSupport(CapID) const;
|
||||
virtual const BaseCap **enumCap(CapID) const;
|
||||
};
|
||||
|
||||
#endif /* __PSCAP_H */
|
||||
#endif // __PSCAP_H
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
* Ithamar R. Adema <[email protected]>
|
||||
*/
|
||||
|
||||
|
||||
#include "PSData.h"
|
||||
|
||||
#include <Node.h>
|
||||
|
||||
#define PD_PPD_PATH "ps:ppd_path"
|
||||
|
||||
|
||||
void
|
||||
PSData::load()
|
||||
{
|
||||
@@ -19,6 +21,7 @@ PSData::load()
|
||||
fNode->ReadAttrString(PD_PPD_PATH, &fPPD);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PSData::save()
|
||||
{
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
* Authors:
|
||||
* Ithamar R. Adema <[email protected]>
|
||||
*/
|
||||
|
||||
#ifndef PSDATA_H
|
||||
#define PSDATA_H
|
||||
|
||||
|
||||
#include "PrinterData.h"
|
||||
|
||||
#include <String.h>
|
||||
|
||||
|
||||
@@ -18,14 +19,17 @@ class BNode;
|
||||
|
||||
class PSData : public PrinterData {
|
||||
public:
|
||||
PSData(BNode *node) : PrinterData(node) {}
|
||||
PSData(BNode* node)
|
||||
:
|
||||
PrinterData(node)
|
||||
{
|
||||
}
|
||||
|
||||
// PrinterData overrides
|
||||
virtual void load();
|
||||
virtual void save();
|
||||
virtual void load();
|
||||
virtual void save();
|
||||
|
||||
BString fPPD;
|
||||
};
|
||||
|
||||
|
||||
#endif /* PSDATA_H */
|
||||
#endif // PSDATA_H
|
||||
|
||||
@@ -5,72 +5,80 @@
|
||||
* Copyright 2010 Ithamar Adema.
|
||||
*/
|
||||
|
||||
#include "PS.h"
|
||||
#include "PSCap.h"
|
||||
#include "PSData.h"
|
||||
#include "PrinterDriver.h"
|
||||
#include "SelectPPDDlg.h"
|
||||
|
||||
#include <Entry.h>
|
||||
#include <Path.h>
|
||||
|
||||
#include "PrinterDriver.h"
|
||||
#include "PS.h"
|
||||
#include "PSCap.h"
|
||||
#include "PSData.h"
|
||||
#include "SelectPPDDlg.h"
|
||||
|
||||
|
||||
class PSPrinterDriver : public PrinterDriver {
|
||||
public:
|
||||
PSPrinterDriver(BNode *printerFolder) : PrinterDriver(printerFolder) {}
|
||||
|
||||
const char *GetSignature() const
|
||||
PSPrinterDriver(BNode* printerFolder)
|
||||
:
|
||||
PrinterDriver(printerFolder)
|
||||
{
|
||||
return "application/x-vnd.PS-compatible";
|
||||
}
|
||||
|
||||
const char *GetDriverName() const
|
||||
{
|
||||
return "PS compatible";
|
||||
}
|
||||
const char* GetSignature() const
|
||||
{
|
||||
return "application/x-vnd.PS-compatible";
|
||||
}
|
||||
|
||||
const char *GetVersion() const
|
||||
{
|
||||
return "0.1";
|
||||
}
|
||||
const char* GetDriverName() const
|
||||
{
|
||||
return "PS compatible";
|
||||
}
|
||||
|
||||
const char *GetCopyright() const
|
||||
{
|
||||
return "PS driver Copyright © 2003,04 Michael Pfeiffer.\n";
|
||||
}
|
||||
const char* GetVersion() const
|
||||
{
|
||||
return "0.1";
|
||||
}
|
||||
|
||||
char *AddPrinter(char *printerName)
|
||||
{
|
||||
BPath path;
|
||||
if (find_directory(B_SYSTEM_DATA_DIRECTORY, &path) == B_OK
|
||||
&& path.Append("ppd") == B_OK
|
||||
&& BEntry(path.Path()).Exists()) {
|
||||
SelectPPDDlg *dialog = new SelectPPDDlg(dynamic_cast<PSData*>(GetPrinterData()));
|
||||
if (dialog->Go() != B_OK)
|
||||
return NULL;
|
||||
}
|
||||
const char* GetCopyright() const
|
||||
{
|
||||
return "PS driver Copyright © 2003,04 Michael Pfeiffer.\n";
|
||||
}
|
||||
|
||||
return printerName;
|
||||
}
|
||||
char* AddPrinter(char *printerName)
|
||||
{
|
||||
BPath path;
|
||||
if (find_directory(B_SYSTEM_DATA_DIRECTORY, &path) == B_OK
|
||||
&& path.Append("ppd") == B_OK
|
||||
&& BEntry(path.Path()).Exists()) {
|
||||
SelectPPDDlg* dialog =
|
||||
new SelectPPDDlg(dynamic_cast<PSData*>
|
||||
(GetPrinterData()));
|
||||
if (dialog->Go() != B_OK)
|
||||
return NULL;
|
||||
}
|
||||
return printerName;
|
||||
}
|
||||
|
||||
PrinterData *InstantiatePrinterData(BNode *node)
|
||||
{
|
||||
return new PSData(node);
|
||||
}
|
||||
PrinterData* InstantiatePrinterData(BNode* node)
|
||||
{
|
||||
return new PSData(node);
|
||||
}
|
||||
|
||||
PrinterCap *InstantiatePrinterCap(PrinterData *printerData)
|
||||
{
|
||||
return new PSCap(printerData);
|
||||
}
|
||||
PrinterCap* InstantiatePrinterCap(PrinterData* printerData)
|
||||
{
|
||||
return new PSCap(printerData);
|
||||
}
|
||||
|
||||
GraphicsDriver *InstantiateGraphicsDriver(BMessage *settings, PrinterData *printerData, PrinterCap *printerCap)
|
||||
{
|
||||
return new PSDriver(settings, printerData, printerCap);
|
||||
}
|
||||
GraphicsDriver* InstantiateGraphicsDriver(BMessage* settings,
|
||||
PrinterData* printerData, PrinterCap* printerCap)
|
||||
{
|
||||
return new PSDriver(settings, printerData, printerCap);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
PrinterDriver *
|
||||
instantiate_printer_driver(BNode *printerFolder)
|
||||
instantiate_printer_driver(BNode* printerFolder)
|
||||
{
|
||||
return new PSPrinterDriver(printerFolder);
|
||||
}
|
||||
|
||||
@@ -6,23 +6,24 @@
|
||||
* Ithamar R. Adema <[email protected]>
|
||||
*/
|
||||
|
||||
|
||||
#include "SelectPPDDlg.h"
|
||||
#include "PPDParser.h"
|
||||
|
||||
#include <GroupLayout.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
|
||||
#include <Button.h>
|
||||
#include <Message.h>
|
||||
#include <ListView.h>
|
||||
#include <ScrollView.h>
|
||||
#include <ScrollBar.h>
|
||||
#include <StringItem.h>
|
||||
#include <Directory.h>
|
||||
#include <String.h>
|
||||
#include <Entry.h>
|
||||
#include <ListView.h>
|
||||
#include <Message.h>
|
||||
#include <Path.h>
|
||||
#include <ScrollBar.h>
|
||||
#include <ScrollView.h>
|
||||
#include <String.h>
|
||||
#include <StringItem.h>
|
||||
|
||||
#include "PPDParser.h"
|
||||
|
||||
enum {
|
||||
kMsgCancel = 'stop',
|
||||
@@ -35,15 +36,18 @@ enum {
|
||||
|
||||
class PPDStringItem : public BStringItem {
|
||||
public:
|
||||
PPDStringItem(const BString& text, const BString& path)
|
||||
: BStringItem(text.String()),
|
||||
fPPDPath(path) {}
|
||||
PPDStringItem(const BString& text, const BString& path)
|
||||
:
|
||||
BStringItem(text.String()),
|
||||
fPPDPath(path)
|
||||
{
|
||||
}
|
||||
|
||||
BString fPPDPath;
|
||||
BString fPPDPath;
|
||||
};
|
||||
|
||||
|
||||
SelectPPDDlg::SelectPPDDlg(PSData *data)
|
||||
SelectPPDDlg::SelectPPDDlg(PSData* data)
|
||||
: DialogWindow(BRect(10, 10, 400, 400),
|
||||
"Select PPD", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
|
||||
B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS),
|
||||
@@ -51,7 +55,8 @@ SelectPPDDlg::SelectPPDDlg(PSData *data)
|
||||
{
|
||||
SetResult(B_ERROR);
|
||||
|
||||
BButton *ok, *cancel;
|
||||
BButton* ok;
|
||||
BButton* cancel;
|
||||
|
||||
ok = new BButton("btn:ok", "OK", new BMessage(kMsgOK));
|
||||
ok->MakeDefault(true);
|
||||
@@ -60,11 +65,13 @@ SelectPPDDlg::SelectPPDDlg(PSData *data)
|
||||
|
||||
cancel = new BButton("btn:cancel", "Cancel", new BMessage(kMsgCancel));
|
||||
|
||||
BScrollView *manuScroller, *printerScroller;
|
||||
BScrollView* manuScroller, *printerScroller;
|
||||
fManufacturersListView = new BListView("olv:manufacturers");
|
||||
manuScroller=new BScrollView("scr:manufacturers", fManufacturersListView, 0, false, true);
|
||||
manuScroller = new BScrollView("scr:manufacturers", fManufacturersListView,
|
||||
0, false, true);
|
||||
fPrintersListView = new BListView("olv:printers");
|
||||
printerScroller=new BScrollView("scr:printers", fPrintersListView, 0, false, true);
|
||||
printerScroller = new BScrollView("scr:printers", fPrintersListView, 0,
|
||||
false, true);
|
||||
|
||||
fPrintersListView->SetSelectionMessage(new BMessage(kMsgPrinterSelected));
|
||||
fManufacturersListView->SetSelectionMessage(new BMessage(kMsgManuSelected));
|
||||
@@ -100,13 +107,14 @@ SelectPPDDlg::PopulateManufacturers(directory_which data_dir)
|
||||
&& path.Append("ppd") == B_OK
|
||||
&& dir.SetTo(path.Path()) == B_OK) {
|
||||
// Got the directory, now scan it
|
||||
while(dir.GetNextEntry(&entry) == B_OK)
|
||||
while (dir.GetNextEntry(&entry) == B_OK)
|
||||
if (entry.IsDirectory()
|
||||
&& entry.GetName(name) == B_OK)
|
||||
fManufacturersListView->AddItem(new BStringItem(name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SelectPPDDlg::PopulatePrinters(directory_which data_dir)
|
||||
{
|
||||
@@ -128,19 +136,21 @@ SelectPPDDlg::PopulatePrinters(directory_which data_dir)
|
||||
&& path.Append(manu) == B_OK
|
||||
&& dir.SetTo(path.Path()) == B_OK) {
|
||||
// Found manufacturer PPD directory, now fill our printer list
|
||||
while(dir.GetNextEntry(&entry) == B_OK)
|
||||
while (dir.GetNextEntry(&entry) == B_OK)
|
||||
if (entry.GetName(name) == B_OK) {
|
||||
PPDParser parser(dir,name);
|
||||
PPDParser parser(dir, name);
|
||||
if (parser.InitCheck() == B_OK) {
|
||||
BString modelName = parser.GetParameter("ModelName");
|
||||
BPath ppdPath = path;
|
||||
ppdPath.Append(name);
|
||||
fPrintersListView->AddItem(new PPDStringItem(modelName, ppdPath.Path()));
|
||||
fPrintersListView->AddItem(new PPDStringItem(modelName,
|
||||
ppdPath.Path()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SelectPPDDlg::PrinterSelected()
|
||||
{
|
||||
@@ -148,6 +158,7 @@ SelectPPDDlg::PrinterSelected()
|
||||
fOKButton->SetEnabled(idx >= 0);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SelectPPDDlg::Save()
|
||||
{
|
||||
@@ -156,35 +167,35 @@ SelectPPDDlg::Save()
|
||||
|
||||
idx = fPrintersListView->CurrentSelection();
|
||||
if (idx >= 0)
|
||||
ppdPath = dynamic_cast<PPDStringItem*>(fPrintersListView->ItemAt(idx))->fPPDPath;
|
||||
ppdPath = dynamic_cast<PPDStringItem*>
|
||||
(fPrintersListView->ItemAt(idx))->fPPDPath;
|
||||
|
||||
fPSData->fPPD = ppdPath;
|
||||
fPSData->save();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SelectPPDDlg::MessageReceived(BMessage *msg)
|
||||
SelectPPDDlg::MessageReceived(BMessage* msg)
|
||||
{
|
||||
switch (msg->what) {
|
||||
case kMsgManuSelected:
|
||||
fPrintersListView->MakeEmpty();
|
||||
PopulatePrinters(B_SYSTEM_DATA_DIRECTORY);
|
||||
break;
|
||||
case kMsgPrinterSelected:
|
||||
PrinterSelected();
|
||||
break;
|
||||
case kMsgOK:
|
||||
Save();
|
||||
SetResult(B_NO_ERROR);
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
break;
|
||||
|
||||
case kMsgCancel:
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
break;
|
||||
|
||||
default:
|
||||
DialogWindow::MessageReceived(msg);
|
||||
break;
|
||||
case kMsgManuSelected:
|
||||
fPrintersListView->MakeEmpty();
|
||||
PopulatePrinters(B_SYSTEM_DATA_DIRECTORY);
|
||||
break;
|
||||
case kMsgPrinterSelected:
|
||||
PrinterSelected();
|
||||
break;
|
||||
case kMsgOK:
|
||||
Save();
|
||||
SetResult(B_NO_ERROR);
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
break;
|
||||
case kMsgCancel:
|
||||
PostMessage(B_QUIT_REQUESTED);
|
||||
break;
|
||||
default:
|
||||
DialogWindow::MessageReceived(msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +1,33 @@
|
||||
#ifndef SELECTPPDDLG_H
|
||||
#define SELECTPPDDLG_H
|
||||
|
||||
|
||||
#include <storage/FindDirectory.h>
|
||||
|
||||
#include "DialogWindow.h"
|
||||
#include "PSData.h"
|
||||
|
||||
#include <storage/FindDirectory.h>
|
||||
|
||||
class BListView;
|
||||
class BButton;
|
||||
class PSData;
|
||||
|
||||
|
||||
class SelectPPDDlg : public DialogWindow {
|
||||
public:
|
||||
SelectPPDDlg(PSData *data);
|
||||
void MessageReceived(BMessage *msg);
|
||||
SelectPPDDlg(PSData* data);
|
||||
void MessageReceived(BMessage* msg);
|
||||
private:
|
||||
void PopulateManufacturers(directory_which data_dir);
|
||||
void PopulatePrinters(directory_which data_dir);
|
||||
void PrinterSelected();
|
||||
void Save();
|
||||
void PopulateManufacturers(directory_which data_dir);
|
||||
void PopulatePrinters(directory_which data_dir);
|
||||
void PrinterSelected();
|
||||
void Save();
|
||||
|
||||
BListView *fManufacturersListView;
|
||||
BListView *fPrintersListView;
|
||||
BButton *fOKButton;
|
||||
BListView* fManufacturersListView;
|
||||
BListView* fPrintersListView;
|
||||
BButton* fOKButton;
|
||||
|
||||
PSData *fPSData;
|
||||
PSData* fPSData;
|
||||
};
|
||||
|
||||
#endif /* SELECTPPDDLG_H */
|
||||
#endif // SELECTPPDDLG_H
|
||||
|
||||
Reference in New Issue
Block a user