@class wxAppTraits
@wxheader{apptrait.h}
- The @b wxAppTraits class defines various configurable aspects of a wxApp.
- You can access it using wxApp::GetTraits function and you can create your
- own wxAppTraits overriding the wxApp::CreateTraits function.
-
- By default, wxWidgets creates a @c wxConsoleAppTraits object for console
- applications (i.e. those applications linked against wxBase library only -
- see the @ref page_libs page) and a @c wxGUIAppTraits object for GUI
+ The wxAppTraits class defines various configurable aspects of a wxApp.
+ You can access it using wxApp::GetTraits() function and you can create your
+ own wxAppTraits overriding the wxApp::CreateTraits() function.
+
+ Note that wxAppTraits is an abstract class since it contains many
+ pure virtual functions.
+ In fact, by default, wxWidgets creates a @c wxConsoleAppTraits object for
+ console applications (i.e. those applications linked against wxBase library
+ only - see the @ref page_libs page) and a @c wxGUIAppTraits object for GUI
applications.
+ Both these classes are derived by wxAppTraits and represent concrete
+ implementation of the wxAppTraits interface.
@library{wxbase}
@category{appmanagement}
/**
Creates the global font mapper object used for encodings/charset mapping.
*/
- virtual wxFontMapper* CreateFontMapper();
+ virtual wxFontMapper* CreateFontMapper() = 0;
/**
Creates a wxLog class for the application to use for logging errors.
@see wxLog
*/
- virtual wxLog* CreateLogTarget();
+ virtual wxLog* CreateLogTarget() = 0;
/**
Creates the global object used for printing out messages.
*/
- virtual wxMessageOutput* CreateMessageOutput();
+ virtual wxMessageOutput* CreateMessageOutput() = 0;
/**
Returns the renderer to use for drawing the generic controls (return
@note the returned pointer needs to be deleted by the caller.
*/
- virtual wxRendererNative* CreateRenderer();
+ virtual wxRendererNative* CreateRenderer() = 0;
/**
This method returns the name of the desktop environment currently
to figure out, which desktop environment is running. The method
returns an empty string otherwise and on all other platforms.
*/
- virtual wxString GetDesktopEnvironment() const;
+ virtual wxString GetDesktopEnvironment() const = 0;
/**
Returns the wxStandardPaths object for the application.
and put in given pointers the versions of the GTK library in use.
See wxPlatformInfo for more details.
*/
- virtual wxPortId GetToolkitVersion(int* major = NULL, int* minor = NULL) const;
+ virtual wxPortId GetToolkitVersion(int* major = NULL, int* minor = NULL) const = 0;
/**
Returns @true if @c fprintf(stderr) goes somewhere, @false otherwise.
*/
- virtual bool HasStderr();
+ virtual bool HasStderr() = 0;
/**
Returns @true if the library was built as wxUniversal.
Always returns @false for wxBase-only apps.
*/
- virtual bool IsUsingUniversalWidgets() const;
+ virtual bool IsUsingUniversalWidgets() const = 0;
/**
Shows the assert dialog with the specified message in GUI mode or just prints
the string to stderr in console mode.
Returns @true to suppress subsequent asserts, @false to continue as before.
*/
- virtual bool ShowAssertDialog(const wxString& msg);
+ virtual bool ShowAssertDialog(const wxString& msg) = 0;
};
@class wxArchiveInputStream
@wxheader{archive.h}
- An abstract base class which serves as a common interface to
+ This is an abstract base class which serves as a common interface to
archive input streams such as wxZipInputStream.
wxArchiveInputStream::GetNextEntry returns an wxArchiveEntry object containing
Closes the current entry. On a non-seekable stream reads to the end of
the current entry first.
*/
- virtual bool CloseEntry();
+ virtual bool CloseEntry() = 0;
/**
Closes the current entry if one is open, then reads the meta-data for
@a entry must be from the same archive file that this wxArchiveInputStream
is reading, and it must be reading it from a seekable stream.
*/
- virtual bool OpenEntry(wxArchiveEntry& entry);
+ virtual bool OpenEntry(wxArchiveEntry& entry) = 0;
};
@class wxArchiveOutputStream
@wxheader{archive.h}
- An abstract base class which serves as a common interface to
+ This is an abstract base class which serves as a common interface to
archive output streams such as wxZipOutputStream.
wxArchiveOutputStream::PutNextEntry is used to create a new entry in the
It is called implicitly whenever another new entry is created with CopyEntry()
or PutNextEntry(), or when the archive is closed.
*/
- virtual bool CloseEntry();
+ virtual bool CloseEntry() = 0;
/**
Some archive formats have additional meta-data that applies to the archive
in which case the two streams set up a link and transfer the data
when it becomes available.
*/
- virtual bool CopyArchiveMetaData(wxArchiveInputStream& stream);
+ virtual bool CopyArchiveMetaData(wxArchiveInputStream& stream) = 0;
/**
Takes ownership of @a entry and uses it to create a new entry in the
@class wxArchiveEntry
@wxheader{archive.h}
- An abstract base class which serves as a common interface to
+ This is an abstract base class which serves as a common interface to
archive entry classes such as wxZipEntry.
These hold the meta-data (filename, timestamp, etc.), for entries
in archive files such as zips and tars.
/**
Gets the entry's timestamp.
*/
- virtual wxDateTime GetDateTime() const;
+ virtual wxDateTime GetDateTime() const = 0;
/**
Sets the entry's timestamp.
*/
- virtual void SetDateTime(const wxDateTime& dt);
+ virtual void SetDateTime(const wxDateTime& dt) = 0;
/**
Returns the entry's name, by default in the native format.
If this is a directory entry, (i.e. if IsDir() is @true) then the
returned string is the name with a trailing path separator.
*/
- virtual wxString GetName(wxPathFormat format = wxPATH_NATIVE) const;
+ virtual wxString GetName(wxPathFormat format = wxPATH_NATIVE) const = 0;
/**
Sets the entry's name.
/**
Returns the size of the entry's data in bytes.
*/
- virtual wxFileOffset GetSize() const;
+ virtual wxFileOffset GetSize() const = 0;
/**
Sets the size of the entry's data in bytes.
*/
- virtual void SetSize(wxFileOffset size);
+ virtual void SetSize(wxFileOffset size) = 0;
/**
Returns the path format used internally within the archive to store
filenames.
*/
- virtual wxPathFormat GetInternalFormat() const;
+ virtual wxPathFormat GetInternalFormat() const = 0;
/**
Returns the entry's filename in the internal format used within the
@see @ref overview_archive_byname
*/
- virtual wxString GetInternalName() const;
+ virtual wxString GetInternalName() const = 0;
/**
Returns a numeric value unique to the entry within the archive.
*/
- virtual wxFileOffset GetOffset() const;
+ virtual wxFileOffset GetOffset() const = 0;
/**
Returns @true if this is a directory entry.
unarchivers typically create whatever directories are necessary as they
restore files, even if the archive contains no explicit directory entries.
*/
- virtual bool IsDir() const;
+ virtual bool IsDir() const = 0;
/**
Marks this entry as a directory if @a isDir is @true. See IsDir() for more info.
*/
- virtual void SetIsDir(bool isDir = true);
+ virtual void SetIsDir(bool isDir = true) = 0;
/**
Returns @true if the entry is a read-only file.
*/
- virtual bool IsReadOnly() const;
+ virtual bool IsReadOnly() const = 0;
/**
Sets this entry as a read-only file.
*/
- virtual void SetIsReadOnly(bool isReadOnly = true);
+ virtual void SetIsReadOnly(bool isReadOnly = true) = 0;
/**
Sets the notifier (see wxArchiveNotifier) for this entry.
Sets the font for drawing the tab labels, using a bold version of the font for
selected tab labels.
*/
- bool SetFont(const wxFont& font);
+ virtual bool SetFont(const wxFont& font);
/**
Sets the font for measuring tab labels.
Specifying -1 as the height will return the control to its default auto-sizing
behaviour.
*/
- void SetTabCtrlHeight(int height);
+ virtual void SetTabCtrlHeight(int height);
//@{
/**
/**
Clones the art object.
*/
- wxAuiTabArt* Clone();
+ virtual wxAuiTabArt* Clone() = 0;
/**
Draws a background on the given area.
*/
- void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect);
+ virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect) = 0;
/**
Draws a button.
/**
Returns the indent size.
*/
- int GetIndentSize();
+ virtual int GetIndentSize() = 0;
/**
Returns the tab size for the given caption, bitmap and state.
/**
Sets flags.
*/
- void SetFlags(unsigned int flags);
+ virtual void SetFlags(unsigned int flags) = 0;
/**
Sets the font used for calculating measurements.
*/
- void SetMeasuringFont(const wxFont& font);
+ virtual void SetMeasuringFont(const wxFont& font) = 0;
/**
Sets the normal font for drawing labels.
*/
- void SetNormalFont(const wxFont& font);
+ virtual void SetNormalFont(const wxFont& font) = 0;
/**
Sets the font for drawing text for selected UI elements.
*/
- void SetSelectedFont(const wxFont& font);
+ virtual void SetSelectedFont(const wxFont& font) = 0;
/**
Sets sizing information.
*/
- void SetSizingInfo(const wxSize& tab_ctrl_size, size_t tab_count);
+ virtual void SetSizingInfo(const wxSize& tab_ctrl_size, size_t tab_count) = 0;
/**
Pops up a menu to show the list of windows managed by wxAui.
/**
Get a font setting.
*/
- virtual wxFont GetFont(int id);
+ virtual wxFont GetFont(int id) = 0;
/**
Get the value of a certain setting.
@a id can be one of the size values of @b wxAuiPaneDockArtSetting.
*/
- virtual int GetMetric(int id);
+ virtual int GetMetric(int id) = 0;
/**
Set a certain setting with the value @e colour.
@a id can be one of the colour values of @b wxAuiPaneDockArtSetting.
*/
- virtual void SetColour(int id, const wxColor& colour) = 0;
+ virtual void SetColour(int id, const wxColour& colour) = 0;
/**
Set a font setting.
*/
- virtual void SetFont(int id, const wxFont& font);
+ virtual void SetFont(int id, const wxFont& font) = 0;
/**
Set a certain setting with the value @e new_val.
@a id can be one of the size values of @b wxAuiPaneDockArtSetting.
*/
- virtual void SetMetric(int id, int new_val);
+ virtual void SetMetric(int id, int new_val) = 0;
};
/**
Returns an array of all panes managed by the frame manager.
*/
- wxAuiPaneInfoArray GetAllPanes();
+ wxAuiPaneInfoArray& GetAllPanes();
/**
Returns the current art provider being used.
Returns the current dock constraint values.
See SetDockSizeConstraint() for more information.
*/
- void GetDockSizeConstraint(double* widthpct, double* heightpct);
+ void GetDockSizeConstraint(double* widthpct, double* heightpct) const;
/**
Returns the current manager's flags.
/**
HideHint() hides any docking hint that may be visible.
*/
- void HideHint();
+ virtual void HideHint();
/**
This method is used to insert either a previously unmanaged pane window
implementing custom pane drag/drop behaviour.
The specified rectangle should be in screen coordinates.
*/
- void ShowHint(const wxRect& rect);
+ virtual void ShowHint(const wxRect& rect);
/**
Uninitializes the framework and should be called before a managed frame or
Bottom() sets the pane dock position to the bottom side of the frame. This is
the same thing as calling Direction(wxAUI_DOCK_BOTTOM).
*/
- wxAuiPaneInfo Bottom();
+ wxAuiPaneInfo& Bottom();
/**
BottomDockable() indicates whether a pane can be docked at the bottom of the
frame.
*/
- wxAuiPaneInfo BottomDockable(bool b = true);
+ wxAuiPaneInfo& BottomDockable(bool b = true);
/**
Caption() sets the caption of the pane.
*/
- wxAuiPaneInfo Caption(const wxString& c);
+ wxAuiPaneInfo& Caption(const wxString& c);
/**
CaptionVisible indicates that a pane caption should be visible. If @false, no
pane caption is drawn.
*/
- wxAuiPaneInfo CaptionVisible(bool visible = true);
+ wxAuiPaneInfo& CaptionVisible(bool visible = true);
//@{
/**
/**
CloseButton() indicates that a close button should be drawn for the pane.
*/
- wxAuiPaneInfo CloseButton(bool visible = true);
+ wxAuiPaneInfo& CloseButton(bool visible = true);
/**
DefaultPane() specifies that the pane should adopt the default pane settings.
*/
- wxAuiPaneInfo DefaultPane();
+ wxAuiPaneInfo& DefaultPane();
/**
DestroyOnClose() indicates whether a pane should be detroyed when it is closed.
Setting DestroyOnClose to @true will cause the window to be destroyed when
the user clicks the pane's close button.
*/
- wxAuiPaneInfo DestroyOnClose(bool b = true);
+ wxAuiPaneInfo& DestroyOnClose(bool b = true);
/**
Direction() determines the direction of the docked pane. It is functionally the
same as calling Left(), Right(), Top() or Bottom(), except that docking direction
may be specified programmatically via the parameter.
*/
- wxAuiPaneInfo Direction(int direction);
+ wxAuiPaneInfo& Direction(int direction);
/**
Dock() indicates that a pane should be docked. It is the opposite of Float().
*/
- wxAuiPaneInfo Dock();
+ wxAuiPaneInfo& Dock();
/**
DockFixed() causes the containing dock to have no resize sash. This is useful
for creating panes that span the entire width or height of a dock, but should
not be resizable in the other direction.
*/
- wxAuiPaneInfo DockFixed(bool b = true);
+ wxAuiPaneInfo& DockFixed(bool b = true);
/**
Dockable() specifies whether a frame can be docked or not. It is the same as
specifying TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b).
*/
- wxAuiPaneInfo Dockable(bool b = true);
+ wxAuiPaneInfo& Dockable(bool b = true);
/**
Fixed() forces a pane to be fixed size so that it cannot be resized. After
calling Fixed(), IsFixed() will return @true.
*/
- wxAuiPaneInfo Fixed();
+ wxAuiPaneInfo& Fixed();
/**
Float() indicates that a pane should be floated. It is the opposite of Dock().
*/
- wxAuiPaneInfo Float();
+ wxAuiPaneInfo& Float();
/**
Floatable() sets whether the user will be able to undock a pane and turn it
into a floating window.
*/
- wxAuiPaneInfo Floatable(bool b = true);
+ wxAuiPaneInfo& Floatable(bool b = true);
//@{
/**
/**
Gripper() indicates that a gripper should be drawn for the pane.
*/
- wxAuiPaneInfo Gripper(bool visible = true);
+ wxAuiPaneInfo& Gripper(bool visible = true);
/**
GripperTop() indicates that a gripper should be drawn at the top of the pane.
*/
- wxAuiPaneInfo GripperTop(bool attop = true);
+ wxAuiPaneInfo& GripperTop(bool attop = true);
/**
HasBorder() returns @true if the pane displays a border.
/**
Hide() indicates that a pane should be hidden.
*/
- wxAuiPaneInfo Hide();
+ wxAuiPaneInfo& Hide();
/**
IsBottomDockable() returns @true if the pane can be docked at the bottom of the
direction has a higher layer number. This allows for more complex docking layout
formation.
*/
- wxAuiPaneInfo Layer(int layer);
+ wxAuiPaneInfo& Layer(int layer);
/**
Left() sets the pane dock position to the left side of the frame. This is the
same thing as calling Direction(wxAUI_DOCK_LEFT).
*/
- wxAuiPaneInfo Left();
+ wxAuiPaneInfo& Left();
/**
LeftDockable() indicates whether a pane can be docked on the left of the frame.
*/
- wxAuiPaneInfo LeftDockable(bool b = true);
+ wxAuiPaneInfo& LeftDockable(bool b = true);
//@{
/**
/**
MaximizeButton() indicates that a maximize button should be drawn for the pane.
*/
- wxAuiPaneInfo MaximizeButton(bool visible = true);
+ wxAuiPaneInfo& MaximizeButton(bool visible = true);
//@{
/**
/**
MinimizeButton() indicates that a minimize button should be drawn for the pane.
*/
- wxAuiPaneInfo MinimizeButton(bool visible = true);
+ wxAuiPaneInfo& MinimizeButton(bool visible = true);
/**
Movable indicates whether a frame can be moved.
*/
- wxAuiPaneInfo Movable(bool b = true);
+ wxAuiPaneInfo& Movable(bool b = true);
/**
Name() sets the name of the pane so it can be referenced in lookup functions.
If a name is not specified by the user, a random name is assigned to the pane
when it is added to the manager.
*/
- wxAuiPaneInfo Name(const wxString& n);
+ wxAuiPaneInfo& Name(const wxString& n);
/**
PaneBorder indicates that a border should be drawn for the pane.
*/
- wxAuiPaneInfo PaneBorder(bool visible = true);
+ wxAuiPaneInfo& PaneBorder(bool visible = true);
/**
PinButton() indicates that a pin button should be drawn for the pane.
*/
- wxAuiPaneInfo PinButton(bool visible = true);
+ wxAuiPaneInfo& PinButton(bool visible = true);
/**
Position() determines the position of the docked pane.
*/
- wxAuiPaneInfo Position(int pos);
+ wxAuiPaneInfo& Position(int pos);
/**
Resizable() allows a pane to be resized if the parameter is @true, and forces it
to be a fixed size if the parameter is @false. This is simply an antonym for Fixed().
*/
- wxAuiPaneInfo Resizable(bool resizable = true);
+ wxAuiPaneInfo& Resizable(bool resizable = true);
/**
Right() sets the pane dock position to the right side of the frame.
*/
- wxAuiPaneInfo Right();
+ wxAuiPaneInfo& Right();
/**
RightDockable() indicates whether a pane can be docked on the right of the
frame.
*/
- wxAuiPaneInfo RightDockable(bool b = true);
+ wxAuiPaneInfo& RightDockable(bool b = true);
/**
Row() determines the row of the docked pane.
*/
- wxAuiPaneInfo Row(int row);
+ wxAuiPaneInfo& Row(int row);
/**
Write the safe parts of a newly loaded PaneInfo structure "source" into "this"
SetFlag() turns the property given by flag on or off with the option_state
parameter.
*/
- wxAuiPaneInfo SetFlag(unsigned int flag, bool option_state);
+ wxAuiPaneInfo& SetFlag(unsigned int flag, bool option_state);
/**
Show() indicates that a pane should be shown.
*/
- wxAuiPaneInfo Show(bool show = true);
+ wxAuiPaneInfo& Show(bool show = true);
/**
ToolbarPane() specifies that the pane should adopt the default toolbar pane
settings.
*/
- wxAuiPaneInfo ToolbarPane();
+ wxAuiPaneInfo& ToolbarPane();
/**
Top() sets the pane dock position to the top of the frame.
*/
- wxAuiPaneInfo Top();
+ wxAuiPaneInfo& Top();
/**
TopDockable() indicates whether a pane can be docked at the top of the frame.
*/
- wxAuiPaneInfo TopDockable(bool b = true);
+ wxAuiPaneInfo& TopDockable(bool b = true);
/**
Window() assigns the window pointer that the wxAuiPaneInfo should use.
automatically assigned to the wxAuiPaneInfo structure as soon as it is added
to the manager.
*/
- wxAuiPaneInfo Window(wxWindow* w);
+ wxAuiPaneInfo& Window(wxWindow* w);
/**
Makes a copy of the wxAuiPaneInfo object.
/**
Destroys the wxBitmapHandler object.
*/
- ~wxBitmapHandler();
+ virtual ~wxBitmapHandler();
/**
Creates a bitmap from the given data, which can be of arbitrary type.
@see wxBitmap::LoadFile, wxBitmap::SaveFile, SaveFile()
*/
- bool LoadFile(wxBitmap* bitmap, const wxString& name, wxBitmapType type);
+ virtual bool LoadFile(wxBitmap* bitmap, const wxString& name, wxBitmapType type);
/**
Saves a bitmap in the named file.
@warning
Do not delete a bitmap that is selected into a memory device context.
*/
- ~wxBitmap();
+ virtual ~wxBitmap();
/**
Adds a handler to the end of the static list of format handlers.
This overload works on all platforms.
*/
- virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
+ bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
/*
Creates a bitmap from the given data, which can be of arbitrary type.
/**
Destroys the wxMask object and the underlying bitmap data.
*/
- ~wxMask();
+ virtual ~wxMask();
/**
Constructs a mask from a bitmap and a palette index that indicates the
/**
Destructor, destroying the button.
*/
- ~wxBitmapButton();
+ virtual ~wxBitmapButton();
/**
Button creation function for two-step creation.
@see GetBitmapDisabled(), SetBitmapLabel(),
SetBitmapSelected(), SetBitmapFocus()
*/
- void SetBitmapDisabled(const wxBitmap& bitmap);
+ virtual void SetBitmapDisabled(const wxBitmap& bitmap);
/**
Sets the bitmap for the button appearance when it has the keyboard focus.
@see GetBitmapFocus(), SetBitmapLabel(),
SetBitmapSelected(), SetBitmapDisabled()
*/
- void SetBitmapFocus(const wxBitmap& bitmap);
+ virtual void SetBitmapFocus(const wxBitmap& bitmap);
/**
Sets the bitmap to be shown when the mouse is over the button.
@see GetBitmapHover()
*/
- void SetBitmapHover(const wxBitmap& bitmap);
+ virtual void SetBitmapHover(const wxBitmap& bitmap);
/**
Sets the bitmap label for the button.
@see GetBitmapLabel()
*/
- void SetBitmapLabel(const wxBitmap& bitmap);
+ virtual void SetBitmapLabel(const wxBitmap& bitmap);
/**
Sets the bitmap for the selected (depressed) button appearance.
@param bitmap
The bitmap to set.
*/
- void SetBitmapSelected(const wxBitmap& bitmap);
+ virtual void SetBitmapSelected(const wxBitmap& bitmap);
};
/**
Destructor, destroying the combobox.
*/
- ~wxBitmapComboBox();
+ virtual ~wxBitmapComboBox();
/**
Adds the item to the end of the combo box.
object is stored in an application data structure, and there is
a risk of double deletion.
*/
- ~wxBrush();
+ virtual ~wxBrush();
/**
Returns a reference to the brush colour.
@see SetColour()
*/
- wxColour GetColour() const;
+ wxColour& GetColour() const;
/**
Gets a pointer to the stipple bitmap. If the brush does not have a wxBRUSHSTYLE_STIPPLE
@see GetStyle()
*/
- bool IsHatch() const;
+ virtual bool IsHatch() const;
/**
Returns @true if the brush is initialised. It will return @false if the default
/**
Returns the size of the buffer.
*/
- size_t GetBufSize();
+ size_t GetBufSize() const;
/**
Return a pointer to the data in the buffer.
*/
- void* GetData();
+ void* GetData() const;
/**
Returns the length of the valid data in the buffer.
*/
- size_t GetDataLen();
+ size_t GetDataLen() const;
/**
Ensure the buffer is big enough and return a pointer to the
/**
Hides and closes the window containing the information text.
*/
- ~wxBusyInfo();
+ virtual ~wxBusyInfo();
};
/**
Destructor, destroying the button.
*/
- ~wxButton();
+ virtual ~wxButton();
/**
Button creation function for two-step creation.
buttons of the same size and this function allows to retrieve the (platform and
current font dependent size) which should be the best suited for this.
*/
- wxSize GetDefaultSize();
+ static wxSize GetDefaultSize();
/**
Returns the string label for the button.