See wxDropTarget::OnDrop(). This function is implemented appropriately
for text, and calls OnDropText().
*/
- virtual bool OnDrop(long x, long y, const void data, size_t size);
+ virtual bool OnDrop(wxCoord x, wxCoord y);
/**
Override this function to receive dropped text.
associated with this drop target, calling its wxDataObject::SetData()
method.
*/
- virtual void GetData();
+ virtual bool GetData();
/**
Called after OnDrop() returns @true. By default this will usually
See wxDropTarget::OnDrop(). This function is implemented appropriately
for files, and calls OnDropFiles().
*/
- virtual bool OnDrop(long x, long y, const void data, size_t size);
+ virtual bool OnDrop(wxCoord x, wxCoord y);
/**
Override this function to receive dropped files.
/**
Closes the file.
*/
- void Close();
+ bool Close();
/**
Creates a file for writing.
An OR-combination of wxPosixPermissions enumeration values.
*/
bool Open(const wxString& filename,
- wxFile::OpenMode mode = wxFile::read,
+ bool Open(const wxString& filename, wxFile::OpenMode mode = wxFile::read,
int access = wxS_DEFAULT);
/**
@return The number of bytes read, or the symbol wxInvalidOffset.
*/
- size_t Read(void* buffer, size_t count);
+ ssize_t Read(void* buffer, size_t count);
/**
Seeks to the specified position.
Supported platforms: wxGTK, wxUniv.
*/
- bool SetExtraControlCreator(t_extraControlCreator creator);
+ bool SetExtraControlCreator(ExtraControlCreatorFunction);
/**
Sets the default filename.
const wxSize& size = wxDefaultSize,
long style = wxFNTP_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "fontpickerctrl");
+ const wxString& name = wxFontPickerCtrlNameStr);
/**
Returns the maximum point size value allowed for the user-chosen font.
(see wxFNTP_USE_TEXTCTRL), it's a good idea to put a limit to the maximum
font size when huge fonts do not make much sense.
*/
- void GetMaxPointSize(unsigned int max);
+ unsigned int GetMaxPointSize() const;
/**
Sets the currently selected font.
/**
Assignment operator.
*/
- void operator =(const wxRect& rect);
+ wxRect& operator=(const wxRect& rect);
/**
Equality operator.
/**
Assignment operator.
*/
- void operator =(const wxPoint& pt);
+ wxPoint& operator=(const wxPoint& pt);
bool operator ==(const wxPoint& p1, const wxPoint& p2);
bool operator !=(const wxPoint& p1, const wxPoint& p2);
/**
Assignment operator.
*/
- void operator =(const wxSize& sz);
+ wxSize& operator=(const wxSize& sz);
bool operator ==(const wxSize& s1, const wxSize& s2);
bool operator !=(const wxSize& s1, const wxSize& s2);
Creation function called by the spin control constructor.
See wxSpinCtrlDouble() 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,
- double min = 0, double max = 100,
+ long style = wxSP_ARROW_KEYS, double min = 0, double max = 100,
double initial = 0, double inc = 1,
- const wxString& name = _T("wxSpinCtrlDouble"));
+ const wxString& name = "wxSpinCtrlDouble");
/**
Gets the number of digits in the display.
*/
- unsigned GetDigits() const;
+ unsigned int GetDigits() const;
/**
Gets the increment value.
/**
Sets the number of digits in the display.
*/
- void SetDigits(unsigned digits);
+ void SetDigits(unsigned int digits);
/**
Sets the increment value.
RC.SetCurrent(win); and @e win.SetCurrent(RC); are equivalent,
see wxGLCanvas::SetCurrent.
*/
- void SetCurrent(const wxGLCanvas& win);
+ virtual bool SetCurrent(const wxGLCanvas& win) const;
};
/**
Sets the current colour for this window (using @c glcolor3f()), using the
wxWidgets colour database to find a named colour.
*/
- void SetColour(const wxString& colour);
+ bool SetColour(const wxString& colour);
/**
Makes the OpenGL state that is represented by the OpenGL rendering context
/**
Creates a native graphics font from a wxFont and a text colour.
*/
- wxGraphicsFont CreateFont(const wxFont& font,
- const wxColour& col = wxBLACK) const;
+ virtual wxGraphicsFont CreateFont(const wxFont& font,
+ const wxColour& col = *wxBLACK) const;
/**
Creates a wxGraphicsContext from a native context. This native context must be
Creates a native affine transformation matrix from the passed in values. The
defaults result in an identity matrix.
*/
- wxGraphicsMatrix CreateMatrix(wxDouble a = 1.0, wxDouble b = 0.0,
- wxDouble c = 0.0,
- wxDouble d = 1.0,
+ virtual wxGraphicsMatrix CreateMatrix(wxDouble a = 1.0, wxDouble b = 0.0,
+ wxDouble c = 0.0, wxDouble d = 1.0,
wxDouble tx = 0.0,
wxDouble ty = 0.0) const;
/**
Creates a native graphics font from a wxFont and a text colour.
*/
- wxGraphicsFont CreateFont(const wxFont& font,
- const wxColour& col = wxBLACK);
+ virtual wxGraphicsFont CreateFont(const wxFont& font,
+ const wxColour& col = *wxBLACK) = 0;
/**
Creates a native brush, having a linear gradient, starting at (x1,y1) with
Creates a native affine transformation matrix from the passed in values. The
defaults result in an identity matrix.
*/
- wxGraphicsMatrix CreateMatrix(wxDouble a = 1.0, wxDouble b = 0.0,
- wxDouble c = 0.0,
- wxDouble d = 1.0,
+ virtual wxGraphicsMatrix CreateMatrix(wxDouble a = 1.0, wxDouble b = 0.0,
+ wxDouble c = 0.0, wxDouble d = 1.0,
wxDouble tx = 0.0,
- wxDouble ty = 0.0);
+ wxDouble ty = 0.0) = 0;
/**
Creates a native graphics path which is initially empty.
Sets the matrix to the respective values (default values are the identity
matrix)
*/
- void Set(wxDouble a = 1.0, wxDouble b = 0.0, wxDouble c = 0.0,
- wxDouble d = 1.0, wxDouble tx = 0.0,
- wxDouble ty = 0.0);
+ virtual void Set(wxDouble a = 1.0, wxDouble b = 0.0, wxDouble c = 0.0,
+ wxDouble d = 1.0, wxDouble tx = 0.0, wxDouble ty = 0.0);
/**
Applies this matrix to a distance (ie. performs all transforms except
/**
*/
- const wxColour GetBackgroundColour() const;
+ const wxColour& GetBackgroundColour() const;
/**
*/
- wxGridCellEditor* GetEditor(wxGrid* grid, int row, int col) const;
+ wxGridCellEditor* GetEditor(const wxGrid* grid, int row, int col) const;
/**
*/
- const wxFont GetFont() const;
+ const wxFont& GetFont() const;
/**
*/
- wxGridCellRenderer* GetRenderer(wxGrid* grid, int row, int col) const;
+ wxGridCellRenderer* GetRenderer(const wxGrid* grid, int row, int col) const;
/**
*/
- const wxColour GetTextColour() const;
+ const wxColour& GetTextColour() const;
/**
Returns @c wxNOT_FOUND if there is no row at the y position.
*/
- int YToRow(int y) const;
+ int YToRow(int y, bool clipToMinMax = false) const;
};
/**
Displays help window and focuses contents panel.
*/
- void DisplayContents();
+ virtual bool DisplayContents();
/**
Displays help window and focuses index panel.
*/
- void DisplayIndex();
+ bool DisplayIndex();
/**
Displays the help window, focuses search panel and starts searching.
/**
Reads the controller's setting (position of window, etc.)
*/
- void ReadCustomization(wxConfigBase* cfg,
- wxString path = wxEmptyString);
+ virtual void ReadCustomization(wxConfigBase* cfg,
+ const wxString& path = wxEmptyString);
/**
Sets the path for storing temporary files - cached binary versions of index and
/**
Stores controllers setting (position of window etc.)
*/
- void WriteCustomization(wxConfigBase* cfg,
- wxString path = wxEmptyString);
+ virtual void WriteCustomization(wxConfigBase* cfg,
+ const wxString& path = wxEmptyString);
};
/**
Returns array with help books info.
*/
- const wxHtmlBookRecArray GetBookRecArray();
+ const wxHtmlBookRecArray& GetBookRecArray() const;
/**
Returns reference to array with contents entries.
*/
- const wxHtmlHelpDataItems GetContentsArray();
+ const wxHtmlHelpDataItems& GetContentsArray() const;
/**
Returns reference to array with index entries.
*/
- const wxHtmlHelpDataItems GetIndexArray();
+ const wxHtmlHelpDataItems& GetIndexArray() const;
/**
Sets the temporary directory where binary cached versions of MS HTML Workshop
for a description of the parameters.
*/
bool Create(wxWindow* parent, wxWindowID id,
- const wxString& title = wxEmptyString,
- int style = wxHF_DEFAULT_STYLE);
+ const wxString& title = wxEmptyString, int style = wxHF_DEFAULT_STYLE,
+ wxConfigBase* config = NULL,
+ const wxString& rootpath = wxEmptyString);
/**
Returns the help controller associated with the frame.
*/
bool Create(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& pos = wxDefaultSize,
- int style = wxTAB_TRAVERSAL|wxBORDER_NONE,
- int helpStyle = wxHF_DEFAULT_STYLE,
- wxHtmlHelpData* data = NULL);
+ const wxSize& size = wxDefaultSize, int style = wxTAB_TRAVERSAL|wxBORDER_NONE,
+ int helpStyle = wxHF_DEFAULT_STYLE);
/**
Creates search panel.
while (container->AdjustPagebreak(&p)) {}
@endcode
*/
- virtual bool AdjustPagebreak(int* pagebreak);
+ virtual bool AdjustPagebreak(int* pagebreak,
+ wxArrayInt& known_pagebreaks) const;
/**
Renders the cell.
y-coord of the last line visible in window.
This is used to optimize rendering speed
*/
- virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
+ virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info);
/**
This method is called instead of Draw() when the cell is certainly out of
dc->DrawText("hello", x + m_PosX, y + m_PosY)
@endcode
*/
- virtual void DrawInvisible(wxDC& dc, int x, int y);
+ virtual void DrawInvisible(wxDC& cd, int x , int y, wxHtmlRenderingInfo& info);
/**
Returns pointer to itself if this cell matches condition (or if any of the
/**
Returns unique cell identifier if there is any, the empty string otherwise.
*/
- virtual wxString GetId() const;
+ const wxString& GetId() const;
/**
Returns hypertext link if associated with this cell or @NULL otherwise.
Sets the next cell in the list. This shouldn't be called by user - it is
to be used only by wxHtmlContainerCell::InsertCell.
*/
- void SetNext(wxHtmlCell cell);
+ void SetNext(wxHtmlCell* cell);
/**
Sets parent container of this cell.
This is called from wxHtmlContainerCell::InsertCell.
*/
- void SetParent(wxHtmlContainerCell p);
+ void SetParent(wxHtmlContainerCell* p);
/**
Sets the cell's position within parent container.
/**
Inserts a new cell into the container.
*/
- void InsertCell(wxHtmlCell cell);
+ void InsertCell(wxHtmlCell* cell);
/**
Sets the container's alignment (both horizontal and vertical) according to
Assigns @a parser to this handler. Each @b instance of handler
is guaranteed to be called only from the parser.
*/
- virtual void SetParser(wxHtmlParser parser);
+ virtual void SetParser(wxHtmlParser* parser);
protected:
/**
All handlers are deleted on object deletion.
*/
- virtual void AddTagHandler(wxHtmlTagHandler handler);
+ virtual void AddTagHandler(wxHtmlTagHandler* handler);
/**
Must be overwritten in derived class.
/**
Returns pointer to the source being parsed.
*/
- wxString* GetSource();
+ const wxString* GetSource();
/**
Setups the parser for parsing the @a source string.
Sets the virtual file system that will be used to request additional files.
(For example @c IMG tag handler requests wxFSFile with the image data.)
*/
- void SetFS(wxFileSystem fs);
+ void SetFS(wxFileSystem* fs);
/**
Call this function to interrupt parsing from a tag handler.
Example: tag contains \<FONT SIZE=+2 COLOR="#000000"\>.
Call to tag.GetAllParams() would return @c 'SIZE=+2 COLOR="#000000"'.
*/
- const wxString GetAllParams() const;
+ wxString GetAllParams() const;
/**
Returns beginning position of the text @e between this tag and paired
@param path
Optional path in config tree. If not given current path is used.
*/
- virtual void ReadCustomization(wxConfigBase cfg,
+ virtual void ReadCustomization(wxConfigBase* cfg,
wxString path = wxEmptyString);
/**
wxHTML_FONT_SIZE_2, ..., wxHTML_FONT_SIZE_7.
Note that they differ among platforms. Default face names are empty strings.
*/
- void SetFonts(const wxString& normal_face,
- const wxString& fixed_face,
- const int sizes = NULL);
+ void SetFonts(const wxString& normal_face, const wxString& fixed_face,
+ const int* sizes = NULL);
/**
Sets HTML page and display it. This won't @b load the page!!
@param path
Optional path in config tree. If not given, the current path is used.
*/
- virtual void WriteCustomization(wxConfigBase cfg,
+ virtual void WriteCustomization(wxConfigBase* cfg,
wxString path = wxEmptyString);
protected:
@return @true if a link was clicked, @false otherwise.
*/
- virtual bool OnCellClicked(wxHtmlCell cell, wxCoord x, wxCoord y,
+ virtual bool OnCellClicked(wxHtmlCell* cell, wxCoord x, wxCoord y,
const wxMouseEvent& event);
/**
@param y
The logical y coordinate of the click point
*/
- virtual void OnCellMouseHover(wxHtmlCell cell, wxCoord x, wxCoord y);
+ virtual void OnCellMouseHover(wxHtmlCell* cell, wxCoord x, wxCoord y);
};
With this function the event handler can return info to the wxHtmlWindow
which sent the event.
*/
- bool SetLinkClicked(bool linkclicked);
+ void SetLinkClicked(bool linkclicked);
};
- SetHtmlText()
<b>Render() changes the DC's user scale and does NOT restore it.</b>
*/
- int Render(int x, int y, int from = 0, int dont_render = false);
+ int Render(int x, int y, wxArrayInt& known_pagebreaks, int from = 0,
+ int dont_render = 0, int to = INT_MAX);
/**
Assign DC instance to the renderer.
@see SetSize()
*/
- void SetFonts(const wxString& normal_face,
- const wxString& fixed_face,
- const int sizes = NULL);
+ void SetFonts(const wxString& normal_face, const wxString& fixed_face,
+ const int* sizes = NULL);
/**
Assign text to the renderer. Render() then draws the text onto DC.
/**
Sets fonts. See wxHtmlWindow::SetFonts for detailed description.
*/
- void SetFonts(const wxString& normal_face,
- const wxString& fixed_face,
- const int sizes = NULL);
+ void SetFonts(const wxString& normal_face, const wxString& fixed_face,
+ const int* sizes = NULL);
/**
Set page footer. The following macros can be used inside it:
/**
Sets fonts. See wxHtmlWindow::SetFonts for detailed description.
*/
- void SetFonts(const wxString& normal_face,
- const wxString& fixed_face,
- const int sizes = NULL);
+ void SetFonts(const wxString& normal_face, const wxString& fixed_face,
+ const int* sizes = NULL);
/**
Set page footer. The following macros can be used inside it:
@see wxImage::LoadFile, wxImage::SaveFile, SaveFile()
*/
- bool LoadFile(wxImage* image, wxInputStream& stream,
- bool verbose = true, int index = 0);
+ virtual bool LoadFile(wxImage* image, wxInputStream& stream,
+ bool verbose = true, int index = -1);
/**
Saves a image in the output stream.
@see wxImage::LoadFile, wxImage::SaveFile, LoadFile()
*/
- bool SaveFile(wxImage* image, wxOutputStream& stream);
+ virtual bool SaveFile(wxImage* image, wxOutputStream& stream,
+ bool verbose = true);
/**
Sets the handler extension.
@return @false if FindFirstUnusedColour returns @false, @true otherwise.
*/
- bool ConvertAlphaToMask(unsigned char threshold = 128);
+ bool ConvertAlphaToMask(unsigned char threshold = wxIMAGE_ALPHA_THRESHOLD);
/**
@deprecated
when converting to YUV, where every pixel equals
(R * @a lr) + (G * @a lg) + (B * @a lb).
*/
- wxImage ConvertToGreyscale(double lr = 0.299, double lg = 0.587,
- double lb = 0.114) const;
+ wxImage ConvertToGreyscale(double lr = 0.299, double lg = 0.587, double lb = 1.114) const;
/**
Returns monochromatic version of the image.
Get the current mask colour or find a suitable unused colour that could be
used as a mask colour. Returns @true if the image currently has a mask.
*/
- bool GetOrFindMaskColour(unsigned char r, unsigned char g,
- unsigned char b) const;
+ bool GetOrFindMaskColour(unsigned char* r, unsigned char* g,
+ unsigned char* b) const;
/**
Returns the palette associated with the image.
/**
Converts a color in HSV color space to RGB color space.
*/
- wxImage::RGBValue HSVtoRGB(const wxImage::HSVValue & hsv);
+ static wxImage::RGBValue HSVtoRGB(const wxImage::HSVValue& hsv);
/**
Returns @true if this image has alpha channel, @false otherwise.
colour if this image has a mask or if this image has alpha channel and alpha
value of this pixel is strictly less than @a threshold.
*/
- bool IsTransparent(int x, int y, unsigned char threshold = 128) const;
+ bool IsTransparent(int x, int y,
+ unsigned char threshold = wxIMAGE_ALPHA_THRESHOLD) const;
/**
Loads an image from an input stream.
/**
Converts a color in RGB color space to HSV color space.
*/
- wxImage::HSVValue RGBtoHSV(const wxImage::RGBValue& rgb);
+ static wxImage::HSVValue RGBtoHSV(const wxImage::RGBValue& rgb);
/**
Finds the handler with the given name, and removes it.
@see Scale()
*/
- wxImage Rescale(int width, int height,
+ wxImage& Rescale(int width, int height,
int quality = wxIMAGE_QUALITY_NORMAL);
/**
@see Size()
*/
- wxImage Resize(const wxSize& size, const wxPoint& pos,
- int red = -1, int green = -1,
- int blue = -1);
+ wxImage& Resize(const wxSize& size, const wxPoint& pos, int red = -1,
+ int green = -1, int blue = -1);
/**
Rotates the image about the given point, by @a angle radians.
@return Returns 'this' object.
*/
- wxImage operator =(const wxImage& image);
+ wxImage& operator=(const wxImage& image);
};
// ============================================================================
the text control without changes, a @c EVT_LIST_END_LABEL_EDIT event
will be sent which can be vetoed as well.
*/
- void EditLabel(long item);
+ wxTextCtrl* EditLabel(long item,
+ wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl));
/**
Ensures this item is visible.
/**
Gets the application-defined data associated with this item.
*/
- long GetItemData(long item) const;
+ wxUIntPtr GetItemData(long item) const;
/**
Returns the item's font.
To compile this feature into wxWidgets library you need to have access to
commctrl.h of version 4.70 that is provided by Microsoft.
*/
- long HitTest(const wxPoint& point, int& flags, long* ptrSubItem) const;
+ long HitTest(const wxPoint& point, int& flags, long* ptrSubItem = NULL) const;
/**
For report view mode (only), inserts a column. For more details, see SetItem().
Note that the wxWindow::GetBackgroundColour() function of wxWindow base
class can be used to retrieve the current background colour.
*/
- void SetBackgroundColour(const wxColour& col);
+ virtual bool SetBackgroundColour(const wxColour& col);
/**
Sets information about this column.
Sets the unselected and selected images associated with the item.
The images are indices into the image list associated with the list control.
*/
- bool SetItemImage(long item, int image);
+ bool SetItemImage(long item, int image, int selImage = -1);
/**
Sets the unselected and selected images associated with the item.
This form is deprecated: @a selImage is not used; use the other
SetItemImage() overload.
*/
- bool SetItemImage(long item, int image, int selImage);
+ bool SetItemImage(long item, int image, int selImage = -1);
/**
Sets the position of the item, in icon or small icon view. Windows only.
/**
An item object, used by some events. See also wxListCtrl::SetItem.
*/
- const wxListItem GetItem() const;
+ const wxListItem& GetItem() const;
/**
Key code if the event is a keypress event.
/**
The (new) item label for @c EVT_LIST_END_LABEL_EDIT event.
*/
- const wxString GetLabel() const;
+ const wxString& GetLabel() const;
/**
The mask.
/**
The text.
*/
- const wxString GetText() const;
+ const wxString& GetText() const;
/**
This method only makes sense for @c EVT_LIST_END_LABEL_EDIT message and
Returns client data associated with the control.
Please note that client data is associated with the item and not with subitems.
*/
- long GetData() const;
+ wxUIntPtr GetData() const;
/**
Returns the font used to display the item.
Used in two-step frame construction.
See wxMDIParentFrame() 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 | wxVSCROLL | wxHSCROLL,
- const wxString& name = "frame");
+ const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
+ const wxString& name = wxFrameNameStr);
/**
Returns a pointer to the active MDI child, if there is one.
@see SetToolBar()
*/
- virtual wxWindow* GetToolBar() const;
+ virtual wxToolBar* GetToolBar() const;
/**
Returns the current Window menu (added by wxWidgets to the menubar). This
@see GetToolBar(), GetClientSize()
*/
- virtual void SetToolBar(wxWindow* toolbar);
+ virtual void SetToolBar(wxToolBar* toolbar);
/**
Call this to change the current Window menu.
Used in two-step frame construction.
See wxMDIChildFrame() for further details.
*/
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& title,
+ bool Create(wxMDIParentFrame* 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);
/**
Maximizes this MDI child frame.
@see Activate(), Restore()
*/
- void Maximize(bool maximize);
+ virtual void Maximize(bool maximize = true);
/**
Restores this MDI child frame (unmaximizes).
Allows you to transfer data from the internal buffer of wxMemoryOutputStream
to an external buffer. @a len specifies the size of the buffer.
*/
- size_t CopyTo(char* buffer, size_t len) const;
+ size_t CopyTo(void* buffer, size_t len) const;
/**
Returns the pointer to the stream object used as an internal buffer
/**
Adds a paragraph of text.
*/
- wxRichTextRange AddParagraph(const wxString& text);
+ virtual wxRichTextRange AddParagraph(const wxString& text,
+ wxTextAttr* paraStyle = 0);
/**
Returns @true if the buffer is currently collapsing commands into a single
See BeginNumberedBullet() for an explanation of how indentation is used
to render the bulleted paragraph.
*/
- bool BeginSymbolBullet(wxChar symbol, int leftIndent,
+ bool BeginSymbolBullet(const wxString& symbol, int leftIndent,
int leftSubIndent,
int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL);
/**
Finds a handler by filename or, if supplied, type.
*/
- wxRichTextFileHandler* FindHandlerFilenameOrType(const wxString& filename,
- int imageType);
+ static wxRichTextFileHandler* FindHandlerFilenameOrType(const wxString& filename, wxRichTextFileType imageType);
/**
Gets the basic (overall) style.
applied (for example, setting the default style to bold will cause
subsequently inserted text to be bold).
*/
- const wxTextAttr GetBasicStyle() const;
+ virtual const wxTextAttr& GetBasicStyle() const;
/**
Gets the collapsed command.
(for example, setting the default style to bold will cause subsequently
inserted text to be bold).
*/
- const wxTextAttr GetDefaultStyle() const;
+ virtual const wxTextAttr& GetDefaultStyle() const;
/**
Gets a wildcard incorporating all visible handlers.
/**
Returns the list of file handlers.
*/
- wxList GetHandlers();
+ static wxList& GetHandlers();
/**
Returns the object to be used to render certain aspects of the content, such as
/**
Submits a command to insert the given image.
*/
- bool InsertImageWithUndo(long pos,
- const wxRichTextImageBlock& imageBlock,
- wxRichTextCtrl* ctrl);
+ bool InsertImageWithUndo(long pos, const wxRichTextImageBlock& imageBlock,
+ wxRichTextCtrl* ctrl, int flags = 0);
/**
Submits a command to insert a newline.
*/
- bool InsertNewlineWithUndo(long pos, wxRichTextCtrl* ctrl);
+ bool InsertNewlineWithUndo(long pos, wxRichTextCtrl* ctrl, int flags = 0);
/**
Submits a command to insert the given text.
*/
bool InsertTextWithUndo(long pos, const wxString& text,
- wxRichTextCtrl* ctrl);
+ wxRichTextCtrl* ctrl, int flags = 0);
/**
Returns @true if the buffer has been modified.
This is not cumulative - setting the default style will replace the previous
default style.
*/
- void SetDefaultStyle(const wxTextAttr& style);
+ virtual bool SetDefaultStyle(const wxTextAttr& style);
//@{
/**
/**
Returns the encoding associated with the handler (if any).
*/
- const wxString GetEncoding() const;
+ const wxString& GetEncoding() const;
/**
Returns the extension associated with the handler.
/**
Gets the range for the current operation.
*/
- wxRichTextRange GetRange() const;
+ const wxRichTextRange& GetRange() const;
/**
Sets the character variable.
See BeginNumberedBullet() for an explanation of how indentation is used
to render the bulleted paragraph.
*/
- bool BeginSymbolBullet(wxChar symbol, int leftIndent,
+ bool BeginSymbolBullet(const wxString& symbol, int leftIndent,
int leftSubIndent,
int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL);
applied (for example, setting the default style to bold will cause
subsequently inserted text to be bold).
*/
- const wxTextAttr GetBasicStyle() const;
+ virtual const wxTextAttr& GetBasicStyle() const;
//@{
/**
Returns the current default style, which can be used to change how subsequently
inserted text is displayed.
*/
- const wxTextAttr GetDefaultStyle() const;
+ virtual const wxTextAttr& GetDefaultStyle() const;
/**
Gets the size of the buffer beyond which layout is delayed during resizing.
/**
Returns the selection range in character positions. -1, -1 means no selection.
*/
- const wxRichTextRange GetSelectionRange() const;
+ wxRichTextRange GetSelectionRange() const;
/**
Returns the text within the current selection range, if any.
Creation: see wxRichTextFormattingDialog() "the constructor" for
details about the parameters.
*/
- bool Create(long flags, wxWindow* parent, const wxString& title,
- wxWindowID id, const wxPoint& pos = wxDefaultPosition,
- const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE);
+ bool Create(long flags, wxWindow* parent,
+ const wxString& title = wxGetTranslation(wxT("Formatting")), wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE);
//@{
/**
/**
Returns the directory used to store temporary image files.
*/
- const wxString GetTempDir() const;
+ const wxString& GetTempDir() const;
/**
Returns the image locations for the last operation.
*/
- const wxArrayString GetTemporaryImageLocations() const;
+ const wxArrayString& GetTemporaryImageLocations() const;
/**
Reset the file counter, in case, for example, the same names are required each
/**
Returns the text colour for drawing the header and footer.
*/
- const wxColour GetTextColour() const;
+ const wxColour& GetTextColour() const;
/**
Initialises the object.
/**
Returns the header and footer data associated with the printout.
*/
- const wxRichTextHeaderFooterData GetHeaderFooterData() const;
+ const wxRichTextHeaderFooterData& GetHeaderFooterData() const;
/**
Gets the page information.
/**
Sets margins in 10ths of millimetre. Defaults to 1 inch for margins.
*/
- void SetMargins(int top = 252, int bottom = 252, int left = 252,
- int right = 252);
+ void SetMargins(int top = 254, int bottom = 254, int left = 254,
+ int right = 254);
/**
Sets the buffer to print. wxRichTextPrintout does not manage this pointer;
/**
Returns the internal wxRichTextHeaderFooterData object.
*/
- const wxRichTextHeaderFooterData GetHeaderFooterData() const;
+ const wxRichTextHeaderFooterData& GetHeaderFooterData() const;
/**
A convenience function to get the header text.
/**
Returns the dimensions to be used for the preview window.
*/
- const wxRect GetPreviewRect() const;
+ const wxRect& GetPreviewRect() const;
/**
Returns a pointer to the internal print data.
/**
Returns the title of the preview window or printing wait caption.
*/
- const wxString GetTitle() const;
+ const wxString& GetTitle() const;
/**
Shows the page setup dialog.
/**
Sets the page setup data.
*/
- void SetPageSetupData(const wxPageSetupData& pageSetupData);
+ void SetPageSetupData(const wxPageSetupDialogData& pageSetupData);
/**
Sets the parent window to be used for the preview window and printing
/**
Creates the dialog. See the ctor.
*/
- bool Create(int flags,
- wxRichTextStyleSheet* sheet,
- wxRichTextCtrl* ctrl,
- wxWindow* parent,
- wxWindowID id = wxID_ANY,
- const wxString& caption = _("Style Organiser"),
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX);
+ bool Create(int flags, wxRichTextStyleSheet* sheet, wxRichTextCtrl* ctrl,
+ wxWindow* parent, wxWindowID id = wxID_ANY,
+ const wxString& caption = wxGetTranslation("Style Organiser"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(400, 300), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX);
/**
Returns @true if the user has opted to restart numbering.
/**
Returns the style on which this style is based.
*/
- const wxString GetBaseStyle() const;
+ const wxString& GetBaseStyle() const;
/**
Returns the style's description.
*/
- const wxString GetDescription() const;
+ const wxString& GetDescription() const;
/**
Returns the style name.
*/
- const wxString GetName() const;
+ const wxString& GetName() const;
//@{
/**
Returns the style attributes combined with the attributes of the specified base
style, if any. This function works recursively.
*/
- wxTextAttr GetStyleMergedWithBase(wxRichTextStyleSheet* sheet) const;
+ virtual wxTextAttr GetStyleMergedWithBase(const wxRichTextStyleSheet* sheet) const;
/**
Sets the name of the style that this style is based on.
/**
Returns the style that should normally follow this style.
*/
- const wxString GetNextStyle() const;
+ const wxString& GetNextStyle() const;
/**
Sets the style that should normally follow this style.
/**
Returns @true if the given level has numbered list attributes.
*/
- int IsNumbered(int level) const;
+ bool IsNumbered(int level) const;
//@{
/**
/**
Finds a character definition by name.
*/
- wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name) const;
+ wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name,
+ bool recurse = true) const;
/**
Finds a list definition by name.
*/
- wxRichTextListStyleDefinition* FindListStyle(const wxString& name) const;
+ wxRichTextListStyleDefinition* FindListStyle(const wxString& name,
+ bool recurse = true) const;
/**
Finds a paragraph definition by name.
*/
- wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name) const;
+ wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name,
+ bool recurse = true) const;
/**
Finds a style definition by name.
/**
Returns the style sheet's description.
*/
- const wxString GetDescription() const;
+ const wxString& GetDescription() const;
/**
Returns the @e nth list style.
/**
Returns the style sheet's name.
*/
- const wxString GetName() const;
+ const wxString& GetName() const;
/**
Returns the @e nth paragraph style.
Creation: see @ref wxSymbolPickerDialog() "the constructor" for details about
the parameters.
*/
- bool Create(const wxString& symbol,
- const wxString& initialFont,
- const wxString& normalTextFont,
- wxWindow* parent,
+ bool Create(const wxString& symbol, const wxString& initialFont,
+ const wxString& normalTextFont, wxWindow* parent,
wxWindowID id = wxID_ANY,
- const wxString& title = _("Symbols"),
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxCLOSE_BOX);
+ const wxString& caption = wxGetTranslation("Symbols"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(400, 300), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxCLOSE_BOX);
/**
Returns the font name (the font reflected in the font list).
/**
Sets the initial/selected font name.
*/
- void SetFontName(const wxString& value);
+ void SetFontName(wxString value);
/**
Sets the internal flag indicating that the full Unicode range should be
/**
Sets the name of the font to be used in the absence of a selected font.
*/
- void SetNormalTextFontName(const wxString& value);
+ void SetNormalTextFontName(wxString value);
/**
Sets the symbol as a one or zero character string.
*/
- void SetSymbol(const wxString& value);
+ void SetSymbol(wxString value);
/**
Sets Unicode display mode.
Returns a character string (actually a pointer to the connection's buffer) if
successful, @NULL otherwise.
*/
- const void* Request(const wxString& item, size_t* size,
+ virtual const void* Request(const wxString& item, size_t* size = 0,
wxIPCFormat format = wxIPC_TEXT);
/**
/**
If this item is tracking a spacer, return its size.
*/
- const wxSize GetSpacer() const;
+ wxSize GetSpacer() const;
/**
Get the userData item attribute.
@see Top(), Left(), Right(), Bottom(), Centre()
*/
- wxSizerFlags& Align(int align = 0);
+ wxSizerFlags& Align(int alignment);
/**
Sets the wxSizerFlags to have a border of a number of pixels specified
/**
Sets the proportion of this wxSizerFlags to @e proportion
*/
- wxSizerFlags& Proportion(int proportion = 0);
+ wxSizerFlags& Proportion(int proportion);
/**
Aligns the object to the right, similar for @c Align(wxALIGN_RIGHT).
@see SetFlexibleDirection(), SetNonFlexibleGrowMode()
*/
- int GetNonFlexibleGrowMode() const;
+ wxFlexSizerGrowMode GetNonFlexibleGrowMode() const;
/**
Returns @true if column @a idx is growable.
Scrollbar creation function called by the spin button constructor.
See wxSpinButton() for details.
*/
- bool Create(wxWindow* parent, wxWindowID id,
+ bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxSP_HORIZONTAL,
- const wxString& name = "spinButton");
+ const wxSize& size = wxDefaultSize, long style = wxSP_HORIZONTAL,
+ const wxString& name = "wxSpinButton");
/**
Returns the maximum permissible value.
Creation function, for two-step construction.
See wxSplitterWindow() for details.
*/
- bool Create(wxWindow* parent, wxWindowID id,
+ bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
const wxPoint& point = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxSP_3D,
- const wxString& name = "splitterWindow");
+ const wxSize& size = wxDefaultSize, long style = wxSP_3D,
+ const wxString& name = "splitter");
/**
Returns the current minimum pane size (defaults to zero).
@see SetSplitMode(), SplitVertically(), SplitHorizontally().
*/
- int GetSplitMode() const;
+ wxSplitMode GetSplitMode() const;
/**
Returns the left/top or only pane.
@see GetSashPosition()
*/
- void SetSashPosition(int position, const bool redraw = true);
+ void SetSashPosition(int position, bool redraw = true);
/**
Sets the sash size. Normally, the sash size is determined according to the
Creates the static box for two-step construction.
See wxStaticBox() 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 wxString& name = "staticBox");
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxString& name = wxStaticBoxNameStr);
};
*/
bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = "staticLine");
+ const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL,
+ const wxString& name = wxStaticLineNameStr);
/**
This static function returns the size which will be given to the smaller
This method can be used to allocate the buffer with enough space for the
trailing @c NUL characters for any encoding.
*/
- const size_t GetMaxMBNulLen();
+ static size_t GetMaxMBNulLen();
/**
Convert multibyte string to a wide character one.
The number of character written (or which would have been written
if it were non-@NULL) to @a dst or @c wxCONV_FAILED on error.
*/
- virtual size_t ToWChar(wchar_t* dst, size_t dstLen,
- const char* src,
+ virtual size_t ToWChar(wchar_t* dst, size_t dstLen, const char* src,
size_t srcLen = wxNO_LEN) const;
/**
The number of character written (or which would have been written
if it were non-@NULL) to @a dst or @c wxCONV_FAILED on error.
*/
- virtual size_t FromWChar(char* dst, size_t dstLen,
- const wchar_t* src,
+ virtual size_t FromWChar(char* dst, size_t dstLen, const wchar_t* src,
size_t srcLen = wxNO_LEN) const;
/**
/**
Returns the current position (counted in bytes) in the stream buffer.
*/
- wxFileOffset GetIntPosition() const;
+ size_t GetIntPosition() const;
/**
Returns the amount of bytes read during the last IO call to the parent stream.
Returns the first character in the input queue and removes it,
blocking until it appears if necessary.
*/
- char GetC();
+ int GetC();
/**
Returns the last number of bytes read.
/**
wxWidgets compatibility conversion. Same as c_str().
*/
- const wxCStrData* GetData() const;
+ const wxCStrData GetData() const;
/**
Returns a reference to the character at position @e n.
Returns a substring starting at @e first, with length @e count, or the rest of
the string if @a count is the default value.
*/
- wxString Mid(size_t first, size_t count = wxSTRING_MAXLEN) const;
+ wxString Mid(size_t first, size_t nCount = wxString::npos) const;
/**
Adds @a count copies of @a pad to the beginning, or to the end of the
string (the default). Removes spaces from the left or from the right (default).
*/
- wxString& Pad(size_t count, wxUniChar pad = ' ',
- bool fromRight = true);
+ wxString& Pad(size_t count, wxUniChar chPad = ' ', bool fromRight = true);
/**
Prepends @a str to this string, returning a reference to this string.
size. Unfortunately, this function is not available on all platforms and the
dangerous @e vsprintf() will be used then which may lead to buffer overflows.
*/
- int Printf(const wxChar* pszFormat, ...);
+ int Printf(const wxString& pszFormat, ...);
/**
Similar to vprintf. Returns the number of characters written, or an integer
less than zero
on error.
*/
- int PrintfV(const wxChar* pszFormat, va_list argPtr);
+ int PrintfV(const wxString& pszFormat, va_list argPtr);
//@{
/**
/**
Removes the last character.
*/
- wxString RemoveLast();
+ wxString& RemoveLast(size_t n = 1);
/**
Replace first (or all) occurrences of substring with another one.
Minimizes the string's memory. This can be useful after a call to
Alloc() if too much memory were preallocated.
*/
- void Shrink();
+ bool Shrink();
/**
This function can be used to test if the string starts with the specified
@see ToLong(), ToULong()
*/
- bool ToDouble(double val) const;
+ bool ToDouble(double* val) const;
/**
Attempts to convert the string to a signed integer in base @e base. Returns
@see ToDouble(), ToULong()
*/
- bool ToLong(long val, int base = 10) const;
+ bool ToLong(long* val, int base = 10) const;
/**
This is exactly the same as ToLong() but works with 64
@see ToLong(), ToULongLong()
*/
- bool ToLongLong(wxLongLong_t val, int base = 10) const;
+ bool ToLongLong(wxLongLong_t* val, int base = 10) const;
/**
Attempts to convert the string to an unsigned integer in base @e base.
@see ToDouble(), ToLong()
*/
- bool ToULong(unsigned long val, int base = 10) const;
+ bool ToULong(unsigned long* val, int base = 10) const;
/**
This is exactly the same as ToULong() but works with 64
bit integer numbers.
Please see ToLongLong() for additional remarks.
*/
- bool ToULongLong(wxULongLong_t val, int base = 10) const;
+ bool ToULongLong(wxULongLong_t* val, int base = 10) const;
//@{
/**
@see wc_str(), utf8_str(), c_str(), mb_str(), fn_str()
*/
- const wxCStrData c_str() const;
+ wxCStrData c_str() const;
/**
Returns an object with string data that is implicitly convertible to
This function is called by wxWidgets itself and should never be called
directly.
*/
- virtual ExitCode Entry();
+ virtual ExitCode Entry() = 0;
/**
Creates a new thread.
See @ref thread_deletion for a broader explanation of this routine.
*/
- wxThreadError Delete();
+ wxThreadError Delete(void** rc = NULL);
/**
Returns the number of system CPUs or -1 if the value is unknown.
identifies the thread throughout the system during its existence
(i.e. the thread identifiers may be reused).
*/
- unsigned long GetId() const;
+ wxThreadIdType GetId() const;
/**
Gets the priority of the thread, between zero and 100.
- @b WXTHREAD_DEFAULT_PRIORITY: 50
- @b WXTHREAD_MAX_PRIORITY: 100
*/
- int GetPriority() const;
+ unsigned int GetPriority() const;
/**
Returns @true if the thread is alive (i.e. started and not terminating).
- @b WXTHREAD_DEFAULT_PRIORITY: 50
- @b WXTHREAD_MAX_PRIORITY: 100
*/
- void SetPriority(int priority);
+ void SetPriority(unsigned int priority);
/**
Pauses the thread execution for the given amount of time.
See @ref thread_deletion for a broader explanation of this routine.
*/
- ExitCode Wait() const;
+ ExitCode Wait();
/**
Give the rest of the thread time slice to the system allowing the other
This function is called by wxWidgets itself and should never be called
directly.
*/
- virtual ExitCode Entry();
+ virtual ExitCode Entry() = 0;
/**
This is a protected function of the wxThread class and thus can only be called
- wxSEMA_TIMEOUT: Timeout occurred without receiving semaphore.
- wxSEMA_MISC_ERROR: Miscellaneous error.
*/
- wxSemaError WaitTimeout(unsigned longtimeout_millis);
+ wxSemaError WaitTimeout(unsigned long timeout_millis);
};
If non-@NULL this is the event handler which will receive the
timer events (see wxTimerEvent) when the timer is running.
*/
- wxEvtHandler GetOwner() const;
+ wxEvtHandler* GetOwner() const;
/**
Returns @true if the timer is one shot, i.e. if it will stop after firing
/**
Returns the timer object which generated this event.
*/
- wxTimer GetTimer() const;
+ wxTimer& GetTimer() const;
};
/**
Writes a character to the stream.
*/
- void PutChar(wxChar c);
+ wxTextOutputStream& PutChar(wxChar c);
/**
Set the end-of-line mode. One of ::wxEOL_NATIVE, ::wxEOL_DOS,