/**
Get string client data.
*/
- const wxString GetData() const;
+ const wxString& GetData() const;
/**
Set string client data.
Initializes the object and calls Create() with all the parameters.
*/
wxColourPickerCtrl(wxWindow* parent, wxWindowID id,
- const wxColour& colour = wxBLACK,
+ const wxColour& colour = *wxBLACK,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCLRP_DEFAULT_STYLE,
creation failed.
*/
bool Create(wxWindow* parent, wxWindowID id,
- const wxColour& colour = wxBLACK,
+ const wxColour& colour = *wxBLACK,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCLRP_DEFAULT_STYLE,
Must be supplied for the command processor to display the command
name in the application's edit menu.
*/
- wxCommand(bool canUndo = false, const wxString& name = NULL);
+ wxCommand(bool canUndo = false, const wxString& name = wxEmptyString);
/**
Destructor.
processor that the action is not undoable and should not be
added to the command history.
*/
- bool Do();
+ virtual bool Do();
/**
Returns the command name.
How you implement this command is totally application dependent, but
typical strategies include:
-
+
- Perform an inverse operation on the last modified piece of data in
the document. When redone, a copy of data stored in command is pasted
back or some operation reapplied. This relies on the fact that you
processor that the action is not redoable and no change should
be made to the command history.
*/
- bool Undo();
+ virtual bool Undo();
};
The default value is black.
*/
- wxColour& GetColour();
+ const wxColour& GetColour() const;
/**
Determines whether "effects" are enabled under Windows. This refers to
/**
Assignment operator for the font data.
*/
- void operator =(const wxFontData& data);
+ wxFontData& operator =(const wxFontData& data);
};
/**
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.
/**
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
@see wxPrintData::SetPaperId()
*/
- void SetPaperId(wxPaperSize& id);
+ void SetPaperId(wxPaperSize id);
/**
Sets the paper size in millimetres. If a corresponding paper id is
/**
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);
};
The default value is @true.
*/
- void SetChooseFull(const bool flag);
+ void SetChooseFull(bool flag);
/**
Sets the default colour for the colour dialog.
/**
Assignment operator for the colour data.
*/
- void operator =(const wxColourData& data);
+ wxColourData& operator =(const wxColourData& data);
/** @todo document these */
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,
/**
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.
/**
Returns the colour data associated with the colour dialog.
*/
- wxColourData GetColourData();
+ wxColourData& GetColourData();
/**
Shows the dialog, returning wxID_OK if the user pressed OK, and
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
+
+
+/**
+ Flags for wxColour -> wxString conversion (see wxColour::GetAsString).
+
+ @{
+*/
+#define wxC2S_NAME 1 //!< Return colour name, when possible.
+#define wxC2S_CSS_SYNTAX 2 //!< Return colour in rgb(r,g,b) syntax.
+#define wxC2S_HTML_SYNTAX 4 //!< Return colour in #rrggbb syntax.
+
+//@}
+
+
/**
@class wxColour
/**
Converts this colour to a wxString using the given flags.
- The supported flags are wxC2S_NAME, to obtain the colour name (e.g.
- wxColour(255,0,0) == "red"), wxC2S_CSS_SYNTAX, to obtain the colour in
- the "rgb(r,g,b)" or "rgba(r,g,b,a)" syntax (e.g.
- wxColour(255,0,0,85) == "rgba(255,0,0,0.333)"), and wxC2S_HTML_SYNTAX,
- to obtain the colour as "#" followed by 6 hexadecimal digits (e.g.
- wxColour(255,0,0) == "#FF0000").
+ The supported flags are @c wxC2S_NAME, to obtain the colour name
+ (e.g. wxColour(255,0,0) == "red"), @c wxC2S_CSS_SYNTAX, to obtain
+ the colour in the "rgb(r,g,b)" or "rgba(r,g,b,a)" syntax
+ (e.g. wxColour(255,0,0,85) == "rgba(255,0,0,0.333)"), and
+ @c wxC2S_HTML_SYNTAX, to obtain the colour as "#" followed by 6
+ hexadecimal digits (e.g. wxColour(255,0,0) == "#FF0000").
This function never fails and always returns a non-empty string but
asserts if the colour has alpha channel (i.e. is non opaque) but
- wxC2S_CSS_SYNTAX (which is the only one supporting alpha) is not
+ @c wxC2S_CSS_SYNTAX (which is the only one supporting alpha) is not
specified in flags.
@since 2.7.0
*/
- wxString GetAsString(long flags);
+ virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const;
/**
- Returns a pixel value which is platform-dependent. On Windows, a COLORREF is
- returned.
+ Returns a pixel value which is platform-dependent.
+ On Windows, a COLORREF is returned.
On X, an allocated pixel value is returned.
- -1 is returned if the pixel is invalid (on X, unallocated).
+ If the pixel is invalid (on X, unallocated), @c -1 is returned.
*/
- long GetPixel() const;
+ int GetPixel() const;
/**
Returns the green intensity.
Tests the inequality of two colours by comparing individual red, green, blue
colours and alpha values.
*/
- bool operator !=(const wxColour& colour);
+ bool operator !=(const wxColour& colour) const;
//@{
/**
Tests the equality of two colours by comparing individual red, green, blue
colours and alpha values.
*/
- bool operator ==(const wxColour& colour);
+ bool operator ==(const wxColour& colour) const;
};
@see Create(), wxValidator
*/
- wxComboCtrl(wxWindow* parent, wxWindowID id,
- const wxString& value = "",
+ wxComboCtrl(wxWindow* parent, wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
should call or replace this function. See wxComboCtrl() for further
details.
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& value = "",
+ bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
@return A reference to the disabled state bitmap.
*/
- const wxBitmap GetBitmapDisabled() const;
+ const wxBitmap& GetBitmapDisabled() const;
/**
Returns button mouse hover bitmap that has been set with
@return A reference to the mouse hover state bitmap.
*/
- const wxBitmap GetBitmapHover() const;
+ const wxBitmap& GetBitmapHover() const;
/**
Returns default button bitmap that has been set with
@return A reference to the normal state bitmap.
*/
- const wxBitmap GetBitmapNormal() const;
+ const wxBitmap& GetBitmapNormal() const;
/**
Returns depressed button bitmap that has been set with
@return A reference to the depressed state bitmap.
*/
- const wxBitmap GetBitmapPressed() const;
+ const wxBitmap& GetBitmapPressed() const;
/**
Returns current size of the dropdown button.
Returns area covered by the text field (includes everything except
borders and the dropdown button).
*/
- const wxRect GetTextRect() const;
+ const wxRect& GetTextRect() const;
/**
Returns text representation of the current value. For writable combo
const wxString& vendorName = wxEmptyString,
const wxString& localFilename = wxEmptyString,
const wxString& globalFilename = wxEmptyString,
- long style = 0,
- const wxMBConv& conv = wxConvAuto());
+ long style = 0);
/**
Empty but ensures that dtor of all derived classes is virtual.
/**
Returns the control's label without mnemonics.
*/
- const wxString GetLabelText();
+ wxString GetLabelText() const;
/**
Returns the given @a label string without mnemonics.
@since 2.7.0
*/
- virtual bool ShowHelpAtPoint(wxWindowBase* window, const wxPoint point,
- wxHelpEvent::Origin origin);
+ virtual bool ShowHelpAtPoint(wxWindowBase* window, const wxPoint& point,
+ wxHelpEvent::Origin origin);
};
/**
Puts the application into context-sensitive help mode. @a window is the
window which will be used to catch events; if @NULL, the top window
- will be used. Returns @true if the application was successfully put
- into context-sensitive help mode. This function only returns when the
- event loop has finished.
+ will be used.
+
+ Returns @true if the application was successfully put into
+ context-sensitive help mode.
+ This function only returns when the event loop has finished.
*/
- bool BeginContextHelp(wxWindow* window = NULL);
+ bool BeginContextHelp(wxWindow* window);
/**
Ends context-sensitive help mode. Not normally called by the
class wxContextHelpButton : public wxBitmapButton
{
public:
- /// Default constructor.
- wxContextHelpButton();
-
/**
Constructor, creating and showing a context help button.