X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..f2b6dd8c508ddc1ebfee5b7d6e68a44b4e05a50f:/interface/wx/cmndata.h diff --git a/interface/wx/cmndata.h b/interface/wx/cmndata.h index 70c26781d1..ce9e92d1c6 100644 --- a/interface/wx/cmndata.h +++ b/interface/wx/cmndata.h @@ -1,136 +1,13 @@ ///////////////////////////////////////////////////////////////////////////// // Name: cmndata.h -// Purpose: interface of common wx*Data classes (font, colour, print) +// Purpose: interface of print wx*Data classes // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -/** - @class wxFontData - @wxheader{cmndata.h} - - This class holds a variety of information related to font dialogs. - - @library{wxcore} - @category{cmndlg} - - @see @ref overview_cmndlg_font, wxFont, wxFontDialog -*/ -class wxFontData : public wxObject -{ -public: - /** - Constructor. Initializes @e fontColour to black, @e showHelp to @false, - @e allowSymbols to @true, @e enableEffects to @true, @e minSize to 0 - and @e maxSize to 0. - */ - wxFontData(); - - /** - Enables or disables "effects" under Windows or generic only. This - refers to the controls for manipulating colour, strikeout and underline - properties. - - The default value is @true. - */ - void EnableEffects(bool enable); - - /** - Under Windows, returns a flag determining whether symbol fonts can be - selected. Has no effect on other platforms. - - The default value is @true. - */ - bool GetAllowSymbols(); - - /** - Gets the font chosen by the user if the user pressed OK - (wxFontDialog::ShowModal() returned wxID_OK). - */ - wxFont GetChosenFont(); - - /** - Gets the colour associated with the font dialog. - - The default value is black. - */ - wxColour& GetColour(); - - /** - Determines whether "effects" are enabled under Windows. This refers to - the controls for manipulating colour, strikeout and underline - properties. - - The default value is @true. - */ - bool GetEnableEffects(); - - /** - Gets the font that will be initially used by the font dialog. This - should have previously been set by the application. - */ - wxFont GetInitialFont(); - - /** - Returns @true if the Help button will be shown (Windows only). - - The default value is @false. - */ - bool GetShowHelp(); - - /** - Under Windows, determines whether symbol fonts can be selected. Has no - effect on other platforms. - - The default value is @true. - */ - void SetAllowSymbols(bool allowSymbols); - - /** - Sets the font that will be returned to the user (for internal use - only). - */ - void SetChosenFont(const wxFont& font); - - /** - Sets the colour that will be used for the font foreground colour. - - The default colour is black. - */ - void SetColour(const wxColour& colour); - - /** - Sets the font that will be initially used by the font dialog. - */ - void SetInitialFont(const wxFont& font); - - /** - Sets the valid range for the font point size (Windows only). - - The default is 0, 0 (unrestricted range). - */ - void SetRange(int min, int max); - - /** - Determines whether the Help button will be displayed in the font dialog - (Windows only). - - The default value is @false. - */ - void SetShowHelp(bool showHelp); - - /** - Assignment operator for the font data. - */ - void operator =(const wxFontData& data); -}; - - - /** @class wxPageSetupDialogData - @wxheader{cmndata.h} This class holds a variety of information related to wxPageSetupDialog. @@ -139,7 +16,7 @@ public: stored by wxPageSetupDialogData). @library{wxcore} - @category{printing} + @category{printing,data} @see @ref overview_printing, wxPageSetupDialog */ @@ -154,17 +31,17 @@ public: /** Copy constructor. */ - wxPageSetupDialogData(wxPageSetupDialogData& data); + wxPageSetupDialogData(const wxPageSetupDialogData& data); /** Construct an object from a print data object. */ - wxPageSetupDialogData(wxPrintData& printData); + wxPageSetupDialogData(const wxPrintData& printData); /** Destructor. */ - ~wxPageSetupDialogData(); + virtual ~wxPageSetupDialogData(); /** Enables or disables the "Help" button (Windows only). @@ -267,7 +144,8 @@ public: /** Returns a reference to the print data associated with this object. */ - wxPrintData GetPrintData(); + wxPrintData& GetPrintData(); + const wxPrintData& GetPrintData() const; /** Returns @true if the print data associated with the dialog data is @@ -317,7 +195,7 @@ public: @see wxPrintData::SetPaperId() */ - void SetPaperId(wxPaperSize& id); + void SetPaperId(wxPaperSize id); /** Sets the paper size in millimetres. If a corresponding paper id is @@ -334,103 +212,14 @@ public: /** Assigns print data to this object. */ - void operator =(const wxPrintData& data); + wxPageSetupDialogData& operator =(const wxPrintData& data); /** Assigns page setup data to this object. */ - void operator =(const wxPageSetupDialogData& data); -}; - - - -/** - @class wxColourData - @wxheader{cmndata.h} - - This class holds a variety of information related to colour dialogs. - - @library{wxcore} - @category{cmndlg} - - @see wxColour, wxColourDialog, @ref overview_cmndlg_colour -*/ -class wxColourData : public wxObject -{ -public: - /** - Constructor. Initializes the custom colours to @c wxNullColour, the - @e data colour setting to black, and the @e choose full setting to - @true. - */ - wxColourData(); - - /** - Destructor. - */ - ~wxColourData(); - - /** - Under Windows, determines whether the Windows colour dialog will - display the full dialog with custom colour selection controls. Under - PalmOS, determines whether colour dialog will display full rgb colour - picker or only available palette indexer. Has no meaning under other - platforms. - - The default value is @true. - */ - bool GetChooseFull() const; - - /** - Gets the current colour associated with the colour dialog. - - The default colour is black. - */ - wxColour& GetColour() const; - - /** - Returns custom colours associated with the colour dialog. - - @param i - An integer between 0 and 15, being any of the 15 custom colours - that the user has saved. The default custom colours are invalid - colours. - */ - wxColour& GetCustomColour(int i) const; - - /** - Under Windows, tells the Windows colour dialog to display the full - dialog with custom colour selection controls. Under other platforms, - has no effect. - - The default value is @true. - */ - void SetChooseFull(const bool flag); - - /** - Sets the default colour for the colour dialog. - - The default colour is black. - */ - void SetColour(const wxColour& colour); - - /** - Sets custom colours for the colour dialog. - - @param i - An integer between 0 and 15 for whatever custom colour you want to - set. The default custom colours are invalid colours. - */ - void SetCustomColour(int i, const wxColour& colour); - - /** - Assignment operator for the colour data. - */ - void operator =(const wxColourData& data); + wxPageSetupDialogData& operator =(const wxPageSetupDialogData& data); }; - - /** Enumeration of various printer bin sources. @@ -459,7 +248,6 @@ enum wxPrintBin /** @class wxPrintData - @wxheader{cmndata.h} This class holds a variety of information related to printers and printer device contexts. This class is used to create a wxPrinterDC and a @@ -468,7 +256,7 @@ enum wxPrintBin between the print dialogs and the application. @remarks - + The following functions are specific to PostScript printing and have not yet been documented: @@ -483,7 +271,6 @@ enum wxPrintBin long GetPrinterTranslateX() const ; long GetPrinterTranslateY() const ; // wxPRINT_MODE_PREVIEW, wxPRINT_MODE_FILE, wxPRINT_MODE_PRINTER - wxPrintMode GetPrintMode() const ; void SetPrinterCommand(const wxString& command) ; void SetPrinterOptions(const wxString& options) ; @@ -496,11 +283,10 @@ enum wxPrintBin void SetPrinterTranslateX(long x) ; void SetPrinterTranslateY(long y) ; void SetPrinterTranslation(long x, long y) ; - void SetPrintMode(wxPrintMode printMode) ; @endcode @library{wxcore} - @category{printing} + @category{printing,data} @see @ref overview_printing, wxPrintDialog, wxPageSetupDialog, wxPrintDialogData, wxPageSetupDialogData, @ref overview_cmndlg_print, @@ -522,7 +308,7 @@ public: /** Destructor. */ - ~wxPrintData(); + virtual ~wxPrintData(); /** Returns the current bin (papersource). By default, the system is left @@ -556,7 +342,7 @@ public: /** Gets the orientation. This can be wxLANDSCAPE or wxPORTRAIT. */ - int GetOrientation() const; + wxPrintOrientation GetOrientation() const; /** Returns the paper size id. @@ -569,7 +355,7 @@ public: Returns the printer name. If the printer name is the empty string, it indicates that the default printer should be used. */ - const wxString GetPrinterName() const; + const wxString& GetPrinterName() const; /** Returns the current print quality. This can be a positive integer, @@ -623,7 +409,7 @@ public: /** Sets the orientation. This can be wxLANDSCAPE or wxPORTRAIT. */ - void SetOrientation(int orientation); + void SetOrientation(wxPrintOrientation orientation); /** Sets the paper id. This indicates the type of paper to be used. For a @@ -657,21 +443,27 @@ public: /** Assigns print data to this object. */ - void operator =(const wxPrintData& data); + wxPrintData& operator =(const wxPrintData& data); + + + wxString GetFilename() const; + void SetFilename( const wxString &filename ); + + wxPrintMode GetPrintMode() const ; + void SetPrintMode(wxPrintMode printMode) ; }; /** @class wxPrintDialogData - @wxheader{cmndata.h} This class holds information related to the visual characteristics of wxPrintDialog. It contains a wxPrintData object with underlying printing settings. @library{wxcore} - @category{printing} + @category{printing,cmndlg,data} @see @ref overview_printing, wxPrintDialog, @ref overview_cmndlg_print */ @@ -686,17 +478,17 @@ public: /** Copy constructor. */ - wxPrintDialogData(wxPrintDialogData& dialogData); + wxPrintDialogData(const wxPrintDialogData& dialogData); /** Construct an object from a print dialog data object. */ - wxPrintDialogData(wxPrintData& printData); + wxPrintDialogData(const wxPrintData& printData); /** Destructor. */ - ~wxPrintDialogData(); + virtual ~wxPrintDialogData(); /** Enables or disables the "Help" button. @@ -824,7 +616,7 @@ public: Determines whether the dialog to be shown will be the Print dialog (pass @false) or Print Setup dialog (pass @true). - + */ void SetSetupDialog(bool flag);