/**
Returns the last position in the combobox text field.
*/
- virtual wxTextPos GetLastPosition() const;
+ virtual long GetLastPosition() const;
/**
This is the same as wxTextCtrl::GetSelection() for the text control
@remarks If the format parameter is invalid, the behaviour is undefined.
*/
- void SetFormat(const wxChar* format);
+ bool SetFormat(const wxString& format);
/**
Sets the valid range for the date selection. If @a dt1 is valid, it
@see SetUserScale()
*/
- void GetUserScale(double x, double y);
+ void GetUserScale(double* x, double* y) const;
/**
Converts logical X coordinate to device coordinate, using the current
Iconize(@false) will bring the window to the front, as does
Show(@true).
*/
- void Iconize(bool iconize);
+ virtual void Iconize(bool iconize = true);
/**
Returns @true if the dialog box is iconized. Windows only.
Creates the editable listbox for two-step construction.
See wxEditableListBox() for further details.
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& label,
+ bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxEL_DEFAULT_STYLE,
- const wxString& name = "editableListBox");
+ const wxString& name = wxEditableListBoxNameStr);
/**
Replaces current contents with given strings.
@see SetOrigin()
*/
- wxHelpEventOrigin GetOrigin() const;
+ wxHelpEvent::Origin GetOrigin() const;
/**
Returns the left-click position of the mouse, in screen coordinates.
@see GetOrigin()
*/
- void SetOrigin(wxHelpEventOrigin);
+ void SetOrigin(wxHelpEvent::Origin origin);
/**
Sets the left-click position of the mouse, in screen coordinates.
/**
Get the string to find.
*/
- const wxString GetFindString();
+ const wxString& GetFindString();
/**
Get the combination of @c wxFindReplaceFlags values.
/**
Get the replacement string.
*/
- const wxString GetReplaceString();
+ const wxString& GetReplaceString();
/**
Set the string to find (used as initial value by the dialog).
The descriptor should be already opened and it will be closed by wxFFile object.
*/
- void Attach(FILE* fp);
+ void Attach(FILE* fp, const wxString& name = wxEmptyString);
/**
Closes the file and returns @true on success.
bool Create(wxWindow* parent, wxWindowID id,
const wxString& defaultDirectory = wxEmptyString,
const wxString& defaultFilename = wxEmptyString,
- const wxPoint& wildCard = wxFileSelectorDefaultWildcardStr,
- long style = wxFC_DEFAULT_STYLE,
- const wxPoint& pos = wxDefaultPosition,
+ const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
+ long style = wxFC_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- const wxString& name = "filectrl");
+ const wxString& name = wxFileCtrlNameStr);
/**
Returns the current directory of the file control (i.e. the directory shown by it).
/**
Sets whether hidden files and folders are shown or not.
*/
- void ShowHidden(const bool show);
+ virtual void ShowHidden(bool show);
};
/**
Sets the files changed by this event.
*/
- void SetFiles(const wxArrayString files);
+ void SetFiles(const wxArrayString& files);
/**
*/
bool Create(wxWindow* parent, wxWindowID id,
const wxString& path = wxEmptyString,
- const wxString& message = "Select a file",
- const wxString& wildcard = ".",
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxFLP_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "filepickerctrl");
+ const wxString& name = wxFilePickerCtrlNameStr);
/**
Similar to GetPath() but returns the path of the currently selected
*/
bool Create(wxWindow* parent, wxWindowID id,
const wxString& path = wxEmptyString,
- const wxString& message = "Select a folder",
+ const wxString& message = wxDirSelectorPromptStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDIRP_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "dirpickerctrl");
+ const wxString& name = wxDirPickerCtrlNameStr);
/**
Returns the absolute path of the currently selected directory as a
@param file
the name of the file to look for
*/
- bool FindFileInPath(wxString str, const wxString& path,
+ bool FindFileInPath(wxString* pStr, const wxString& path,
const wxString& file);
/**
You will have to delete the stream yourself.
*/
- void DetachStream();
+ wxInputStream* DetachStream();
/**
Returns anchor (if present). The term of @b anchor can be easily
Call OnFontEncoding() for each encoding supported by the given font -
or for each encoding supported by at least some font if @a font is not specified.
*/
- virtual bool EnumerateEncodings(const wxString& font = "");
+ virtual bool EnumerateEncodings(const wxString& font = wxEmptyString);
/**
Call OnFacename() for each font which supports given encoding (only if
Used in two-step frame construction.
See wxFrame() for further details.
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& title,
+ bool Create(wxWindow* parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = "frame");
+ const wxString& name = wxFrameNameStr);
/**
Creates a status bar at the bottom of the frame.
@see SetStatusText(), OnCreateStatusBar(), GetStatusBar()
*/
- virtual wxStatusBar* CreateStatusBar(int number = 1,
- long style = 0,
- wxWindowID id = -1,
- const wxString& name = "statusBar");
+ virtual wxStatusBar* CreateStatusBar(int number = 1, long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
+ wxWindowID id = 0,
+ const wxString& name = wxStatusLineNameStr);
/**
Creates a toolbar at the top or left of the frame.
@see CreateStatusBar(), OnCreateToolBar(), SetToolBar(), GetToolBar()
*/
virtual wxToolBar* CreateToolBar(long style = wxBORDER_NONE | wxTB_HORIZONTAL,
- wxWindowID id = -1,
- const wxString& name = "toolBar");
+ wxWindowID id = wxID_ANY,
+ const wxString& name = wxToolBarNameStr);
/**
Returns the origin of the frame client area (in client coordinates).
width of all fields, minus the sum of widths of the
non-variable fields, divided by the number of variable fields.
*/
- virtual void SetStatusWidths(int n, int* widths);
+ virtual void SetStatusWidths(int n, const int* widths_field);
/**
Associates a toolbar with the frame.
*/
bool Create(wxWindow* parent, wxWindowID id, int range,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxGA_HORIZONTAL,
+ const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "gauge");
+ const wxString& name = wxGaugeNameStr);
/**
Returns the width of the 3D bezel face.
@param name
Window name.
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxString& url,
- const wxPoint& pos = wxDefaultPosition,
+ bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
+ const wxString& url, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxHL_DEFAULT_STYLE,
- const wxString& name = "hyperlink");
+ const wxString& name = wxHyperlinkCtrlNameStr);
/**
Returns the colour used to print the label of the hyperlink when the mouse is
@param icon
Icon to assign.
*/
- wxIcon operator =(const wxIcon& icon);
+ wxIcon& operator=(const wxIcon& icon);
};
/**
/**
Assignment operator, using @ref overview_refcount "reference counting".
*/
- wxIconBundle operator =(const wxIconBundle& ic);
+ wxIconBundle& operator=(const wxIconBundle& ic);
/**
Equality operator. This returns @true if two icon bundles are equal.
@see AddCatalog()
*/
- bool IsLoaded(const char* domain) const;
+ bool IsLoaded(const wxString& domain) const;
/**
Returns @true if the locale could be set successfully.
@param name
Window name.
*/
- bool Create(wxSashLayoutWindow* parent, wxWindowID id,
+ bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCLIP_CHILDREN | wxSW_3D,
client area the window sticks to).
One of wxLAYOUT_TOP, wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM.
*/
- void GetAlignment() const;
+ wxLayoutAlignment GetAlignment() const;
/**
Returns the flags associated with this event. Not currently used.
@see OnFrameDelete()
*/
- virtual bool OnFrameClose(wxFrame frame);
+ virtual bool OnFrameClose(wxFrame* frame);
/**
Called immediately after the log frame creation allowing for
any extra initializations.
*/
- virtual void OnFrameCreate(wxFrame frame);
+ virtual void OnFrameCreate(wxFrame* frame);
/**
Called right before the log frame is going to be deleted: will
always be called unlike OnFrameClose().
*/
- virtual void OnFrameDelete(wxFrame frame);
+ virtual void OnFrameDelete(wxFrame* frame);
/**
Shows or hides the frame.
The buffer can be cleared by Flush() which will also show the current
contents to the user.
*/
- const wxString GetBuffer();
+ const wxString& GetBuffer() const;
};
@row2col{wxMEDIASTATE_PLAYING, The movie is currently playing.}
@endTable
*/
- wxMediaCtrlState GetState();
+ wxMediaState GetState();
/**
Gets the volume of the media from a 0.0 to 1.0 range.
/**
Same as Load(const wxURI& uri). Kept for wxPython compatibility.
*/
- bool LoadURI(const wxURI& uri);
+ bool LoadURI(const wxString& fileName);
/**
Same as Load(const wxURI& uri, const wxURI& proxy).
Kept for wxPython compatibility.
*/
- bool LoadURIWithProxy(const wxURI& uri, const wxURI& proxy);
+ bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy);
/**
Pauses playback of the movie.
@todo Document the wxSeekMode parameter @a mode, and perhaps also the
wxFileOffset and wxSeekMode themselves.
*/
- wxFileOffset Seek(wxFileOffset where, wxSeekMode mode);
+ wxFileOffset Seek(wxFileOffset where, wxSeekMode mode = wxFromStart);
/**
Sets the playback rate, or speed of the media, to that referred by @a dRate.
success. Returns -1 if an error was detected that prevents
further checking.
*/
- int Check();
+ static int Check(bool checkAll = false);
/**
Performs a memory dump from the currently set checkpoint, writing to the
@remarks Only use this when the menu bar has been associated with a
frame; otherwise, use the wxMenu equivalent call.
*/
- void Check(int id, const bool check);
+ void Check(int id, bool check);
/**
Enables or disables (greys out) a menu item.
@remarks Only use this when the menu bar has been associated with a frame.
*/
- void EnableTop(int pos, const bool enable);
+ virtual void EnableTop(size_t pos, bool enable);
/**
Finds the menu item object associated with the given menu item identifier.
@return The found menu item object, or @NULL if one was not found.
*/
- wxMenuItem* FindItem(int id, wxMenu menu = NULL) const;
+ virtual wxMenuItem* FindItem(int id, wxMenu* menu = NULL) const;
/**
Returns the index of the menu with the given @a title or @c wxNOT_FOUND if no
@see SetLabelTop()
*/
- wxString GetLabelTop(int pos) const;
+ wxString GetLabelTop(size_t pos) const;
/**
Returns the menu at @a menuIndex (zero-based).
*/
- wxMenu* GetMenu(int menuIndex) const;
+ wxMenu* GetMenu(size_t menuIndex) const;
/**
Returns the number of menus in this menubar.
@see GetMenuLabelText(), SetMenuLabel()
*/
- wxString GetMenuLabel(int pos) const;
+ virtual wxString GetMenuLabel(size_t pos) const;
/**
Returns the label of a top-level menu. Note that the returned string does not
@see GetMenuLabel(), SetMenuLabel()
*/
- wxString GetMenuLabelText(int pos) const;
+ virtual wxString GetMenuLabelText(size_t pos) const;
/**
Inserts the menu at the given position into the menu bar. Inserting menu at
/**
Redraw the menu bar
*/
- void Refresh();
+ virtual void Refresh(bool eraseBackground = true, const wxRect* rect = NULL);
/**
Removes the menu from the menu bar and returns the menu object - the caller
@see GetLabelTop()
*/
- void SetLabelTop(int pos, const wxString& label);
+ void SetLabelTop(size_t pos, const wxString& label);
/**
Sets the label of a top-level menu.
@remarks Use only after the menubar has been associated with a frame.
*/
- void SetMenuLabel(int pos, const wxString& label);
+ virtual void SetMenuLabel(size_t pos, const wxString& label);
};
@see Append(), InsertCheckItem()
*/
wxMenuItem* AppendCheckItem(int id, const wxString& item,
- const wxString& helpString = "");
+ const wxString& help = wxEmptyString);
/**
Adds a radio item to the end of the menu.
@see Append(), InsertRadioItem()
*/
wxMenuItem* AppendRadioItem(int id, const wxString& item,
- const wxString& helpString = "");
+ const wxString& help = wxEmptyString);
/**
Adds a separator to the end of the menu.
@see IsChecked()
*/
- void Check(int id, const bool check);
+ void Check(int id, bool check);
/**
Deletes the menu item from the menu. If the item is a submenu, it will
@see IsEnabled()
*/
- void Enable(int id, const bool enable);
+ void Enable(int id, bool enable);
/**
Finds the menu id for a menu item string.
@see SetTitle()
*/
- wxString GetTitle() const;
+ const wxString& GetTitle() const;
/**
Inserts the given @a item before the position @a pos.
@see Insert(), AppendCheckItem()
*/
- wxMenuItem* InsertCheckItem(size_t pos, int id,
- const wxString& item,
- const wxString& helpString = "");
+ wxMenuItem* InsertCheckItem(size_t pos, int id, const wxString& item,
+ const wxString& helpString = wxEmptyString);
/**
Inserts a radio item at the given position.
@see Insert(), AppendRadioItem()
*/
- wxMenuItem* InsertRadioItem(size_t pos, int id,
- const wxString& item,
- const wxString& helpString = "");
+ wxMenuItem* InsertRadioItem(size_t pos, int id, const wxString& item,
+ const wxString& helpString = wxEmptyString);
/**
Inserts a separator at the given position.
@see Prepend(), AppendCheckItem()
*/
wxMenuItem* PrependCheckItem(int id, const wxString& item,
- const wxString& helpString = "");
+ const wxString& helpString = wxEmptyString);
/**
Inserts a radio item at position 0.
@see Prepend(), AppendRadioItem()
*/
wxMenuItem* PrependRadioItem(int id, const wxString& item,
- const wxString& helpString = "");
+ const wxString& helpString = wxEmptyString);
/**
Inserts a separator at position 0.
/**
Returns the checked or unchecked bitmap (Windows only).
*/
- wxBitmap GetBitmap(bool checked = true) const;
+ virtual const wxBitmap& GetBitmap() const;
/**
Returns the font associated with the menu item (Windows only).
/**
Returns the help string associated with the menu item.
*/
- wxString GetHelp() const;
+ const wxString& GetHelp() const;
/**
Returns the menu item identifier.
@see GetLabel(), GetLabelFromText()
*/
- wxString GetText() const;
+ const wxString& GetText() const;
/**
Returns the text colour associated with the menu item (Windows only).
/**
Sets the parent menu which will contain this menu item.
*/
- void SetMenu(const wxMenu* menu);
+ void SetMenu(wxMenu* menu);
/**
Sets the submenu of this menu item.
*/
- void SetSubMenu(const wxMenu* menu);
+ void SetSubMenu(wxMenu* menu);
/**
Sets the text associated with the menu item.
This happens when one file extension is mapped to different MIME types
by KDE, mailcap and mime.types.
*/
- bool GetMimeType(wxArrayString& mimeTypes);
+ bool GetMimeTypes(wxArrayString& mimeTypes) const;
//@{
/**
The name of the file is retrieved from the MessageParameters class.
*/
- bool GetPrintCommand(wxString* command, MessageParameters& params);
+ bool GetPrintCommand(wxString* command,
+ const MessageParameters& params) const;
};
Used in two-step frame construction.
See wxMiniFrame() for further details.
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& title,
+ bool Create(wxWindow* parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCAPTION | wxRESIZE_BORDER,
- const wxString& name = "frame");
+ const wxString& name = wxFrameNameStr);
};
which don't support extended messages, it is simply appended to the
normal message with a new line separating them.
*/
- void SetExtendedMessage(const wxString extendedMessage);
+ virtual void SetExtendedMessage(const wxString& extendedMessage);
/**
Sets the message shown by the dialog.
*/
- void SetMessage(const wxString msg);
+ virtual void SetMessage(const wxString& message);
/**
Overrides the default labels of the OK and Cancel buttons.
@see GetPixel()
*/
- bool GetRGB(int pixel, const unsigned char* red,
- const unsigned char* green,
- const unsigned char* blue) const;
+ bool GetRGB(int pixel, unsigned char* red, unsigned char* green,
+ unsigned char* blue) const;
/**
Returns @true if palette data is present.
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
- const wxString& name = "panel");
+ const wxString& name = wxPanelNameStr);
/**
Sends a wxInitDialogEvent, which in turn transfers data to the dialog via
@see GetDashes()
*/
- virtual void SetDashes(int n, wxDash* dashes);
+ virtual void SetDashes(int n, const wxDash* dash);
/**
Sets the pen join style, which may be one of @c wxJOIN_BEVEL, @c wxJOIN_ROUND
@see GetStipple()
*/
- virtual void SetStipple(wxBitmap* stipple);
+ virtual void SetStipple(const wxBitmap& stipple);
/**
Set the pen style.
/**
Assignment operator, using @ref overview_refcount.
*/
- wxPen operator =(const wxPen& pen);
+ wxPen& operator=(const wxPen& pen);
/**
Equality operator.
The implementation simply blits the preview bitmap onto
the canvas, creating a new preview bitmap if none exists.
*/
- bool PaintPage(wxPreviewCanvas* canvas, wxDC dc);
+ virtual bool PaintPage(wxPreviewCanvas* canvas, wxDC& dc);
/**
Invokes the print process using the second wxPrintout object
/**
Sets the current page to be previewed.
*/
- void SetCurrentPage(int pageNum);
+ virtual bool SetCurrentPage(int pageNum);
/**
Sets the frame to be used for displaying the print preview canvas
/**
Creates the default printing abort window, with a cancel button.
*/
- void CreateAbortWindow(wxWindow* parent, wxPrintout* printout);
+ virtual wxWindow* CreateAbortWindow(wxWindow* parent, wxPrintout* printout);
/**
Returns @true if the user has aborted the print job.
Returns the @ref overview_printing_printdata "print dialog data" associated
with the print dialog.
*/
- wxPrintDialogData GetPrintDialogData();
+ virtual wxPrintDialogData& GetPrintDialogData();
/**
Shows the dialog, returning @c wxID_OK if the user pressed OK, and @c
(if present) to "Unknown" or to @a newmsg (if it's non-empty); moves the progress
bar a bit to indicate that some progress was done.
*/
- virtual bool Pulse(const wxString& newmsg = "",
- bool* skip = NULL);
+ virtual bool Pulse(const wxString& newmsg = wxEmptyString, bool* skip = NULL);
/**
Can be used to continue with the dialog, after the user had clicked the "Abort" button.
/**
Call this from your own Create function, before adding buttons and pages.
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& title,
+ bool Create(wxWindow* parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
- const wxString& name = "dialogBox");
+ const wxString& name = wxDialogNameStr);
/**
Override this if you wish to create a different kind of book control; by
@see GetFilesList()
*/
bool GetDirList(wxArrayString& files,
- const wxString& wildcard = "");
+ const wxString& wildcard = wxEmptyString);
/**
Returns the file size in bytes or -1 if the file doesn't exist or the size
@see GetDirList()
*/
bool GetFilesList(wxArrayString& files,
- const wxString& wildcard = "");
+ const wxString& wildcard = wxEmptyString);
/**
Creates a new input stream on the specified path.
/**
Returns the last command result, i.e. the full server reply for the last command.
*/
- const wxString GetLastResult();
+ const wxString& GetLastResult();
/**
Initializes an output stream to the specified @e file.
Fills @a out_rows with indexes into palette (which is also stored into @a palette
variable).
*/
- void DoQuantize(unsigned w, unsigned h, unsigned char** in_rows,
- unsigned char** out_rows, unsigned char* palette,
- int desiredNoColours);
+ static void DoQuantize(unsigned int w, unsigned int h,
+ unsigned char** in_rows, unsigned char** out_rows,
+ unsigned char* palette, int desiredNoColours);
/**
Reduce the colours in the source image and put the result into the destination image.
@param string
The string to find.
*/
- int FindString(const wxString& string) const;
+ virtual int FindString(const wxString& s, bool bCase = false) const;
/**
Returns the number of columns in the radiobox.
@param pt
Point in client coordinates.
*/
- int GetItemFromPoint(const wxPoint pt) const;
+ virtual int GetItemFromPoint(const wxPoint& pt) const;
/**
Returns the helptext associated with the specified @a item if any or @c
Creates the choice for two-step construction. See wxRadioButton() for
further details.
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& label,
+ bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
+ const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "radioButton");
+ const wxString& name = wxRadioButtonNameStr);
/**
Returns @true if the radio button is depressed, @false otherwise.
@param value
@true to select, @false to deselect.
*/
- void SetValue(const bool value);
+ virtual void SetValue(bool value);
};
/**
Assignment operator, using @ref overview_refcount.
*/
- void operator =(const wxRegion& region);
+ wxRegion& operator=(const wxRegion& region);
};
/**
@a flags may have the @c wxCONTROL_CHECKED, @c wxCONTROL_CURRENT or
@c wxCONTROL_UNDETERMINED bit set, see @ref wxCONTROL_FLAGS.
*/
- virtual void DrawCheckBox(wxWindow* win, wxDC& dc,
- const wxRect& rect, int flags);
+ virtual void DrawCheckBox(wxWindow* win, wxDC& dc, const wxRect& rect,
+ int flags = 0) = 0;
/**
Draw a button like the one used by wxComboBox to show a
see @ref wxCONTROL_FLAGS.
*/
virtual void DrawComboBoxDropButton(wxWindow* win, wxDC& dc,
- const wxRect& rect,
- int flags);
+ const wxRect& rect, int flags = 0) = 0;
/**
Draw a drop down arrow that is suitable for use outside a combo box. Arrow will
see @ref wxCONTROL_FLAGS.
*/
virtual void DrawDropArrow(wxWindow* win, wxDC& dc, const wxRect& rect,
- int flags);
+ int flags = 0) = 0;
/**
Draw a focus rectangle using the specified rectangle.
@a flags may have the @c wxCONTROL_PRESSED, @c wxCONTROL_CURRENT or
@c wxCONTROL_ISDEFAULT bit set, see @ref wxCONTROL_FLAGS.
*/
- virtual void DrawPushButton(wxWindow* win, wxDC& dc,
- const wxRect& rect, int flags);
+ virtual void DrawPushButton(wxWindow* win, wxDC& dc, const wxRect& rect,
+ int flags = 0) = 0;
/**
Draw the border for sash window: this border must be such that the sash
*/
bool Create(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxSB_HORIZONTAL,
+ const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "scrollBar");
+ const wxString& name = wxScrollBarNameStr);
/**
Returns the page size of the scrollbar.
Used for two-step slider construction.
See wxSlider() for further details.
*/
- bool Create(wxWindow* parent, wxWindowID id, int value,
- int minValue, int maxValue,
- const wxPoint& point = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxSL_HORIZONTAL,
+ bool Create(wxWindow* parent, wxWindowID id, int value, int minValue,
+ int maxValue, const wxPoint& point = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "slider");
+ const wxString& name = wxSliderNameStr);
/**
Returns the line size.
Creation function called by the spin control constructor.
See wxSpinCtrl() for details.
*/
- bool Create(wxWindow* parent, wxWindowID id = -1,
+ bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxSP_ARROW_KEYS,
- int min = 0, int max = 100,
- int initial = 0, const wxString& name = _T("wxSpinCtrl"));
+ long style = wxSP_ARROW_KEYS, int min = 0, int max = 100,
+ int initial = 0, const wxString& name = "wxSpinCtrl");
/**
Gets maximal allowable value.
/**
Creation function, for two-step construction. For details see wxStaticBitmap().
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxBitmap& label,
+ bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = "staticBitmap");
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxString& name = wxStaticBitmapNameStr);
/**
Returns the bitmap currently used in the control.
/**
Creation function, for two-step construction. For details see wxStaticText().
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& label,
+ bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = "staticText");
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxString& name = wxStaticTextNameStr);
/**
Returns the contents of the control.
*/
bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
long style = wxST_SIZEGRIP,
- const wxString& name = "statusBar");
+ const wxString& name = wxStatusBarNameStr);
/**
Returns the size and position of a field's internal bounding rectangle.
An array of n integers interpreted in the same way as
in SetStatusWidths().
*/
- virtual void SetFieldsCount(int number = 1, int* widths = NULL);
+ virtual void SetFieldsCount(int number = 1, const int* widths = NULL);
/**
Sets the minimal possible height for the status bar.
- wxSB_FLAT: No border is painted around the field so that it appears flat.
- wxSB_RAISED: A raised 3D border is painted around the field.
*/
- virtual void SetStatusStyles(int n, int* styles);
+ virtual void SetStatusStyles(int n, const int* styles);
/**
Sets the text for one field.
@see SetFieldsCount(), wxFrame::SetStatusWidths()
*/
- virtual void SetStatusWidths(int n, int* widths);
+ virtual void SetStatusWidths(int n, const int* widths_field);
};
/**
*/
- wxString GetCurLine(int* OUTPUT);
+ wxString GetCurLine(int* linePos = NULL);
/**
*/
- wxCharBuffer GetCurLineRaw(int* OUTPUT);
+ wxCharBuffer GetCurLineRaw(int* linePos = NULL);
/**
END of generated section
/**
Are the indentation guides visible?
*/
- bool GetIndentationGuides();
+ int GetIndentationGuides() const;
/**
Find the last child line of a header line.
/**
Load the contents of filename into the editor
*/
- bool LoadFile(const wxString& filename);
+ bool LoadFile(const wxString& file, int fileType = wxTEXT_TYPE_ANY);
/**
Transform the selection to lower case.
/**
Write the contents of the editor to filename
*/
- bool SaveFile(const wxString& filename);
+ bool SaveFile(const wxString& file = wxEmptyString, int fileType = wxTEXT_TYPE_ANY);
/**
Scroll enough to make the given column visible
/**
Send a message to Scintilla
*/
- long SendMsg(int msg, long wp = 0, long lp = 0);
+ wxIntPtr SendMsg(int msg, wxUIntPtr wp = 0, wxIntPtr lp = 0) const;
/**
Set the selection anchor to a position. The anchor is the opposite
/**
Show or hide indentation guides.
*/
- void SetIndentationGuides(bool show);
+ void SetIndentationGuides(int indentView);
/**
Set up the key words used by the lexer.
/**
Select a range of text.
*/
- void SetSelection(int start, int end);
+ virtual void SetSelection(long from, long to);
/**
Sets the position that ends the selection - this becomes the currentPosition.
@since 2.7.0
*/
- wxString GetLocalizedResourcesDir(const wxString& lang,
- ResourceCat category = ResourceCat_None) const;
+ virtual wxString GetLocalizedResourcesDir(const wxString& lang,
+ ResourceCat category) const;
/**
Return the directory where the loadable modules (plugins) live.
/**
Sets the icon, and optional tooltip text.
*/
- bool SetIcon(const wxIcon& icon, const wxString& tooltip);
+ virtual bool SetIcon(const wxIcon& icon,
+ const wxString& tooltip = wxEmptyString);
/**
Returns true if system tray is available in the desktop environment the
Returns the bullet text, which could be a symbol, or (for example) cached
outline text.
*/
- const wxString GetBulletText() const;
+ const wxString& GetBulletText() const;
/**
Returns the name of the character style.
*/
- const wxString GetCharacterStyleName() const;
+ const wxString& GetCharacterStyleName() const;
/**
Returns flags indicating which attributes are applicable.
/**
Returns the font face name.
*/
- const wxString GetFontFaceName() const;
+ const wxString& GetFontFaceName() const;
/**
Returns the font size in points.
/**
Returns the name of the list style.
*/
- const wxString GetListStyleName() const;
+ const wxString& GetListStyleName() const;
/**
Returns the outline level.
*/
- bool GetOutlineLevel() const;
+ int GetOutlineLevel() const;
/**
Returns the space in tenths of a millimeter after the paragraph.
/**
Returns the name of the paragraph style.
*/
- const wxString GetParagraphStyleName() const;
+ const wxString& GetParagraphStyleName() const;
/**
Returns the right indent in tenths of a millimeter.
Each stop is measured from the left margin and therefore each value must
be larger than the last.
*/
- const wxArrayInt GetTabs() const;
+ const wxArrayInt& GetTabs() const;
/**
Returns the text foreground colour.
*/
- const wxColour GetTextColour() const;
+ const wxColour& GetTextColour() const;
/**
Returns the text effect bits of interest.
hand cursor over it, and wxRichTextCtrl generates a wxTextUrlEvent
when the content is clicked.
*/
- const wxString GetURL() const;
+ const wxString& GetURL() const;
/**
Returns @true if the attribute object specifies alignment.
Sets the bullet text, which could be a symbol, or (for example) cached
outline text.
*/
- void SetBulletText(const wxString text);
+ void SetBulletText(const wxString& text);
/**
Sets the character style name.
Sets the attributes for the given font.
Note that wxTextAttr does not store an actual wxFont object.
*/
- void SetFont(const wxFont& font);
+ void SetFont(const wxFont& font, int flags = wxTEXT_ATTR_FONT);
/**
Sets the font encoding.
non-default constructor.
*/
bool Create(wxWindow* parent, wxWindowID id,
- const wxString& value = "",
+ const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
+ const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr);
@see SetDefaultStyle()
*/
- const wxTextAttr GetDefaultStyle() const;
+ virtual const wxTextAttr& GetDefaultStyle() const;
/**
Returns the insertion point, or cursor, position.
@return
@true if the operation was successful, @false otherwise.
*/
- bool SaveFile(const wxString& filename,
+ bool SaveFile(const wxString& filename = wxEmptyString,
int fileType = wxTEXT_TYPE_ANY);
/**
@see IsEditable()
*/
- virtual void SetEditable(const bool editable);
+ virtual void SetEditable(bool editable);
/**
Sets the insertion point at the given position.
Adds a line to the end of file.
*/
void AddLine(const wxString& str,
- wxTextFileType type = typeDefault) const;
+ wxTextFileType type = wxTextBuffer::typeDefault);
/**
Delete all lines from the file, set current line number to 0.
// do something with the last line in str
@endcode
*/
- wxString GetFirstLine() const;
+ wxString& GetFirstLine();
/**
Gets the last line of the file.
// do something with the first line in str
@endcode
*/
- wxString GetLastLine();
+ wxString& GetLastLine();
/**
Retrieves the line number @a n from the file.
The returned line may be modified but you shouldn't add line terminator
at the end - this will be done by wxTextFile.
*/
- wxString GetLine(size_t n) const;
+ wxString& GetLine(size_t n) const;
/**
Get the number of lines in the file.
/**
Get the name of the file.
*/
- const char* GetName() const;
+ const wxString& GetName() const;
/**
Gets the next line (see GetFirstLine() for the example).
*/
- wxString GetNextLine();
+ wxString& GetNextLine();
/**
Gets the previous line in the file.
*/
- wxString GetPrevLine();
+ wxString& GetPrevLine();
/**
Changes the value returned by GetCurrentLine() and used by GetFirstLine()
Insert a line before the line number @a n.
*/
void InsertLine(const wxString& str, size_t n,
- wxTextFileType type = typeDefault) const;
+ wxTextFileType type = wxTextBuffer::typeDefault);
/**
Returns @true if the file is currently opened.
/**
The same as GetLine().
*/
- wxString operator[](size_t n) const;
+ wxString& operator[](size_t n) const;
};
GetNextToken() is called and when it reaches 0, HasMoreTokens()
returns @false.
*/
- int CountTokens() const;
+ size_t CountTokens() const;
/**
Returns the delimiter which ended scan for the last token returned by
@see AddTool()
*/
- wxToolBarToolBase* AddCheckTool(int toolId,
- const wxString& label,
+ wxToolBarToolBase* AddCheckTool(int toolId, const wxString& label,
const wxBitmap& bitmap1,
- const wxBitmap& bitmap2,
- const wxString& shortHelpString = "",
- const wxString& longHelpString = "",
+ const wxBitmap& bmpDisabled = wxNullBitmap,
+ const wxString& shortHelp = wxEmptyString,
+ const wxString& longHelp = wxEmptyString,
wxObject* clientData = NULL);
/**
wxMac: labels are only displayed if wxWidgets is built with @c
wxMAC_USE_NATIVE_TOOLBAR set to 1
*/
- bool AddControl(wxControl* control, const wxString label = "");
+ virtual wxToolBarToolBase* AddControl(wxControl* control,
+ const wxString& label = wxEmptyString);
/**
Adds a new radio tool to the toolbar. Consecutive radio tools form a
@see AddTool()
*/
- wxToolBarToolBase* AddRadioTool(int toolId,
- const wxString& label,
+ wxToolBarToolBase* AddRadioTool(int toolId, const wxString& label,
const wxBitmap& bitmap1,
- const wxBitmap& bitmap2,
- const wxString& shortHelpString = "",
- const wxString& longHelpString = "",
+ const wxBitmap& bmpDisabled = wxNullBitmap,
+ const wxString& shortHelp = wxEmptyString,
+ const wxString& longHelp = wxEmptyString,
wxObject* clientData = NULL);
/**
@see AddTool(), SetToolSeparation()
*/
- void AddSeparator();
+ virtual wxToolBarToolBase* AddSeparator();
/**
Adds a tool to the toolbar.
/**
Returns the number of tools in the toolbar.
*/
- int GetToolsCount() const;
+ size_t GetToolsCount() const;
/**
Inserts the control into the toolbar at the given position. You must
@see AddControl(), InsertTool()
*/
- wxToolBarToolBase* InsertControl(size_t pos, wxControl* control);
+ virtual wxToolBarToolBase* InsertControl(size_t pos, wxControl* control,
+ const wxString& label = wxEmptyString);
/**
Inserts the separator into the toolbar at the given position. You must
@see OnMouseEnter(), OnLeftClick()
*/
- void OnRightClick(int toolId, float x, float y);
+ virtual void OnRightClick(int toolId, long x, long y);
/**
This function should be called after you have added tools.
/**
Clones the generic validator using the copy constructor.
*/
- virtual wxValidator* Clone() const;
+ virtual wxObject* Clone() const;
/**
Transfers the value from the window to the appropriate data type.
/**
Clones the text validator using the copy constructor.
*/
- virtual wxValidator* Clone() const;
+ virtual wxObject* Clone() const;
/**
Returns a reference to the exclude list (the list of invalid values).