X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c99e2fd1b3432974b892be508c0757da5b6ad49..b09857ae000a60704207d63290be937584805fb0:/interface/wx/cmndata.h diff --git a/interface/wx/cmndata.h b/interface/wx/cmndata.h index 81c8a126b5..76de88a0b4 100644 --- a/interface/wx/cmndata.h +++ b/interface/wx/cmndata.h @@ -1,132 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // 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 - - This class holds a variety of information related to font dialogs. - - @library{wxcore} - @category{cmndlg,data} - - @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() const; - - /** - Gets the font chosen by the user if the user pressed OK - (wxFontDialog::ShowModal() returned wxID_OK). - */ - wxFont GetChosenFont() const; - - /** - Gets the colour associated with the font dialog. - - The default value is black. - */ - const wxColour& GetColour() const; - - /** - 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() const; - - /** - Gets the font that will be initially used by the font dialog. This - should have previously been set by the application. - */ - wxFont GetInitialFont() const; - - /** - Returns @true if the Help button will be shown (Windows only). - - The default value is @false. - */ - bool GetShowHelp() const; - - /** - 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. - */ - wxFontData& operator =(const wxFontData& data); -}; - - - /** @class wxPageSetupDialogData @@ -341,108 +220,6 @@ public: wxPageSetupDialogData& operator =(const wxPageSetupDialogData& data); }; - - -/** - @class wxColourData - - This class holds a variety of information related to colour dialogs. - - @library{wxcore} - @category{cmndlg,data} - - @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. - */ - virtual ~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(); - - /** - 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(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. - @param colour - The colour to set - */ - void SetCustomColour(int i, const wxColour& colour); - - /** - Converts the colours saved in this class in a string form, separing - the various colours with a comma. - */ - wxString ToString() const; - - /** - Decodes the given string, which should be in the same format returned - by ToString(), and sets the internal colours. - */ - bool FromString(const wxString& str); - - /** - Assignment operator for the colour data. - */ - wxColourData& operator =(const wxColourData& data); -}; - - - /** Enumeration of various printer bin sources. @@ -478,38 +255,6 @@ enum wxPrintBin wxPageSetupDialogData, as part of the mechanism for transferring data between the print dialogs and the application. - @remarks - - The following functions are specific to PostScript printing and have not - yet been documented: - - @code - const wxString& GetPrinterCommand() const ; - const wxString& GetPrinterOptions() const ; - const wxString& GetPreviewCommand() const ; - const wxString& GetFilename() const ; - const wxString& GetFontMetricPath() const ; - double GetPrinterScaleX() const ; - double GetPrinterScaleY() const ; - 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) ; - void SetPreviewCommand(const wxString& command) ; - void SetFilename(const wxString& filename) ; - void SetFontMetricPath(const wxString& path) ; - void SetPrinterScaleX(double x) ; - void SetPrinterScaleY(double y) ; - void SetPrinterScaling(double x, double y) ; - void SetPrinterTranslateX(long x) ; - void SetPrinterTranslateY(long y) ; - void SetPrinterTranslation(long x, long y) ; - void SetPrintMode(wxPrintMode printMode) ; - @endcode - @library{wxcore} @category{printing,data} @@ -567,7 +312,7 @@ public: /** Gets the orientation. This can be wxLANDSCAPE or wxPORTRAIT. */ - int GetOrientation() const; + wxPrintOrientation GetOrientation() const; /** Returns the paper size id. @@ -634,7 +379,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 @@ -669,6 +414,13 @@ public: Assigns print data to this object. */ wxPrintData& operator =(const wxPrintData& data); + + + wxString GetFilename() const; + void SetFilename( const wxString &filename ); + + wxPrintMode GetPrintMode() const ; + void SetPrintMode(wxPrintMode printMode) ; };