Padre-Plugin-WxWidgets
view release on metacpan or search on metacpan
share/doc/wxwidgets.pod view on Meta::CPAN
Default constructor.
wxComboCtrl(wxWindow* parent, wxWindowID id, const wxString& value =
"", const wxPoint& pos = wxDefaultPosition, const wxSize& size =
wxDefaultSize, long style = 0, const wxValidator& validator =
wxDefaultValidator, const wxString& name = "comboCtrl")
Constructor, creating and showing a combo control.
Parameters
parent
Parent window. Must not be NULL.
id
Window identifier. A value of -1 indicates a default value.
value
Initial selection string. An empty string indicates no selection.
pos
Window position.
size
Window size. If the default size (-1, -1) is specified then the
window is sized appropriately.
style
Window style. See wxComboCtrl.
validator
Window validator.
name
Window name.
See also
wxComboCtrl::Create, wxValidator
=head2 Wx::ComboCtrl::DESTROY
~wxComboCtrl()
Destructor, destroying the combo control.
=head2 Wx::ComboCtrl::AnimateShow
virtual bool AnimateShow(const wxRect& rect, int flags)
This member function is not normally called in application code.
Instead, it can be implemented in a derived class to create a custom
popup animation.
Parameters
Same as in DoShowPopup.
Return value
true if animation finishes before the function returns. false
otherwise. In the latter case you need to manually call DoShowPopup
after the animation ends.
=head2 Wx::ComboCtrl::Create
bool Create(wxWindow* parent, wxWindowID id, const wxString& value =
"", const wxPoint& pos = wxDefaultPosition, const wxSize& size =
wxDefaultSize, long style = 0, const wxValidator& validator =
wxDefaultValidator, const wxString& name = "comboCtrl")
Creates the combo control for two-step construction. Derived classes
should call or replace this function. See wxComboCtrl::wxComboCtrl for
further details.
=head2 Wx::ComboCtrl::Copy
void Copy()
Copies the selected text to the clipboard.
=head2 Wx::ComboCtrl::Cut
void Cut()
Copies the selected text to the clipboard and removes the selection.
=head2 Wx::ComboCtrl::DoSetPopupControl
void DoSetPopupControl(wxComboPopup* popup)
This member function is not normally called in application code.
Instead, it can be implemented in a derived class to return default
wxComboPopup, incase popup is NULL.
Note: If you have implemented OnButtonClick to do something else than
show the popup, then DoSetPopupControl must always return NULL.
=head2 Wx::ComboCtrl::DoShowPopup
virtual void DoShowPopup(const wxRect& rect, int flags)
This member function is not normally called in application code.
Instead, it must be called in a derived class to make sure popup is
properly shown after a popup animation has finished (but only if
AnimateShow did not finish the animation within it's function scope).
Parameters
rect
Position to show the popup window at, in screen coordinates.
flags
Combination of any of the following:
=head2 Wx::ComboCtrl::EnablePopupAnimation
void EnablePopupAnimation(bool enable = true)
Enables or disables popup animation, if any, depending on the value of
the argument.
=head2 Wx::ComboCtrl::GetBitmapDisabled
const wxBitmap& GetBitmapDisabled() const
Returns disabled button bitmap that has been set with SetButtonBitmaps.
Return value
A reference to the disabled state bitmap.
=head2 Wx::ComboCtrl::GetBitmapHover
const wxBitmap& GetBitmapHover() const
Returns button mouse hover bitmap that has been set with
SetButtonBitmaps.
Return value
A reference to the mouse hover state bitmap.
=head2 Wx::ComboCtrl::GetBitmapNormal
const wxBitmap& GetBitmapNormal() const
Returns default button bitmap that has been set with SetButtonBitmaps.
Return value
A reference to the normal state bitmap.
=head2 Wx::ComboCtrl::GetBitmapPressed
const wxBitmap& GetBitmapPressed() const
Returns depressed button bitmap that has been set with
SetButtonBitmaps.
Return value
A reference to the depressed state bitmap.
=head2 Wx::ComboCtrl::GetButtonSize
wxSize GetButtonSize()
Returns current size of the dropdown button.
=head2 Wx::ComboCtrl::GetCustomPaintWidth
int GetCustomPaintWidth() const
Returns custom painted area in control.
See also
wxComboCtrl::SetCustomPaintWidth.
=head2 Wx::ComboCtrl::GetFeatures
static int GetFeatures()
Returns features supported by wxComboCtrl. If needed feature is
missing, you need to instead use wxGenericComboCtrl, which however may
lack native look and feel (but otherwise sports identical API).
Return value
Value returned is a combination of following flags:
=head2 Wx::ComboCtrl::GetInsertionPoint
long GetInsertionPoint() const
Returns the insertion point for the combo control's text field.
Note: Under wxMSW, this function always returns 0 if the combo control
doesn't have the focus.
=head2 Wx::ComboCtrl::IsPopupWindowState
bool IsPopupWindowState(int state) const
Returns true if the popup window is in the given state. Possible
values are:
=head2 Wx::ComboCtrl::GetLastPosition
long GetLastPosition() const
Returns the last position in the combo control text field.
=head2 Wx::ComboCtrl::GetPopupControl
wxComboPopup* GetPopupControl()
Returns current popup interface that has been set with
SetPopupControl.
=head2 Wx::ComboCtrl::GetPopupWindow
wxWindow* GetPopupWindow() const
Returns popup window containing the popup control.
=head2 Wx::ComboCtrl::GetTextCtrl
wxTextCtrl* GetTextCtrl() const
Get the text control which is part of the combo control.
=head2 Wx::ComboCtrl::GetTextIndent
wxCoord GetTextIndent() const
Returns actual indentation in pixels.
=head2 Wx::ComboCtrl::GetTextRect
const wxRect& GetTextRect() const
Returns area covered by the text field (includes everything except
borders and the dropdown button).
=head2 Wx::ComboCtrl::GetValue
wxString GetValue() const
Returns text representation of the current value. For writable combo
control it always returns the value in the text field.
=head2 Wx::ComboCtrl::HidePopup
void HidePopup()
Dismisses the popup window.
=head2 Wx::ComboCtrl::IsPopupShown
bool IsPopupShown() const
Returns true if the popup is currently shown
=head2 Wx::ComboCtrl::OnButtonClick
void OnButtonClick()
Implement in a derived class to define what happens on dropdown button
click.
Default action is to show the popup.
Note: If you implement this to do something else than show the popup,
you must then also implement DoSetPopupControl to always return NULL.
=head2 Wx::ComboCtrl::Paste
void Paste()
Pastes text from the clipboard to the text field.
=head2 Wx::ComboCtrl::Remove
void Remove(long from, long to)
Removes the text between the two positions in the combo control text
field.
Parameters
from
The first position.
to
The last position.
=head2 Wx::ComboCtrl::Replace
void Replace(long from, long to, const wxString& value)
Replaces the text between two positions with the given text, in the
combo control text field.
Parameters
from
The first position.
to
The second position.
text
The text to insert.
=head2 Wx::ComboCtrl::SetButtonBitmaps
void SetButtonBitmaps(const wxBitmap& bmpNormal, bool pushButtonBg =
false, const wxBitmap& bmpPressed = wxNullBitmap, const wxBitmap&
bmpHover = wxNullBitmap, const wxBitmap& bmpDisabled = wxNullBitmap)
Sets custom dropdown button graphics.
Parameters
bmpNormal
Default button image.
=head2 Wx::ComboCtrl::SetButtonPosition
void SetButtonPosition(int width = -1, int height = -1, int side =
wxRIGHT, int spacingX = 0)
Sets size and position of dropdown button.
Parameters
width
Button width. Value <= 0 specifies default.
=head2 Wx::ComboCtrl::SetCustomPaintWidth
void SetCustomPaintWidth(int width)
Set width, in pixels, of custom painted area in control without
wxCB_READONLY style. In read-only wxOwnerDrawnComboBox, this is used
to indicate area that is not covered by the focus rectangle.
=head2 Wx::ComboCtrl::SetInsertionPoint
void SetInsertionPoint(long pos)
Sets the insertion point in the text field.
Parameters
pos
The new insertion point.
=head2 Wx::ComboCtrl::SetInsertionPointEnd
void SetInsertionPointEnd()
Sets the insertion point at the end of the combo control text field.
=head2 Wx::ComboCtrl::SetPopupAnchor
void SetPopupAnchor(int anchorSide)
Set side of the control to which the popup will align itself. Valid
values are wxLEFT, wxRIGHT and 0. The default value 0 means that the
most appropriate side is used (which, currently, is always wxLEFT).
=head2 Wx::ComboCtrl::SetPopupControl
void SetPopupControl(wxComboPopup* popup)
Set popup interface class derived from wxComboPopup. This method
should be called as soon as possible after the control has been
created, unless OnButtonClick has been overridden.
=head2 Wx::ComboCtrl::SetPopupExtents
void SetPopupExtents(int extLeft, int extRight)
Extends popup size horizontally, relative to the edges of the combo
control.
Parameters
extLeft
How many pixel to extend beyond the left edge of the control.
Default is 0.
=head2 Wx::ComboCtrl::SetPopupMaxHeight
void SetPopupMaxHeight(int height)
Sets preferred maximum height of the popup.
Remarks
Value -1 indicates the default.
Also, popup implementation may choose to ignore this.
=head2 Wx::ComboCtrl::SetPopupMinWidth
void SetPopupMinWidth(int width)
Sets minimum width of the popup. If wider than combo control, it will
extend to the left.
Remarks
Value -1 indicates the default.
Also, popup implementation may choose to ignore this.
=head2 Wx::ComboCtrl::SetSelection
void SetSelection(long from, long to)
Selects the text between the two positions, in the combo control text
field.
Parameters
from
The first position.
to
The second position.
=head2 Wx::ComboCtrl::SetText
void SetText(const wxString& value)
Sets the text for the text field without affecting the popup. Thus,
unlike SetValue, it works equally well with combo control using
wxCB_READONLY style.
=head2 Wx::ComboCtrl::SetTextIndent
void SetTextIndent(int indent)
This will set the space in pixels between left edge of the control and
the text, regardless whether control is read-only or not. Value -1 can
be given to indicate platform default.
=head2 Wx::ComboCtrl::SetValue
void SetValue(const wxString& value)
Sets the text for the combo control text field.
NB: For a combo control with wxCB_READONLY style the string must be
accepted by the popup (for instance, exist in the dropdown list),
otherwise the call to SetValue() is ignored
=head2 Wx::ComboCtrl::SetValueWithEvent
void SetValueWithEvent(const wxString& value, bool withEvent = true)
Same as SetValue, but also sends wxCommandEvent of type
wxEVT_COMMAND_TEXT_UPDATED if withEvent is true.
=head2 Wx::ComboCtrl::ShowPopup
void ShowPopup()
Show the popup.
=head2 Wx::ComboCtrl::Undo
void Undo()
Undoes the last edit in the text field. Windows only.
=head2 Wx::ComboCtrl::UseAltPopupWindow
void UseAltPopupWindow(bool enable = true)
Enable or disable usage of an alternative popup window, which
guarantees ability to focus the popup control, and allows common
native controls to function normally. This alternative popup window is
usually a wxDialog, and as such, when it is shown, its parent
top-level window will appear as if the focus has been lost from it.
=head1 Wx::ComboPopup
=head2 Wx::ComboPopup::new
wxComboPopup()
Default constructor. It is recommended that internal variables are
prepared in Init instead (because m_combo is not valid in
constructor).
=head2 Wx::ComboPopup::m_combo
wxComboCtrl* m_combo
Parent wxComboCtrl. This protected member variable is prepared
automatically before Init is called.
=head2 Wx::ComboPopup::Create
bool Create(wxWindow* parent)
The derived class must implement this to create the popup control.
Return value
true if the call succeeded, false otherwise.
=head2 Wx::ComboPopup::Dismiss
void Dismiss()
Utility function that hides the popup.
=head2 Wx::ComboPopup::GetAdjustedSize
wxSize GetAdjustedSize(int minWidth, int prefHeight, int maxHeight)
The derived class may implement this to return adjusted size for the
popup control, according to the variables given.
Parameters
minWidth
Preferred minimum width.
=head2 Wx::ComboPopup::GetControl
wxWindow* GetControl()
The derived class must implement this to return pointer to the
associated control created in Create.
=head2 Wx::ComboPopup::GetStringValue
wxString GetStringValue() const
The derived class must implement this to return string representation
of the value.
=head2 Wx::ComboPopup::Init
void Init()
The derived class must implement this to initialize its internal
variables. This method is called immediately after construction
finishes. m_combo member variable has been initialized before the
call.
=head2 Wx::ComboPopup::IsCreated
bool IsCreated() const
Utility method that returns true if Create has been called.
Useful in conjunction with LazyCreate.
=head2 Wx::ComboPopup::LazyCreate
bool LazyCreate()
The derived class may implement this to return true if it wants to
delay call to Create until the popup is shown for the first time. It
is more efficient, but on the other hand it is often more convenient
to have the control created immediately.
Remarks
Base implementation returns false.
=head2 Wx::ComboPopup::OnComboDoubleClick
void OnComboDoubleClick()
The derived class may implement this to do something when the parent
wxComboCtrl gets double-clicked.
=head2 Wx::ComboPopup::OnComboKeyEvent
void OnComboKeyEvent(wxKeyEvent& event)
The derived class may implement this to receive key events from the
parent wxComboCtrl.
Events not handled should be skipped, as usual.
=head2 Wx::ComboPopup::OnDismiss
void OnDismiss()
The derived class may implement this to do special processing when
popup is hidden.
=head2 Wx::ComboPopup::OnPopup
void OnPopup()
The derived class may implement this to do special processing when
popup is shown.
=head2 Wx::ComboPopup::PaintComboControl
void PaintComboControl(wxDC& dc, const wxRect& rect)
The derived class may implement this to paint the parent wxComboCtrl.
Default implementation draws value as string.
=head2 Wx::ComboPopup::SetStringValue
void SetStringValue(const wxString& value)
The derived class must implement this to receive string value changes
from wxComboCtrl.
=head1 Wx::Command
=head2 Wx::Command::new
wxCommand(bool canUndo = false, const wxString& name = NULL)
Constructor. wxCommand is an abstract class, so you will need to
derive a new class and call this constructor from your own
constructor.
canUndo tells the command processor whether this command is undo-able.
You can achieve the same functionality by overriding the CanUndo
member function (if for example the criteria for undoability is
context-dependent).
name must be supplied for the command processor to display the command
name in the application's edit menu.
=head2 Wx::Command::DESTROY
~wxCommand()
Destructor.
=head2 Wx::Command::CanUndo
bool CanUndo()
Returns true if the command can be undone, false otherwise.
=head2 Wx::Command::Do
bool Do()
Override this member function to execute the appropriate action when
called. Return true to indicate that the action has taken place, false
otherwise. Returning false will indicate to the command processor that
the action is not undoable and should not be added to the command
history.
=head2 Wx::Command::GetName
wxString GetName()
share/doc/wxwidgets.pod view on Meta::CPAN
viewer.
If you provide a window, it will be used by some help controller
classes, such as wxCHMHelpController, wxWinHelpController and
wxHtmlHelpController, as the parent for the help window instead of the
value of wxApp::GetTopWindow. You can also change the parent window
later with wxHelpController::SetParentWindow.
=head2 Wx::HelpController::DESTROY
~wxHelpController()
Destroys the help instance, closing down the viewer if it is running.
=head2 Wx::HelpController::Initialize
virtual bool Initialize(const wxString& file)
virtual bool Initialize(const wxString& file, int server)
Initializes the help instance with a help filename, and optionally a
server socket number if using wxHelp (now obsolete). Does not invoke
the help viewer. This must be called directly after the help instance
object is created and before any attempts to communicate with the
viewer.
You may omit the file extension and a suitable one will be chosen. For
wxHtmlHelpController, the extensions zip, htb and hhp will be appended
while searching for a suitable file. For WinHelp, the hlp extension is
appended.
=head2 Wx::HelpController::DisplayBlock
virtual bool DisplayBlock(long blockNo)
If the help viewer is not running, runs it and displays the file at
the given block number.
WinHelp: Refers to the context number.
MS HTML Help: Refers to the context number.
External HTML help: the same as for wxHelpController::DisplaySection.
wxHtmlHelpController: sectionNo is an identifier as specified in the
.hhc file. See Help files format.
This function is for backward compatibility only, and applications
should use wxHelpController instead.
=head2 Wx::HelpController::DisplayContents
virtual bool DisplayContents()
If the help viewer is not running, runs it and displays the contents.
=head2 Wx::HelpController::DisplayContextPopup
virtual bool DisplayContextPopup(int contextId)
Displays the section as a popup window using a context id.
Returns false if unsuccessful or not implemented.
=head2 Wx::HelpController::DisplaySection
virtual bool DisplaySection(const wxString& section)
If the help viewer is not running, runs it and displays the given
section.
The interpretation of section differs between help viewers. For most
viewers, this call is equivalent to KeywordSearch. For MS HTML Help,
wxHTML help and external HTML help, if section has a .htm or .html
extension, that HTML file will be displayed; otherwise a keyword
search is done.
virtual bool DisplaySection(int sectionNo)
If the help viewer is not running, runs it and displays the given
section.
WinHelp, MS HTML Help sectionNo is a context id.
External HTML help: wxExtHelpController implements sectionNo as an id
in a map file, which is of the form:
0 wx.html ; Index
1 wx34.html#classref ; Class reference
2 wx204.html ; Function reference
wxHtmlHelpController: sectionNo is an identifier as specified in the
.hhc file. See Help files format.
See also the help sample for notes on how to specify section numbers
for various help file formats.
=head2 Wx::HelpController::DisplayTextPopup
virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos)
Displays the text in a popup window, if possible.
Returns false if unsuccessful or not implemented.
=head2 Wx::HelpController::GetFrameParameters
virtual wxFrame * GetFrameParameters(const wxSize * size = NULL, const
wxPoint * pos = NULL, bool *newFrameEachTime = NULL)
wxHtmlHelpController returns the frame, size and position.
For all other help controllers, this function does nothing and just
returns NULL.
Parameters
viewer
This defaults to "netscape" for wxExtHelpController.
flags
This defaults to wxHELP_NETSCAPE for wxExtHelpController,
indicating that the viewer is a variant of Netscape Navigator.
=head2 Wx::HelpController::GetParentWindow
virtual wxWindow* GetParentWindow() const
Returns the window to be used as the parent for the help window. This
window is used by wxCHMHelpController, wxWinHelpController and
wxHtmlHelpController.
=head2 Wx::HelpController::KeywordSearch
virtual bool KeywordSearch(const wxString& keyWord, wxHelpSearchMode
mode = wxHELP_SEARCH_ALL)
If the help viewer is not running, runs it, and searches for sections
matching the given keyword. If one match is found, the file is
displayed at this section. The optional parameter allows the search
the index (wxHELP_SEARCH_INDEX) but this currently only supported by
the wxHtmlHelpController.
WinHelp, MS HTML Help: If more than one match is found, the first
topic is displayed.
External HTML help, simple wxHTML help: If more than one match is
found, a choice of topics is displayed.
wxHtmlHelpController: see wxHtmlHelpController::KeywordSearch.
=head2 Wx::HelpController::LoadFile
virtual bool LoadFile(const wxString& file = "")
If the help viewer is not running, runs it and loads the given file.
If the filename is not supplied or is empty, the file specified in
Initialize is used. If the viewer is already displaying the specified
file, it will not be reloaded. This member function may be used before
each display call in case the user has opened another file.
share/doc/wxwidgets.pod view on Meta::CPAN
=head2 Wx::MemoryInputStream::GetInputStreamBuffer
wxStreamBuffer * GetInputStreamBuffer() const
Returns the pointer to the stream object used as an internal buffer
for that stream.
=head1 Wx::MemoryOutputStream
=head2 Wx::MemoryOutputStream::new
wxMemoryOutputStream(char * data = NULL, size_t length = 0)
If data is NULL, then it will initialize a new empty buffer which will
grow if required.
Warning
If the buffer is created, it will be destroyed at the destruction of
the stream.
=head2 Wx::MemoryOutputStream::DESTROY
~wxMemoryOutputStream()
Destructor.
=head2 Wx::MemoryOutputStream::CopyTo
size_t CopyTo(char *buffer, size_t len) const
CopyTo allowed you to transfer data from the internal buffer of
wxMemoryOutputStream to an external buffer. len specifies the size of
the buffer.
Returned value
CopyTo returns the number of bytes copied to the buffer. Generally it
is either len or the size of the stream buffer.
=head2 Wx::MemoryOutputStream::GetOutputStreamBuffer
wxStreamBuffer * GetOutputStreamBuffer() const
Returns the pointer to the stream object used as an internal buffer
for that stream.
=head1 Wx::Menu
=head2 Wx::Menu::new
wxMenu(const wxString& title = "", long style = 0)
Constructs a wxMenu object.
Parameters
title
A title for the popup menu: the empty string denotes no title.
style
If set to wxMENU_TEAROFF, the menu will be detachable (wxGTK
only).
wxMenu(long style)
Constructs a wxMenu object.
Parameters
style
If set to wxMENU_TEAROFF, the menu will be detachable (wxGTK
only).
=head2 Wx::Menu::DESTROY
~wxMenu()
Destructor, destroying the menu.
Note: under Motif, a popup menu must have a valid parent (the window
it was last popped up on) when being destroyed. Therefore, make sure
you delete or re-use the popup menu before destroying the parent
window. Re-use in this context means popping up the menu on a
different window from last time, which causes an implicit destruction
and recreation of internal data structures.
=head2 Wx::Menu::Append
wxMenuItem* Append(int id, const wxString& item = "", const wxString&
helpString = "", wxItemKind kind = wxITEM_NORMAL)
Adds a string item to the end of the menu.
wxMenuItem* Append(int id, const wxString& item, wxMenu *subMenu,
const wxString& helpString = "")
Adds a pull-right submenu to the end of the menu. Append the submenu
to the parent menu after you have added your menu items, or
accelerators may not be registered properly.
wxMenuItem* Append(wxMenuItem* menuItem)
Adds a menu item object. This is the most generic variant of Append()
method because it may be used for both items (including separators)
and submenus and because you can also specify various extra properties
of a menu item this way, such as bitmaps and fonts.
Parameters
id
The menu command identifier.
item
The string to appear on the menu item.
menu
Pull-right submenu.
kind
May be wxITEM_SEPARATOR, wxITEM_NORMAL, wxITEM_CHECK or
wxITEM_RADIO
helpString
An optional help string associated with the item. By default, the
handler for the wxEVT_MENU_HIGHLIGHT event displays this string in
the status line.
menuItem
A menuitem object. It will be owned by the wxMenu object after
this function is called, so do not delete it yourself.
Remarks
This command can be used after the menu has been shown, as well as on
initial creation of a menu or menubar.
share/doc/wxwidgets.pod view on Meta::CPAN
wxString GetLabel(int id) const
Returns a menu item label, including any mnemonics and accelerators.
Parameters
id
The menu item identifier.
Return value
The item label, or the empty string if the item was not found.
See also
wxMenu::GetLabelText, wxMenu::SetLabel
=head2 Wx::Menu::GetLabelText
wxString GetLabelText(int id) const
Returns a menu item label, without any of the original mnemonics and
accelerators.
Parameters
id
The menu item identifier.
Return value
The item label, or the empty string if the item was not found.
See also
wxMenu::GetLabel, wxMenu::SetLabel
=head2 Wx::Menu::GetMenuItemCount
size_t GetMenuItemCount() const
Returns the number of items in the menu.
=head2 Wx::Menu::GetMenuItems
wxMenuItemList& GetMenuItems() const
Returns the list of items in the menu. wxMenuItemList is a
pseudo-template list class containing wxMenuItem pointers, see wxList.
=head2 Wx::Menu::GetTitle
wxString GetTitle() const
Returns the title of the menu.
Remarks
This is relevant only to popup menus, use wxMenuBar::GetMenuLabel for
the menus in the menubar.
See also
wxMenu::SetTitle
=head2 Wx::Menu::Insert
wxMenuItem* Insert(size_t pos, wxMenuItem *item)
wxMenuItem* Insert(size_t pos, int id, const wxString& item = "",
const wxString& helpString = "", wxItemKind kind = wxITEM_NORMAL)
Inserts the given item before the position pos. Inserting the item at
position GetMenuItemCount is the same as appending it.
See also
wxMenu::Append, wxMenu::Prepend
=head2 Wx::Menu::InsertCheckItem
wxMenuItem* InsertCheckItem(size_t pos, int id, const wxString& item,
const wxString& helpString = "")
Inserts a checkable item at the given position.
See also
wxMenu::Insert, wxMenu::AppendCheckItem
=head2 Wx::Menu::InsertRadioItem
wxMenuItem* InsertRadioItem(size_t pos, int id, const wxString& item,
const wxString& helpString = "")
Inserts a radio item at the given position.
See also
wxMenu::Insert, wxMenu::AppendRadioItem
=head2 Wx::Menu::InsertSeparator
wxMenuItem* InsertSeparator(size_t pos)
Inserts a separator at the given position.
See also
wxMenu::Insert, wxMenu::AppendSeparator
=head2 Wx::Menu::IsChecked
bool IsChecked(int id) const
Determines whether a menu item is checked.
Parameters
share/doc/wxwidgets.pod view on Meta::CPAN
The menu item to remove.
Return value
The item which was detached from the menu.
=head2 Wx::Menu::SetHelpString
void SetHelpString(int id, const wxString& helpString)
Sets an item's help string.
Parameters
id
The menu item identifier.
helpString
The help string to set.
See also
wxMenu::GetHelpString
=head2 Wx::Menu::SetLabel
void SetLabel(int id, const wxString& label)
Sets the label of a menu item.
Parameters
id
The menu item identifier.
label
The menu item label to set.
See also
wxMenu::Append, wxMenu::GetLabel
=head2 Wx::Menu::SetTitle
void SetTitle(const wxString& title)
Sets the title of the menu.
Parameters
title
The title to set.
Remarks
This is relevant only to popup menus, use wxMenuBar::SetLabelTop for
the menus in the menubar.
See also
wxMenu::GetTitle
=head2 Wx::Menu::UpdateUI
void UpdateUI(wxEvtHandler* source = NULL) const
Sends events to source (or owning window if NULL) to update the menu
UI. This is called just before the menu is popped up with
wxWindow::PopupMenu, but the application may call it at other times if
required.
See also
wxUpdateUIEvent
=head1 Wx::MenuBar
=head2 Wx::MenuBar::new
wxMenuBar(long style = 0)
Default constructor.
wxMenuBar(size_t n, wxMenu* menus[], const wxString titles[], long
style = 0)
Construct a menu bar from arrays of menus and titles.
Parameters
n
The number of menus.
menus
An array of menus. Do not use this array again - it now belongs to
the menu bar.
titles
An array of title strings. Deallocate this array after creating
the menu bar.
style
If wxMB_DOCKABLE the menu bar can be detached (wxGTK only).
wxPython note: Only the default constructor is supported in wxPython.
Use wxMenuBar::Append instead.
wxPerl note: wxPerl only supports the first constructor: use
wxMenuBar::Append instead.
=head2 Wx::MenuBar::DESTROY
share/doc/wxwidgets.pod view on Meta::CPAN
Use only after the menubar has been associated with a frame.
This function has been deprecated in favour of SetMenuLabel.
See also
wxMenuBar::GetLabelTop
=head2 Wx::MenuBar::SetMenuLabel
void SetMenuLabel(int pos, const wxString& label)
Sets the label of a top-level menu.
Parameters
pos
The position of a menu on the menu bar, starting from zero.
label
The menu label.
Remarks
Use only after the menubar has been associated with a frame.
See also
wxMenuBar::GetMenuLabel, wxMenuBar::GetMenuLabelText
=head1 Wx::MenuEvent
=head2 Wx::MenuEvent::new
wxMenuEvent(WXTYPE id = 0, int id = 0, wxMenu* menu = NULL)
Constructor.
=head2 Wx::MenuEvent::GetMenu
wxMenu * GetMenu() const
Returns the menu which is being opened or closed. This method should
only be used with the OPEN and CLOSE events and even for them the
returned pointer may be NULL in some ports.
=head2 Wx::MenuEvent::GetMenuId
int GetMenuId() const
Returns the menu identifier associated with the event. This method
should be only used with the HIGHLIGHT events.
=head2 Wx::MenuEvent::IsPopup
bool IsPopup() const
Returns true if the menu which is being opened or closed is a popup
menu, false if it is a normal one.
This method should only be used with the OPEN and CLOSE events.
=head1 Wx::MenuItem
=head2 Wx::MenuItem::new
wxMenuItem(wxMenu* parentMenu = NULL, int id = wxID_SEPARATOR, const
wxString& text = "", const wxString& helpString = "", wxItemKind kind
= wxITEM_NORMAL, wxMenu* subMenu = NULL)
Constructs a wxMenuItem object.
Menu items can be standard, or "stock menu items'', or custom. For the
standard menu items (such as commands to open a file, exit the program
and so on, see stock items for the full list) it is enough to specify
just the stock ID and leave text and helpString empty. In fact,
leaving at least text empty for the stock menu items is strongly
recommended as they will have appearance and keyboard interface
(including standard accelerators) familiar to the user.
For the custom (non-stock) menu items, text must be specified and
while helpString may be left empty, it's recommended to pass the item
description (which is automatically shown by the library in the status
bar when the menu item is selected) in this parameter.
Finally note that you can e.g. use a stock menu label without using
its stock help string:
// use all stock properties:
helpMenu->Append(wxID_ABOUT);
=head2 Wx::MenuItem::DESTROY
~wxMenuItem()
Destructor.
=head2 Wx::MenuItem::Check
void Check(bool check = true)
Checks or unchecks the menu item.
Note that this only works when the item is already appended to a menu.
=head2 Wx::MenuItem::Enable
void Enable(bool enable = true)
Enables or disables the menu item.
=head2 Wx::MenuItem::GetBackgroundColour
wxColour& GetBackgroundColour() const
Returns the background colour associated with the menu item (Windows
only).
share/doc/wxwidgets.pod view on Meta::CPAN
without decompressing and recompressing them. For tar however it makes
no difference.
For tars on seekable streams, entry must be from the same tar file as
stream. For non-seekable streams, entry must also be the last thing
read from inputStream.
=head2 Wx::TarOutputStream::Get/SetBlockingFactor
int GetBlockingFactor() const
void SetBlockingFactor(int factor)
The tar is zero padded to round its size up to BlockingFactor * 512
bytes.
Defaults to 10 for wxTAR_PAX and 20 for wxTAR_USTAR (see the
constructor), as specified in the POSIX standards.
=head2 Wx::TarOutputStream::PutNextDirEntry
bool PutNextDirEntry(const wxString& name, const wxDateTime& dt =
wxDateTime::Now())
Create a new directory entry (see wxArchiveEntry::IsDir()) with the
given name and timestamp.
PutNextEntry() can also be used to create directory entries, by
supplying a name with a trailing path separator.
=head2 Wx::TarOutputStream::PutNextEntry
bool PutNextEntry(wxTarEntry* entry)
Takes ownership of entry and uses it to create a new entry in the tar.
bool PutNextEntry(const wxString& name, const wxDateTime& dt =
wxDateTime::Now(), wxFileOffset size = wxInvalidOffset)
Create a new entry with the given name, timestamp and size.
=head1 Wx::TaskBarIcon
=head2 Wx::TaskBarIcon::new
wxTaskBarIcon()
Default constructor.
=head2 Wx::TaskBarIcon::DESTROY
~wxTaskBarIcon()
Destroys the wxTaskBarIcon object, removing the icon if not already
removed.
=head2 Wx::TaskBarIcon::CreatePopupMenu
virtual wxMenu* CreatePopupMenu()
This method is called by the library when the user requests popup menu
(on Windows and Unix platforms, this is when the user right-clicks the
icon). Override this function in order to provide popup menu
associated with the icon.
If CreatePopupMenu returns NULL (this happens by default), no menu is
shown, otherwise the menu is displayed and then deleted by the library
as soon as the user dismisses it. The events can be handled by a class
derived from wxTaskBarIcon.
=head2 Wx::TaskBarIcon::IsIconInstalled
bool IsIconInstalled()
Returns true if SetIcon was called with no subsequent RemoveIcon.
=head2 Wx::TaskBarIcon::IsOk
bool IsOk()
Returns true if the object initialized successfully.
=head2 Wx::TaskBarIcon::PopupMenu
bool PopupMenu(wxMenu* menu)
Pops up a menu at the current mouse position. The events can be
handled by a class derived from wxTaskBarIcon.
Note
It is recommended to override CreatePopupMenu callback instead of
calling this method from event handler, because some ports (e.g.
wxCocoa) may not implement PopupMenu and mouse click events at all.
=head2 Wx::TaskBarIcon::RemoveIcon
bool RemoveIcon()
Removes the icon previously set with SetIcon.
=head2 Wx::TaskBarIcon::SetIcon
bool SetIcon(const wxIcon& icon, const wxString& tooltip)
Sets the icon, and optional tooltip text.
=head1 Wx::TCPClient
=head2 Wx::TCPClient::new
wxTCPClient()
Constructs a client object.
=head2 Wx::TCPClient::MakeConnection
wxConnectionBase * MakeConnection(const wxString& host, const wxString&
service, const wxString& topic)
Tries to make a connection with a server specified by the host (a
machine name under Unix), service name (must contain an integer port
number under Unix), and a topic string. If the server allows a
( run in 2.089 seconds using v1.01-cache-2.11-cpan-364913b4093 )