JX Application Framework
|
#include <JXPTPrinter.h>
Public Types | |
enum | Destination { kPrintToPrinter = 0 , kPrintToFile = 1 } |
Public Member Functions | |
JXPTPrinter () | |
~JXPTPrinter () override | |
void | Print (const JString &text) override |
void | ReadXPTSetup (std::istream &input) |
void | WriteXPTSetup (std::ostream &output) const |
Destination | GetDestination () const |
void | SetDestination (const Destination dest, const JString &printCmd, const JString &fileName) |
const JString & | GetPrintCmd () const |
void | SetPrintCmd (const JString &cmd) |
const JString & | GetFileName () const |
void | SetFileName (const JString &name) |
bool | EditUserPageSetup () |
bool | ConfirmUserPrintSetup () |
![]() | |
JPTPrinter () | |
~JPTPrinter () override | |
void | ReadPTSetup (std::istream &input) |
void | WritePTSetup (std::ostream &output) const |
JSize | GetCopyCount () const |
void | SetCopyCount (const JSize count) |
JIndex | GetFirstPageToPrint () const |
void | SetFirstPageToPrint (const JIndex index) |
JIndex | GetLastPageToPrint () const |
void | SetLastPageToPrint (const JIndex index) |
bool | WillPrintAllPages () const |
void | PrintAllPages () |
bool | WillPrintReverseOrder () const |
void | ShouldPrintReverseOrder (const bool reverse) |
bool | WillPrintLineNumbers () const |
void | ShouldPrintLineNumbers (const bool print) |
JSize | GetPageWidth () const |
void | SetPageWidth (const JSize width) |
JSize | GetPageHeight () const |
void | SetPageHeight (const JSize height) |
JSize | GetTabWidth () const |
void | SetTabWidth (const JSize width) |
![]() | |
JPrinter () | |
~JPrinter () override | |
![]() | |
JBroadcaster () | |
virtual | ~JBroadcaster () |
JBroadcaster & | operator= (const JBroadcaster &source) |
bool | HasSenders () const |
JSize | GetSenderCount () const |
bool | HasRecipients () const |
JSize | GetRecipientCount () const |
virtual JString | ToString () const |
template<class T > | |
void | ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f) |
Protected Member Functions | |
virtual JXPTPageSetupDialog * | CreatePageSetupDialog (const JString &printCmd, const JSize pageWidth, const JSize pageHeight, const JSize minPageHeight, const bool printReverseOrder) |
virtual JXPTPrintSetupDialog * | CreatePrintSetupDialog (const Destination destination, const JString &printCmd, const JString &fileName, const bool printLineNumbers) |
![]() | |
bool | Print (const JString &text, std::ostream &output) |
virtual JSize | GetHeaderLineCount () const |
virtual JSize | GetFooterLineCount () const |
virtual void | PrintHeader (std::ostream &output, const JIndex pageIndex) |
virtual void | PrintFooter (std::ostream &output, const JIndex pageIndex) |
![]() | |
JBroadcaster (const JBroadcaster &source) | |
void | ListenTo (const JBroadcaster *sender) |
void | StopListening (const JBroadcaster *sender) |
void | ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember) |
void | StopListening (const JBroadcaster *sender, const std::type_info &messageType) |
template<class T > | |
void | Send (JBroadcaster *recipient, const T &message) |
template<class T > | |
void | Broadcast (const T &message) |
virtual void | Receive (JBroadcaster *sender, const Message &message) |
void | SendWithFeedback (JBroadcaster *recipient, Message *message) |
void | BroadcastWithFeedback (Message *message) |
virtual void | ReceiveWithFeedback (JBroadcaster *sender, Message *message) |
virtual void | ReceiveGoingAway (JBroadcaster *sender) |
This class implements the functions required to print plain text.
JXPTPrinter::JXPTPrinter | ( | ) |
|
override |
bool JXPTPrinter::ConfirmUserPrintSetup | ( | ) |
Displays a dialog with print setup information. Returns true if the user confirms printing.
|
protectedvirtual |
Derived class can override to create an extended dialog.
|
protectedvirtual |
Derived class can override to create an extended dialog.
bool JXPTPrinter::EditUserPageSetup | ( | ) |
Displays a dialog with page setup information. Returns true if the setup changed.
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Implements JPTPrinter.
void JXPTPrinter::ReadXPTSetup | ( | std::istream & | input | ) |
Automatically calls ReadPTSetup().
void JXPTPrinter::SetDestination | ( | const Destination | dest, |
const JString & | printCmd, | ||
const JString & | fileName | ||
) |
cmd and fileName can be empty. They are there to force the caller to consider them.
void JXPTPrinter::SetFileName | ( | const JString & | name | ) |
void JXPTPrinter::SetPrintCmd | ( | const JString & | cmd | ) |
void JXPTPrinter::WriteXPTSetup | ( | std::ostream & | output | ) | const |
Automatically calls WritePTSetup().