@param parser
Pointer to the parser that requested tables filling.
*/
- virtual void FillHandlersTable(wxHtmlWinParser parser);
+ virtual void FillHandlersTable(wxHtmlWinParser*);
};
/**
Returns actual text colour.
*/
- const wxColour GetActualColor() const;
+ const wxColour& GetActualColor() const;
/**
Returns default horizontal alignment.
if the parser is between @c A and @c /A tags,
wxEmptyString otherwise.)
*/
- const wxHtmlLinkInfo GetLink() const;
+ const wxHtmlLinkInfo& GetLink() const;
/**
Returns the colour of hypertext link text.
*/
- const wxColour GetLinkColor() const;
+ const wxColour& GetLinkColor() const;
/**
Returns output encoding, i.e. closest match to document's input encoding
HTML are given in pixels -- e.g. image sizes. 300x300 image would be only one
inch wide on typical printer. With pixel_scale = 3.0 it would be 3 inches.)
*/
- virtual void SetDC(wxDC dc, double pixel_scale = 1.0);
+ virtual void SetDC(wxDC* dc, double pixel_scale = 1.0e+0);
/**
Sets bold flag of actualfont. @a x is either @true of @false.
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 = 0);
/**
Sets input encoding. The parser uses this information to build conversion
Initializes a file stream in write-only mode using the file descriptor @e fp.
*/
wxFFileOutputStream(const wxString& filename,
- const wxString& mode = "w+b");
+ const wxString& mode = "wb");
/**
Initializes a file stream in write-only mode using the file I/O object file.
@remarks This function is currently only implemented under Mac/Carbon.
*/
- void AlwaysShowScrollbars(bool hflag, bool vflag);
+ virtual void AlwaysShowScrollbars(bool = true, bool = true);
/**
Sets the cached best size value.
/**
A synonym for Centre().
*/
- void Center(int direction);
+ void Center(int dir = wxBOTH);
/**
A synonym for CentreOnParent().
*/
- void CenterOnParent(int direction);
+ void CenterOnParent(int dir = wxBOTH);
/**
Centres the window.
/**
Destroys all children of a window. Called automatically by the destructor.
*/
- virtual void DestroyChildren();
+ bool DestroyChildren();
/**
Returns true if this window is in process of being destroyed.
*/
bool Disable();
- /**
- Gets the size which best suits the window: for a control, it would be
- the minimal size which doesn't truncate the control, for a panel - the
- same size as it would have after a call to Fit().
-
- The default implementation of this function is designed for use in container
- windows, such as wxPanel, and works something like this:
- -# If the window has a sizer then it is used to calculate the best size.
- -# Otherwise if the window has layout constraints then those are used to
- calculate the best size.
- -# Otherwise if the window has children then the best size is set to be large
- enough to show all the children.
- -# Otherwise if there are no children then the window's minimal size will be
- used as its best size.
- -# Otherwise if there is no minimal size set, then the current size is used
- for the best size.
-
- @see @ref overview_windowsizing
- */
- virtual wxSize DoGetBestSize() const;
-
/**
Does the window-specific updating after processing the update event.
This function is called by UpdateWindowUI() in order to check return
Cast it to an appropriate handle, such as @b HWND for Windows,
@b Widget for Motif, @b GtkWidget for GTK or @b WinHandle for PalmOS.
*/
- void* GetHandle() const;
+ virtual WXWidget GetHandle() const;
/**
Gets the help text to be used as context-sensitive help for this window.
@see SetId(), @ref overview_windowids
*/
- int GetId() const;
+ wxWindowID GetId() const;
/**
Generic way of getting a label from any window, for
Return value for external leading (optional).
@param font
Font to use instead of the current window font (optional).
- @param use16
- If @true, string contains 16-bit characters. The default is @false.
*/
virtual void GetTextExtent(const wxString& string, int* w, int* h,
int* descent = NULL,
int* externalLeading = NULL,
- const wxFont* font = NULL,
- bool use16 = false) const;
+ const wxFont* font = NULL) const;
/**
Gets the dimensions of the string as it would be drawn on the
@see wxRegion, wxRegionIterator
*/
- virtual wxRegion GetUpdateRegion() const;
+ const wxRegion& GetUpdateRegion() const;
/**
Returns a pointer to the current validator for the window, or @NULL if
@since 2.9.0
*/
virtual bool HideWithEffect(wxShowEffect effect,
- unsigned timeout = 0);
+ unsigned int timeout = 0);
/**
This function is (or should be, in case of custom controls) called during
@see @ref overview_windowsizing
*/
- void Layout();
+ virtual bool Layout();
/**
Lowers the window to the bottom of the window hierarchy (Z-order).
the user can only interact with this window. If @false, the effect is
reversed.
*/
- virtual void MakeModal(bool flag);
+ virtual void MakeModal(bool modal = true);
/**
Moves the window to the given position.
@see SetSize()
*/
- void Move(int x, int y);
+ void Move(int x, int y, int flags = 0);
/**
Moves the window to the given position.
@see SetSize()
*/
- void Move(const wxPoint& pt);
+ void Move(const wxPoint& pt, int flags = 0);
/**
Moves this window in the tab navigation order after the specified @e win.
control. See also wxNavigationKeyEvent and
HandleAsNavigationKey.
*/
- bool Navigate(int flags = wxNavigationKeyEvent::IsForward);
+ bool Navigate(int flags = IsForward);
/**
Performs a keyboard navigation action inside this window.
See Navigate() for more information.
*/
- bool NavigateIn(int flags = wxNavigationKeyEvent::IsForward);
+ bool NavigateIn(int flags = IsForward);
/**
Create a new ID or range of IDs that are not currently in use.
@see SetBackgroundColour(), GetForegroundColour(),
SetTransparent()
*/
- virtual void SetBackgroundStyle(wxBackgroundStyle style);
+ virtual bool SetBackgroundStyle(wxBackgroundStyle style);
/**
This method is only implemented by ports which have support for
@see ::wxSetCursor, wxCursor
*/
- virtual void SetCursor(const wxCursor& cursor);
+ virtual bool SetCursor(const wxCursor& cursor);
/**
Associates a drop target with this window.
@see GetForegroundColour(), SetBackgroundColour(),
GetBackgroundColour(), ShouldInheritColours()
*/
- virtual void SetForegroundColour(const wxColour& colour);
+ virtual bool SetForegroundColour(const wxColour& colour);
/**
Sets the help text to be used as context-sensitive help for this window.
@see GetId(), @ref overview_windowids
*/
- void SetId(int id);
-
- /**
- Sets the initial window size if none is given (i.e. at least one of the
- components of the size passed to ctor/Create() is wxDefaultCoord).
- */
- virtual void SetInitialBestSize(const wxSize& size);
+ void SetId(wxWindowID winid);
/**
A @e smart SetSize that will fill in default size components with the
/**
@deprecated use wxDC::SetPalette instead.
*/
- virtual void SetPalette(wxPalette* palette);
+ void SetPalette(const wxPalette& pal);
/**
Sets the position of one of the built-in scrollbars.
@see Move()
*/
- virtual void SetSize(int x, int y, int width, int height,
- int sizeFlags = wxSIZE_AUTO);
+ void SetSize(int x, int y, int width, int height,
+ int sizeFlags = wxSIZE_AUTO);
//@{
/**
@see HideWithEffect()
*/
virtual bool ShowWithEffect(wxShowEffect effect,
- unsigned timeout = 0);
+ unsigned int timeout = 0);
/**
Reenables window updating after a previous call to Freeze().
The new y position for the cursor.
*/
virtual void WarpPointer(int x, int y);
+
+
+protected:
+
+ /**
+ Gets the size which best suits the window: for a control, it would be
+ the minimal size which doesn't truncate the control, for a panel - the
+ same size as it would have after a call to Fit().
+
+ The default implementation of this function is designed for use in container
+ windows, such as wxPanel, and works something like this:
+ -# If the window has a sizer then it is used to calculate the best size.
+ -# Otherwise if the window has layout constraints then those are used to
+ calculate the best size.
+ -# Otherwise if the window has children then the best size is set to be large
+ enough to show all the children.
+ -# Otherwise if there are no children then the window's minimal size will be
+ used as its best size.
+ -# Otherwise if there is no minimal size set, then the current size is used
+ for the best size.
+
+ @see @ref overview_windowsizing
+ */
+ virtual wxSize DoGetBestSize() const;
+
+
+ /**
+ Sets the initial window size if none is given (i.e. at least one of the
+ components of the size passed to ctor/Create() is wxDefaultCoord).
+ @deprecated @todo provide deprecation description
+ */
+ virtual void SetInitialBestSize(const wxSize& size);
};
@see GetPrev()
*/
- wxWizardPage* GetNext() const;
+ virtual wxWizardPage* GetNext() const = 0;
/**
Get the page which should be shown when the user chooses the @c "Back"
@see GetNext()
*/
- wxWizardPage* GetPrev() const;
+ virtual wxWizardPage* GetPrev() const = 0;
};
It is not normally used by the user code as the objects of this
type are constructed by wxWizard.
*/
- wxWizardEvent(wxEventType type = wxEVT_NULL, int id = -1,
- bool direction = true);
+ wxWizardEvent(wxEventType type = wxEVT_NULL, int id = wxID_ANY,
+ bool direction = true, wxWizardPage* page = 0);
/**
Return the direction in which the page is changing: for
Constructor takes the previous and next pages.
They may be modified later by SetPrev() or SetNext().
*/
- wxWizardPageSimple(wxWizard* parent = NULL,
+ wxWizardPageSimple(wxWizard* parent,
wxWizardPage* prev = NULL,
wxWizardPage* next = NULL,
const wxBitmap& bitmap = wxNullBitmap);
@param parent
The parent window, may be @NULL.
@param id
- The id of the dialog, will usually be just -1.
+ The id of the dialog, will usually be just wxID_ANY.
@param title
The title of the dialog.
@param bitmap
@param style
Window style is passed to wxDialog.
*/
- wxWizard(wxWindow* parent, int id = -1,
+ wxWizard(wxWindow* parent, int id = wxID_ANY,
const wxString& title = wxEmptyString,
const wxBitmap& bitmap = wxNullBitmap,
const wxPoint& pos = wxDefaultPosition,
@param style
Window style is passed to wxDialog.
*/
- bool Create(wxWindow* parent, int id = -1,
+ bool Create(wxWindow* parent, int id = wxID_ANY,
const wxString& title = wxEmptyString,
const wxBitmap& bitmap = wxNullBitmap,
- const wxPoint& pos = wxDefaultPosition,
- long style = wxDEFAULT_DIALOG_STYLE);
+ const wxPoint& pos = wxDefaultPosition, long style = 536877056);
/**
This method is obsolete, use GetPageAreaSizer() instead.
Both of these flags are on by default.
*/
wxWrapSizer(int orient = wxHORIZONTAL,
- int flags = wxEXTEND_LAST_ON_EACH_LINE |
- wxREMOVE_LEADING_SPACES);
+ int flags = wxWRAPSIZER_DEFAULT_FLAGS);
/**
Not used by an application.
Returns @true if the information was used (and the sub-item min size was
updated).
*/
- bool InformFirstDirection(int direction, int size,
- int availableOtherDir);
+ virtual bool InformFirstDirection(int direction, int size,
+ int availableOtherDir);
protected:
/**
Be aware that for nodes of type @c wxXML_ELEMENT_NODE (the most used node type)
the content is an empty string. See GetNodeContent() for more details.
*/
- wxString GetContent() const;
+ const wxString& GetContent() const;
/**
Returns the number of nodes which separe this node from @c grandparent.
Can be an empty string (e.g. for nodes of type @c wxXML_TEXT_NODE or
@c wxXML_CDATA_SECTION_NODE).
*/
- wxString GetName() const;
+ const wxString& GetName() const;
/**
Returns a pointer to the sibling of this node or @NULL if there are no
@note This is the encoding original file was saved in, @b not the
encoding of in-memory representation!
*/
- wxString GetFileEncoding() const;
+ const wxString& GetFileEncoding() const;
/**
Returns the root node of the document.
If the version attribute was not explicitely given in the header, this function
returns an empty string.
*/
- wxString GetVersion() const;
+ const wxString& GetVersion() const;
/**
Returns @true if the document has been loaded successfully.
Returns the domain (message catalog) that will be used to load
translatable strings in the XRC.
*/
- wxChar* GetDomain();
+ const wxString& GetDomain() const;
/**
Returns flags, which may be a bitlist of ::wxXmlResourceFlags
Sets the domain (message catalog) that will be used to load
translatable strings in the XRC.
*/
- wxChar* SetDomain(const wxChar* domain);
+ void SetDomain(const wxString& domain);
/**
Sets flags (bitlist of ::wxXmlResourceFlags enumeration values).
virtual ~wxXmlResourceHandler();
/**
- Add a style flag (e.g. @c wxMB_DOCKABLE) to the list of flags
- understood by this handler.
+ Creates an object (menu, dialog, control, ...) from an XML node.
+ Should check for validity. @a parent is a higher-level object
+ (usually window, dialog or panel) that is often necessary to
+ create the resource.
+
+ If @b instance is non-@NULL it should not create a new instance via
+ 'new' but should rather use this one, and call its Create method.
*/
- void AddStyle(const wxString& name, int value);
+ wxObject* CreateResource(wxXmlNode* node, wxObject* parent,
+ wxObject* instance);
/**
- Add styles common to all wxWindow-derived classes.
+ Called from CreateResource after variables were filled.
*/
- void AddWindowStyles();
+ virtual wxObject* DoCreateResource() = 0;
/**
Returns @true if it understands this node and can create
at the time CanHandle() is called and it is only safe to operate on
node directly or to call IsOfClass().
*/
- bool CanHandle(wxXmlNode* node);
+ virtual bool CanHandle(wxXmlNode* node) = 0;
+
+ /**
+ Sets the parent resource.
+ */
+ void SetParentResource(wxXmlResource* res);
+
+
+protected:
+
+ /**
+ Add a style flag (e.g. @c wxMB_DOCKABLE) to the list of flags
+ understood by this handler.
+ */
+ void AddStyle(const wxString& name, int value);
+
+ /**
+ Add styles common to all wxWindow-derived classes.
+ */
+ void AddWindowStyles();
/**
Creates children.
wxObject* CreateResFromNode(wxXmlNode* node, wxObject* parent,
wxObject* instance = NULL);
- /**
- Creates an object (menu, dialog, control, ...) from an XML node.
- Should check for validity. @a parent is a higher-level object
- (usually window, dialog or panel) that is often necessary to
- create the resource.
-
- If @b instance is non-@NULL it should not create a new instance via 'new'
- but should rather use this one, and call its Create method.
- */
- wxObject* CreateResource(wxXmlNode* node, wxObject* parent,
- wxObject* instance);
-
- /**
- Called from CreateResource after variables were filled.
- */
- wxObject* DoCreateResource();
-
/**
Creates an animation (see wxAnimation) from the filename specified in @a param.
*/
/**
Gets a bitmap.
*/
- wxBitmap GetBitmap(const wxString& param = wxT("bitmap"), wxSize size = wxDefaultSize);
+ wxBitmap GetBitmap(const wxString& param = "bitmap",
+ const wxArtClient& defaultArtClient = wxART_OTHER,
+ wxSize size = wxDefaultSize);
/**
Gets a bool flag (1, t, yes, on, true are @true, everything else is @false).
/**
Returns the current file system.
*/
- wxFileSystem GetCurFileSystem();
+ wxFileSystem& GetCurFileSystem();
/**
Gets a dimension (may be in dialog units).
*/
- wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0);
+ wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0,
+ wxWindow* windowToUse = 0);
/**
Gets a font.
*/
- wxFont GetFont();
+ wxFont GetFont(const wxString& param = "font");
/**
Returns the XRCID.
/**
Returns an icon.
*/
- wxIcon GetIcon(const wxString& param = wxT("icon"), wxSize size = wxDefaultSize);
+ wxIcon GetIcon(const wxString& param = "icon",
+ const wxArtClient& defaultArtClient = wxART_OTHER,
+ wxSize size = wxDefaultSize);
/**
Gets the integer value from the parameter.
/**
Gets the size (may be in dialog units).
*/
- wxSize GetSize(const wxString& param = wxT("size"));
+ wxSize GetSize(const wxString& param = "size", wxWindow* windowToUse = 0);
/**
Gets style flags from text in form "flag | flag2| flag3 |..."
translation because of XML syntax)
- calls wxGetTranslations (unless disabled in wxXmlResource)
*/
- wxString GetText(const wxString& param);
+ wxString GetText(const wxString& param, bool translate = true);
/**
Check to see if a parameter exists.
*/
bool IsOfClass(wxXmlNode* node, const wxString& classname);
- /**
- Sets the parent resource.
- */
- void SetParentResource(wxXmlResource* res);
-
/**
Sets common window options.
*/