X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12f5e1e78fe906050ff2fee9529476db332633f0..bf06fbce415a5b923de735aae3fe306619268594:/interface/wx/cmndata.h diff --git a/interface/wx/cmndata.h b/interface/wx/cmndata.h index a90ac9457b..4f00278e74 100644 --- a/interface/wx/cmndata.h +++ b/interface/wx/cmndata.h @@ -12,7 +12,7 @@ This class holds a variety of information related to font dialogs. @library{wxcore} - @category{cmndlg} + @category{cmndlg,data} @see @ref overview_cmndlg_font, wxFont, wxFontDialog */ @@ -41,20 +41,20 @@ public: The default value is @true. */ - bool GetAllowSymbols(); + bool GetAllowSymbols() const; /** Gets the font chosen by the user if the user pressed OK (wxFontDialog::ShowModal() returned wxID_OK). */ - wxFont GetChosenFont(); + wxFont GetChosenFont() const; /** Gets the colour associated with the font dialog. The default value is black. */ - wxColour& GetColour(); + const wxColour& GetColour() const; /** Determines whether "effects" are enabled under Windows. This refers to @@ -63,20 +63,20 @@ public: The default value is @true. */ - bool GetEnableEffects(); + 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(); + wxFont GetInitialFont() const; /** Returns @true if the Help button will be shown (Windows only). The default value is @false. */ - bool GetShowHelp(); + bool GetShowHelp() const; /** Under Windows, determines whether symbol fonts can be selected. Has no @@ -122,7 +122,7 @@ public: /** Assignment operator for the font data. */ - void operator =(const wxFontData& data); + wxFontData& operator =(const wxFontData& data); }; @@ -137,7 +137,7 @@ public: stored by wxPageSetupDialogData). @library{wxcore} - @category{printing} + @category{printing,data} @see @ref overview_printing, wxPageSetupDialog */ @@ -152,17 +152,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). @@ -265,7 +265,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 @@ -315,7 +316,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 @@ -332,12 +333,12 @@ 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); + wxPageSetupDialogData& operator =(const wxPageSetupDialogData& data); }; @@ -348,7 +349,7 @@ public: This class holds a variety of information related to colour dialogs. @library{wxcore} - @category{cmndlg} + @category{cmndlg,data} @see wxColour, wxColourDialog, @ref overview_cmndlg_colour */ @@ -365,7 +366,7 @@ public: /** Destructor. */ - ~wxColourData(); + virtual ~wxColourData(); /** Under Windows, determines whether the Windows colour dialog will @@ -383,7 +384,7 @@ public: The default colour is black. */ - wxColour& GetColour() const; + wxColour& GetColour(); /** Returns custom colours associated with the colour dialog. @@ -393,7 +394,7 @@ public: that the user has saved. The default custom colours are invalid colours. */ - wxColour& GetCustomColour(int i) const; + wxColour GetCustomColour(int i) const; /** Under Windows, tells the Windows colour dialog to display the full @@ -402,7 +403,7 @@ public: The default value is @true. */ - void SetChooseFull(const bool flag); + void SetChooseFull(bool flag); /** Sets the default colour for the colour dialog. @@ -417,13 +418,27 @@ public: @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. */ - void operator =(const wxColourData& data); + wxColourData& operator =(const wxColourData& data); }; @@ -464,7 +479,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: @@ -496,7 +511,7 @@ enum wxPrintBin @endcode @library{wxcore} - @category{printing} + @category{printing,data} @see @ref overview_printing, wxPrintDialog, wxPageSetupDialog, wxPrintDialogData, wxPageSetupDialogData, @ref overview_cmndlg_print, @@ -518,7 +533,7 @@ public: /** Destructor. */ - ~wxPrintData(); + virtual ~wxPrintData(); /** Returns the current bin (papersource). By default, the system is left @@ -552,7 +567,7 @@ public: /** Gets the orientation. This can be wxLANDSCAPE or wxPORTRAIT. */ - int GetOrientation() const; + wxPrintOrientation GetOrientation() const; /** Returns the paper size id. @@ -565,7 +580,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, @@ -619,7 +634,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 @@ -653,7 +668,7 @@ public: /** Assigns print data to this object. */ - void operator =(const wxPrintData& data); + wxPrintData& operator =(const wxPrintData& data); }; @@ -666,7 +681,7 @@ public: settings. @library{wxcore} - @category{printing} + @category{printing,cmndlg,data} @see @ref overview_printing, wxPrintDialog, @ref overview_cmndlg_print */ @@ -681,17 +696,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. @@ -819,7 +834,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);