Initial review of various [q-r] by Utensil Candel.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2008-05-04 09:04:38 +00:00
parent 7bf6f523e7
commit 3ed3a1c846
11 changed files with 470 additions and 319 deletions

View File

@@ -27,7 +27,7 @@
@beginEventTable{wxCommandEvent}
@event{EVT_RADIOBOX(id, func)}
Process a wxEVT_COMMAND_RADIOBOX_SELECTED event, when a radiobutton
Process a @c wxEVT_COMMAND_RADIOBOX_SELECTED event, when a radiobutton
is clicked.
@endEventTable
@@ -40,30 +40,37 @@
class wxRadioBox : public wxControl, wxItemContainerImmutable
{
public:
//@{
/**
Default constructor.
@see Create(), wxValidator
*/
wxRadioBox();
/**
Constructor, creating and showing a radiobox.
@param parent
Parent window. Must not be @NULL.
@param id
Window identifier. The value wxID_ANY indicates a default value.
Window identifier. The value @c wxID_ANY indicates a default value.
@param label
Label for the static box surrounding the radio buttons.
@param pos
Window position. If wxDefaultPosition is specified then a default
position is chosen.
Window position. If @c wxDefaultPosition is specified then a
default position is chosen.
@param size
Window size. If wxDefaultSize is specified then a default size
is chosen.
Window size. If @c wxDefaultSize is specified then a default size
is chosen.
@param n
Number of choices with which to initialize the radiobox.
@param choices
An array of choices with which to initialize the radiobox.
@param majorDimension
Specifies the maximum number of rows (if style contains wxRA_SPECIFY_ROWS)
or columns (if style contains wxRA_SPECIFY_COLS) for a two-dimensional
radiobox.
Specifies the maximum number of rows (if style contains
@c wxRA_SPECIFY_ROWS) or columns (if style contains
@c wxRA_SPECIFY_COLS) for a two-dimensional radiobox.
@param style
Window style. See wxRadioBox.
@param validator
@@ -73,10 +80,9 @@ public:
@see Create(), wxValidator
*/
wxRadioBox();
wxRadioBox(wxWindow* parent, wxWindowID id,
const wxString& label,
const wxPoint& point = wxDefaultPosition,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0,
const wxString choices[] = NULL,
@@ -84,30 +90,59 @@ public:
long style = wxRA_SPECIFY_COLS,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "radioBox");
/**
Constructor, creating and showing a radiobox.
@param parent
Parent window. Must not be @NULL.
@param id
Window identifier. The value @c wxID_ANY indicates a default value.
@param label
Label for the static box surrounding the radio buttons.
@param pos
Window position. If @c wxDefaultPosition is specified then a
default position is chosen.
@param size
Window size. If @c wxDefaultSize is specified then a default size
is chosen.
@param choices
An array of choices with which to initialize the radiobox.
@param majorDimension
Specifies the maximum number of rows (if style contains
@c wxRA_SPECIFY_ROWS) or columns (if style contains
@c wxRA_SPECIFY_COLS) for a two-dimensional radiobox.
@param style
Window style. See wxRadioBox.
@param validator
Window validator.
@param name
Window name.
@see Create(), wxValidator
*/
wxRadioBox(wxWindow* parent, wxWindowID id,
const wxString& label,
const wxPoint& point,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
int majorDimension = 0,
long style = wxRA_SPECIFY_COLS,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "radioBox");
//@}
/**
Destructor, destroying the radiobox item.
*/
~wxRadioBox();
//@{
/**
Creates the radiobox for two-step construction. See wxRadioBox()
for further details.
*/
bool Create(wxWindow* parent, wxWindowID id,
const wxString& label,
const wxPoint& point = wxDefaultPosition,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0,
const wxString choices[] = NULL,
@@ -115,18 +150,21 @@ public:
long style = wxRA_SPECIFY_COLS,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "radioBox");
/**
Creates the radiobox for two-step construction. See wxRadioBox()
for further details.
*/
bool Create(wxWindow* parent, wxWindowID id,
const wxString& label,
const wxPoint& point,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
int majorDimension = 0,
long style = wxRA_SPECIFY_COLS,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "radioBox");
//@}
//@{
/**
Enables or disables an individual button in the radiobox.
@@ -135,11 +173,20 @@ public:
@param n
The zero-based button to enable or disable.
@see wxWindow::Enable
@see wxWindow::Enable()
@beginWxPythonOnly
In place of a single overloaded method name, wxPython implements the following methods:
@beginTable
@row2col{Enable(flag), Enables or disables the entire radiobox.}
@row2col{EnableItem(n\, flag), Enables or disables an individual button in the radiobox.}
@endTable
@endWxPythonOnly
*/
virtual bool Enable(bool enable = true);
virtual bool Enable(unsigned int n, bool enable = true);
//@}
/**
Finds a button matching the given string, returning the position if found, or
@@ -178,48 +225,21 @@ public:
/**
Returns the tooltip associated with the specified @a item if any or @NULL.
@see SetItemToolTip(), wxWindow::GetToolTip
@see SetItemToolTip(), wxWindow::GetToolTip()
*/
wxToolTip* GetItemToolTip(unsigned int item) const;
/**
Returns the radiobox label.
@param n
The zero-based button index.
@see SetLabel()
*/
wxString GetLabel() const;
/**
Returns the number of rows in the radiobox.
*/
unsigned int GetRowCount() const;
/**
Returns the zero-based position of the selected button.
*/
int GetSelection() const;
/**
Returns the label for the button at the given position.
@param n
The zero-based button position.
*/
wxString GetString(unsigned int n) const;
/**
Returns the selected string.
*/
wxString GetStringSelection() const;
/**
Returns @true if the item is enabled or @false if it was disabled using
@ref enable() "Enable(n, @false)".
@b Platform note: Currently only implemented in wxMSW, wxGTK and wxUniversal
and always returns @true in the other ports.
@ref Enable(unsigned int,bool) "Enable(n, false)".
This function is currently only implemented in wxMSW, wxGTK and
wxUniversal and always returns @true in the other ports.
@param n
The zero-based button position.
@@ -228,13 +248,13 @@ public:
/**
Returns @true if the item is currently shown or @false if it was hidden
using
@ref show() "Show(n, @false)".
using @ref Show(unsigned int,bool) "Show(n, false)".
Note that this function returns @true for an item which hadn't been hidden
even
if the entire radiobox is not currently shown.
@b Platform note: Currently only implemented in wxMSW, wxGTK and wxUniversal
and always returns @true in the other ports.
even if the entire radiobox is not currently shown.
This function is currently only implemented in wxMSW, wxGTK and
wxUniversal and always returns @true in the other ports.
@param n
The zero-based button position.
@@ -255,45 +275,44 @@ public:
/**
Sets the tooltip text for the specified item in the radio group.
@b Platform note: Currently only implemented in wxMSW and wxGTK2 and does
nothing in the other ports.
This function is currently only implemented in wxMSW and wxGTK2 and
does nothing in the other ports.
@param item
Index of the item the tooltip will be shown for.
@param text
Tooltip text for the item, the tooltip is removed if empty.
@see GetItemToolTip(), wxWindow::SetToolTip
@see GetItemToolTip(), wxWindow::SetToolTip()
*/
void SetItemToolTip(unsigned int item, const wxString& text);
/**
Sets the radiobox label.
Shows or hides individual buttons.
@param show
@true to show, @false to hide.
@param item
The zero-based position of the button to show or hide.
@return
@true if the item has been shown or hidden or @false if nothing
was done because it already was in the requested state.
@see
wxWindow::Show()
@beginWxPythonOnly
In place of a single overloaded method name, wxPython implements the following methods:
@beginTable
@row2col{Show(flag), Shows or hides the entire radiobox.}
@row2col{ShowItem(n\, flag), Shows or hides individual buttons.}
@endTable
@endWxPythonOnly
@param label
The label to set.
@param n
The zero-based button index.
*/
void SetLabel(const wxString& label);
/**
Sets a button by passing the desired string position. This does not cause
a wxEVT_COMMAND_RADIOBOX_SELECTED event to get emitted.
@param n
The zero-based button position.
*/
void SetSelection(int n);
/**
Sets the selection to a button by passing the desired string. This does not
cause
a wxEVT_COMMAND_RADIOBOX_SELECTED event to get emitted.
@param string
The label of the button to select.
*/
void SetStringSelection(const wxString& string);
virtual bool Show(unsigned int item, const bool show = true);
};