/**
@class wxAboutDialogInfo
@wxheader{aboutdlg.h}
-
+
wxAboutDialogInfo contains information shown in the standard @e About
dialog displayed by the wxAboutBox function.
-
+
This class contains the general information about the program, such as its
name, version, copyright and so on, as well as lists of the program developers,
documentation writers, artists and translators. The simple properties from the
former group are represented as a string with the exception of the program icon
- and the program web site, while the lists from the latter group are stored as
+ and the program web site, while the lists from the latter group are stored as
wxArrayString and can be either set entirely at once
using wxAboutDialogInfo::SetDevelopers and similar
- functions or built one by one using wxAboutDialogInfo::AddDeveloper
+ functions or built one by one using wxAboutDialogInfo::AddDeveloper
etc.
-
+
Please also notice that while all the main platforms have the native
implementation of the about dialog, they are often more limited than the
generic version provided by wxWidgets and so the generic version is used if
either of those is used, wxAboutBox will automatically
use the generic version so you should avoid specifying these fields to achieve
more native look and feel.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxAboutDialogInfo::SetArtists
*/
-class wxAboutDialogInfo
+class wxAboutDialogInfo
{
public:
/**
Default constructor leaves all fields are initially uninitialized, in general
- you should call at least SetVersion(),
- SetCopyright() and
- SetDescription().
+ you should call at least SetVersion(), SetCopyright() and SetDescription().
*/
wxAboutDialogInfo();
/**
Adds a translator name to be shown in the program credits. Notice that if no
- translator names are specified explicitely, wxAboutBox
- will try to use the translation of the string @c translator-credits from
- the currently used message catalog -- this can be used to show just the name of
- the translator of the program in the current language.
+ translator names are specified explicitely, wxAboutBox will try to use the
+ translation of the string @c translator-credits from the currently used message
+ catalog -- this can be used to show just the name of the translator of the
+ program in the current language.
@sa SetTranslators()
*/
void SetArtists(const wxArrayString& artists);
/**
- Set the short string containing the program copyright information. Notice that
- any occurrences of @c "(C)" in @e copyright will be replaced by the
+ Set the short string containing the program copyright information. Notice
+ that any occurrences of @c "(C)" in @e copyright will be replaced by the
copyright symbol (circled C) automatically, which means that you can avoid
using this symbol in the program source code which can be problematic,
*/
Only GTK+ version supports showing the licence text in the native about dialog
currently so the generic version will be used under all the other platforms if
this method is called. To preserve the native look and feel it is advised that
- you do not call this method but provide a separate menu item in the
+ you do not call this method but provide a separate menu item in the
@c "Help" menu for displaying the text of your program licence.
*/
void SetLicence(const wxString& licence);
void SetName(const wxString& name);
/**
- Set the list of translators. Please see
- AddTranslator() for additional
+ Set the list of translators. Please see AddTranslator() for additional
discussion.
*/
void SetTranslators(const wxArrayString& translators);
/**
Set the version of the program. The version is in free format, i.e. not
- necessarily in the @c x.y.z form but it shouldn't contain the "version"
- word.
+ necessarily in the @c x.y.z form but it shouldn't contain the "version" word.
*/
void SetVersion(const wxString& version);
which is capable of showing all the fields in @e info, the native dialog is
used, otherwise the function falls back to the generic wxWidgets version of the
dialog, i.e. does the same thing as wxGenericAboutBox.
-
+
Here is an example of how this function may be used:
-
+
@code
void MyFrame::ShowSimpleAboutDialog(wxCommandEvent& WXUNUSED(event))
{
info.SetVersion(_("1.2.3 Beta"));
info.SetDescription(_("This program does something great."));
info.SetCopyright(_T("(C) 2007 Me my@email.addre.ss"));
-
+
wxAboutBox(info);
}
@endcode
-
+
Please see the @ref overview_sampledialogs "dialogs sample" for more examples of
using this function and wxAboutDialogInfo for the
description of the information which can be shown in the about dialog.
native one. This is mainly useful if you need to customize the dialog by e.g.
adding custom controls to it (customizing the native dialog is not currently
supported).
-
+
See the @ref overview_sampledialogs "dialogs sample" for an example of about
- dialog
- customization.
-
+ dialog customization.
+
@sa wxAboutDialogInfo
*/
void wxGenericAboutBox(const wxAboutDialogInfo& info);
/**
@class wxAcceleratorEntry
@wxheader{accel.h}
-
+
An object used by an application wishing to create an @ref
overview_wxacceleratortable "accelerator table".
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxAcceleratorTable, wxWindow::SetAcceleratorTable
*/
-class wxAcceleratorEntry
+class wxAcceleratorEntry
{
public:
//@{
/**
Constructor.
- @param flags
+ @param flags
One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL. Indicates
which modifier key is held down.
- @param keyCode
+ @param keyCode
The keycode to be detected. See Keycodes for a full list of keycodes.
- @param cmd
+ @param cmd
The menu or control command identifier.
*/
wxAcceleratorEntry();
- wxAcceleratorEntry(int flags, int keyCode, int cmd);
+ wxAcceleratorEntry(int flags, int keyCode, int cmd);
//@}
/**
/**
Sets the accelerator entry parameters.
- @param flags
+ @param flags
One of wxACCEL_ALT, wxACCEL_SHIFT, wxACCEL_CTRL and wxACCEL_NORMAL. Indicates
which modifier key is held down.
- @param keyCode
+ @param keyCode
The keycode to be detected. See Keycodes for a full list of keycodes.
- @param cmd
+ @param cmd
The menu or control command identifier.
*/
#define void Set(int flags, int keyCode, int cmd) /* implementation is private */
/**
@class wxAcceleratorTable
@wxheader{accel.h}
-
+
An accelerator table allows the application to specify a table of keyboard
shortcuts for
menus or other commands. On Windows and Mac OS X, menu or button commands are
supported; on GTK,
only menu commands are supported.
-
+
The object @b wxNullAcceleratorTable is defined to be a table with no data, and
is the
initial accelerator table for a window.
-
+
@library{wxcore}
@category{misc}
-
+
@stdobjects
Objects:
wxNullAcceleratorTable
-
+
@seealso
wxAcceleratorEntry, wxWindow::SetAcceleratorTable
*/
/**
Loads the accelerator table from a Windows resource (Windows only).
- @param n
+ @param n
Number of accelerator entries.
- @param entries
+ @param entries
The array of entries.
- @param resource
+ @param resource
Name of a Windows accelerator.
*/
wxAcceleratorTable();
- wxAcceleratorTable(const wxAcceleratorTable& bitmap);
- wxAcceleratorTable(int n, wxAcceleratorEntry entries[]);
- wxAcceleratorTable(const wxString& resource);
+ wxAcceleratorTable(const wxAcceleratorTable& bitmap);
+ wxAcceleratorTable(int n, wxAcceleratorEntry entries[]);
+ wxAcceleratorTable(const wxString& resource);
//@}
/**
/**
Assignment operator, using @ref overview_trefcount "reference counting".
- @param accel
+ @param accel
Accelerator table to assign.
*/
wxAcceleratorTable operator =(const wxAcceleratorTable& accel);
/**
@class wxAccessible
@wxheader{access.h}
-
+
The wxAccessible class allows wxWidgets applications, and
wxWidgets itself, to return extended information about user interface elements
to client applications such as screen readers. This is the
main way in which wxWidgets implements accessibility features.
-
+
At present, only Microsoft Active Accessibility is supported
by this class.
-
+
To use this class, derive from wxAccessible, implement appropriate
functions, and associate an object of the class with a
window using wxWindow::SetAccessible.
-
+
All functions return an indication of success, failure, or not implemented
using values of the wxAccStatus enum type.
-
+
If you return wxACC_NOT_IMPLEMENTED from any function, the system will try to
implement the appropriate functionality. However this will not work with
all functions.
-
+
Most functions work with an @e object id, which can be zero to refer to
'this' UI element, or greater than zero to refer to the nth child element.
This allows you to specify elements that don't have a corresponding wxWindow or
wxAccessible; for example, the sash of a splitter window.
-
+
For details on the semantics of functions and types, please refer to the
Microsoft Active Accessibility 1.2 documentation.
-
+
This class is compiled into wxWidgets only if the wxUSE_ACCESSIBILITY setup
symbol is set to 1.
-
+
@library{wxcore}
@category{FIXME}
*/
/**
@class wxAnimationCtrl
@wxheader{animate.h}
-
+
This is a static control which displays an animation.
wxAnimationCtrl API is simple as possible and won't give you full control on the
animation; if you need it then use wxMediaCtrl.
-
+
This control is useful to display a (small) animation while doing a long task
(e.g. a "throbber").
-
+
It is only available if @c wxUSE_ANIMATIONCTRL is set to 1 (the default).
-
+
@beginStyleTable
@style{wxAC_DEFAULT_STYLE}:
The default style: wxBORDER_NONE.
size of the animation when SetAnimation is called. If this style
flag is given, the control will not change its size
@endStyleTable
-
+
@library{wxadv}
@category{ctrl}
@appearance{animationctrl.png}
-
+
@seealso
wxAnimation
*/
frame
of the animation is displayed.
- @param parent
+ @param parent
Parent window, must be non-@NULL.
- @param id
+ @param id
The identifier for the control.
- @param anim
+ @param anim
The initial animation shown in the control.
- @param pos
+ @param pos
Initial position.
- @param size
+ @param size
Initial size.
- @param style
+ @param style
The window style, see wxAC_* flags.
- @param name
+ @param name
Control name.
@returns @true if the control was successfully created or @false if
/**
@class wxAnimation
@wxheader{animate.h}
-
+
This class encapsulates the concept of a platform-dependent animation.
An animation is a sequence of frames of the same size.
Sound is not supported by wxAnimation.
-
+
@library{wxadv}
@category{FIXME}
-
+
@stdobjects
Objects:
wxNullAnimation
-
+
@seealso
wxAnimationCtrl
*/
/**
Loads an animation from a file.
- @param name
+ @param name
The name of the file to load.
- @param type
+ @param type
See LoadFile for more info.
*/
wxAnimation();
- wxAnimation(const wxAnimation& anim);
- wxAnimation(const wxString& name,
- wxAnimationType type = wxANIMATION_TYPE_ANY);
+ wxAnimation(const wxAnimation& anim);
+ wxAnimation(const wxString& name,
+ wxAnimationType type = wxANIMATION_TYPE_ANY);
//@}
/**
/**
Loads an animation from the given stream.
- @param stream
+ @param stream
The stream to use to load the animation.
- @param type
+ @param type
One of the following values:
/**
Loads an animation from a file.
- @param name
+ @param name
A filename.
- @param type
+ @param type
One of the following values:
/**
@class wxApp
@wxheader{app.h}
-
+
The @b wxApp class represents the application itself. It is used
to:
-
+
set and get application-wide properties;
implement the windowing system message or event loop;
initiate application processing via wxApp::OnInit;
allow default processing of events not handled by other
objects in the application.
-
+
You should use the macro IMPLEMENT_APP(appClass) in your application
implementation
file to tell wxWidgets how to create an instance of your application class.
-
+
Use DECLARE_APP(appClass) in a header file if you want the wxGetApp function
(which returns
a reference to your application object) to be visible to other files.
-
+
@library{wxbase}
@category{appmanagement}
-
+
@seealso
@ref overview_wxappoverview "wxApp overview"
*/
/**
Returns @true if the application is active, i.e. if one of its windows is
currently in the foreground. If this function returns @false and you need to
- attract users attention to the application, you may use
- wxTopLevelWindow::RequestUserAttention
+ attract users attention to the application, you may use
+ wxTopLevelWindow::RequestUserAttention
to do it.
*/
bool IsActive();
void MacNewFile();
/**
- Mac specific. Called in response of an "open-document" Apple event. You need to
+ Mac specific. Called in response of an "open-document" Apple event. You need to
override this method in order to open a document file after the
user double clicked on it or if the document file was dropped
on either the running application or the application icon in
The base class version shows the default assert failure dialog box proposing to
the user to stop the program, continue or ignore all subsequent asserts.
- @param file
+ @param file
the name of the source file where the assert occurred
- @param line
+ @param line
the line number in this file where the assert occurred
- @param func
+ @param func
the name of the function where the assert occurred, may be
empty if the compiler doesn't support C99 __FUNCTION__
- @param cond
+ @param cond
the condition of the failed assert in text form
- @param msg
- the message specified as argument to
+ @param msg
+ the message specified as argument to
wxASSERT_MSG or wxFAIL_MSG, will
- be @NULL if just wxASSERT or wxFAIL
+ be @NULL if just wxASSERT or wxFAIL
was used
*/
void OnAssertFailure(const wxChar file, int line,
was specified by the user). The default behaviour is to show the program usage
text and abort the program.
- Return @true to continue normal execution or @false to return
+ Return @true to continue normal execution or @false to return
@false from OnInit() thus terminating the program.
@sa OnInitCmdLine()
Called when the help option (@c --help) was specified on the command line.
The default behaviour is to show the program usage text and abort the program.
- Return @true to continue normal execution or @false to return
+ Return @true to continue normal execution or @false to return
@false from OnInit() thus terminating the program.
@sa OnInitCmdLine()
Don't forget to call the base class version unless you want to suppress
processing of the standard command line options.
- Return @true to continue normal execution or @false to return
+ Return @true to continue normal execution or @false to return
@false from OnInit() thus terminating the program.
@sa OnInitCmdLine()
the different options. You may override this function in your class to do
something more appropriate.
- Finally note that if the exception is rethrown from here, it can be caught in
+ Finally note that if the exception is rethrown from here, it can be caught in
OnUnhandledException().
*/
virtual bool OnExceptionInMainLoop();
Override this member function for any processing which needs to be
done as the application is about to exit. OnExit is called after
destroying all application windows and controls, but before
- wxWidgets cleanup. Note that it is not called at all if
+ wxWidgets cleanup. Note that it is not called at all if
OnInit() failed.
The return value of this function is currently ignored, return the same value
/**
This function may be called if something fatal happens: an unhandled
exception under Win32 or a a fatal signal under Unix, for example. However,
- this will not happen by default: you have to explicitly call
+ this will not happen by default: you have to explicitly call
wxHandleFatalExceptions to enable this.
Generally speaking, this function should only show a message to the user and
/**
This must be provided by the application, and will usually create the
- application's main window, optionally calling
- SetTopWindow(). You may use
+ application's main window, optionally calling
+ SetTopWindow(). You may use
OnExit() to clean up anything initialized here, provided
that the function returns @true.
/**
This virtual function is where the execution of a program written in wxWidgets
starts. The default implementation just enters the main loop and starts
- handling the events until it terminates, either because
+ handling the events until it terminates, either because
ExitMainLoop() has been explicitly called or because
- the last frame has been deleted and
+ the last frame has been deleted and
GetExitOnFrameDelete() flag is @true (this
is the default).
virtual int OnRun();
/**
- This function is called when an unhandled C++ exception occurs inside
+ This function is called when an unhandled C++ exception occurs inside
OnRun() (the exceptions which occur during the program
startup and shutdown might not be caught at all). Notice that by now the main
event loop has been terminated and the program will exit, if you want to
/**
Sets the name of the application. This name should be used for file names,
configuration file entries and other internal strings. For the user-visible
- strings, such as the window titles, the application display name set by
+ strings, such as the window titles, the application display name set by
SetAppDisplayName() is used instead.
By default the application name is set to the name of its executable file.
Allows the programmer to specify whether the application will exit when the
top-level frame is deleted.
- @param flag
+ @param flag
If @true (the default), the application will exit when the top-level frame is
deleted. If @false, the application will continue to run.
Allows external code to modify global @c wxTheApp, but you should really
know what you're doing if you call it.
- @param app
+ @param app
Replacement for the global application object.
@sa GetInstance()
Return @true if theme was successfully changed.
- @param theme
+ @param theme
The name of the new theme or an absolute path to a gtkrc-theme-file
*/
bool SetNativeTheme();
when it
needs to use the top window.
- @param window
+ @param window
The new top window.
@sa GetTopWindow(), OnInit()
If @e forceTrueColour is @true then the application will try to force
using a TrueColour visual and abort the app if none is found.
- Note that this function has to be called in the constructor of the @c wxApp
+ Note that this function has to be called in the constructor of the @c wxApp
instance and won't have any effect when called later on.
This function currently only has effect under GTK.
- @param flag
+ @param flag
If @true, the app will use the best visual.
*/
void SetUseBestVisual(bool flag, bool forceTrueColour = @false);
iteration), call wxLog::FlushActive.
Calling Yield() recursively is normally an error and an assert failure is
- raised in debug build if such situation is detected. However if the
+ raised in debug build if such situation is detected. However if the
@e onlyIfNeeded parameter is @true, the method will just silently
return @false instead.
*/
default (but it can be changed).
*/
void wxLogMessage(const char * formatString, ... );
- void wxVLogMessage(const char * formatString, va_list argPtr);
+void wxVLogMessage(const char * formatString, va_list argPtr);
//@}
//@{
wxLogInfo).
*/
void wxLogVerbose(const char * formatString, ... );
- void wxVLogVerbose(const char * formatString, va_list argPtr);
+void wxVLogVerbose(const char * formatString, va_list argPtr);
//@}
/**
wxGetApp function implemented by
wxIMPLEMENT_APP. It creates the declaration
@c className wxGetApp(void).
-
+
Example:
@code
wxDECLARE_APP(MyApp)
the program work.
*/
void wxLogWarning(const char * formatString, ... );
- void wxVLogWarning(const char * formatString, va_list argPtr);
+void wxVLogWarning(const char * formatString, va_list argPtr);
//@}
//@{
function also terminates the program with this exit code.
*/
void wxLogFatalError(const char * formatString, ... );
- void wxVLogFatalError(const char * formatString,
- va_list argPtr);
+void wxVLogFatalError(const char * formatString,
+ va_list argPtr);
//@}
/**
normal way which usually just means that the application will be terminated.
Calling wxHandleFatalExceptions() with @e doIt equal to @false will restore
this default behaviour.
-
- Notice that this function is only available if
+
+ Notice that this function is only available if
@c wxUSE_ON_FATAL_EXCEPTION is 1 and under Windows platform this
requires a compiler with support for SEH (structured exception handling) which
currently means only Microsoft Visual C++ or a recent Borland C++ version.
This is used in the application class implementation file to make the
application class known to
wxWidgets for dynamic construction. You use this instead of
-
+
Old form:
@code
MyApp myApp;
@endcode
-
+
New form:
@code
IMPLEMENT_APP(MyApp)
@endcode
-
+
See also DECLARE_APP.
*/
#define IMPLEMENT_APP() /* implementation is private */
/**
Returns the error code from the last system call. This function uses
@c errno on Unix platforms and @c GetLastError under Win32.
-
+
@sa wxSysErrorMsg, wxLogSysError
*/
unsigned long wxSysErrorCode();
user about it.
*/
void wxLogError(const char * formatString, ... );
- void wxVLogError(const char * formatString, va_list argPtr);
+void wxVLogError(const char * formatString, va_list argPtr);
//@}
//@{
expand to nothing in the release one. The reason for making
it a separate function from it is that usually there are a lot of trace
messages, so it might make sense to separate them from other debug messages.
-
+
The trace messages also usually can be separated into different categories and
the second and third versions of this function only log the message if the
@e mask which it has is currently enabled in wxLog. This
allows to selectively trace only some operations and not others by changing
the value of the trace mask (possible during the run-time).
-
+
For the second function (taking a string mask), the message is logged only if
the mask has been previously enabled by the call to
wxLog::AddTraceMask or by setting
@ref overview_envvars "@c WXTRACE environment variable".
The predefined string trace masks
used by wxWidgets are:
-
+
wxTRACE_MemAlloc: trace memory allocation (new/delete)
wxTRACE_Messages: trace window messages/X callbacks
wxTRACE_ResAlloc: trace GDI resource allocation
wxTRACE_RefCount: trace various ref counting operations
wxTRACE_OleCalls: trace OLE method calls (Win32 only)
-
+
@b Caveats: since both the mask and the format string are strings,
this might lead to function signature confusion in some cases:
if you intend to call the format string only version of wxLogTrace,
for that %s, the string mask version of wxLogTrace will erroneously get called instead, since you are supplying two string parameters to the function.
In this case you'll unfortunately have to avoid having two leading
string parameters, e.g. by adding a bogus integer (with its %d format string).
-
+
The third version of the function only logs the message if all the bits
corresponding to the @e mask are set in the wxLog trace mask which can be
set by wxLog::SetTraceMask. This version is less
flexible than the previous one because it doesn't allow defining the user
trace masks easily - this is why it is deprecated in favour of using string
trace masks.
-
+
wxTraceMemAlloc: trace memory allocation (new/delete)
wxTraceMessages: trace window messages/X callbacks
wxTraceResAlloc: trace GDI resource allocation
wxTraceOleCalls: trace OLE method calls (Win32 only)
*/
void wxLogTrace(const char * formatString, ... );
- void wxVLogTrace(const char * formatString, va_list argPtr);
- void wxLogTrace(const char * mask, const char * formatString,
- ... );
- void wxVLogTrace(const char * mask,
- const char * formatString,
- va_list argPtr);
- void wxLogTrace(wxTraceMask mask, const char * formatString,
- ... );
- void wxVLogTrace(wxTraceMask mask, const char * formatString,
- va_list argPtr);
+void wxVLogTrace(const char * formatString, va_list argPtr);
+void wxLogTrace(const char * mask, const char * formatString,
+ ... );
+void wxVLogTrace(const char * mask,
+ const char * formatString,
+ va_list argPtr);
+void wxLogTrace(wxTraceMask mask, const char * formatString,
+ ... );
+void wxVLogTrace(wxTraceMask mask, const char * formatString,
+ va_list argPtr);
//@}
/**
Returns the error message corresponding to the given system error code. If
@e errCode is 0 (default), the last error code (as returned by
wxSysErrorCode) is used.
-
+
@sa wxSysErrorCode, wxLogSysError
*/
const wxChar * wxSysErrorMsg(unsigned long errCode = 0);
nothing in release mode (otherwise).
*/
void wxLogDebug(const char * formatString, ... );
- void wxVLogDebug(const char * formatString, va_list argPtr);
+void wxVLogDebug(const char * formatString, va_list argPtr);
//@}
/**
the IMPLEMENT_APP macro. Thus, before using it
anywhere but in the same module where this macro is used, you must make it
available using DECLARE_APP.
-
+
The advantage of using this function compared to directly using the global
wxTheApp pointer is that the latter is of type @c wxApp * and so wouldn't
allow you to access the functions specific to your application class but not
Messages logged by these functions will appear in the statusbar of the @e frame
or of the top level application window by default (i.e. when using
the second version of the functions).
-
+
If the target frame doesn't have a statusbar, the message will be lost.
*/
void wxLogStatus(wxFrame * frame, const char * formatString,
... );
- void wxVLogStatus(wxFrame * frame, const char * formatString,
- va_list argPtr);
- void wxLogStatus(const char * formatString, ... );
- void wxVLogStatus(const char * formatString, va_list argPtr);
+void wxVLogStatus(wxFrame * frame, const char * formatString,
+ va_list argPtr);
+void wxLogStatus(const char * formatString, ... );
+void wxVLogStatus(const char * formatString, va_list argPtr);
//@}
/**
This function is used in wxBase only and only if you don't create
wxApp object at all. In this case you must call it from your
@c main() function before calling any other wxWidgets functions.
-
+
If the function returns @false the initialization could not be performed,
in this case the library cannot be used and
wxUninitialize shouldn't be called neither.
-
+
This function may be called several times but
wxUninitialize must be called for each successful
call to this function.
wxGetApp function implemented by
IMPLEMENT_APP. It creates the declaration
@c className wxGetApp(void).
-
+
Example:
@code
DECLARE_APP(MyApp)
/**
Calls wxApp::Yield.
-
+
This function is kept only for backwards compatibility. Please use
the wxApp::Yield method instead in any new code.
*/
as the last system error code (@e errno or @e ::GetLastError() depending
on the platform) and the corresponding error message. The second form
of this function takes the error code explicitly as the first argument.
-
+
@sa wxSysErrorCode, wxSysErrorMsg
*/
void wxLogSysError(const char * formatString, ... );
- void wxVLogSysError(const char * formatString,
- va_list argPtr);
+void wxVLogSysError(const char * formatString,
+ va_list argPtr);
//@}
//@{
using the default wxWidgets entry code (e.g. main or WinMain). For example, you
can initialize wxWidgets from an Microsoft Foundation Classes application using
this function.
-
+
The following overload of wxEntry is available under all platforms:
-
- (notice that under Windows CE platform, and only there, the type of
+
+ (notice that under Windows CE platform, and only there, the type of
@e pCmdLine is @c wchar_t *, otherwise it is @c char *, even in
Unicode build).
-
+
@remarks To clean up wxWidgets, call wxApp::OnExit followed by the static
function wxApp::CleanUp. For example, if exiting from
an MFC application that also uses wxWidgets:
-
+
@sa wxEntryStart
*/
int wxEntry(int& argc, wxChar ** argv);
- int wxEntry(HINSTANCE hInstance,
- HINSTANCE hPrevInstance = @NULL,
- char * pCmdLine = @NULL,
- int nCmdShow = SW_SHOWNORMAL);
+int wxEntry(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance = @NULL,
+ char * pCmdLine = @NULL,
+ int nCmdShow = SW_SHOWNORMAL);
//@}
/**
@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 overview_librarieslist "Libraries list" page) and a @c wxGUIAppTraits
object for GUI
applications.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxappoverview "wxApp overview", wxApp
*/
-class wxAppTraits
+class wxAppTraits
{
public:
/**
Called by wxWidgets to create the default configuration object for the
- application. The default version creates a registry-based
- wxRegConfig class under MSW and
- wxFileConfig under all other platforms. The
- wxApp wxApp::GetAppName and
+ application. The default version creates a registry-based
+ wxRegConfig class under MSW and
+ wxFileConfig under all other platforms. The
+ wxApp wxApp::GetAppName and
wxApp::GetVendorName methods are used to determine the
registry key or file name.
*/
/**
@class wxArchiveInputStream
@wxheader{archive.h}
-
+
An abstract base class which serves as a common interface to
archive input streams such as wxZipInputStream.
-
+
wxArchiveInputStream::GetNextEntry returns an
wxArchiveEntry object containing the meta-data
for the next entry in the archive (and gives away ownership). Reading from
the wxArchiveInputStream then returns the entry's data. Eof() becomes @true
after an attempt has been made to read past the end of the entry's data.
When there are no more entries, GetNextEntry() returns @NULL and sets Eof().
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", wxArchiveEntry,
wxArchiveOutputStream
/**
@class wxArchiveOutputStream
@wxheader{archive.h}
-
+
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 output archive, then the entry's data is
written to the wxArchiveOutputStream. Another call to PutNextEntry()
closes the current entry and begins the next.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", wxArchiveEntry,
wxArchiveInputStream
data can then be written by writing to this wxArchiveOutputStream.
*/
bool PutNextEntry(wxArchiveEntry* entry);
- bool PutNextEntry(const wxString& name);
+ bool PutNextEntry(const wxString& name);
//@}
};
/**
@class wxArchiveEntry
@wxheader{archive.h}
-
+
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.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", @ref overview_wxarcgeneric
"Generic archive programming", wxArchiveInputStream, wxArchiveOutputStream, wxArchiveNotifier
The entry's timestamp.
*/
wxDateTime GetDateTime();
- void SetDateTime(const wxDateTime& dt);
+ void SetDateTime(const wxDateTime& dt);
//@}
//@{
Similarly, setting a name with a trailing path separator sets IsDir().
*/
wxString GetName(wxPathFormat format = wxPATH_NATIVE);
- void SetName(const wxString& name,
- wxPathFormat format = wxPATH_NATIVE);
+ void SetName(const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE);
//@}
//@{
The size of the entry's data in bytes.
*/
off_t GetSize();
- void SetSize(off_t size);
+ void SetSize(off_t size);
//@}
/**
restore files, even if the archive contains no explicit directory entries.
*/
bool IsDir();
- void SetIsDir(bool isDir = @true);
+ void SetIsDir(bool isDir = @true);
//@}
//@{
True if the entry is a read-only file.
*/
bool IsReadOnly();
- void SetIsReadOnly(bool isReadOnly = @true);
+ void SetIsReadOnly(bool isReadOnly = @true);
//@}
//@{
non-seekable streams).
*/
void SetNotifier(wxArchiveNotifier& notifier);
- void UnsetNotifier();
+ void UnsetNotifier();
//@}
};
/**
@class wxArchiveClassFactory
@wxheader{archive.h}
-
+
Allows the creation of streams to handle archive formats such
as zip and tar.
-
+
For example, given a filename you can search for a factory that will
handle it and create a stream to read it:
-
+
@code
factory = wxArchiveClassFactory::Find(filename, wxSTREAM_FILEEXT);
if (factory)
stream = factory-NewStream(new wxFFileInputStream(filename));
@endcode
-
+
wxArchiveClassFactory::Find can also search
for a factory by MIME type or wxFileSystem protocol.
The available factories can be enumerated
using @ref wxArchiveClassFactory::getfirst "GetFirst() and GetNext".
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", @ref overview_wxarcgeneric
"Generic archive programming", wxArchiveEntry, wxArchiveInputStream, wxArchiveOutputStream, wxFilterClassFactory
can be a complete filename rather than just an extension.
*/
static const wxArchiveClassFactory* Find(const wxChar* protocol,
- wxStreamProtocolType type = wxSTREAM_PROTOCOL);
+ wxStreamProtocolType type = wxSTREAM_PROTOCOL);
//@{
/**
constructor, is wxConvLocal.
*/
wxMBConv GetConv();
- void SetConv(wxMBConv& conv);
+ void SetConv(wxMBConv& conv);
//@}
//@{
are available. They do not give away ownership of the factory.
*/
static const wxArchiveClassFactory* GetFirst();
- const wxArchiveClassFactory* GetNext();
+ const wxArchiveClassFactory* GetNext();
//@}
/**
takes ownership of it. If it is passed by reference then it does not.
*/
wxArchiveInputStream* NewStream(wxInputStream& stream);
- wxArchiveOutputStream* NewStream(wxOutputStream& stream);
- wxArchiveInputStream* NewStream(wxInputStream* stream);
- wxArchiveOutputStream* NewStream(wxOutputStream* stream);
+ wxArchiveOutputStream* NewStream(wxOutputStream& stream);
+ wxArchiveInputStream* NewStream(wxInputStream* stream);
+ wxArchiveOutputStream* NewStream(wxOutputStream* stream);
//@}
/**
by @ref getfirst() GetFirst()/GetNext.
It is not necessary to do this to use the archive streams. It is usually
- used when implementing streams, typically the implementation will
+ used when implementing streams, typically the implementation will
add a static instance of its factory class.
It can also be used to change the order of a factory already in the list,
/**
@class wxArchiveNotifier
@wxheader{archive.h}
-
+
If you need to know when a
wxArchiveInputStream updates a
wxArchiveEntry object, you can create
using wxArchiveEntry::SetNotifier.
Your OnEntryUpdated() method will then be invoked whenever the input
stream updates the entry.
-
+
Setting a notifier is not usually necessary. It is used to handle
certain cases when modifying an archive in a pipeline (i.e. between
non-seekable streams).
See @ref overview_wxarcnoseek "Archives on non-seekable streams".
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxarcnoseek "Archives on non-seekable streams", wxArchiveEntry,
wxArchiveInputStream, wxArchiveOutputStream
*/
-class wxArchiveNotifier
+class wxArchiveNotifier
{
public:
/**
/**
@class wxArchiveIterator
@wxheader{archive.h}
-
+
An input iterator template class that can be used to transfer an archive's
catalogue to a container. It is only available if wxUSE_STL is set to 1
in setup.h, and the uses for it outlined below require a compiler which
supports member templates.
-
+
@code
template class Arc, class T = typename Arc::entry_type*
class wxArchiveIterator
{
// this constructor creates an 'end of sequence' object
wxArchiveIterator();
-
+
// template parameter 'Arc' should be the type of an archive input stream
wxArchiveIterator(Arc& arc) {
-
+
/* ... */
- };
- @endcode
-
- The first template parameter should be the type of archive input stream
- (e.g. wxArchiveInputStream) and the
- second can either be a pointer to an entry
- (e.g. wxArchiveEntry*), or a string/pointer pair
- (e.g. std::pairwxString, wxArchiveEntry*).
-
- The @c wx/archive.h header defines the following typedefs:
-
- @code
- typedef wxArchiveIteratorwxArchiveInputStream wxArchiveIter;
-
- typedef wxArchiveIteratorwxArchiveInputStream,
- std::pairwxString, wxArchiveEntry* wxArchivePairIter;
- @endcode
-
- The header for any implementation of this interface should define similar
- typedefs for its types, for example in @c wx/zipstrm.h there is:
-
- @code
- typedef wxArchiveIteratorwxZipInputStream wxZipIter;
-
- typedef wxArchiveIteratorwxZipInputStream,
- std::pairwxString, wxZipEntry* wxZipPairIter;
- @endcode
-
- Transferring the catalogue of an archive @e arc to a vector @e cat,
- can then be done something like this:
-
- @code
- std::vectorwxArchiveEntry* cat((wxArchiveIter)arc, wxArchiveIter());
- @endcode
-
- When the iterator is dereferenced, it gives away ownership of an entry
- object. So in the above example, when you have finished with @e cat
- you must delete the pointers it contains.
-
- If you have smart pointers with normal copy semantics (i.e. not auto_ptr
- or wxScopedPtr), then you can create an iterator
- which uses them instead. For example, with a smart pointer class for
- zip entries @e ZipEntryPtr:
-
- @code
- typedef std::vectorZipEntryPtr ZipCatalog;
- typedef wxArchiveIteratorwxZipInputStream, ZipEntryPtr ZipIter;
- ZipCatalog cat((ZipIter)zip, ZipIter());
- @endcode
-
- Iterators that return std::pair objects can be used to
- populate a std::multimap, to allow entries to be looked
- up by name. The string is initialised using the wxArchiveEntry object's
- wxArchiveEntry::GetInternalName function.
-
- @code
- typedef std::multimapwxString, wxZipEntry* ZipCatalog;
- ZipCatalog cat((wxZipPairIter)zip, wxZipPairIter());
- @endcode
-
-
- Note that this iterator also gives away ownership of an entry
- object each time it is dereferenced. So in the above example, when
- you have finished with @e cat you must delete the pointers it contains.
-
- Or if you have them, a pair containing a smart pointer can be used
- (again @e ZipEntryPtr), no worries about ownership:
-
- @code
- typedef std::multimapwxString, ZipEntryPtr ZipCatalog;
- typedef wxArchiveIteratorwxZipInputStream,
- std::pairwxString, ZipEntryPtr ZipPairIter;
- ZipCatalog cat((ZipPairIter)zip, ZipPairIter());
- @endcode
-
- @library{wxbase}
- @category{FIXME}
-
- @seealso
- wxArchiveEntry, wxArchiveInputStream, wxArchiveOutputStream
+};
+@endcode
+
+The first template parameter should be the type of archive input stream
+(e.g. wxArchiveInputStream) and the
+second can either be a pointer to an entry
+(e.g. wxArchiveEntry*), or a string/pointer pair
+(e.g. std::pairwxString, wxArchiveEntry*).
+
+The @c wx/archive.h header defines the following typedefs:
+
+@code
+typedef wxArchiveIteratorwxArchiveInputStream wxArchiveIter;
+
+typedef wxArchiveIteratorwxArchiveInputStream,
+std::pairwxString, wxArchiveEntry* wxArchivePairIter;
+@endcode
+
+The header for any implementation of this interface should define similar
+typedefs for its types, for example in @c wx/zipstrm.h there is:
+
+ @code
+ typedef wxArchiveIteratorwxZipInputStream wxZipIter;
+
+typedef wxArchiveIteratorwxZipInputStream,
+std::pairwxString, wxZipEntry* wxZipPairIter;
+@endcode
+
+Transferring the catalogue of an archive @e arc to a vector @e cat,
+can then be done something like this:
+
+@code
+std::vectorwxArchiveEntry* cat((wxArchiveIter)arc, wxArchiveIter());
+@endcode
+
+When the iterator is dereferenced, it gives away ownership of an entry
+object. So in the above example, when you have finished with @e cat
+you must delete the pointers it contains.
+
+If you have smart pointers with normal copy semantics (i.e. not auto_ptr
+ or wxScopedPtr), then you can create an iterator
+which uses them instead. For example, with a smart pointer class for
+zip entries @e ZipEntryPtr:
+
+@code
+typedef std::vectorZipEntryPtr ZipCatalog;
+typedef wxArchiveIteratorwxZipInputStream, ZipEntryPtr ZipIter;
+ZipCatalog cat((ZipIter)zip, ZipIter());
+@endcode
+
+Iterators that return std::pair objects can be used to
+populate a std::multimap, to allow entries to be looked
+up by name. The string is initialised using the wxArchiveEntry object's
+wxArchiveEntry::GetInternalName function.
+
+@code
+typedef std::multimapwxString, wxZipEntry* ZipCatalog;
+ZipCatalog cat((wxZipPairIter)zip, wxZipPairIter());
+@endcode
+
+
+Note that this iterator also gives away ownership of an entry
+object each time it is dereferenced. So in the above example, when
+you have finished with @e cat you must delete the pointers it contains.
+
+Or if you have them, a pair containing a smart pointer can be used
+(again @e ZipEntryPtr), no worries about ownership:
+
+@code
+typedef std::multimapwxString, ZipEntryPtr ZipCatalog;
+typedef wxArchiveIteratorwxZipInputStream,
+std::pairwxString, ZipEntryPtr ZipPairIter;
+ZipCatalog cat((ZipPairIter)zip, ZipPairIter());
+@endcode
+
+@library{wxbase}
+@category{FIXME}
+
+@seealso
+wxArchiveEntry, wxArchiveInputStream, wxArchiveOutputStream
*/
-class wxArchiveIterator
+class wxArchiveIterator
{
public:
- //@{
- /**
- Construct iterator that returns all the entries in the archive input
- stream @e arc.
- */
- wxArchiveIterator();
- wxArchiveIterator(Arc& arc);
- //@}
+//@{
+/**
+Construct iterator that returns all the entries in the archive input
+stream @e arc.
+*/
+wxArchiveIterator();
+wxArchiveIterator(Arc& arc);
+//@}
- /**
- Returns an entry object from the archive input stream, giving away
- ownership.
- */
- const T operator*();
+/**
+Returns an entry object from the archive input stream, giving away
+ownership.
+*/
+const T operator*();
- //@{
- /**
- Position the input iterator at the next entry in the archive input stream.
- */
- wxArchiveIterator operator++();
- wxArchiveIterator operator++(int );
- //@}
+//@{
+/**
+Position the input iterator at the next entry in the archive input stream.
+*/
+wxArchiveIterator operator++();
+wxArchiveIterator operator++(int );
+//@}
};
/**
@class wxArrayString
@wxheader{arrstr.h}
-
- wxArrayString is an efficient container for storing
- wxString objects. It has the same features as all
+
+ wxArrayString is an efficient container for storing
+ wxString objects. It has the same features as all
wxArray classes, i.e. it dynamically expands when new items
are added to it (so it is as easy to use as a linked list), but the access
time to the elements is constant, instead of being linear in number of
elements as in the case of linked lists. It is also very size efficient and
doesn't take more space than a C array @e wxString[] type (wxArrayString
uses its knowledge of internals of wxString class to achieve this).
-
+
This class is used in the same way as other dynamic arrays,
except that no @e WX_DEFINE_ARRAY declaration is needed for it. When a
string is added or inserted in the array, a copy of the string is created, so
- the original string may be safely deleted (e.g. if it was a @e wxChar *
+ the original string may be safely deleted (e.g. if it was a @e wxChar *
pointer the memory it was using can be freed immediately after this). In
general, there is no need to worry about string memory deallocation when using
this class - it will always free the memory it uses itself.
-
- The references returned by wxArrayString::Item,
- wxArrayString::Last or
+
+ The references returned by wxArrayString::Item,
+ wxArrayString::Last or
@ref wxArrayString::operatorindex operator[] are not constant, so the
array elements may be modified in place like this
-
+
@code
array.Last().MakeUpper();
@endcode
-
+
There is also a variant of wxArrayString called wxSortedArrayString which has
exactly the same methods as wxArrayString, but which always keeps the string
- in it in (alphabetical) order. wxSortedArrayString uses binary search in its
+ in it in (alphabetical) order. wxSortedArrayString uses binary search in its
wxArrayString::Index function (instead of linear search for
wxArrayString::Index) which makes it much more efficient if you add strings to
the array rarely (because, of course, you have to pay for Index() efficiency
by having Add() be slower) but search for them often. Several methods should
not be used with sorted array (basically, all which break the order of items)
which is mentioned in their description.
-
+
Final word: none of the methods of wxArrayString is virtual including its
destructor, so this class should not be used as a base class.
-
+
@library{wxbase}
@category{containers}
-
+
@seealso
wxArray, wxString, @ref overview_wxstringoverview "wxString overview"
*/
Constructor from a wxString array. Pass a size @e sz and array @e arr.
*/
wxArrayString();
- wxArrayString(const wxArrayString& array);
- wxArrayString(size_t sz, const char** arr);
- wxArrayString(size_t sz, const wchar_t** arr);
- wxArrayString(size_t sz, const wxString* arr);
+ wxArrayString(const wxArrayString& array);
+ wxArrayString(size_t sz, const char** arr);
+ wxArrayString(size_t sz, const wchar_t** arr);
+ wxArrayString(size_t sz, const wxString* arr);
//@}
/**
void Clear();
/**
- Empties the array: after a call to this function
+ Empties the array: after a call to this function
GetCount() will return 0. However, this
function does not free the memory used by the array and so should be used when
the array is going to be reused for storing other strings. Otherwise, you
case sensitive (default), otherwise the case is ignored.
This function uses linear search for wxArrayString and binary search for
- wxSortedArrayString, but it ignores the @e bCase and @e bFromEnd
+ wxSortedArrayString, but it ignores the @e bCase and @e bFromEnd
parameters in the latter case.
Returns index of the first item matched or @c wxNOT_FOUND if there is no match.
Insert the given number of @e copies of the new element in the array before the
position @e nIndex. Thus, for
example, to insert the string in the beginning of the array you would write
- If @e nIndex is equal to @e GetCount() this function behaves as
+ If @e nIndex is equal to @e GetCount() this function behaves as
Add().
@b Warning: this function should not be used with sorted arrays because it
- could break the order of items and, for example, subsequent calls to
+ could break the order of items and, for example, subsequent calls to
Index() would then not work!
*/
void Insert(const wxString& str, size_t nIndex,
second one.
*/
void Sort(bool reverseOrder = @false);
- Warning: void Sort(CompareFunction compareFunction);
+Warning:
+ void Sort(CompareFunction compareFunction);
//@}
/**
/**
Splits the given wxString object using the separator @e sep and returns the
result as a wxArrayString.
-
+
If the @e escape character is non-@NULL, then the occurrences of @e sep
immediately prefixed
with @e escape are not considered as separators.
-
+
Note that empty tokens will be generated if there are two or more adjacent
separators.
-
+
@sa wxJoin
*/
wxArrayString wxSplit(const wxString& str, const wxChar sep,
const wxChar escape = '
-');
+ ');
/**
Concatenate all lines of the given wxArrayString object using the separator @e
sep and returns
the result as a wxString.
-
+
If the @e escape character is non-@NULL, then it's used as prefix for each
occurrence of @e sep
in the strings contained in @e arr before joining them which is necessary
/**
@class wxArtProvider
@wxheader{artprov.h}
-
+
wxArtProvider class is used to customize the look of wxWidgets application.
When wxWidgets needs to display an icon or a bitmap (e.g. in the standard file
dialog), it does not use a hard-coded resource but asks wxArtProvider for it
wxArtProvider::CreateIconBundle methods
and register the provider with
wxArtProvider::Push:
-
+
@code
class MyProvider : public wxArtProvider
{
protected:
- wxBitmap CreateBitmap(const wxArtID& id,
+ wxBitmap CreateBitmap(const wxArtID& id,
const wxArtClient& client,
const wxSize size)
-
+
// optionally override this one as well
wxIconBundle CreateIconBundle(const wxArtID& id,
const wxArtClient& client)
...
wxArtProvider::Push(new MyProvider);
@endcode
-
+
If you need bitmap images (of the same artwork) that should be displayed at
different sizes
- you should probably consider overriding wxArtProvider::CreateIconBundle
+ you should probably consider overriding wxArtProvider::CreateIconBundle
and supplying icon bundles that contain different bitmap sizes.
-
+
There's another way of taking advantage of this class: you can use it in your
code and use
- platform native icons as provided by wxArtProvider::GetBitmap or
+ platform native icons as provided by wxArtProvider::GetBitmap or
wxArtProvider::GetIcon (NB: this is not yet really
possible as of wxWidgets 2.3.3, the set of wxArtProvider bitmaps is too
- small).
-
-
+ small).
+
+
wxArtProvider::~wxArtProvider
wxArtProvider::CreateBitmap
wxArtProvider::CreateIconBundle
wxArtProvider::Pop
wxArtProvider::Push
wxArtProvider::Remove
-
-
+
+
Identifying art resources
-
+
Every bitmap and icon bundle are known to wxArtProvider under an unique ID that
is used when
requesting a resource from it. The ID is represented by wxArtID type and can
have one of these predefined values (you can see bitmaps represented by these
constants in the artprov sample):
-
+
wxART_ERROR
wxART_QUESTION
wxART_WARNING
wxART_FLOPPY
wxART_CDROM
wxART_REMOVABLE
-
-
- Additionally, any string recognized by custom art providers registered using
+
+
+ Additionally, any string recognized by custom art providers registered using
wxArtProvider::Push may be used.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
See the artprov sample for an example of wxArtProvider usage.
*/
/**
Client is the entity that calls wxArtProvider's GetBitmap or GetIcon
- function. It is represented by wxClientID type and can have one of these
+ function. It is represented by wxClientID type and can have one of these
values:
wxART_TOOLBAR
slightly different icons in menus and toolbars even though they represent the
same action (e.g. @c wx_ART_FILE_OPEN). Remember that this is really
only a hint for wxArtProvider -- it is common that
- GetBitmap()
+ GetBitmap()
returns identical bitmap for different @e client values!
@sa See the artprov sample for an example of wxArtProvider usage.
therefore not necessary to optimize CreateBitmap() for speed (e.g. you may
create wxBitmap objects from XPMs here).
- @param id
+ @param id
wxArtID unique identifier of the bitmap.
- @param client
+ @param client
wxArtClient identifier of the client (i.e. who is asking for the bitmap).
This only servers as a hint.
- @param size
+ @param size
Preferred size of the bitmap. The function may return a bitmap of different
dimensions, it will be automatically rescaled to meet client's request.
/**
Query registered providers for bitmap with given ID.
- @param id
+ @param id
wxArtID unique identifier of the bitmap.
- @param client
+ @param client
wxArtClient identifier of the client (i.e. who is asking for the bitmap).
- @param size
+ @param size
Size of the returned bitmap or wxDefaultSize if size doesn't matter.
@returns The bitmap if one of registered providers recognizes the ID or
//@{
/**
- Returns a suitable size hint for the given @e wxArtClient. If
- @e platform_default is @true, return a size based on the current platform,
+ Returns a suitable size hint for the given @e wxArtClient. If
+ @e platform_default is @true, return a size based on the current platform,
otherwise return the size from the topmost wxArtProvider. @e wxDefaultSize may
- be
+ be
returned if the client doesn't have a specified size, like wxART_OTHER for
example.
*/
static wxIcon GetIcon(const wxArtID& id,
const wxArtClient& client = wxART_OTHER,
const wxSize& size = wxDefaultSize);
- static wxSize GetSizeHint(const wxArtClient& client,
- bool platform_default = @false);
+ static wxSize GetSizeHint(const wxArtClient& client,
+ bool platform_default = @false);
//@}
/**
Query registered providers for icon bundle with given ID.
- @param id
+ @param id
wxArtID unique identifier of the icon bundle.
- @param client
+ @param client
wxArtClient identifier of the client (i.e. who is asking for the icon bundle).
@returns The icon bundle if one of registered providers recognizes the ID
wxART_CDROM
wxART_REMOVABLE
- Additionally, any string recognized by custom art providers registered using
+ Additionally, any string recognized by custom art providers registered using
Push() may be used.
*/
static void Push(wxArtProvider* provider);
/**
- Remove a provider from the stack if it is on it. The provider is not
+ Remove a provider from the stack if it is on it. The provider is not
deleted, unlike when using Delete().
*/
static bool Remove(wxArtProvider* provider);
/////////////////////////////////////////////////////////////////////////////
- // Name: atomic.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- /**
- This function increments @e value in an atomic manner.
+// Name: atomic.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+This function increments @e value in an atomic manner.
*/
void wxAtomicInc(wxAtomicInt& value);
-
\ No newline at end of file
/**
@class wxAuiManager
@headerfile aui.h wx/aui/aui.h
-
+
wxAuiManager is the central class of the wxAUI class framework.
-
+
See also @ref overview_wxauioverview "wxAUI overview".
-
+
wxAuiManager manages the panes associated with it
for a particular wxFrame, using a pane's wxAuiPaneInfo information to
determine each pane's docking and floating behavior. wxAuiManager
uses a replaceable dock art class to do all drawing, so all drawing is
localized in one area, and may be customized depending on an
application's specific needs.
-
+
wxAuiManager works as follows: the programmer adds panes to the class,
or makes changes to existing pane properties (dock position, floating
state, show state, etc.). To apply these changes, wxAuiManager's
Update() function is called. This batch processing can be used to avoid
flicker, by modifying more than one pane at a time, and then "committing"
all of the changes at once by calling Update().
-
+
Panes can be added quite easily:
-
+
@code
wxTextCtrl* text1 = new wxTextCtrl(this, -1);
wxTextCtrl* text2 = new wxTextCtrl(this, -1);
m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Caption"));
m_mgr.Update();
@endcode
-
+
Later on, the positions can be modified easily. The following will float
an existing pane in a tool window:
-
+
@code
m_mgr.GetPane(text1).Float();
@endcode
-
+
@library{wxbase}
@category{aui}
-
+
@seealso
wxAuiPaneInfo, wxAuiDockArt
*/
several versions of this function. The first version allows the full spectrum of pane parameter possibilities. The second version is used for simpler user interfaces which do not require as much configuration. The last version allows a drop position to be specified, which will determine where the pane will be added.
*/
bool AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info);
- bool AddPane(wxWindow* window, int direction = wxLEFT,
- const wxString& caption = wxEmptyString);
- bool AddPane(wxWindow* window,
- const wxAuiPaneInfo& pane_info,
- const wxPoint& drop_pos);
+ bool AddPane(wxWindow* window, int direction = wxLEFT,
+ const wxString& caption = wxEmptyString);
+ bool AddPane(wxWindow* window,
+ const wxAuiPaneInfo& pane_info,
+ const wxPoint& drop_pos);
//@}
/**
returned wxAuiPaneInfo's IsOk() method will return @false.
*/
wxAuiPaneInfo GetPane(wxWindow* window);
- wxAuiPaneInfo GetPane(const wxString& name);
+ wxAuiPaneInfo GetPane(const wxString& name);
//@}
/**
/**
This method is used to insert either a previously unmanaged pane window
- into the frame manager, or to insert a currently managed pane somewhere
+ into the frame manager, or to insert a currently managed pane somewhere
else. @e InsertPane will push all panes, rows, or docks aside and
- insert the window into the position specified by @e insert_location.
+ insert the window into the position specified by @e insert_location.
Because @e insert_location can specify either a pane, dock row, or dock
layer, the @e insert_level parameter is used to disambiguate this. The
parameter @e insert_level can take a value of wxAUI_INSERT_PANE,
- wxAUI_INSERT_ROW
+ wxAUI_INSERT_ROW
or wxAUI_INSERT_DOCK.
*/
bool InsertPane(wxWindow* window,
void SetFlags(unsigned int flags);
/**
- Called to specify the frame or window which is to be managed by wxAuiManager.
+ Called to specify the frame or window which is to be managed by wxAuiManager.
Frame management is not restricted to just frames. Child windows or custom controls are also allowed.
*/
void SetManagedWindow(wxWindow* managed_wnd);
/**
@class wxAuiPaneInfo
@headerfile aui.h wx/aui/aui.h
-
+
wxAuiPaneInfo is part of the wxAUI class framework.
See also @ref overview_wxauioverview "wxAUI overview".
-
+
wxAuiPaneInfo specifies all the parameters for a pane.
These parameters specify where the pane is on the
screen, whether it is docked or floating, or hidden.
In addition, these parameters specify the pane's
docked position, floating position, preferred size,
minimum size, caption text among many other parameters.
-
+
@library{wxbase}
@category{aui}
-
+
@seealso
wxAuiManager, wxAuiDockArt
*/
-class wxAuiPaneInfo
+class wxAuiPaneInfo
{
public:
//@{
Copy constructor.
*/
wxAuiPaneInfo();
- wxAuiPaneInfo(const wxAuiPaneInfo& c);
+ wxAuiPaneInfo(const wxAuiPaneInfo& c);
//@}
//@{
to use this size as much as possible when docking or floating the pane.
*/
wxAuiPaneInfo BestSize(const wxSize& size);
- wxAuiPaneInfo BestSize(int x, int y);
+ wxAuiPaneInfo BestSize(int x, int y);
//@}
/**
This is the same thing as calling Direction(wxAUI_DOCK_CENTRE).
*/
wxAuiPaneInfo Centre();
- wxAuiPaneInfo Center();
+ wxAuiPaneInfo Center();
//@}
//@{
settings. Centre panes usually do not have caption bars. This function provides an easy way of preparing a pane to be displayed in the center dock position.
*/
wxAuiPaneInfo CentrePane();
- wxAuiPaneInfo CenterPane();
+ wxAuiPaneInfo CenterPane();
//@}
/**
FloatingPosition() sets the position of the floating pane.
*/
wxAuiPaneInfo FloatingPosition(const wxPoint& pos);
- wxAuiPaneInfo FloatingPosition(int x, int y);
+ wxAuiPaneInfo FloatingPosition(int x, int y);
//@}
//@{
FloatingSize() sets the size of the floating pane.
*/
wxAuiPaneInfo FloatingSize(const wxSize& size);
- wxAuiPaneInfo FloatingSize(int x, int y);
+ wxAuiPaneInfo FloatingSize(int x, int y);
//@}
/**
MaxSize() sets the maximum size of the pane.
*/
wxAuiPaneInfo MaxSize(const wxSize& size);
- wxAuiPaneInfo MaxSize(int x, int y);
+ wxAuiPaneInfo MaxSize(int x, int y);
//@}
/**
partially supported as of this writing.
*/
wxAuiPaneInfo MinSize(const wxSize& size);
- wxAuiPaneInfo MinSize(int x, int y);
+ wxAuiPaneInfo MinSize(int x, int y);
//@}
/**
/**
@class wxAuiNotebook
@headerfile auibook.h wx/aui/auibook.h
-
+
wxAuiNotebook is part of the wxAUI class framework.
See also @ref overview_wxauioverview "wxAUI overview".
-
+
wxAuiNotebook is a notebook control which implements many features common in
applications with dockable panes.
Specifically, wxAuiNotebook implements functionality which allows the user to
split the tab window into many different splitter configurations, and toggle
through different themes to customize
the control's look and feel.
-
+
An effort has been made to try to maintain an API as similar to that of
wxNotebook.
-
+
The default theme that is used is wxAuiDefaultTabArt, which provides a modern,
glossy look and feel.
The theme can be changed by calling wxAuiNotebook::SetArtProvider.
-
+
@beginStyleTable
@style{wxAUI_NB_DEFAULT_STYLE}:
Defined as wxAUI_NB_TOP | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE |
@style{wxAUI_NB_BOTTOM}:
With this style, tabs are drawn along the bottom of the notebook.
@endStyleTable
-
+
@library{wxaui}
@category{aui}
*/
Constructor. Creates a wxAuiNotebok control.
*/
wxAuiNotebook();
- wxAuiNotebook(wxWindow* parent, wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxAUI_NB_DEFAULT_STYLE);
+ wxAuiNotebook(wxWindow* parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxAUI_NB_DEFAULT_STYLE);
//@}
/**
of the following: wxTOP, wxBOTTOM, wxLEFT, or wxRIGHT.
*/
void SetUniformBitmapSize(const wxSize& size);
- void Split(size_t page, int direction);
+ void Split(size_t page, int direction);
//@}
/**
/**
@class wxAuiTabArt
@headerfile auibook.h wx/aui/auibook.h
-
+
Tab art class.
-
+
@library{wxaui}
@category{aui}
*/
-class wxAuiTabArt
+class wxAuiTabArt
{
public:
/**
/**
@class wxAuiDockArt
@headerfile dockart.h wx/aui/dockart.h
-
+
wxAuiDockArt is part of the wxAUI class framework.
See also @ref overview_wxauioverview "wxAUI overview".
-
+
Dock art provider code - a dock provider provides all drawing
functionality to the wxAui dock manager. This allows the dock
manager to have a plugable look-and-feel.
-
+
By default, a wxAuiManager uses an
instance of this class called @b wxAuiDefaultDockArt which
provides bitmap art and a colour scheme that is adapted to
class to alter its behaviour or write a completely new dock
art class. Call wxAuiManager::SetArtProvider
to make use this new dock art.
-
+
@library{wxaui}
@category{aui}
-
+
@seealso
wxAuiManager, wxAuiPaneInfo
*/
-class wxAuiDockArt
+class wxAuiDockArt
{
public:
/**
/////////////////////////////////////////////////////////////////////////////
- // Name: base64.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- //@{
+// Name: base64.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+//@{
/**
These functions encode the given data using base64. The first of them is the
raw encoding function writing the output string into provided buffer while the
other ones return the output as wxString. There is no error return for these
functions except for the first one which returns @c wxCONV_FAILED if the
- output buffer is too small. To allocate the buffer of the correct size, use
- wxBase64EncodedSize or call this function with
+ output buffer is too small. To allocate the buffer of the correct size, use
+ wxBase64EncodedSize or call this function with
@e dst set to @NULL -- it will then return the necessary buffer size.
-
- @param dst
+
+ @param dst
The output buffer, may be @NULL to retrieve the needed buffer
size.
-
- @param dstLen
+
+ @param dstLen
The output buffer size, ignored if dst is @NULL.
-
- @param src
+
+ @param src
The input buffer, must not be @NULL.
-
- @param srcLen
+
+ @param srcLen
The length of the input data.
*/
size_t wxBase64Encode(char * dst, size_t dstLen,
const void * src,
size_t srcLen);
- wxString wxBase64Encode(const void * src, size_t srcLen);
- wxString wxBase64Encode(const wxMemoryBuffer& buf);
+wxString wxBase64Encode(const void * src, size_t srcLen);
+wxString wxBase64Encode(const wxMemoryBuffer& buf);
//@}
- /**
- Returns the size of the buffer necessary to contain the data encoded in a
- base64 string of length @e srcLen. This can be useful for allocating a
- buffer to be passed to wxBase64Decode.
+/**
+Returns the size of the buffer necessary to contain the data encoded in a
+base64 string of length @e srcLen. This can be useful for allocating a
+buffer to be passed to wxBase64Decode.
*/
size_t wxBase64DecodedSize(size_t srcLen);
These function decode a Base64-encoded string. The first version is a raw
decoding function and decodes the data into the provided buffer @e dst of
the given size @e dstLen. An error is returned if the buffer is not large
- enough -- that is not at least wxBase64DecodedSize(srcLen)
+ enough -- that is not at least wxBase64DecodedSize(srcLen)
bytes. The second version allocates memory internally and returns it as
wxMemoryBuffer and is recommended for normal use.
-
+
The first version returns the number of bytes written to the buffer or the
necessary buffer size if @e dst was @NULL or @c wxCONV_FAILED on
error, e.g. if the output buffer is too small or invalid characters were
encountered in the input string. The second version returns a buffer with the
base64 decoded binary equivalent of the input string. In neither case is the
buffer NUL-terminated.
-
- @param dst
+
+ @param dst
Pointer to output buffer, may be @NULL to just compute the
necessary buffer size.
-
- @param dstLen
+
+ @param dstLen
The size of the output buffer, ignored if dst is
@NULL.
-
- @param src
+
+ @param src
The input string, must not be @NULL. For the version using
wxString, the input string should contain only ASCII characters.
-
- @param srcLen
+
+ @param srcLen
The length of the input string or special value
wxNO_LEN if the string is NUL-terminated and the length should be
computed by this function itself.
-
- @param mode
+
+ @param mode
This parameter specifies the function behaviour when invalid
characters are encountered in input. By default, any such character stops the
decoding with error. If the mode is wxBase64DecodeMode_SkipWS, then the white
space characters are silently skipped instead. And if it is
wxBase64DecodeMode_Relaxed, then all invalid characters are skipped.
-
- @param posErr
+
+ @param posErr
If this pointer is non-@NULL and an error occurs during
decoding, it is filled with the index of the invalid character.
*/
size_t srcLen = wxNO_LEN,
wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
size_t posErr = @NULL);
- wxMemoryBuffer wxBase64Decode(const char * src,
- size_t srcLen = wxNO_LEN,
- wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
- size_t posErr = @NULL);
- wxMemoryBuffer wxBase64Decode(const wxString& src,
- wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
- size_t posErr = @NULL);
+wxMemoryBuffer wxBase64Decode(const char * src,
+ size_t srcLen = wxNO_LEN,
+ wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
+ size_t posErr = @NULL);
+wxMemoryBuffer wxBase64Decode(const wxString& src,
+ wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
+ size_t posErr = @NULL);
//@}
/**
@class wxBitmapHandler
@wxheader{bitmap.h}
-
+
Overview
-
+
This is the base class for implementing bitmap file loading/saving, and bitmap
creation from data.
It is used within wxBitmap and is not normally seen by the application.
-
+
If you wish to extend the capabilities of wxBitmap, derive a class from
wxBitmapHandler
and add the handler using wxBitmap::AddHandler in your
application initialisation.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxBitmap, wxIcon, wxCursor
*/
wxBitmap object @e bitmap is
manipulated by this function.
- @param bitmap
+ @param bitmap
The wxBitmap object.
- @param width
+ @param width
The width of the bitmap in pixels.
- @param height
+ @param height
The height of the bitmap in pixels.
- @param depth
+ @param depth
The depth of the bitmap in pixels. If this is -1, the screen depth is used.
- @param data
+ @param data
Data whose type depends on the value of type.
- @param type
+ @param type
A bitmap type identifier - see wxBitmapHandler() for a list
of possible values.
Loads a bitmap from a file or resource, putting the resulting data into @e
bitmap.
- @param bitmap
+ @param bitmap
The bitmap object which is to be affected by this operation.
- @param name
+ @param name
Either a filename or a Windows resource name.
The meaning of name is determined by the type parameter.
- @param type
+ @param type
See wxBitmap::wxBitmap for values this can take.
@returns @true if the operation succeeded, @false otherwise.
/**
Saves a bitmap in the named file.
- @param bitmap
+ @param bitmap
The bitmap object which is to be affected by this operation.
- @param name
+ @param name
A filename. The meaning of name is determined by the type parameter.
- @param type
+ @param type
See wxBitmap::wxBitmap for values this can take.
- @param palette
+ @param palette
An optional palette used for saving the bitmap.
@returns @true if the operation succeeded, @false otherwise.
/**
Sets the handler extension.
- @param extension
+ @param extension
Handler extension.
*/
void SetExtension(const wxString& extension);
/**
Sets the handler name.
- @param name
+ @param name
Handler name.
*/
void SetName(const wxString& name);
/**
Sets the handler type.
- @param name
+ @param name
Handler type.
*/
void SetType(long type);
/**
@class wxBitmap
@wxheader{bitmap.h}
-
+
This class encapsulates the concept of a platform-dependent bitmap,
either monochrome or colour or colour with alpha channel support.
-
+
@library{wxcore}
@category{gdi}
-
+
@stdobjects
Objects:
wxNullBitmap
-
+
@seealso
@ref overview_wxbitmapoverview "wxBitmap overview", @ref
overview_supportedbitmapformats "supported bitmap file formats", wxDC::Blit, wxIcon, wxCursor, wxBitmap, wxMemoryDC
creating the wxBitmap (most useful in 8-bit display mode). On other platforms,
the palette is currently ignored.
- @param bits
+ @param bits
Specifies an array of pixel values.
- @param width
+ @param width
Specifies the width of the bitmap.
- @param height
+ @param height
Specifies the height of the bitmap.
- @param depth
+ @param depth
Specifies the depth of the bitmap. If this is omitted, the display depth of the
screen is used.
- @param name
+ @param name
This can refer to a resource name under MS Windows, or a filename under MS
Windows and X.
Its meaning is determined by the type parameter.
- @param type
+ @param type
May be one of the following:
wxBITMAP_TYPE_PCX,
and wxBITMAP_TYPE_PNM. Of course, you must have wxImage handlers loaded.
- @param img
+ @param img
Platform-independent wxImage object.
@remarks The first form constructs a bitmap object with no data; an
@sa LoadFile()
*/
wxBitmap();
- wxBitmap(const wxBitmap& bitmap);
- wxBitmap(const void* data, int type, int width, int height,
- int depth = -1);
- wxBitmap(const char bits[], int width, int height,
- int depth = 1);
- wxBitmap(int width, int height, int depth = -1);
- wxBitmap(const char* const* bits);
- wxBitmap(const wxString& name, long type);
- wxBitmap(const wxImage& img, int depth = -1);
+ wxBitmap(const wxBitmap& bitmap);
+ wxBitmap(const void* data, int type, int width, int height,
+ int depth = -1);
+ wxBitmap(const char bits[], int width, int height,
+ int depth = 1);
+ wxBitmap(int width, int height, int depth = -1);
+ wxBitmap(const char* const* bits);
+ wxBitmap(const wxString& name, long type);
+ wxBitmap(const wxImage& img, int depth = -1);
//@}
/**
/**
Adds a handler to the end of the static list of format handlers.
- @param handler
+ @param handler
A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.
/**
Creates a bitmap from the given data, which can be of arbitrary type.
- @param width
+ @param width
The width of the bitmap in pixels.
- @param height
+ @param height
The height of the bitmap in pixels.
- @param depth
+ @param depth
The depth of the bitmap in pixels. If this is -1, the screen depth is used.
- @param data
+ @param data
Data whose type depends on the value of type.
- @param type
+ @param type
A bitmap type identifier - see wxBitmap() for a list
of possible values.
@sa wxBitmap()
*/
virtual bool Create(int width, int height, int depth = -1);
- virtual bool Create(const void* data, int type, int width,
- int height,
- int depth = -1);
+ virtual bool Create(const void* data, int type, int width,
+ int height,
+ int depth = -1);
//@}
//@{
/**
Finds the handler associated with the given bitmap type.
- @param name
+ @param name
The handler name.
- @param extension
+ @param extension
The file extension, such as "bmp".
- @param bitmapType
+ @param bitmapType
The bitmap type, such as wxBITMAP_TYPE_BMP.
@returns A pointer to the handler if found, @NULL otherwise.
@sa wxBitmapHandler
*/
static wxBitmapHandler* FindHandler(const wxString& name);
- static wxBitmapHandler* FindHandler(const wxString& extension,
- wxBitmapType bitmapType);
- static wxBitmapHandler* FindHandler(wxBitmapType bitmapType);
+ static wxBitmapHandler* FindHandler(const wxString& extension,
+ wxBitmapType bitmapType);
+ static wxBitmapHandler* FindHandler(wxBitmapType bitmapType);
//@}
/**
/**
Adds a handler at the start of the static list of format handlers.
- @param handler
+ @param handler
A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.
/**
Loads a bitmap from a file or resource.
- @param name
+ @param name
Either a filename or a Windows resource name.
The meaning of name is determined by the type parameter.
- @param type
+ @param type
One of the following values:
Finds the handler with the given name, and removes it. The handler
is not deleted.
- @param name
+ @param name
The handler name.
@returns @true if the handler was found and removed, @false otherwise.
/**
Saves a bitmap in the named file.
- @param name
+ @param name
A filename. The meaning of name is determined by the type parameter.
- @param type
+ @param type
One of the following values:
(wxBITMAP_TYPE_JPEG, wxBITMAP_TYPE_PNG).
(Of course you must have wxImage handlers loaded.)
- @param palette
+ @param palette
An optional palette used for saving the bitmap.
@returns @true if the operation succeeded, @false otherwise.
/**
Sets the depth member (does not affect the bitmap data).
- @param depth
+ @param depth
Bitmap depth.
*/
void SetDepth(int depth);
/**
Sets the height member (does not affect the bitmap data).
- @param height
+ @param height
Bitmap height in pixels.
*/
void SetHeight(int height);
/**
Sets the associated palette. (Not implemented under GTK+).
- @param palette
+ @param palette
The palette to set.
@sa wxPalette
/**
Sets the width member (does not affect the bitmap data).
- @param width
+ @param width
Bitmap width in pixels.
*/
void SetWidth(int width);
/**
Assignment operator, using @ref overview_trefcount "reference counting".
- @param bitmap
+ @param bitmap
Bitmap to assign.
*/
wxBitmap operator =(const wxBitmap& bitmap);
/**
@class wxMask
@wxheader{bitmap.h}
-
+
This class encapsulates a monochrome mask bitmap, where the masked area is
black and
the unmasked area is white. When associated with a bitmap and drawn in a device
context,
the unmasked area of the bitmap will be drawn, and the masked area will not be
drawn.
-
+
@library{wxcore}
@category{gdi}
-
+
@seealso
wxBitmap, wxDC::Blit, wxMemoryDC
*/
background. Not
yet implemented for GTK.
- @param bitmap
+ @param bitmap
A valid bitmap.
- @param colour
+ @param colour
A colour specifying the transparency RGB values.
- @param index
+ @param index
Index into a palette, specifying the transparency colour.
*/
wxMask();
- wxMask(const wxBitmap& bitmap);
- wxMask(const wxBitmap& bitmap,
- const wxColour& colour);
- wxMask(const wxBitmap& bitmap, int index);
+ wxMask(const wxBitmap& bitmap);
+ wxMask(const wxBitmap& bitmap,
+ const wxColour& colour);
+ wxMask(const wxBitmap& bitmap, int index);
//@}
/**
background. Not
yet implemented for GTK.
- @param bitmap
+ @param bitmap
A valid bitmap.
- @param colour
+ @param colour
A colour specifying the transparency RGB values.
- @param index
+ @param index
Index into a palette, specifying the transparency colour.
*/
bool Create(const wxBitmap& bitmap);
- bool Create(const wxBitmap& bitmap, const wxColour& colour);
- bool Create(const wxBitmap& bitmap, int index);
+ bool Create(const wxBitmap& bitmap, const wxColour& colour);
+ bool Create(const wxBitmap& bitmap, int index);
//@}
};
/**
@class wxBitmapButton
@wxheader{bmpbuttn.h}
-
+
A bitmap button is a control that contains a bitmap.
It may be placed on a @ref overview_wxdialog "dialog box" or panel, or indeed
almost any other window.
-
+
@beginStyleTable
@style{wxBU_AUTODRAW}:
If this is specified, the button will be drawn automatically using
@style{wxBU_BOTTOM}:
Aligns the bitmap label to the bottom of the button. WIN32 only.
@endStyleTable
-
+
@beginEventTable
@event{EVT_BUTTON(id\, func)}:
Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is
clicked.
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{bitmapbutton.png}
-
+
@seealso
wxButton
*/
/**
Constructor, creating and showing a button.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Button identifier. The value wxID_ANY indicates a default value.
- @param bitmap
+ @param bitmap
Bitmap to be displayed.
- @param pos
+ @param pos
Button position.
- @param size
+ @param size
Button size. If wxDefaultSize is specified then the button is sized
appropriately for the bitmap.
- @param style
+ @param style
Window style. See wxBitmapButton.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@remarks The bitmap parameter is normally the only bitmap you need to
@sa Create(), wxValidator
*/
wxBitmapButton();
- wxBitmapButton(wxWindow* parent, wxWindowID id,
- const wxBitmap& bitmap,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxBU_AUTODRAW,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "button");
+ wxBitmapButton(wxWindow* parent, wxWindowID id,
+ const wxBitmap& bitmap,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxBU_AUTODRAW,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "button");
//@}
/**
@sa SetBitmapDisabled()
*/
const wxBitmap GetBitmapDisabled();
- wxBitmap GetBitmapDisabled();
+ wxBitmap GetBitmapDisabled();
//@}
//@{
@sa SetBitmapFocus()
*/
const wxBitmap GetBitmapFocus();
- wxBitmap GetBitmapFocus();
+ wxBitmap GetBitmapFocus();
//@}
//@{
@sa SetBitmapHover()
*/
const wxBitmap GetBitmapHover();
- wxBitmap GetBitmapHover();
+ wxBitmap GetBitmapHover();
//@}
//@{
@sa SetBitmapLabel()
*/
const wxBitmap GetBitmapLabel();
- wxBitmap GetBitmapLabel();
+ wxBitmap GetBitmapLabel();
//@}
/**
/**
Sets the bitmap for the disabled button appearance.
- @param bitmap
+ @param bitmap
The bitmap to set.
@sa GetBitmapDisabled(), SetBitmapLabel(),
/**
Sets the bitmap for the button appearance when it has the keyboard focus.
- @param bitmap
+ @param bitmap
The bitmap to set.
@sa GetBitmapFocus(), SetBitmapLabel(),
Sets the bitmap to be shown when the mouse is over the button.
This function is new since wxWidgets version 2.7.0 and the hover bitmap is
- currently only supported in wxMSW.
+ currently only supported in wxMSW.
@sa GetBitmapHover()
*/
/**
Sets the bitmap label for the button.
- @param bitmap
+ @param bitmap
The bitmap label to set.
@remarks This is the bitmap used for the unselected state, and for all
/**
Sets the bitmap for the selected (depressed) button appearance.
- @param bitmap
+ @param bitmap
The bitmap to set.
*/
void SetBitmapSelected(const wxBitmap& bitmap);
/**
@class wxBitmapComboBox
@wxheader{bmpcbox.h}
-
+
A combobox that displays bitmap in front of the list items.
It currently only allows using bitmaps of one size, and resizes itself
so that a bitmap can be shown next to the text field.
-
+
@beginStyleTable
@style{wxCB_READONLY}:
Creates a combobox without a text editor. On some platforms the
control or used for navigation between dialog controls). Windows
only.
@endStyleTable
-
+
@beginEventTable
@event{EVT_COMBOBOX(id\, func)}:
Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on
Process a wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in
the combobox.
@endEventTable
-
+
@library{wxadv}
@category{ctrl}
@appearance{bitmapcombobox.png}
-
+
@seealso
wxComboBox, wxChoice, wxOwnerDrawnComboBox, wxCommandEvent
*/
/**
Constructor, creating and showing a combobox.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param value
+ @param value
Initial selection string. An empty string indicates no selection.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then the window is sized
appropriately.
- @param n
+ @param n
Number of strings with which to initialise the control.
- @param choices
+ @param choices
An array of strings with which to initialise the control.
- @param style
+ @param style
Window style. See wxBitmapComboBox.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxBitmapComboBox();
- wxBitmapComboBox(wxWindow* parent, wxWindowID id,
- const wxString& value = "",
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- int n = 0,
- const wxString choices[] = @NULL,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "comboBox");
- wxBitmapComboBox(wxWindow* parent, wxWindowID id,
- const wxString& value,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "comboBox");
+ wxBitmapComboBox(wxWindow* parent, wxWindowID id,
+ const wxString& value = "",
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ int n = 0,
+ const wxString choices[] = @NULL,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "comboBox");
+ wxBitmapComboBox(wxWindow* parent, wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "comboBox");
//@}
/**
*/
int Append(const wxString& item,
const wxBitmap& bitmap = wxNullBitmap);
- int Append(const wxString& item, const wxBitmap& bitmap,
- void * clientData);
- int Append(const wxString& item, const wxBitmap& bitmap,
- wxClientData * clientData);
+ int Append(const wxString& item, const wxBitmap& bitmap,
+ void * clientData);
+ int Append(const wxString& item, const wxBitmap& bitmap,
+ wxClientData * clientData);
//@}
//@{
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox");
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& value,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "comboBox");
+ bool Create(wxWindow* parent, wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "comboBox");
//@}
/**
*/
int Insert(const wxString& item, const wxBitmap& bitmap,
unsigned int pos);
- int Insert(const wxString& item, const wxBitmap& bitmap,
- unsigned int pos,
- void * clientData);
- int Insert(const wxString& item, const wxBitmap& bitmap,
- unsigned int pos,
- wxClientData * clientData);
+ int Insert(const wxString& item, const wxBitmap& bitmap,
+ unsigned int pos,
+ void * clientData);
+ int Insert(const wxString& item, const wxBitmap& bitmap,
+ unsigned int pos,
+ wxClientData * clientData);
//@}
/**
/**
@class wxBrush
@wxheader{brush.h}
-
+
A brush is a drawing tool for filling in areas. It is used for painting
the background of rectangles, ellipses, etc. It has a colour and a
style.
-
+
@library{wxcore}
@category{gdi}
-
+
@stdobjects
Objects:
wxNullBrush
Pointers:
wxBLUE_BRUSH
-
+
wxGREEN_BRUSH
-
+
wxWHITE_BRUSH
-
+
wxBLACK_BRUSH
-
+
wxGREY_BRUSH
-
+
wxMEDIUM_GREY_BRUSH
-
+
wxLIGHT_GREY_BRUSH
-
+
wxTRANSPARENT_BRUSH
-
+
wxCYAN_BRUSH
-
+
wxRED_BRUSH
-
+
@seealso
wxBrushList, wxDC, wxDC::SetBrush
*/
/**
Copy constructor, uses @ref overview_trefcount "reference counting".
- @param colour
+ @param colour
Colour object.
- @param colourName
+ @param colourName
Colour name. The name will be looked up in the colour database.
- @param style
+ @param style
One of:
wxTRANSPARENT
Vertical hatch.
- @param brush
+ @param brush
Pointer or reference to a brush to copy.
- @param stippleBitmap
+ @param stippleBitmap
A bitmap to use for stippling.
@remarks If a stipple brush is created, the brush style will be set to
@sa wxBrushList, wxColour, wxColourDatabase
*/
wxBrush();
- wxBrush(const wxColour& colour, int style = wxSOLID);
- wxBrush(const wxString& colourName, int style);
- wxBrush(const wxBitmap& stippleBitmap);
- wxBrush(const wxBrush& brush);
+ wxBrush(const wxColour& colour, int style = wxSOLID);
+ wxBrush(const wxString& colourName, int style);
+ wxBrush(const wxBitmap& stippleBitmap);
+ wxBrush(const wxBrush& brush);
//@}
/**
@sa GetColour()
*/
void SetColour(wxColour& colour);
- void SetColour(const wxString& colourName);
- void SetColour(unsigned char red, unsigned char green,
- unsigned char blue);
+ void SetColour(const wxString& colourName);
+ void SetColour(unsigned char red, unsigned char green,
+ unsigned char blue);
//@}
/**
Sets the stipple bitmap.
- @param bitmap
+ @param bitmap
The bitmap to use for stippling.
@remarks The style will be set to wxSTIPPLE, unless the bitmap has a mask
/**
Sets the brush style.
- @param style
+ @param style
One of:
wxTRANSPARENT
/**
@class wxMemoryBuffer
@wxheader{buffer.h}
-
+
A @b wxMemoryBuffer is a useful data structure for storing arbitrary sized
blocks
of memory. wxMemoryBuffer guarantees deletion of the memory block when the
object
- is destroyed.
-
+ is destroyed.
+
@library{wxbase}
@category{FIXME}
*/
-class wxMemoryBuffer
+class wxMemoryBuffer
{
public:
//@{
/**
Create a new buffer.
- @param size
+ @param size
size of new buffer.
*/
wxMemoryBuffer(const wxMemoryBuffer& src);
- wxMemoryBuffer(size_t size);
+ wxMemoryBuffer(size_t size);
//@}
/**
Append a single byte to the buffer.
- @param data
+ @param data
New byte to append to the buffer.
*/
void AppendByte(char data);
/**
Ensure that the buffer is big enough and return a pointer to the start
- of the empty space in the buffer. This pointer can be used to directly
+ of the empty space in the buffer. This pointer can be used to directly
write data into the buffer, this new data will be appended to
the existing data.
- @param sizeNeeded
+ @param sizeNeeded
Amount of extra space required in the buffer for
the append operation
*/
Sets the length of the data stored in the buffer. Mainly useful for truncating
existing data.
- @param size
+ @param size
New length of the valid data in the buffer. This is
distinct from the allocated size
*/
Update the length after completing a direct append, which
you must have used GetAppendBuf() to initialise.
- @param sizeUsed
- This is the amount of new data that has been
+ @param sizeUsed
+ This is the amount of new data that has been
appended.
*/
void UngetAppendBuf(size_t sizeUsed);
Update the buffer after completing a direct write, which
you must have used GetWriteBuf() to initialise.
- @param sizeUsed
+ @param sizeUsed
The amount of data written in to buffer
by the direct write
*/
/**
@class wxBusyInfo
@wxheader{busyinfo.h}
-
+
This class makes it easy to tell your user that the program is temporarily busy.
Just create a wxBusyInfo object on the stack, and within the current scope,
a message window will be shown.
-
+
For example:
-
+
@code
wxBusyInfo wait("Please wait, working...");
-
+
for (int i = 0; i 100000; i++)
{
DoACalculation();
}
@endcode
-
+
It works by creating a window in the constructor,
and deleting it in the destructor.
-
+
You may also want to call wxTheApp-Yield() to refresh the window
periodically (in case it had been obscured by other windows, for
example) like this:
-
+
@code
wxWindowDisabler disableAll;
-
+
wxBusyInfo wait("Please wait, working...");
-
+
for (int i = 0; i 100000; i++)
{
DoACalculation();
-
+
if ( !(i % 1000) )
wxTheApp-Yield();
}
@endcode
-
- but take care to not cause undesirable reentrancies when doing it (see
+
+ but take care to not cause undesirable reentrancies when doing it (see
wxApp::Yield for more details). The simplest way to do
it is to use wxWindowDisabler class as illustrated
in the above example.
-
+
@library{wxcore}
@category{FIXME}
*/
-class wxBusyInfo
+class wxBusyInfo
{
public:
/**
/**
@class wxButton
@wxheader{button.h}
-
+
A button is a control that contains a text string,
and is one of the most common elements of a GUI. It may be placed on a
@ref overview_wxdialog "dialog box" or panel, or indeed
almost any other window.
-
+
@beginStyleTable
@style{wxBU_LEFT}:
Left-justifies the label. Windows and GTK+ only.
@style{wxBORDER_NONE}:
Creates a flat button. Windows and GTK+ only.
@endStyleTable
-
+
@beginEventTable
@event{EVT_BUTTON(id\, func)}:
Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is
clicked.
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{button.png}
-
+
@seealso
wxBitmapButton
*/
to
that, the button will be decorated with stock icons under GTK+ 2.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Button identifier. A value of wxID_ANY indicates a default value.
- @param label
+ @param label
Text to be displayed on the button.
- @param pos
+ @param pos
Button position.
- @param size
+ @param size
Button size. If the default size is specified then the button is sized
appropriately for the text.
- @param style
+ @param style
Window style. See wxButton.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxButton();
- wxButton(wxWindow* parent, wxWindowID id,
- const wxString& label = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "button");
+ wxButton(wxWindow* parent, wxWindowID id,
+ const wxString& label = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "button");
//@}
/**
/**
Sets the string label for the button.
- @param label
+ @param label
The label to set.
*/
void SetLabel(const wxString& label);
/**
@class wxCalendarEvent
@wxheader{calctrl.h}
-
- The wxCalendarEvent class is used together with
+
+ The wxCalendarEvent class is used together with
wxCalendarCtrl.
-
+
@library{wxadv}
@category{events}
-
+
@seealso
wxCalendarCtrl
*/
{
public:
/**
- Returns the week day on which the user clicked in
+ Returns the week day on which the user clicked in
@c EVT_CALENDAR_WEEKDAY_CLICKED handler. It doesn't make sense to call
this function in other handlers.
*/
/**
@class wxCalendarDateAttr
@wxheader{calctrl.h}
-
+
wxCalendarDateAttr is a custom attributes for a calendar date. The objects of
this class are used with wxCalendarCtrl.
-
+
@library{wxadv}
@category{misc}
-
+
@seealso
wxCalendarCtrl
*/
-class wxCalendarDateAttr
+class wxCalendarDateAttr
{
public:
//@{
The constructors.
*/
wxCalendarDateAttr();
- wxCalendarDateAttr(const wxColour& colText,
- const wxColour& colBack = wxNullColour,
- const wxColour& colBorder = wxNullColour,
- const wxFont& font = wxNullFont,
- wxCalendarDateBorder border = wxCAL_BORDER_NONE);
- wxCalendarDateAttr(wxCalendarDateBorder border,
- const wxColour& colBorder = wxNullColour);
+ wxCalendarDateAttr(const wxColour& colText,
+ const wxColour& colBack = wxNullColour,
+ const wxColour& colBorder = wxNullColour,
+ const wxFont& font = wxNullFont,
+ wxCalendarDateBorder border = wxCAL_BORDER_NONE);
+ wxCalendarDateAttr(wxCalendarDateBorder border,
+ const wxColour& colBorder = wxNullColour);
//@}
/**
/**
@class wxCalendarCtrl
@wxheader{calctrl.h}
-
+
The calendar control allows the user to pick a date. For this,
it displays a window containing several parts: a control at the top to pick the
month
and the year (either or both of them may be disabled), and a month
area below them which shows all the days in the month. The user can move the
- current selection using the keyboard and select the date (generating
+ current selection using the keyboard and select the date (generating
@c EVT_CALENDAR event) by pressing @c Return or double clicking it.
-
+
It has advanced possibilities for the customization of its display. All global
settings (such as colours and fonts used) can, of course, be changed. But
also, the display style for each day in the month can be set independently
using wxCalendarDateAttr class.
-
+
An item without custom attributes is drawn with the default colours and
- font and without border, but setting custom attributes with
+ font and without border, but setting custom attributes with
wxCalendarCtrl::SetAttr allows to modify its appearance. Just
create a custom attribute object and set it for the day you want to be
displayed specially (note that the control will take ownership of the pointer,
i.e. it will delete it itself). A day may be marked as being a holiday, even
- if it is not recognized as one by wxDateTime using
+ if it is not recognized as one by wxDateTime using
wxCalendarDateAttr::SetHoliday method.
-
+
As the attributes are specified for each day, they may change when the month
- is changed, so you will often want to update them in
+ is changed, so you will often want to update them in
@c EVT_CALENDAR_MONTH event handler.
-
+
@beginStyleTable
@style{wxCAL_SUNDAY_FIRST}:
Show Sunday as the first day in the week
Use alternative, more compact, style for the month and year
selection controls.
@endStyleTable
-
+
@library{wxadv}
@category{ctrl}
@appearance{calendarctrl.png}
-
+
@seealso
@ref overview_samplecalendar "Calendar sample", wxCalendarDateAttr,
wxCalendarEvent
Does the same as Create() method.
*/
wxCalendarCtrl();
- wxCalendarCtrl(wxWindow* parent, wxWindowID id,
- const wxDateTime& date = wxDefaultDateTime,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxCAL_SHOW_HOLIDAYS,
- const wxString& name = wxCalendarNameStr);
+ wxCalendarCtrl(wxWindow* parent, wxWindowID id,
+ const wxDateTime& date = wxDefaultDateTime,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCAL_SHOW_HOLIDAYS,
+ const wxString& name = wxCalendarNameStr);
//@}
/**
void EnableHolidayDisplay(bool display = @true);
/**
- This function should be used instead of changing
+ This function should be used instead of changing
@c wxCAL_NO_MONTH_CHANGE style bit. It allows or disallows the user to
change the month interactively. Note that if the month can not be changed, the
year can not be changed neither.
const wxColour GetHolidayColourFg();
/**
- Returns one of @c wxCAL_HITTEST_XXX
- constants and fills either @e date or
+ Returns one of @c wxCAL_HITTEST_XXX
+ constants and fills either @e date or
@e wd pointer with the corresponding value depending on the hit test code.
*/
wxCalendarHitTestResult HitTest(const wxPoint& pos,
/**
@class wxCaret
@wxheader{caret.h}
-
+
A caret is a blinking cursor showing the position where the typed text will
appear. The text controls usually have a caret but wxCaret class also allows
to use a caret in other windows.
-
+
Currently, the caret appears as a rectangle of the given size. In the future,
it will be possible to specify a bitmap to be used for the caret shape.
-
+
A caret is always associated with a window and the current caret can be
retrieved using wxWindow::GetCaret. The same caret
can't be reused in two different windows.
-
+
@library{wxcore}
@category{misc}
-
+
@seealso
wxCaret::GetBlinkTime
*/
-class wxCaret
+class wxCaret
{
public:
//@{
with the given window.
*/
wxCaret();
- wxCaret(wxWindow* window, int width, int height);
- wxCaret(wxWindowBase* window, const wxSize& size);
+ wxCaret(wxWindow* window, int width, int height);
+ wxCaret(wxWindowBase* window, const wxSize& size);
//@}
//@{
with the given window (same as constructor).
*/
bool Create(wxWindowBase* window, int width, int height);
- bool Create(wxWindowBase* window, const wxSize& size);
+ bool Create(wxWindowBase* window, const wxSize& size);
//@}
/**
@c ( x, y )
*/
void GetPosition(int* x, int* y);
- wxPoint GetPosition();
+ wxPoint GetPosition();
//@}
//@{
@c ( width, height )
*/
void GetSize(int* width, int* height);
- wxSize GetSize();
+ wxSize GetSize();
//@}
/**
Move the caret to given position (in logical coordinates).
*/
void Move(int x, int y);
- void Move(const wxPoint& pt);
+ void Move(const wxPoint& pt);
//@}
/**
Changes the size of the caret.
*/
void SetSize(int width, int height);
- void SetSize(const wxSize& size);
+ void SetSize(const wxSize& size);
//@}
/**
/////////////////////////////////////////////////////////////////////////////
- // Name: chartype.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- //@{
+// Name: chartype.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+//@{
/**
wxT() is a macro which can be used with character and string literals (in other
words, @c 'x' or @c "foo") to automatically convert them to Unicode in
Unicode build configuration. Please see the
@ref overview_unicode "Unicode overview" for more information.
-
+
This macro is simply returns the value passed to it without changes in ASCII
build. In fact, its definition is:
-
+
@code
#ifdef UNICODE
#define wxT(x) L ## x
@endcode
*/
wxChar wxT(char ch);
- const wxChar * wxT(const char * s);
+const wxChar * wxT(const char * s);
//@}
- //@{
+//@{
/**
wxS is macro which can be used with character and string literals to either
convert them to wide characters or strings in @c wchar_t-based Unicode
mismatch between the kind of the literal used and wxStringCharType used in the
current build, but using it can be beneficial in performance-sensitive code to
do the conversion at compile-time instead.
-
+
@sa wxT
*/
wxStringCharType wxS(char ch);
- const wxStringCharType * wxS(const char * s);
+const wxStringCharType * wxS(const char * s);
//@}
/**
@class wxCheckBox
@wxheader{checkbox.h}
-
+
A checkbox is a labelled box which by default is either on (checkmark is
visible) or off (no checkmark). Optionally (when the wxCHK_3STATE style flag
is set) it can have a third state, called the mixed or undetermined state.
Often this is used as a "Does Not Apply" state.
-
+
@beginStyleTable
@style{wxCHK_2STATE}:
Create a 2-state checkbox. This is the default.
@style{wxALIGN_RIGHT}:
Makes the text appear on the left of the checkbox.
@endStyleTable
-
+
@beginEventTable
@event{EVT_CHECKBOX(id\, func)}:
Process a wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox
is clicked.
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{checkbox.png}
-
+
@seealso
wxRadioButton, wxCommandEvent
*/
/**
Constructor, creating and showing a checkbox.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Checkbox identifier. The value wxID_ANY indicates a default value.
- @param label
+ @param label
Text to be displayed next to the checkbox.
- @param pos
+ @param pos
Checkbox position. If wxDefaultPosition is specified then a default
position is chosen.
- @param size
+ @param size
Checkbox size. If wxDefaultSize is specified then a default size is
chosen.
- @param style
+ @param style
Window style. See wxCheckBox.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxCheckBox();
- wxCheckBox(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& val,
- const wxString& name = "checkBox");
+ wxCheckBox(wxWindow* parent, wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& val,
+ const wxString& name = "checkBox");
//@}
/**
bool Is3rdStateAllowedForUser();
/**
- This is just a maybe more readable synonym for
- GetValue(): just as the latter, it returns
+ This is just a maybe more readable synonym for
+ GetValue(): just as the latter, it returns
@true if the checkbox is checked and @false otherwise.
*/
bool IsChecked();
Sets the checkbox to the given state. This does not cause a
wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted.
- @param state
+ @param state
If @true, the check is on, otherwise it is off.
*/
void SetValue(bool state);
/**
@class wxCheckListBox
@wxheader{checklst.h}
-
+
A checklistbox is like a listbox, but allows items to be checked or unchecked.
-
+
When using this class under Windows wxWidgets must be compiled with
USE_OWNER_DRAWN set to 1.
-
+
Only the new functions for this class are documented; see also wxListBox.
-
+
Please note that wxCheckListBox uses client data in its implementation,
and therefore this is not available to the application.
-
+
@beginEventTable
@event{EVT_CHECKLISTBOX(id\, func)}:
Process a wxEVT_COMMAND_CHECKLISTBOX_TOGGLED event, when an item in
the check list box is checked or unchecked.
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{checklistbox.png}
-
+
@seealso
wxListBox, wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
*/
/**
Constructor, creating and showing a list box.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then the window is sized
appropriately.
- @param n
+ @param n
Number of strings with which to initialise the control.
- @param choices
+ @param choices
An array of strings with which to initialise the control.
- @param style
+ @param style
Window style. See wxCheckListBox.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
*/
wxCheckListBox();
- wxCheckListBox(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- int n,
- const wxString choices[] = @NULL,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "listBox");
- wxCheckListBox(wxWindow* parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "listBox");
+ wxCheckListBox(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ int n,
+ const wxString choices[] = @NULL,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "listBox");
+ wxCheckListBox(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "listBox");
//@}
/**
Checks the given item. Note that calling this method doesn't result in
wxEVT_COMMAND_CHECKLISTBOX_TOGGLE being emitted.
- @param item
+ @param item
Index of item to check.
- @param check
+ @param check
@true if the item is to be checked, @false otherwise.
*/
void Check(int item, bool check = @true);
/**
@class wxMultiChoiceDialog
@wxheader{choicdlg.h}
-
+
This class represents a dialog that shows a list of strings, and allows
the user to select one or more.
-
+
@library{wxbase}
@category{cmndlg}
-
+
@seealso
@ref overview_wxmultichoicedialogoverview "wxMultiChoiceDialog overview",
wxSingleChoiceDialog
/**
Constructor taking an array of wxString choices.
- @param parent
+ @param parent
Parent window.
- @param message
+ @param message
Message to show on the dialog.
- @param caption
+ @param caption
The dialog caption.
- @param n
+ @param n
The number of choices.
- @param choices
+ @param choices
An array of strings, or a string list, containing the choices.
- @param style
+ @param style
A dialog style (bitlist) containing flags chosen from standard
dialog styles and the following:
Centre the message. Not Windows.
- The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER |
+ The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER |
wxOK | wxCANCEL | wxCENTRE.
- @param pos
+ @param pos
Dialog position. Not Windows.
@remarks Use ShowModal() to show the dialog.
const wxString* choices,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition);
- wxMultiChoiceDialog(wxWindow* parent,
- const wxString& message,
- const wxString& caption,
- const wxArrayString& choices,
- long style = wxCHOICEDLG_STYLE,
- const wxPoint& pos = wxDefaultPosition);
+ wxMultiChoiceDialog(wxWindow* parent,
+ const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ long style = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition);
//@}
/**
/**
@class wxSingleChoiceDialog
@wxheader{choicdlg.h}
-
+
This class represents a dialog that shows a list of strings, and allows the
user to select one. Double-clicking on a list item is equivalent to
single-clicking and then pressing OK.
-
+
@library{wxbase}
@category{cmndlg}
-
+
@seealso
@ref overview_wxsinglechoicedialogoverview "wxSingleChoiceDialog overview",
wxMultiChoiceDialog
/**
Constructor, taking an array of wxString choices and optional client data.
- @param parent
+ @param parent
Parent window.
- @param message
+ @param message
Message to show on the dialog.
- @param caption
+ @param caption
The dialog caption.
- @param n
+ @param n
The number of choices.
- @param choices
+ @param choices
An array of strings, or a string list, containing the choices.
- @param clientData
+ @param clientData
An array of client data to be associated with the items.
See GetSelectionClientData.
- @param style
+ @param style
A dialog style (bitlist) containing flags chosen from standard
dialog styles and the following:
Centre the message. Not Windows.
- The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER |
+ The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER |
wxOK | wxCANCEL | wxCENTRE.
- @param pos
+ @param pos
Dialog position. Not Windows.
@remarks Use ShowModal() to show the dialog.
void** clientData = @NULL,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition);
- wxSingleChoiceDialog(wxWindow* parent,
- const wxString& message,
- const wxString& caption,
- const wxArrayString& choices,
- void** clientData = @NULL,
- long style = wxCHOICEDLG_STYLE,
- const wxPoint& pos = wxDefaultPosition);
+ wxSingleChoiceDialog(wxWindow* parent,
+ const wxString& message,
+ const wxString& caption,
+ const wxArrayString& choices,
+ void** clientData = @NULL,
+ long style = wxCHOICEDLG_STYLE,
+ const wxPoint& pos = wxDefaultPosition);
//@}
/**
bool centre = @true,
int width=150,
int height=200);
- int wxGetSingleChoiceIndex(const wxString& message,
- const wxString& caption,
- int n,
- const wxString& choices[],
- wxWindow * parent = @NULL,
- int x = -1,
- int y = -1,
- bool centre = @true,
- int width=150,
- int height=200);
+int wxGetSingleChoiceIndex(const wxString& message,
+ const wxString& caption,
+ int n,
+ const wxString& choices[],
+ wxWindow * parent = @NULL,
+ int x = -1,
+ int y = -1,
+ bool centre = @true,
+ int width=150,
+ int height=200);
//@}
//@{
string or Cancel to return the empty string. Use
wxGetSingleChoiceIndex if empty string is a
valid choice and if you want to be able to detect pressing Cancel reliably.
-
+
You may pass the list of strings to choose from either using @e choices
which is an array of @e n strings for the listbox or by using a single
@e aChoices parameter of type wxArrayString.
-
+
If @e centre is @true, the message text (which may include new line
characters) is centred; if @false, the message is left-justified.
*/
bool centre = @true,
int width=150,
int height=200);
- wxString wxGetSingleChoice(const wxString& message,
- const wxString& caption,
- int n,
- const wxString& choices[],
- wxWindow * parent = @NULL,
- int x = -1,
- int y = -1,
- bool centre = @true,
- int width=150,
- int height=200);
+wxString wxGetSingleChoice(const wxString& message,
+ const wxString& caption,
+ int n,
+ const wxString& choices[],
+ wxWindow * parent = @NULL,
+ int x = -1,
+ int y = -1,
+ bool centre = @true,
+ int width=150,
+ int height=200);
//@}
//@{
bool centre = @true,
int width=150,
int height=200);
- wxString wxGetSingleChoiceData(const wxString& message,
- const wxString& caption,
- int n,
- const wxString& choices[],
- const wxString& client_data[],
- wxWindow * parent = @NULL,
- int x = -1,
- int y = -1,
- bool centre = @true,
- int width=150,
- int height=200);
+wxString wxGetSingleChoiceData(const wxString& message,
+ const wxString& caption,
+ int n,
+ const wxString& choices[],
+ const wxString& client_data[],
+ wxWindow * parent = @NULL,
+ int x = -1,
+ int y = -1,
+ bool centre = @true,
+ int width=150,
+ int height=200);
//@}
//@{
number of items in the listbox whose indices will be returned in
@e selection array. The initial contents of this array will be used to
select the items when the dialog is shown.
-
+
You may pass the list of strings to choose from either using @e choices
which is an array of @e n strings for the listbox or by using a single
@e aChoices parameter of type wxArrayString.
-
+
If @e centre is @true, the message text (which may include new line
characters) is centred; if @false, the message is left-justified.
*/
bool centre = @true,
int width=150,
int height=200);
- size_t wxGetMultipleChoices(wxArrayInt& selections,
- const wxString& message,
- const wxString& caption,
- int n,
- const wxString& choices[],
- wxWindow * parent = @NULL,
- int x = -1,
- int y = -1,
- bool centre = @true,
- int width=150,
- int height=200);
+size_t wxGetMultipleChoices(wxArrayInt& selections,
+ const wxString& message,
+ const wxString& caption,
+ int n,
+ const wxString& choices[],
+ wxWindow * parent = @NULL,
+ int x = -1,
+ int y = -1,
+ bool centre = @true,
+ int width=150,
+ int height=200);
//@}
/**
@class wxChoice
@wxheader{choice.h}
-
+
A choice item is used to select one of a list of strings. Unlike a
listbox, only the selection is visible until the user pulls down the
menu of choices.
-
+
@beginStyleTable
@style{wxCB_SORT}:
Sorts the entries alphabetically.
@endStyleTable
-
+
@beginEventTable
@event{EVT_CHOICE(id\, func)}:
Process a wxEVT_COMMAND_CHOICE_SELECTED event, when an item on the
list is selected.
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{choice.png}
-
+
@seealso
wxListBox, wxComboBox, wxCommandEvent
*/
/**
Constructor, creating and showing a choice.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then the choice is sized
appropriately.
- @param n
+ @param n
Number of strings with which to initialise the choice control.
- @param choices
+ @param choices
An array of strings with which to initialise the choice control.
- @param style
+ @param style
Window style. See wxChoice.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxChoice();
- wxChoice(wxWindow * parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size, int n,
- const wxString choices[],
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "choice");
- wxChoice(wxWindow * parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "choice");
+ wxChoice(wxWindow * parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size, int n,
+ const wxString choices[],
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "choice");
+ wxChoice(wxWindow * parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "choice");
//@}
/**
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "choice");
- bool Create(wxWindow * parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "choice");
+ bool Create(wxWindow * parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "choice");
//@}
/**
/**
Sets the number of columns in this choice item.
- @param n
+ @param n
Number of columns.
*/
void SetColumns(int n = 1);
/**
@class wxChoicebook
@wxheader{choicebk.h}
-
+
wxChoicebook is a class similar to wxNotebook but which
uses a wxChoice to show the labels instead of the
tabs.
-
+
There is no documentation for this class yet but its usage is
identical to wxNotebook (except for the features clearly related to tabs
only), so please refer to that class documentation for now. You can also
use the @ref overview_samplenotebook "notebook sample" to see wxChoicebook in
action.
-
+
wxChoicebook allows the use of wxBookCtrl::GetControlSizer, allowing a program
to add other controls next to the choice control. This is particularly useful
when screen space is restricted, as it often is when wxChoicebook is being
employed.
-
+
@beginStyleTable
@style{wxCHB_DEFAULT}:
Choose the default location for the labels depending on the current
@style{wxCHB_BOTTOM}:
Place labels below the page area.
@endStyleTable
-
+
@library{wxcore}
@category{miscwnd}
-
+
@seealso
wxBookCtrl, wxNotebook, @ref overview_samplenotebook "notebook sample"
*/
Constructs a choicebook control.
*/
wxChoicebook();
- wxChoicebook(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxEmptyStr);
+ wxChoicebook(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxEmptyStr);
//@}
};
/////////////////////////////////////////////////////////////////////////////
- // Name: clipboard.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- /**
- Gets the name of a registered clipboard format, and puts it into the buffer @e
- formatName which is of maximum
- length @e maxCount. @e dataFormat must not specify a predefined clipboard
- format.
+// Name: clipboard.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+Gets the name of a registered clipboard format, and puts it into the buffer @e
+formatName which is of maximum
+length @e maxCount. @e dataFormat must not specify a predefined clipboard
+format.
*/
bool wxGetClipboardFormatName(int dataFormat,
const wxString& formatName,
int maxCount);
- /**
- Gets data from the clipboard.
-
- @e dataFormat may be one of:
-
- wxCF_TEXT or wxCF_OEMTEXT: returns a pointer to new memory containing a
- null-terminated text string.
- wxCF_BITMAP: returns a new wxBitmap.
-
- The clipboard must have previously been opened for this call to succeed.
+/**
+Gets data from the clipboard.
+
+@e dataFormat may be one of:
+
+ wxCF_TEXT or wxCF_OEMTEXT: returns a pointer to new memory containing a
+null-terminated text string.
+ wxCF_BITMAP: returns a new wxBitmap.
+
+The clipboard must have previously been opened for this call to succeed.
*/
wxObject * wxGetClipboardData(int dataFormat);
to the clipboard. Each call to this function specifies a known
available format; the function returns the format that appears next in
the list.
-
+
@e dataFormat specifies a known format. If this parameter is zero,
the function returns the first format in the list.
-
+
The return value specifies the next known clipboard data format if the
function is successful. It is zero if the @e dataFormat parameter specifies
the last format in the list of available formats, or if the clipboard
is not open.
-
+
Before it enumerates the formats function, an application must open the
clipboard by using the
wxOpenClipboard function.
/**
@class wxClipboard
@wxheader{clipbrd.h}
-
+
A class for manipulating the clipboard. Note that this is not compatible with
the
clipboard class from wxWidgets 1.xx, which has the same name but a different
implementation.
-
+
To use the clipboard, you call member functions of the global @b wxTheClipboard
object.
-
+
See also the @ref overview_wxdataobjectoverview "wxDataObject overview" for
further information.
-
+
Call wxClipboard::Open to get ownership of the clipboard. If this operation
returns @true, you
now own the clipboard. Call wxClipboard::SetData to put data
retrieve data from the clipboard. Call wxClipboard::Close to close
the clipboard and relinquish ownership. You should keep the clipboard open only
momentarily.
-
+
For example:
-
+
@code
// Write some text to the clipboard
if (wxTheClipboard-Open())
{
- // This data objects are held by the clipboard,
+ // This data objects are held by the clipboard,
// so do not delete them in the app.
wxTheClipboard-SetData( new wxTextDataObject("Some text") );
wxTheClipboard-Close();
}
-
+
// Read some text
if (wxTheClipboard-Open())
{
wxTextDataObject data;
wxTheClipboard-GetData( data );
wxMessageBox( data.GetText() );
- }
+ }
wxTheClipboard-Close();
}
@endcode
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
@ref overview_wxdndoverview "Drag and drop overview", wxDataObject
*/
bool IsUsingPrimarySelection();
/**
- Call this function to open the clipboard before calling SetData()
+ Call this function to open the clipboard before calling SetData()
and GetData().
Call Close() when you have finished with the clipboard. You
/**
@class wxClientDataContainer
@wxheader{clntdata.h}
-
+
This class is a mixin that provides storage and management of "client
data." This data can either be of type void - in which case the data
@e container does not take care of freeing the data again
container will free the memory itself later.
Note that you @e must not assign both void data and data
derived from the wxClientData class to a container.
-
+
NOTE: This functionality is currently duplicated in wxEvtHandler in
order to avoid having more than one vtable in that class hierarchy.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxEvtHandler, wxClientData
*/
-class wxClientDataContainer
+class wxClientDataContainer
{
public:
/**
/**
@class wxClientData
@wxheader{clntdata.h}
-
+
All classes deriving from wxEvtHandler
(such as all controls and wxApp)
can hold arbitrary data which is here referred to as "client data".
container (e.g. a control) will free the memory itself later.
Note that you @e must not assign both void data and data
derived from the wxClientData class to a container.
-
+
Some controls can hold various items and these controls can
additionally hold client data for each item. This is the case for
wxChoice, wxComboBox
and wxListBox. wxTreeCtrl
has a specialized class wxTreeItemData
for each item in the tree.
-
+
If you want to add client data to your own classes, you may
use the mix-in class wxClientDataContainer.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxEvtHandler, wxTreeItemData, wxStringClientData, wxClientDataContainer
*/
-class wxClientData
+class wxClientData
{
public:
/**
/**
@class wxStringClientData
@wxheader{clntdata.h}
-
+
Predefined client data class for holding a string.
-
+
@library{wxbase}
@category{FIXME}
*/
Create client data with string.
*/
wxStringClientData();
- wxStringClientData(const wxString& data);
+ wxStringClientData(const wxString& data);
//@}
/**
/**
@class wxColourPickerCtrl
@wxheader{clrpicker.h}
-
+
This control allows the user to select a colour. The generic implementation is
a button which brings up a wxColourDialog when clicked. Native implementation
may differ but this is usually a (small) widget which give access to the
colour-chooser
dialog.
It is only available if @c wxUSE_COLOURPICKERCTRL is set to 1 (the default).
-
+
@beginStyleTable
@style{wxCLRP_DEFAULT_STYLE}:
The default style: 0.
Shows the colour in HTML form (AABBCC) as colour button label
(instead of no label at all).
@endStyleTable
-
+
@library{wxcore}
@category{miscpickers}
@appearance{colourpickerctrl.png}
-
+
@seealso
wxColourDialog, wxColourPickerEvent
*/
const wxString& name = "colourpickerctrl");
/**
- @param parent
+ @param parent
Parent window, must not be non-@NULL.
- @param id
+ @param id
The identifier for the control.
- @param colour
+ @param colour
The initial colour shown in the control.
- @param pos
+ @param pos
Initial position.
- @param size
+ @param size
Initial size.
- @param style
+ @param style
The window style, see wxCRLP_* flags.
- @param validator
+ @param validator
Validator which can be used for additional date checks.
- @param name
+ @param name
Control name.
@returns @true if the control was successfully created or @false if
Sets the currently selected colour. See wxColour::Set.
*/
void SetColour(const wxColour & col);
- void SetColour(const wxString & colname);
+ void SetColour(const wxString & colname);
//@}
};
/**
@class wxColourPickerEvent
@wxheader{clrpicker.h}
-
+
This event class is used for the events generated by
wxColourPickerCtrl.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxColourPickerCtrl
*/
/**
@class wxCmdLineParser
@wxheader{cmdline.h}
-
+
wxCmdLineParser is a class for parsing the command line.
-
+
It has the following features:
-
+
distinguishes options, switches and parameters; allows option grouping
allows both short and long options
automatically generates the usage message from the command line description
does type checks on the options values (number, date, ...).
-
+
To use it you should follow these steps:
-
+
@ref wxCmdLineParser::construction construct an object of this class
- giving it the command line to parse and optionally its description or use
+ giving it the command line to parse and optionally its description or use
@c AddXXX() functions later
call @c Parse()
use @c Found() to retrieve the results
-
+
In the documentation below the following terminology is used:
-
-
-
+
+
+
switch
-
-
+
+
This is a boolean option which can be given or not, but
which doesn't have any value. We use the word switch to distinguish such boolean
- options from more generic options like those described below. For example,
+ options from more generic options like those described below. For example,
@c -v might be a switch meaning "enable verbose mode".
-
-
+
+
option
-
-
+
+
Option for us here is something which comes with a value 0
unlike a switch. For example, @c -o:filename might be an option which allows
to specify the name of the output file.
-
-
+
+
parameter
-
-
+
+
This is a required program argument.
-
-
-
+
+
+
@library{wxbase}
@category{appmanagement}
-
+
@seealso
wxApp::argc and wxApp::argv, console sample
*/
-class wxCmdLineParser
+class wxCmdLineParser
{
public:
//@{
/**
- Specifies both the command line (in Windows format) and the
+ Specifies both the command line (in Windows format) and the
@ref setdesc() "command line description".
*/
wxCmdLineParser();
- wxCmdLineParser(int argc, char** argv);
- wxCmdLineParser(int argc, wchar_t** argv);
- wxCmdLineParser(const wxString& cmdline);
- wxCmdLineParser(const wxCmdLineEntryDesc* desc);
- wxCmdLineParser(const wxCmdLineEntryDesc* desc, int argc,
- char** argv);
- wxCmdLineParser(const wxCmdLineEntryDesc* desc,
- const wxString& cmdline);
+ wxCmdLineParser(int argc, char** argv);
+ wxCmdLineParser(int argc, wchar_t** argv);
+ wxCmdLineParser(const wxString& cmdline);
+ wxCmdLineParser(const wxCmdLineEntryDesc* desc);
+ wxCmdLineParser(const wxCmdLineEntryDesc* desc, int argc,
+ char** argv);
+ wxCmdLineParser(const wxCmdLineEntryDesc* desc,
+ const wxString& cmdline);
//@}
/**
description in what follows.
You have complete freedom of choice as to when specify the required information,
- the only restriction is that it must be done before calling
+ the only restriction is that it must be done before calling
Parse().
To specify the command line to parse you may use either one of constructors
accepting it (@c wxCmdLineParser(argc, argv) or @c wxCmdLineParser(const
wxString) usually)
- or, if you use the default constructor, you can do it later by calling
+ or, if you use the default constructor, you can do it later by calling
SetCmdLine().
The same holds for command line description: it can be specified either in
the @ref wxcmdlineparserctor() constructor (with or without
the command line itself) or constructed later using either
- SetDesc() or combination of
- AddSwitch(),
- AddOption() and
+ SetDesc() or combination of
+ AddSwitch(),
+ AddOption() and
AddParam() methods.
- Using constructors or SetDesc() uses a (usually
+ Using constructors or SetDesc() uses a (usually
@c const static) table containing the command line description. If you want
- to decide which options to accept during the run-time, using one of the
+ to decide which options to accept during the run-time, using one of the
@c AddXXX() functions above might be preferable.
*/
The long options are the ones which start with two dashes (@c "--") and look
like this: @c --verbose, i.e. they generally are complete words and not some
abbreviations of them. As long options are used by more and more applications,
- they are enabled by default, but may be disabled with
+ they are enabled by default, but may be disabled with
DisableLongOptions().
Another global option is the set of characters which may be used to start an
with SetSwitchChars() method.
Finally, SetLogo() can be used to show some
- application-specific text before the explanation given by
+ application-specific text before the explanation given by
Usage() function.
*/
value in the provided pointer (which should not be @NULL).
*/
bool Found(const wxString& name);
- bool Found(const wxString& name, wxString* value);
- bool Found(const wxString& name, long* value);
- bool Found(const wxString& name, wxDateTime* value);
+ bool Found(const wxString& name, wxString* value);
+ bool Found(const wxString& name, long* value);
+ bool Found(const wxString& name, wxDateTime* value);
//@}
/**
you may access the results of parsing using one of overloaded @c Found()
methods.
- For a simple switch, you will simply call
+ For a simple switch, you will simply call
Found() to determine if the switch was given
- or not, for an option or a parameter, you will call a version of @c Found()
- which also returns the associated value in the provided variable. All
+ or not, for an option or a parameter, you will call a version of @c Found()
+ which also returns the associated value in the provided variable. All
@c Found() functions return @true if the switch or option were found in the
command line or @false if they were not specified.
*/
/**
- Parse the command line, return 0 if ok, -1 if @c "-h" or @c "--help"
+ Parse the command line, return 0 if ok, -1 if @c "-h" or @c "--help"
option was encountered and the help message was given or a positive value if a
syntax error occurred.
- @param giveUsage
+ @param giveUsage
If @true (default), the usage message is given if a
syntax error was encountered while parsing the command line or if help was
requested. If @false, only error messages about possible syntax errors
Set command line to parse after using one of the constructors which don't do it.
*/
void SetCmdLine(int argc, char** argv);
- void SetCmdLine(int argc, wchar_t** argv);
- void SetCmdLine(const wxString& cmdline);
+ void SetCmdLine(int argc, wchar_t** argv);
+ void SetCmdLine(const wxString& cmdline);
//@}
/**
void SetDesc(const wxCmdLineEntryDesc* desc);
/**
- @e logo is some extra text which will be shown by
+ @e logo is some extra text which will be shown by
Usage() method.
*/
void SetLogo(const wxString& logo);
/**
@class wxCommand
@wxheader{cmdproc.h}
-
+
wxCommand is a base class for modelling an application command,
which is an action usually performed by selecting a menu item, pressing
a toolbar button or any other means provided by the application to
change the data or view.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
Overview
*/
/**
@class wxCommandProcessor
@wxheader{cmdproc.h}
-
+
wxCommandProcessor is a class that maintains a history of wxCommands,
with undo/redo functionality built-in. Derive a new class from this
if you want different behaviour.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@ref overview_wxcommandprocessoroverview "wxCommandProcessor overview",
wxCommand
/**
Returns a boolean value that indicates if changes have been made since
- the last save operation. This only works if
+ the last save operation. This only works if
MarkAsSaved()
is called whenever the project is saved.
*/
virtual bool IsDirty();
/**
- You must call this method whenever the project is saved if you plan to use
+ You must call this method whenever the project is saved if you plan to use
IsDirty().
*/
virtual void MarkAsSaved();
/**
@class wxFontData
@wxheader{cmndata.h}
-
+
@ref overview_wxfontdialogoverview "wxFontDialog overview"
-
+
This class holds a variety of information related to font dialogs.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
Overview, wxFont, wxFontDialog
*/
/**
@class wxPageSetupDialogData
@wxheader{cmndata.h}
-
+
This class holds a variety of information related to wxPageSetupDialog.
-
+
It contains a wxPrintData member which is used to hold basic printer
configuration data (as opposed to the
user-interface configuration settings stored by wxPageSetupDialogData).
-
+
@library{wxcore}
@category{printing}
-
+
@seealso
@ref overview_printingoverview "Printing framework overview", wxPageSetupDialog
*/
Construct an object from a print data object.
*/
wxPageSetupDialogData();
- wxPageSetupDialogData(wxPageSetupDialogData& data);
- wxPageSetupDialogData(wxPrintData& printData);
+ wxPageSetupDialogData(wxPageSetupDialogData& data);
+ wxPageSetupDialogData(wxPrintData& printData);
//@}
/**
Assigns page setup data to this object.
*/
void operator =(const wxPrintData& data);
- void operator =(const wxPageSetupDialogData& data);
+ void operator =(const wxPageSetupDialogData& data);
//@}
};
/**
@class wxColourData
@wxheader{cmndata.h}
-
+
This class holds a variety of information related to colour dialogs.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxColour, wxColourDialog, @ref overview_wxcolourdialogoverview "wxColourDialog
overview"
/**
@class wxPrintData
@wxheader{cmndata.h}
-
+
This class holds a variety of information related to printers and
printer device contexts. This class is used to create a wxPrinterDC
and a wxPostScriptDC. It is also used as a data member of wxPrintDialogData
and wxPageSetupDialogData, as part of the mechanism for transferring data
between the print dialogs and the application.
-
+
@library{wxcore}
@category{printing}
-
+
@seealso
@ref overview_printingoverview "Printing framework overview", wxPrintDialog,
wxPageSetupDialog, wxPrintDialogData, wxPageSetupDialogData, @ref overview_wxprintdialogoverview "wxPrintDialog Overview", wxPrinterDC, wxPostScriptDC
Copy constructor.
*/
wxPrintData();
- wxPrintData(const wxPrintData& data);
+ wxPrintData(const wxPrintData& data);
//@}
/**
but retained for backward compatibility.
*/
void operator =(const wxPrintData& data);
- void operator =(const wxPrintSetupData& data);
+ void operator =(const wxPrintSetupData& data);
//@}
};
/**
@class wxPrintDialogData
@wxheader{cmndata.h}
-
+
This class holds information related to the visual characteristics of
wxPrintDialog.
It contains a wxPrintData object with underlying printing settings.
-
+
@library{wxcore}
@category{printing}
-
+
@seealso
@ref overview_printingoverview "Printing framework overview", wxPrintDialog,
@ref overview_wxprintdialogoverview "wxPrintDialog Overview"
Construct an object from a print dialog data object.
*/
wxPrintDialogData();
- wxPrintDialogData(wxPrintDialogData& dialogData);
- wxPrintDialogData(wxPrintData& printData);
+ wxPrintDialogData(wxPrintDialogData& dialogData);
+ wxPrintDialogData(wxPrintData& printData);
//@}
/**
Assigns another print dialog data object to this object.
*/
void operator =(const wxPrintData& data);
- void operator =(const wxPrintDialogData& data);
+ void operator =(const wxPrintDialogData& data);
//@}
};
/**
@class wxCollapsiblePaneEvent
@wxheader{collpane.h}
-
+
This event class is used for the events generated by
wxCollapsiblePane.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxCollapsiblePane
*/
/**
@class wxCollapsiblePane
@wxheader{collpane.h}
-
+
A collapsible pane is a container with an embedded button-like control which
can be
used by the user to collapse or expand the pane's contents.
-
+
Once constructed you should use the wxCollapsiblePane::GetPane
function to access the pane and add your controls inside it (i.e. use the
wxCollapsiblePane::GetPane's returned pointer as parent for the
controls which must go in the pane, NOT the wxCollapsiblePane itself!).
-
+
Note that because of its nature of control which can dynamically (and
drastically)
change its size at run-time under user-input, when putting wxCollapsiblePane
would automatically get resized each time the user expands or collapse the pane
window
resulting usually in a weird, flickering effect.
-
+
Usage sample:
-
+
@code
wxCollapsiblePane *collpane = new wxCollapsiblePane(this, wxID_ANY,
wxT("Details:"));
-
+
// add the pane with a zero proportion value to the 'sz' sizer which
contains it
sz-Add(collpane, 0, wxGROW|wxALL, 5);
-
+
// now add a test label in the collapsible pane using a sizer to layout it:
wxWindow *win = collpane-GetPane();
wxSizer *paneSz = new wxBoxSizer(wxVERTICAL);
win-SetSizer(paneSz);
paneSz-SetSizeHints(win);
@endcode
-
+
It is only available if @c wxUSE_COLLPANE is set to 1 (the default).
-
+
@beginStyleTable
@style{wxCP_DEFAULT_STYLE}:
The default style: 0.
@endStyleTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{collapsiblepane.png}
-
+
@seealso
wxPanel, wxCollapsiblePaneEvent
*/
void Collapse(bool collapse = @true);
/**
- @param parent
+ @param parent
Parent window, must not be non-@NULL.
- @param id
+ @param id
The identifier for the control.
- @param label
+ @param label
The initial label shown in the button which allows the user to expand or
collapse the pane window.
- @param pos
+ @param pos
Initial position.
- @param size
+ @param size
Initial size.
- @param style
+ @param style
The window style, see wxCP_* flags.
- @param validator
+ @param validator
Validator which can be used for additional date checks.
- @param name
+ @param name
Control name.
@returns @true if the control was successfully created or @false if
/**
@class wxColourDialog
@wxheader{colordlg.h}
-
+
This class represents the colour chooser dialog.
-
+
@library{wxcore}
@category{cmndlg}
-
+
@seealso
@ref overview_wxcolourdialogoverview "wxColourDialog Overview", wxColour,
wxColourData, wxGetColourFromUser
Shows the colour selection dialog and returns the colour selected by user or
invalid colour (use @ref wxColour::isok wxColour:IsOk to test whether a colour
is valid) if the dialog was cancelled.
-
- @param parent
+
+ @param parent
The parent window for the colour selection dialog
-
- @param colInit
+
+ @param colInit
If given, this will be the colour initially selected in the dialog.
-
- @param caption
+
+ @param caption
If given, this will be used for the dialog caption.
-
- @param data
+
+ @param data
Optional object storing additional colour dialog settings, such
as custom colours. If none is provided the same settings as the last time are
used.
/**
@class wxColour
@wxheader{colour.h}
-
+
A colour is an object representing a combination of Red, Green, and Blue (RGB)
intensity values,
and is used to determine drawing colours. See the
entry for wxColourDatabase for how a pointer to a predefined,
named colour may be returned instead of creating a new colour.
-
+
Valid RGB values are in the range 0 to 255.
-
+
You can retrieve the current system colour settings with wxSystemSettings.
-
+
@library{wxcore}
@category{gdi}
-
+
@stdobjects
Objects:
wxNullColour
Pointers:
wxBLACK
-
+
wxWHITE
-
+
wxRED
-
+
wxBLUE
-
+
wxGREEN
-
+
wxCYAN
-
+
wxLIGHT_GREY
-
+
@seealso
wxColourDatabase, wxPen, wxBrush, wxColourDialog, wxSystemSettings
*/
/**
Copy constructor.
- @param red
+ @param red
The red value.
- @param green
+ @param green
The green value.
- @param blue
+ @param blue
The blue value.
- @param alpha
+ @param alpha
The alpha value. Alpha values range from 0 (wxALPHA_TRANSPARENT) to 255
(wxALPHA_OPAQUE).
- @param colourName
+ @param colourName
The colour name.
- @param colour
+ @param colour
The colour to copy.
@sa wxColourDatabase
*/
wxColour();
- wxColour(unsigned char red, unsigned char green,
- unsigned char blue,
- unsigned char alpha=wxALPHA_OPAQUE);
- wxColour(const wxString& colourNname);
- wxColour(const wxColour& colour);
+ wxColour(unsigned char red, unsigned char green,
+ unsigned char blue,
+ unsigned char alpha=wxALPHA_OPAQUE);
+ wxColour(const wxString& colourNname);
+ wxColour(const wxColour& colour);
//@}
/**
This function is new since wxWidgets version 2.7.0
*/
wxString GetAsString(long flags);
- wxC2S_NAME wxC2S_CSS_SYNTAX, to obtain
-the colour in the "rgb(r,g,b)" or "rgba(r,g,b,a)" syntax
-(e.g. wxColour(255,0,0,85) - "rgba(255,0,0,0.333)"), and
-wxC2S_HTML_SYNTAX, to obtain the colour as "#" followed
-by 6 hexadecimal digits (e.g. wxColour(255,0,0) - "#FF0000").
-This function never fails and always returns a non-empty string but asserts if
-the colour has alpha channel (i.e. is non opaque) but
-wxC2S_CSS_SYNTAX();
+ wxC2S_NAME wxC2S_CSS_SYNTAX, to obtain
+ the colour in the "rgb(r,g,b)" or "rgba(r,g,b,a)" syntax
+ (e.g. wxColour(255,0,0,85) - "rgba(255,0,0,0.333)"), and
+ wxC2S_HTML_SYNTAX, to obtain the colour as "#" followed
+ by 6 hexadecimal digits (e.g. wxColour(255,0,0) - "#FF0000").
+ This function never fails and always returns a non-empty string but asserts if
+ the colour has alpha channel (i.e. is non opaque) but
+ wxC2S_CSS_SYNTAX();
//@}
/**
Sets the RGB intensity values using the given values (first overload),
extracting them from the packed long (second overload), using the given string (third overloard).
- When using third form, Set() accepts: colour names (those listed in
- wxTheColourDatabase), the CSS-like
- @c "rgb(r,g,b)" or @c "rgba(r,g,b,a)" syntax (case insensitive)
- and the HTML-like syntax (i.e. @c "#" followed by 6 hexadecimal digits
+ When using third form, Set() accepts: colour names (those listed in
+ wxTheColourDatabase), the CSS-like
+ @c "rgb(r,g,b)" or @c "rgba(r,g,b,a)" syntax (case insensitive)
+ and the HTML-like syntax (i.e. @c "#" followed by 6 hexadecimal digits
for red, green, blue components).
Returns @true if the conversion was successful, @false otherwise.
void Set(unsigned char red, unsigned char green,
unsigned char blue,
unsigned char alpha=wxALPHA_OPAQUE);
- void Set(unsigned long RGB);
- bool Set(const wxString & str);
+ void Set(unsigned long RGB);
+ bool Set(const wxString & str);
//@}
/**
@sa wxColourDatabase
*/
wxColour operator =(const wxColour& colour);
- wxColour operator =(const wxString& colourName);
+ wxColour operator =(const wxString& colourName);
//@}
/**
/**
@class wxComboPopup
@wxheader{combo.h}
-
+
In order to use a custom popup with wxComboCtrl,
an interface class must be derived from wxComboPopup. For more information
how to use it, see @ref overview_wxcomboctrl "Setting Custom Popup for
wxComboCtrl".
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxComboCtrl
*/
-class wxComboPopup
+class wxComboPopup
{
public:
/**
The derived class may implement this to return adjusted size
for the popup control, according to the variables given.
- @param minWidth
+ @param minWidth
Preferred minimum width.
- @param prefHeight
+ @param prefHeight
Preferred height. May be -1 to indicate
no preference.
- @param maxWidth
+ @param maxWidth
Max height for window, as limited by
screen size.
/**
@class wxComboCtrl
@wxheader{combo.h}
-
+
A combo control is a generic combobox that allows totally
custom popup. In addition it has other customization features.
For instance, position and size of the dropdown button
can be changed.
-
+
@beginStyleTable
@style{wxCB_READONLY}:
Text will not be editable.
@style{wxCC_STD_BUTTON}:
Drop button will behave more like a standard push button.
@endStyleTable
-
+
@beginEventTable
@event{EVT_TEXT(id\, func)}:
Process a wxEVT_COMMAND_TEXT_UPDATED event, when the text changes.
Process a wxEVT_COMMAND_TEXT_ENTER event, when RETURN is pressed in
the combo control.
@endEventTable
-
+
@library{wxbase}
@category{ctrl}
@appearance{comboctrl.png}
-
+
@seealso
wxComboBox, wxChoice, wxOwnerDrawnComboBox, wxComboPopup, wxCommandEvent
*/
/**
Constructor, creating and showing a combo control.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param value
+ @param value
Initial selection string. An empty string indicates no selection.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then the window is sized
appropriately.
- @param style
+ @param style
Window style. See wxComboCtrl.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxComboCtrl();
- wxComboCtrl(wxWindow* parent, wxWindowID id,
- const wxString& value = "",
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "comboCtrl");
+ wxComboCtrl(wxWindow* parent, wxWindowID id,
+ const wxString& value = "",
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "comboCtrl");
//@}
/**
if AnimateShow() did not finish
the animation within it's function scope).
- @param rect
+ @param rect
Position to show the popup window at, in screen coordinates.
- @param flags
+ @param flags
Combination of any of the following:
*/
virtual void DoShowPopup(const wxRect& rect, int flags);
/**
Removes the text between the two positions in the combo control text field.
- @param from
+ @param from
The first position.
- @param to
+ @param to
The last position.
*/
void Remove(long from, long to);
Replaces the text between two positions with the given text, in the combo
control text field.
- @param from
+ @param from
The first position.
- @param to
+ @param to
The second position.
- @param text
+ @param text
The text to insert.
*/
void Replace(long from, long to, const wxString& value);
/**
Sets custom dropdown button graphics.
- @param bmpNormal
+ @param bmpNormal
Default button image.
- @param pushButtonBg
+ @param pushButtonBg
If @true, blank push button background is painted
below the image.
- @param bmpPressed
+ @param bmpPressed
Depressed button image.
- @param bmpHover
+ @param bmpHover
Button image when mouse hovers above it. This
should be ignored on platforms and themes that do not generally draw
different kind of button on mouse hover.
- @param bmpDisabled
+ @param bmpDisabled
Disabled button image.
*/
void SetButtonBitmaps(const wxBitmap& bmpNormal,
/**
Sets size and position of dropdown button.
- @param width
+ @param width
Button width. Value = 0 specifies default.
- @param height
+ @param height
Button height. Value = 0 specifies default.
- @param side
+ @param side
Indicates which side the button will be placed.
Value can be wxLEFT or wxRIGHT.
- @param spacingX
+ @param spacingX
Horizontal spacing around the button. Default is 0.
*/
void SetButtonPosition(int width = -1, int height = -1,
/**
Sets the insertion point in the text field.
- @param pos
+ @param pos
The new insertion point.
*/
void SetInsertionPoint(long pos);
/**
Extends popup size horizontally, relative to the edges of the combo control.
- @param extLeft
+ @param extLeft
How many pixel to extend beyond the left edge of the
control. Default is 0.
- @param extRight
+ @param extRight
How many pixel to extend beyond the right edge of the
control. Default is 0.
/**
Selects the text between the two positions, in the combo control text field.
- @param from
+ @param from
The first position.
- @param to
+ @param to
The second position.
*/
void SetSelection(long from, long to);
/**
@class wxComboBox
@wxheader{combobox.h}
-
+
A combobox is like a combination of an edit control and a listbox. It can be
displayed as static list with editable or read-only text field; or a drop-down
list with
text field; or a drop-down list without a text field.
-
+
A combobox permits a single selection only. Combobox items are numbered from
zero.
-
+
If you need a customized combobox, have a look at wxComboCtrl,
wxOwnerDrawnComboBox, wxComboPopup
and the ready-to-use wxBitmapComboBox.
-
+
@beginStyleTable
@style{wxCB_SIMPLE}:
Creates a combobox with a permanently displayed list. Windows only.
control or used for navigation between dialog controls). Windows
only.
@endStyleTable
-
+
@beginEventTable
@event{EVT_COMBOBOX(id\, func)}:
Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on
the combobox (notice that the combobox must have been created with
wxTE_PROCESS_ENTER style to receive this event).
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{combobox.png}
-
+
@seealso
wxListBox, wxTextCtrl, wxChoice, wxCommandEvent
*/
/**
Constructor, creating and showing a combobox.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param value
+ @param value
Initial selection string. An empty string indicates no selection.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then the window is sized
appropriately.
- @param n
+ @param n
Number of strings with which to initialise the control.
- @param choices
+ @param choices
An array of strings with which to initialise the control.
- @param style
+ @param style
Window style. See wxComboBox.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxComboBox();
- wxComboBox(wxWindow* parent, wxWindowID id,
- const wxString& value = "",
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- int n = 0,
- const wxString choices[] = @NULL,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "comboBox");
- wxComboBox(wxWindow* parent, wxWindowID id,
- const wxString& value,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "comboBox");
+ wxComboBox(wxWindow* parent, wxWindowID id,
+ const wxString& value = "",
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ int n = 0,
+ const wxString choices[] = @NULL,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "comboBox");
+ wxComboBox(wxWindow* parent, wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "comboBox");
//@}
/**
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox");
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& value,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "comboBox");
+ bool Create(wxWindow* parent, wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "comboBox");
//@}
/**
#define void Cut() /* implementation is private */
/**
- This function does the same things as
+ This function does the same things as
wxChoice::GetCurrentSelection and
returns the item currently selected in the dropdown list if it's open or the
same thing as wxControlWithItems::GetSelection otherwise.
virtual wxTextPos GetLastPosition();
/**
- This is the same as wxTextCtrl::GetSelection
+ This is the same as wxTextCtrl::GetSelection
for the text control which is part of the combobox. Notice that this is a
different method from wxControlWithItems::GetSelection.
/**
Removes the text between the two positions in the combobox text field.
- @param from
+ @param from
The first position.
- @param to
+ @param to
The last position.
*/
void Remove(long from, long to);
Replaces the text between two positions with the given text, in the combobox
text field.
- @param from
+ @param from
The first position.
- @param to
+ @param to
The second position.
- @param text
+ @param text
The text to insert.
*/
void Replace(long from, long to, const wxString& text);
/**
Sets the insertion point in the combobox text field.
- @param pos
+ @param pos
The new insertion point.
*/
void SetInsertionPoint(long pos);
/**
Selects the text between the two positions, in the combobox text field.
- @param from
+ @param from
The first position.
- @param to
+ @param to
The second position.
*/
void SetSelection(long from, long to);
@b NB: For a combobox with @c wxCB_READONLY style the string must be in
the combobox choices list, otherwise the call to SetValue() is ignored.
- @param text
+ @param text
The text to set.
*/
void SetValue(const wxString& text);
/**
@class wxConfigBase
@wxheader{config.h}
-
+
wxConfigBase class defines the basic interface of all config classes. It can
not be used by itself (it is an abstract base class) and you will always use one
of its derivations: wxFileConfig,
wxRegConfig or any other.
-
+
However, usually you don't even need to know the precise nature of the class
you're working with but you would just use the wxConfigBase methods. This
allows you to write the same code regardless of whether you're working with
which is mapped onto the native wxConfigBase implementation on the given
platform: i.e. wxRegConfig under Win32 and
wxFileConfig otherwise.
-
+
See @ref overview_wxconfigoverview "config overview" for the descriptions of all
features of this class.
-
- It is highly recommended to use static functions @e Get() and/or @e Set(),
+
+ It is highly recommended to use static functions @e Get() and/or @e Set(),
so please have a @ref overview_wxconfigstaticfunctions "look at them."
-
+
@library{wxbase}
@category{misc}
*/
This is the default and only constructor of the wxConfigBase class, and
derived classes.
- @param appName
+ @param appName
The application name. If this is empty, the class will
normally use wxApp::GetAppName to set it. The
application name is used in the registry key on Windows, and can be used to
deduce the local filename parameter if that is missing.
- @param vendorName
+ @param vendorName
The vendor name. If this is empty, it is assumed that
no vendor name is wanted, if this is optional for the current config class.
The vendor name is appended to the application name for wxRegConfig.
- @param localFilename
+ @param localFilename
Some config classes require a local filename. If this
is not present, but required, the application name will be used instead.
- @param globalFilename
+ @param globalFilename
Some config classes require a global filename. If
this is not present, but required, the application name will be used instead.
- @param style
+ @param style
Can be one of wxCONFIG_USE_LOCAL_FILE and
wxCONFIG_USE_GLOBAL_FILE. The style interpretation depends on the config
class and is ignored by some implementations. For wxFileConfig, these styles
For wxFileConfig, you can also add wxCONFIG_USE_NO_ESCAPE_CHARACTERS which
will turn off character escaping for the values of entries stored in the config
file: for example a foo key with some backslash characters will be stored
- as foo=C:\mydir instead of the usual storage of
+ as foo=C:\mydir instead of the usual storage of
foo=C:\\mydir.
- The wxCONFIG_USE_NO_ESCAPE_CHARACTERS style can be helpful if your config
- file must be read or written to by a non-wxWidgets program (which might not
- understand the escape characters). Note, however, that if
- wxCONFIG_USE_NO_ESCAPE_CHARACTERS style is used, it is is now
- your application's responsibility to ensure that there is no newline or
+ The wxCONFIG_USE_NO_ESCAPE_CHARACTERS style can be helpful if your config
+ file must be read or written to by a non-wxWidgets program (which might not
+ understand the escape characters). Note, however, that if
+ wxCONFIG_USE_NO_ESCAPE_CHARACTERS style is used, it is is now
+ your application's responsibility to ensure that there is no newline or
other illegal characters in a value, before writing that value to the file.
- @param conv
+ @param conv
This parameter is only used by wxFileConfig when compiled
in Unicode mode. It specifies the encoding in which the configuration file
is written.
Returns a boolean
*/
bool Read(const wxString& key, wxString* str);
- bool Read(const wxString& key, wxString* str,
- const wxString& defaultVal);
- wxString Read(const wxString& key,
- const
-wxString& defaultVal);
- bool Read(const wxString& key, long* l);
- bool Read(const wxString& key, long* l, long defaultVal);
- bool Read(const wxString& key, double* d);
- bool Read(const wxString& key, double* d, double defaultVal);
- bool Read(const wxString& key, bool* b);
- bool Read(const wxString& key, bool* d, bool defaultVal);
- bool Read(const wxString& key, wxMemoryBuffer* buf);
- bool Read(const wxString& key, T* value);
- bool Read(const wxString& key, T* value,
- T const& defaultVal);
+ bool Read(const wxString& key, wxString* str,
+ const wxString& defaultVal);
+ wxString Read(const wxString& key,
+ const
+ wxString& defaultVal);
+ bool Read(const wxString& key, long* l);
+ bool Read(const wxString& key, long* l, long defaultVal);
+ bool Read(const wxString& key, double* d);
+ bool Read(const wxString& key, double* d, double defaultVal);
+ bool Read(const wxString& key, bool* b);
+ bool Read(const wxString& key, bool* d, bool defaultVal);
+ bool Read(const wxString& key, wxMemoryBuffer* buf);
+ bool Read(const wxString& key, T* value);
+ bool Read(const wxString& key, T* value,
+ T const& defaultVal);
//@}
/**
/**
Reads a value of type T, for which function
- wxFromString is defined, from the key and returns it.
+ wxFromString is defined, from the key and returns it.
@e defaultVal is returned if the key is not found.
*/
T ReadObject(const wxString& key, T const& defaultVal);
Writes a boolean
*/
bool Write(const wxString& key, const wxString& value);
- bool Write(const wxString& key, long value);
- bool Write(const wxString& key, double value);
- bool Write(const wxString& key, bool value);
- bool Write(const wxString& key, const wxMemoryBuffer& buf);
- bool Write(const wxString& key, const T& buf);
+ bool Write(const wxString& key, long value);
+ bool Write(const wxString& key, double value);
+ bool Write(const wxString& key, bool value);
+ bool Write(const wxString& key, const wxMemoryBuffer& buf);
+ bool Write(const wxString& key, const T& buf);
//@}
};
/**
@class wxControl
@wxheader{control.h}
-
+
This is the base class for a control or "widget''.
-
+
A control is generally a small window which processes user input and/or
displays one or more item of data.
-
+
@library{wxcore}
@category{ctrl}
@appearance{control.png}
-
+
@seealso
wxValidator
*/
version, without the mnemonics characters.
*/
const wxString GetLabelText();
- static wxString GetLabelText(const wxString& label);
+ static wxString GetLabelText(const wxString& label);
//@}
/**
The @c characters in the @e label are special and indicate that the
following character is a mnemonic for this control and can be used to activate
it from the keyboard (typically by using @e Alt key in combination with
- it). To insert a literal ampersand character, you need to double it, i.e. use
+ it). To insert a literal ampersand character, you need to double it, i.e. use
@c "".
*/
void SetLabel(const wxString& label);
/**
@class wxConvAuto
@wxheader{convauto.h}
-
+
This class implements a Unicode to/from multibyte converter capable of
automatically recognizing the encoding of the multibyte text on input. The
logic used is very simple: the class uses the BOM (byte order mark) if it's
specified in the constructor of a wxConvAuto instance and, in turn, defaults to
the value of @ref wxConvAuto::getdefaultmbencoding GetFallbackEncoding if
not explicitly given.
-
+
For the conversion from Unicode to multibyte, the same encoding as was
previously used for multibyte to Unicode conversion is reused. If there had
been no previous multibyte to Unicode conversion, UTF-8 is used by default.
operator, or using wxMBConv::Clone method, resets the
automatically detected encoding so that the new copy will try to detect the
encoding of the input on first use.
-
+
This class is used by default in wxWidgets classes and functions reading text
- from files such as wxFile, wxFFile,
+ from files such as wxFile, wxFFile,
wxTextFile, wxFileConfig and
- various stream classes so the encoding set with its
+ various stream classes so the encoding set with its
@ref wxConvAuto::setdefaultmbencoding SetFallbackEncoding method will
affect how these classes treat input files. In particular, use this method
to change the fall-back multibyte encoding used to interpret the contents of
the files whose contents isn't valid UTF-8 or to disallow it completely.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_mbconvclasses "wxMBConv classes overview"
*/
@c wxFONTENCODING_SYSTEM which means to use the encoding currently used
on the user system, i.e. the encoding returned by
wxLocale::GetSystemEncoding. Any other
- encoding will be used as is, e.g. passing @c wxFONTENCODING_ISO8859_1
+ encoding will be used as is, e.g. passing @c wxFONTENCODING_ISO8859_1
ensures that non-UTF-8 input will be treated as latin1.
*/
wxConvAuto(wxFontEncoding enc = wxFONTENCODING_DEFAULT);
/**
Returns the encoding used by default by wxConvAuto if no other encoding is
- explicitly specified in constructor. By default, returns
- @c wxFONTENCODING_ISO8859_1 but can be changed using
+ explicitly specified in constructor. By default, returns
+ @c wxFONTENCODING_ISO8859_1 but can be changed using
@ref setdefaultmbencoding() SetFallbackEncoding method.
*/
static wxFontEncoding GetFallbackEncoding();
/**
Changes the encoding used by default by wxConvAuto if no other encoding is
explicitly specified in constructor. The default value, which can be retrieved
- using @ref getdefaultmbencoding() GetFallbackEncoding, is
+ using @ref getdefaultmbencoding() GetFallbackEncoding, is
@c wxFONTENCODING_ISO8859_1.
- Special values of @c wxFONTENCODING_SYSTEM or
+ Special values of @c wxFONTENCODING_SYSTEM or
@c wxFONTENCODING_MAX can be used for @e enc parameter to use the
encoding of the current user locale as fall back or not use any encoding for
fall back at all, respectively (just as with the similar constructor
/////////////////////////////////////////////////////////////////////////////
- // Name: cpp.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- //@{
+// Name: cpp.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+//@{
/**
These macro return the concatenation of the tokens passed as their arguments.
Unlike when using the preprocessor @c operator, the arguments undergo
the macro expansion before being concatenated.
*/
- wxCONCAT(x1, x2);
- wxCONCAT3(x1, x2, x3);
- wxCONCAT4(x1, x2, x3, x4);
- wxCONCAT5(x1, x2, x3, x4, x5);
+wxCONCAT(x1, x2);
+wxCONCAT3(x1, x2, x3);
+wxCONCAT4(x1, x2, x3, x4);
+wxCONCAT5(x1, x2, x3, x4, x5);
//@}
- /**
- Returns the string representation of the given symbol which can be either a
- literal or a macro (hence the advantage of using this macro instead of the
- standard preprocessor @c # operator which doesn't work with macros).
-
- Notice that this macro always produces a @c char string, use
- wxSTRINGIZE_T to build a wide string Unicode build.
-
- @sa wxCONCAT
+/**
+Returns the string representation of the given symbol which can be either a
+literal or a macro (hence the advantage of using this macro instead of the
+standard preprocessor @c # operator which doesn't work with macros).
+
+Notice that this macro always produces a @c char string, use
+wxSTRINGIZE_T to build a wide string Unicode build.
+
+@sa wxCONCAT
*/
#define wxSTRINGIZE(x) /* implementation is private */
/**
@class wxHelpProvider
@wxheader{cshelp.h}
-
+
wxHelpProvider is an abstract class used by a program implementing
context-sensitive help to
show the help text for the given window.
-
+
The current help provider must be explicitly set by the application using
wxHelpProvider::Set().
-
+
@library{wxcore}
@category{help}
-
+
@seealso
wxContextHelp, wxContextHelpButton, wxSimpleHelpProvider,
wxHelpControllerHelpProvider, wxWindow::SetHelpText, wxWindow::GetHelpTextAtPoint
*/
-class wxHelpProvider
+class wxHelpProvider
{
public:
/**
/**
Associates the text with the given window or id. Although all help
- providers have these functions to allow making wxWindow::SetHelpText
+ providers have these functions to allow making wxWindow::SetHelpText
work, not all of them implement the functions.
*/
void AddHelp(wxWindowBase* window, const wxString& text);
the application, for example.
*/
wxString GetHelp(const wxWindowBase* window);
- void AddHelp(wxWindowID id, const wxString& text);
+ void AddHelp(wxWindowID id, const wxString& text);
//@}
/**
/**
Shows help for the given window. Override this function if the help doesn't
- depend on the exact position inside the window, otherwise you need to override
+ depend on the exact position inside the window, otherwise you need to override
ShowHelpAtPoint().
Returns @true if help was shown, or @false if no help was available for this
/**
This function may be overridden to show help for the window when it should
- depend on the position inside the window, By default this method forwards to
+ depend on the position inside the window, By default this method forwards to
ShowHelp(), so it is enough to only implement
the latter if the help doesn't depend on the position.
Returns @true if help was shown, or @false if no help was available for this
window.
- @param window
+ @param window
Window to show help text for.
- @param point
+ @param point
Coordinates of the mouse at the moment of help event emission.
- @param origin
+ @param origin
Help event origin, see wxHelpEvent::GetOrigin.
*/
bool ShowHelpAtPoint(wxWindowBase* window, const wxPoint point,
/**
@class wxHelpControllerHelpProvider
@wxheader{cshelp.h}
-
+
wxHelpControllerHelpProvider is an implementation of wxHelpProvider which
supports
both context identifiers and plain text help strings. If the help text is an
in a tooltip as per wxSimpleHelpProvider. If you use this with a
wxCHMHelpController instance
on windows, it will use the native style of tip window instead of wxTipWindow.
-
+
You can use the convenience function @b wxContextId to convert an integer
context
id to a string for passing to wxWindow::SetHelpText.
-
+
@library{wxcore}
@category{help}
-
+
@seealso
wxHelpProvider, wxSimpleHelpProvider, wxContextHelp, wxWindow::SetHelpText,
wxWindow::GetHelpTextAtPoint
/**
@class wxContextHelp
@wxheader{cshelp.h}
-
+
This class changes the cursor to a query and puts the application into a
'context-sensitive help mode'.
When the user left-clicks on a window within the specified window, a wxEVT_HELP
event is
sent to that control, and the application may respond to it by popping up some
help.
-
+
For example:
-
+
@code
wxContextHelp contextHelp(myWindow);
@endcode
-
+
There are a couple of ways to invoke this behaviour implicitly:
-
+
Use the wxDIALOG_EX_CONTEXTHELP style for a dialog (Windows only). This will
put a question mark
in the titlebar, and Windows will put the application into context-sensitive
Normally you will write your application so that this button is only added to a
dialog for non-Windows platforms
(use wxDIALOG_EX_CONTEXTHELP on Windows).
-
+
Note that on Mac OS X, the cursor does not change when in context-sensitive
help mode.
-
+
@library{wxcore}
@category{help}
-
+
@seealso
wxHelpEvent, wxHelpController, wxContextHelpButton
*/
/**
@class wxContextHelpButton
@wxheader{cshelp.h}
-
+
Instances of this class may be used to add a question mark button that when
pressed, puts the
application into context-help mode. It does this by creating a wxContextHelp
object which itself
generates a wxEVT_HELP event when the user clicks on a window.
-
+
On Windows, you may add a question-mark icon to a dialog by use of the
wxDIALOG_EX_CONTEXTHELP extra style, but
on other platforms you will have to add a button explicitly, usually next to
OK, Cancel or similar buttons.
-
+
@library{wxcore}
@category{help}
-
+
@seealso
wxBitmapButton, wxContextHelp
*/
/**
Constructor, creating and showing a context help button.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Button identifier. Defaults to wxID_CONTEXT_HELP.
- @param pos
+ @param pos
Button position.
- @param size
+ @param size
Button size. If wxDefaultSize is specified then the button is sized
appropriately for the question mark bitmap.
- @param style
+ @param style
Window style.
*/
wxContextHelpButton();
- wxContextHelpButton(wxWindow* parent,
- wxWindowID id = wxID_CONTEXT_HELP,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxBU_AUTODRAW);
+ wxContextHelpButton(wxWindow* parent,
+ wxWindowID id = wxID_CONTEXT_HELP,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxBU_AUTODRAW);
//@}
};
/**
@class wxSimpleHelpProvider
@wxheader{cshelp.h}
-
+
wxSimpleHelpProvider is an implementation of wxHelpProvider which supports
only plain text help strings, and shows the string associated with the
control (if any) in a tooltip.
-
+
@library{wxcore}
@category{help}
-
+
@seealso
wxHelpProvider, wxHelpControllerHelpProvider, wxContextHelp,
wxWindow::SetHelpText, wxWindow::GetHelpTextAtPoint
class wxSimpleHelpProvider : public wxHelpProvider
{
public:
-
+
};
/**
@class wxControlWithItems
@wxheader{ctrlsub.h}
-
+
This class is an abstract base class for some wxWidgets controls which contain
several items, such as wxListBox and
wxCheckListBox derived from it,
wxChoice and wxComboBox.
-
+
It defines the methods for accessing the controls items and although each of
the derived classes implements them differently, they still all conform to the
same interface.
-
+
The items in a wxControlWithItems have (non-empty) string labels and,
optionally, client data associated with them. Client data may be of two
different kinds: either simple untyped (@c void *) pointers which are simply
data of the same type (typed or untyped), if any. This type is determined by
the first call to wxControlWithItems::Append (the version with
client data pointer) or wxControlWithItems::SetClientData.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxControlWithItems::Clear
*/
is usually much faster than appending them one by one if you need to add a lot
of items.
- @param item
+ @param item
String to add.
- @param stringsArray
+ @param stringsArray
Contains items to append to the control.
- @param strings
+ @param strings
Array of strings of size n.
- @param n
+ @param n
Number of items in the strings array.
- @param clientData
+ @param clientData
Array of client data pointers of size n to associate with the new items.
@returns When appending a single item, the return value is the index of
or wxCB_SORT style).
*/
int Append(const wxString& item);
- int Append(const wxString& item, void * clientData);
- int Append(const wxString& item, wxClientData * clientData);
- void Append(const wxArrayString& strings);
- void Append(unsigned int n, const wxString* strings);
- void Append(unsigned int n, const wxString* strings,
- void ** clientData);
- void Append(unsigned int n, const wxString* strings,
- wxClientData ** clientData);
+ int Append(const wxString& item, void * clientData);
+ int Append(const wxString& item, wxClientData * clientData);
+ void Append(const wxArrayString& strings);
+ void Append(unsigned int n, const wxString* strings);
+ void Append(unsigned int n, const wxString* strings,
+ void ** clientData);
+ void Append(unsigned int n, const wxString* strings,
+ wxClientData ** clientData);
//@}
/**
remove an item with the index negative or greater or equal than the number of
items in the control.
- @param n
+ @param n
The zero-based item index.
@sa Clear()
/**
Finds an item whose label matches the given string.
- @param string
+ @param string
String to find.
- @param caseSensitive
+ @param caseSensitive
Whether search is case sensitive (default is not).
@returns The zero-based position of the item, or wxNOT_FOUND if the
client data at all although it is ok to call it even if the given item doesn't
have any client data associated with it (but other items do).
- @param n
+ @param n
The zero-based position of the item.
@returns A pointer to the client data, or @NULL if not present.
client data at all although it is ok to call it even if the given item doesn't
have any client data associated with it (but other items do).
- @param n
+ @param n
The zero-based position of the item.
@returns A pointer to the client data, or @NULL if not present.
/**
Returns the label of the item with the given index.
- @param n
+ @param n
The zero-based index.
@returns The label of the item or an empty string if the position was
lot
of items.
- @param item
+ @param item
String to add.
- @param pos
+ @param pos
Position to insert item before, zero based.
- @param stringsArray
+ @param stringsArray
Contains items to insert into the control content
- @param strings
+ @param strings
Array of strings of size n.
- @param n
+ @param n
Number of items in the strings array.
- @param clientData
+ @param clientData
Array of client data pointers of size n to associate with the new items.
@returns The return value is the index of the newly inserted item. If the
insertion failed for some reason, -1 is returned.
*/
int Insert(const wxString& item, unsigned int pos);
- int Insert(const wxString& item, unsigned int pos,
- void * clientData);
- int Insert(const wxString& item, unsigned int pos,
- wxClientData * clientData);
- void Insert(const wxArrayString& strings, unsigned int pos);
- void Insert(const wxArrayString& strings, unsigned int pos);
- void Insert(unsigned int n, const wxString* strings,
- unsigned int pos);
- void Insert(unsigned int n, const wxString* strings,
- unsigned int pos,
- void ** clientData);
- void Insert(unsigned int n, const wxString* strings,
- unsigned int pos,
- wxClientData ** clientData);
+ int Insert(const wxString& item, unsigned int pos,
+ void * clientData);
+ int Insert(const wxString& item, unsigned int pos,
+ wxClientData * clientData);
+ void Insert(const wxArrayString& strings, unsigned int pos);
+ void Insert(const wxArrayString& strings, unsigned int pos);
+ void Insert(unsigned int n, const wxString* strings,
+ unsigned int pos);
+ void Insert(unsigned int n, const wxString* strings,
+ unsigned int pos,
+ void ** clientData);
+ void Insert(unsigned int n, const wxString* strings,
+ unsigned int pos,
+ wxClientData ** clientData);
//@}
/**
this method is much faster than appending the items one by one if you need to
append a lot of them.
- @param item
+ @param item
The single item to insert into the control.
- @param stringsArray
+ @param stringsArray
Contains items to set as control content.
- @param strings
+ @param strings
Raw C++ array of strings. Only used in conjunction with 'n'.
- @param n
+ @param n
Number of items passed in 'strings'. Only used in conjunction with 'strings'.
- @param clientData
+ @param clientData
Client data to associate with the item(s).
@returns When the control is sorted (e.g. has wxLB_SORT or wxCB_SORT
wxCB_SORT style).
*/
int Set(const wxString& item);
- int Set(const wxString& item, void * clientData);
- int Set(const wxString& item, wxClientData * clientData);
- void Set(const wxArrayString& stringsArray);
- void Set(unsigned int n, const wxString* strings);
- void Set(unsigned int n, const wxString* strings,
- void ** clientData);
- void Set(unsigned int n, const wxString* strings,
- wxClientData ** clientData);
+ int Set(const wxString& item, void * clientData);
+ int Set(const wxString& item, wxClientData * clientData);
+ void Set(const wxArrayString& stringsArray);
+ void Set(unsigned int n, const wxString* strings);
+ void Set(unsigned int n, const wxString* strings,
+ void ** clientData);
+ void Set(unsigned int n, const wxString* strings,
+ wxClientData ** clientData);
//@}
/**
it is an error to call this function if any typed client data pointers had been
associated with the control items before.
- @param n
+ @param n
The zero-based item index.
- @param data
+ @param data
The client data to associate with the item.
*/
void SetClientData(unsigned int n, void * data);
Note that it is an error to call this function if any untyped client data
pointers had been associated with the control items before.
- @param n
+ @param n
The zero-based item index.
- @param data
+ @param data
The client data to associate with the item.
*/
void SetClientObject(unsigned int n, wxClientData * data);
Note that this does not cause any command events to be emitted nor does it
deselect any other items in the controls which support multiple selections.
- @param n
+ @param n
The string position to select, starting from zero.
@sa SetString(), SetStringSelection()
/**
Sets the label for the given item.
- @param n
+ @param n
The zero-based item index.
- @param string
+ @param string
The label to set.
*/
void SetString(unsigned int n, const wxString& string);
Selects the item with the specified string in the control. This doesn't cause
any command events to be emitted.
- @param string
+ @param string
The string to select.
@returns @true if the specified string has been selected, @false if it
/**
@class wxCursor
@wxheader{cursor.h}
-
+
A cursor is a small bitmap usually used for denoting where the mouse
pointer is, with a picture that might indicate the interpretation of a
mouse click. As with icons, cursors in X and MS Windows are created
object are catered for, and this is an occasion where
conditional compilation will probably be required (see wxIcon for
an example).
-
+
A single cursor object may be used in many windows (any subwindow type).
The wxWidgets convention is to set the cursor for a window, as in X,
rather than to set it globally as in MS Windows, although a
global ::wxSetCursor is also available for MS Windows use.
-
+
@library{wxcore}
@category{gdi}
-
+
@stdobjects
Objects:
wxNullCursor
Pointers:
wxSTANDARD_CURSOR
-
+
wxHOURGLASS_CURSOR
-
+
wxCROSS_CURSOR
-
+
@seealso
wxBitmap, wxIcon, wxWindow::SetCursor, ::wxSetCursor
*/
/**
Copy constructor, uses @ref overview_trefcount "reference counting".
- @param bits
+ @param bits
An array of bits.
- @param maskBits
+ @param maskBits
Bits for a mask bitmap.
- @param width
+ @param width
Cursor width.
- @param height
+ @param height
Cursor height.
- @param hotSpotX
+ @param hotSpotX
Hotspot x coordinate.
- @param hotSpotY
+ @param hotSpotY
Hotspot y coordinate.
- @param type
+ @param type
Icon type to load. Under Motif, type defaults to wxBITMAP_TYPE_XBM. Under
Windows,
it defaults to wxBITMAP_TYPE_CUR_RESOURCE. Under MacOS, it defaults to
Load a cursor from a .ico icon file (only if USE_RESOURCE_LOADING_IN_MSW
is enabled in setup.h). Specify hotSpotX and hotSpotY.
- @param cursorId
+ @param cursorId
A stock cursor identifier. May be one of:
Note that not all cursors are available on all platforms.
- @param cursor
+ @param cursor
Pointer or reference to a cursor to copy.
*/
wxCursor();
- wxCursor(const char bits[], int width, int height,
- int hotSpotX=-1, int hotSpotY=-1,
- const char maskBits[]=@NULL,
- wxColour* fg=@NULL,
- wxColour* bg=@NULL);
- wxCursor(const wxString& cursorName, long type,
- int hotSpotX=0, int hotSpotY=0);
- wxCursor(int cursorId);
- wxCursor(const wxImage& image);
- wxCursor(const wxCursor& cursor);
+ wxCursor(const char bits[], int width, int height,
+ int hotSpotX=-1, int hotSpotY=-1,
+ const char maskBits[]=@NULL,
+ wxColour* fg=@NULL,
+ wxColour* bg=@NULL);
+ wxCursor(const wxString& cursorName, long type,
+ int hotSpotX=0, int hotSpotY=0);
+ wxCursor(int cursorId);
+ wxCursor(const wxImage& image);
+ wxCursor(const wxCursor& cursor);
//@}
/**
/**
@class wxCustomDataObject
@wxheader{dataobj.h}
-
- wxCustomDataObject is a specialization of
+
+ wxCustomDataObject is a specialization of
wxDataObjectSimple for some
application-specific data in arbitrary (either custom or one of the standard
ones). The only restriction is that it is supposed that this data can be
copied bitwise (i.e. with @c memcpy()), so it would be a bad idea to make
it contain a C++ object (though C struct is fine).
-
+
By default, wxCustomDataObject stores the data inside in a buffer. To put the
- data into the buffer you may use either
- wxCustomDataObject::SetData or
+ data into the buffer you may use either
+ wxCustomDataObject::SetData or
wxCustomDataObject::TakeData depending on whether you want
the object to make a copy of data or not.
-
+
If you already store the data in another place, it may be more convenient and
efficient to provide the data on-demand which is possible too if you override
the virtual functions mentioned below.
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
wxDataObject
*/
public:
/**
The constructor accepts a @e format argument which specifies the (single)
- format supported by this object. If it isn't set here,
+ format supported by this object. If it isn't set here,
wxDataObjectSimple::SetFormat should be used.
*/
wxCustomDataObject(const wxDataFormat& format = wxFormatInvalid);
/**
@class wxDataObjectComposite
@wxheader{dataobj.h}
-
- wxDataObjectComposite is the simplest
+
+ wxDataObjectComposite is the simplest
wxDataObject derivation which may be used to support
- multiple formats. It contains several
+ multiple formats. It contains several
wxDataObjectSimple objects and supports any
format supported by at least one of them. Only one of these data objects is
@e preferred (the first one if not explicitly changed by using the second
parameter of wxDataObjectComposite::Add) and its format determines
the preferred format of the composite data object as well.
-
+
See wxDataObject documentation for the reasons why you
might prefer to use wxDataObject directly instead of wxDataObjectComposite for
efficiency reasons.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview",
wxDataObject, wxDataObjectSimple, wxFileDataObject, wxTextDataObject, wxBitmapDataObject
/**
@class wxDataObjectSimple
@wxheader{dataobj.h}
-
- This is the simplest possible implementation of the
+
+ This is the simplest possible implementation of the
wxDataObject class. The data object of (a class derived
from) this class only supports one format, so the number of virtual functions
to be implemented is reduced.
-
+
Notice that this is still an abstract base class and cannot be used but should
be derived from.
-
+
@b wxPython note: If you wish to create a derived wxDataObjectSimple class in
wxPython you should derive the class from wxPyDataObjectSimple
in order to get Python-aware capabilities for the various virtual
methods.
-
+
@b wxPerl note: In wxPerl, you need to derive your data object class
from Wx::PlDataObjectSimple.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref
overview_samplednd "DnD sample", wxFileDataObject, wxTextDataObject, wxBitmapDataObject
/**
@class wxBitmapDataObject
@wxheader{dataobj.h}
-
+
wxBitmapDataObject is a specialization of wxDataObject for bitmap data. It can
- be used without change to paste data into the
+ be used without change to paste data into the
wxClipboard or a wxDropSource. A
user may wish to derive a new class from this class for providing a bitmap
on-demand in order to minimize memory consumption when offering data in several
formats, such as a bitmap and GIF.
-
+
@b wxPython note: If you wish to create a derived wxBitmapDataObject class in
wxPython you should derive the class from wxPyBitmapDataObject
in order to get Python-aware capabilities for the various virtual
methods.
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview",
wxDataObject, wxDataObjectSimple, wxFileDataObject, wxTextDataObject, wxDataObject
{
public:
/**
- Constructor, optionally passing a bitmap (otherwise use
+ Constructor, optionally passing a bitmap (otherwise use
SetBitmap() later).
*/
wxBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap);
/**
@class wxDataFormat
@wxheader{dataobj.h}
-
+
A wxDataFormat is an encapsulation of a platform-specific format handle which
is used by the system for the clipboard and drag and drop operations. The
applications are usually only interested in, for example, pasting data from the
clipboard only if the data is in a format the program understands and a data
format is something which uniquely identifies this format.
-
+
On the system level, a data format is usually just a number (@c CLIPFORMAT
under Windows or @c Atom under X11, for example) and the standard formats
are, indeed, just numbers which can be implicitly converted to wxDataFormat.
The standard formats are:
-
-
-
+
+
+
wxDF_INVALID
-
-
+
+
An invalid format - used as default argument for
functions taking a wxDataFormat argument sometimes
-
-
+
+
wxDF_TEXT
-
-
+
+
Text format (wxString)
-
-
+
+
wxDF_BITMAP
-
-
+
+
A bitmap (wxBitmap)
-
-
+
+
wxDF_METAFILE
-
-
+
+
A metafile (wxMetafile, Windows only)
-
-
+
+
wxDF_FILENAME
-
-
+
+
A list of filenames
-
-
+
+
wxDF_HTML
-
-
+
+
An HTML string. This is only valid when passed to wxSetClipboardData
when compiled with Visual C++ in non-Unicode mode
-
-
-
+
+
+
As mentioned above, these standard formats may be passed to any function taking
wxDataFormat argument because wxDataFormat has an implicit conversion from
them (or, to be precise from the type @c wxDataFormat::NativeFormat which is
the type used by the underlying platform for data formats).
-
+
Aside the standard formats, the application may also use custom formats which
are identified by their names (strings) and not numeric identifiers. Although
internally custom format must be created (or @e registered) first, you
with non-default constructor because their constructors are executed before the
program has time to perform all necessary initialisations and so an attempt to
do clipboard format registration at this time will usually lead to a crash!
-
+
@library{wxbase}
@category{dnd}
-
+
@seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref
overview_samplednd "DnD sample", wxDataObject
*/
-class wxDataFormat
+class wxDataFormat
{
public:
/**
- Constructs a data format object for a custom format identified by its name
+ Constructs a data format object for a custom format identified by its name
@e format.
*/
wxDataFormat(const wxChar format);
/**
@class wxURLDataObject
@wxheader{dataobj.h}
-
+
wxURLDataObject is a wxDataObject containing an URL
and can be used e.g. when you need to put an URL on or retrieve it from the
clipboard:
-
+
@code
wxTheClipboard-SetData(new wxURLDataObject(url));
@endcode
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", wxDataObject
*/
-class wxURLDataObject
+class wxURLDataObject
{
public:
/**
- Constructor, may be used to initialize the URL. If @e url is empty,
+ Constructor, may be used to initialize the URL. If @e url is empty,
SetURL() can be used later.
*/
wxURLDataObject(const wxString& url = wxEmptyString);
/**
@class wxDataObject
@wxheader{dataobj.h}
-
+
A wxDataObject represents data that can be copied to or from the clipboard, or
dragged and dropped. The important thing about wxDataObject is that this is a
'smart' piece of data unlike 'dumb' data containers such as memory
buffers or files. Being 'smart' here means that the data object itself should
know what data formats it supports and how to render itself in each of
its supported formats.
-
+
A supported format, incidentally, is exactly the format in which the data can
be requested from a data object or from which the data object may be set. In
the general case, an object may support different formats on 'input' and
'output', i.e. it may be able to render itself in a given format but not be
created from data on this format or vice versa. wxDataObject defines an
enumeration type
-
+
@code
enum Direction
{
Set = 0x02 // format is supported by SetData()
};
@endcode
-
- which distinguishes between them. See
+
+ which distinguishes between them. See
wxDataFormat documentation for more about formats.
-
+
Not surprisingly, being 'smart' comes at a price of added complexity. This is
reasonable for the situations when you really need to support multiple formats,
but may be annoying if you only want to do something simple like cut and paste
text.
-
+
To provide a solution for both cases, wxWidgets has two predefined classes
- which derive from wxDataObject: wxDataObjectSimple and
- wxDataObjectComposite.
+ which derive from wxDataObject: wxDataObjectSimple and
+ wxDataObjectComposite.
wxDataObjectSimple is
the simplest wxDataObject possible and only holds data in a single format (such
as HTML or text) and wxDataObjectComposite is
the simplest way to implement a wxDataObject that does support multiple formats
because it achieves this by simply holding several wxDataObjectSimple objects.
-
+
So, you have several solutions when you need a wxDataObject class (and you need
one as soon as you want to transfer data via the clipboard or drag and drop):
-
-
-
+
+
+
@b 1. Use one of the built-in classes
-
-
+
+
You may use wxTextDataObject,
wxBitmapDataObject or wxFileDataObject in the simplest cases when you only need
to support one format and your data is either text, bitmap or list of files.
-
-
+
+
@b 2. Use wxDataObjectSimple
-
-
+
+
Deriving from wxDataObjectSimple is the simplest
solution for custom data - you will only support one format and so probably
won't be able to communicate with other programs, but data transfer will work
in your program (or between different copies of it).
-
-
+
+
@b 3. Use wxDataObjectComposite
-
-
+
+
This is a simple but powerful
solution which allows you to support any number of formats (either
standard or custom if you combine it with the previous solution).
-
-
+
+
@b 4. Use wxDataObject directly
-
-
+
+
This is the solution for
maximal flexibility and efficiency, but it is also the most difficult to
implement.
-
-
-
+
+
+
Please note that the easiest way to use drag and drop and the clipboard with
multiple formats is by using wxDataObjectComposite, but it is not the most
efficient one as each wxDataObjectSimple would contain the whole data in its
the clipboard and even today's computers are in trouble. For this case, you
will have to derive from wxDataObject directly and make it enumerate its
formats and provide the data in the requested format on demand.
-
+
Note that neither the GTK+ data transfer mechanisms for clipboard and
drag and drop, nor OLE data transfer, copy any data until another application
actually requests the data. This is in contrast to the 'feel' offered to the
user of a program who would normally think that the data resides in the
clipboard after having pressed 'Copy' - in reality it is only declared to be
available.
-
+
There are several predefined data object classes derived from
- wxDataObjectSimple: wxFileDataObject,
+ wxDataObjectSimple: wxFileDataObject,
wxTextDataObject,
wxBitmapDataObject and
wxURLDataObject
which can be used without change.
-
- You may also derive your own data object classes from
+
+ You may also derive your own data object classes from
wxCustomDataObject for user-defined types. The
format of user-defined data is given as a mime-type string literal, such as
"application/word" or "image/png". These strings are used as they are under
Windows equivalent under Win32 (using the OLE IDataObject for data exchange to
and from the clipboard and for drag and drop). Note that the format string
translation under Windows is not yet finished.
-
+
@b wxPython note: At this time this class is not directly usable from wxPython.
- Derive a class from wxPyDataObjectSimple
+ Derive a class from wxPyDataObjectSimple
instead.
-
+
@b wxPerl note: This class is not currently usable from wxPerl; you may
use Wx::PlDataObjectSimple instead.
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview", @ref
overview_samplednd "DnD sample", wxFileDataObject, wxTextDataObject, wxBitmapDataObject, wxCustomDataObject, wxDropTarget, wxDropSource, wxTextDropTarget, wxFileDropTarget
*/
-class wxDataObject
+class wxDataObject
{
public:
/**
~wxDataObject();
/**
- Copy all supported formats in the given direction to the array pointed to by
+ Copy all supported formats in the given direction to the array pointed to by
@e formats. There is enough space for GetFormatCount(dir) formats in it.
*/
virtual void GetAllFormats(wxDataFormat * formats,
/**
@class wxTextDataObject
@wxheader{dataobj.h}
-
+
wxTextDataObject is a specialization of wxDataObject for text data. It can be
- used without change to paste data into the wxClipboard
+ used without change to paste data into the wxClipboard
or a wxDropSource. A user may wish to derive a new
class from this class for providing text on-demand in order to minimize memory
consumption when offering data in several formats, such as plain text and RTF
because by default the text is stored in a string in this class, but it might
- as well be generated when requested. For this,
- wxTextDataObject::GetTextLength and
+ as well be generated when requested. For this,
+ wxTextDataObject::GetTextLength and
wxTextDataObject::GetText will have to be overridden.
-
+
Note that if you already have the text inside a string, you will not achieve
any efficiency gain by overriding these functions because copying wxStrings is
already a very efficient operation (data is not actually copied because
wxStrings are reference counted).
-
+
@b wxPython note: If you wish to create a derived wxTextDataObject class in
wxPython you should derive the class from wxPyTextDataObject
in order to get Python-aware capabilities for the various virtual
methods.
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
@ref overview_wxdndoverview "Clipboard and drag and drop overview",
wxDataObject, wxDataObjectSimple, wxFileDataObject, wxBitmapDataObject
{
public:
/**
- Constructor, may be used to initialise the text (otherwise
+ Constructor, may be used to initialise the text (otherwise
SetText() should be used later).
*/
wxTextDataObject(const wxString& text = wxEmptyString);
/**
@class wxFileDataObject
@wxheader{dataobj.h}
-
- wxFileDataObject is a specialization of wxDataObject
+
+ wxFileDataObject is a specialization of wxDataObject
for file names. The program works with it just as if it were a list of absolute
file
names, but internally it uses the same format as
Explorer and other compatible programs under Windows or GNOME/KDE filemanager
under Unix which makes it possible to receive files from them using this
class.
-
+
@b Warning: Under all non-Windows platforms this class is currently
"input-only", i.e. you can receive the files from another application, but
copying (or dragging) file(s) from a wxWidgets application is not currently
supported. PS: GTK2 should work as well.
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
wxDataObject, wxDataObjectSimple, wxTextDataObject, wxBitmapDataObject,
wxDataObject
/**
@class wxDataViewIconText
@wxheader{dataview.h}
-
- wxDataViewIconText is used by
+
+ wxDataViewIconText is used by
wxDataViewIconTextRenderer
for data transfer. This class can be converted to a from
a wxVariant.
-
+
@library{wxbase}
@category{FIXME}
*/
*/
wxDataViewIconText(const wxString& text = wxEmptyString,
const wxIcon& icon = wxNullIcon);
- wxDataViewIconText(const wxDataViewIconText& other);
+ wxDataViewIconText(const wxDataViewIconText& other);
//@}
/**
/**
@class wxDataViewEvent
@wxheader{dataview.h}
-
+
wxDataViewEvent - the event class for the wxDataViewCtrl notifications
-
+
@library{wxadv}
@category{FIXME}
*/
*/
wxDataViewEvent(wxEventType commandType = wxEVT_@NULL,
int winid = 0);
- wxDataViewEvent(const wxDataViewEvent& event);
+ wxDataViewEvent(const wxDataViewEvent& event);
//@}
/**
/**
@class wxDataViewIconTextRenderer
@wxheader{dataview.h}
-
+
The wxDataViewIconTextRenderer class is used to display text with
a small icon next to it as it is typically done in a file manager.
This classes uses the wxDataViewIconText
helper class to store its data. wxDataViewIonText can be converted
to a from a wxVariant using the left shift
operator.
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxDataViewIndexListModel
@wxheader{dataview.h}
-
+
wxDataViewIndexListModel is a specialized data model which lets
- you address an item by its position (row) rather than its
- wxDataViewItem (which you can obtain from this class).
- This model also provides its own
+ you address an item by its position (row) rather than its
+ wxDataViewItem (which you can obtain from this class).
+ This model also provides its own
wxDataViewIndexListModel::Compare method
which sorts the model's data by the index.
-
+
This model is special in the it is implemented differently under OS X
and other platforms. Under OS X a wxDataViewItem is always persistent
and this is also the case for this class. Under other platforms, the
meaning of a wxDataViewItem is changed to reflect a row number for
- wxDataViewIndexListModel. The consequence of this is that
+ wxDataViewIndexListModel. The consequence of this is that
wxDataViewIndexListModel can be used as a virtual model with an
almost infinate number of items on platforms other than OS X.
-
+
@library{wxbase}
@category{FIXME}
*/
/**
Oberride this to indicate that the row has special font attributes.
- This only affects the
+ This only affects the
wxDataViewTextRendererText renderer.
See also wxDataViewItemAttr.
/**
@class wxDataViewModel
@wxheader{dataview.h}
-
+
wxDataViewModel is the base class for all data model to be
- displayed by a wxDataViewCtrl.
+ displayed by a wxDataViewCtrl.
All other models derive from it and must implement its
pure virtual functions in order to define a complete
- data model. In detail, you need to override
+ data model. In detail, you need to override
wxDataViewModel::IsContainer,
wxDataViewModel::GetParent,
wxDataViewModel::GetChildren,
wxDataViewModel::GetColumnCount,
wxDataViewModel::GetColumnType and
wxDataViewModel::GetValue in order to
- define the data model which acts as an interface between
+ define the data model which acts as an interface between
your actual data and the wxDataViewCtrl. Since you will
usually also allow the wxDataViewCtrl to change your data
through its graphical interface, you will also have to override
wxDataViewModel::SetValue which the
wxDataViewCtrl will call when a change to some data has been
commited.
-
+
wxDataViewModel (as indeed the entire wxDataViewCtrl
code) is using wxVariant to store data and
its type in a generic way. wxVariant can be extended to contain
almost any data without changes to the original class.
-
+
The data that is presented through this data model is expected
to change at run-time. You need to inform the data model when
a change happened. Depending on what happened you need to call
- one of the following methods:
+ one of the following methods:
wxDataViewModel::ValueChanged,
wxDataViewModel::ItemAdded,
wxDataViewModel::ItemDeleted,
wxDataViewModel::ItemChanged,
wxDataViewModel::Cleared. There are
plural forms for notification of addition, change
- or removal of several item at once. See
+ or removal of several item at once. See
wxDataViewModel::ItemsAdded,
wxDataViewModel::ItemsDeleted,
wxDataViewModel::ItemsChanged.
-
+
Note that wxDataViewModel does not define the position or
index of any item in the control because different controls
might display the same data differently. wxDataViewModel does
which the wxDataViewCtrl may use to sort the data either
in conjunction with a column header or without (see
wxDataViewModel::HasDefaultCompare).
-
- This class maintains a list of
+
+ This class maintains a list of
wxDataViewModelNotifier
which link this class to the specific implementations on the
- supported platforms so that e.g. calling
+ supported platforms so that e.g. calling
wxDataViewModel::ValueChanged
- on this model will just call
+ on this model will just call
wxDataViewModelNotifier::ValueChanged
- for each notifier that has been added. You can also add
- your own notifier in order to get informed about any changes
+ for each notifier that has been added. You can also add
+ your own notifier in order to get informed about any changes
to the data in the list model.
-
+
Currently wxWidgets provides the following models apart
- from the base model:
+ from the base model:
wxDataViewIndexListModel,
wxDataViewTreeStore.
-
- Note that wxDataViewModel is reference counted, derives from
+
+ Note that wxDataViewModel is reference counted, derives from
wxObjectRefData and cannot be deleted
directly as it can be shared by several wxDataViewCtrls. This
implies that you need to decrease the reference count after
associating the model with a control like this:
-
+
@code
wxDataViewCtrl *musicCtrl = new wxDataViewCtrl( this, ID_MUSIC_CTRL );
wxDataViewModel *musicModel = new MyMusicModel;
musicModel-DecRef(); // avoid memory leak !!
// add columns now
@endcode
-
-
+
+
@library{wxadv}
@category{FIXME}
*/
/**
Oberride this to indicate that the item has special font attributes.
- This only affects the
+ This only affects the
wxDataViewTextRendererText renderer.
See also wxDataViewItemAttr.
/**
Override this method to indicate if a container item merely
acts as a headline (or for categorisation) or if it also
- acts a normal item with entries for futher columns. By
+ acts a normal item with entries for futher columns. By
default returns @e @false.
*/
virtual bool HasContainerColumns(const wxDataViewItem& item);
/**
Call this to inform this model that a value in the model has
been changed. This is also called from wxDataViewCtrl's
- internal editing code, e.g. when editing a text field
+ internal editing code, e.g. when editing a text field
in the control.
This will eventually emit a wxEVT_DATAVIEW_ITEM_VALUE_CHANGED
/**
@class wxDataViewCustomRenderer
@wxheader{dataview.h}
-
+
You need to derive a new class from wxDataViewCustomRenderer in
- order to write a new renderer. You need to override at least
+ order to write a new renderer. You need to override at least
wxDataViewRenderer::SetValue,
- wxDataViewRenderer::GetValue,
+ wxDataViewRenderer::GetValue,
wxDataViewCustomRenderer::GetSize
and wxDataViewCustomRenderer::Render.
-
+
If you want your renderer to support in-place editing then you
- also need to override
+ also need to override
wxDataViewCustomRenderer::HasEditorCtrl,
wxDataViewCustomRenderer::CreateEditorCtrl
and wxDataViewCustomRenderer::GetValueFromEditorCtrl.
Note that a special event handler will be pushed onto that
editor control which handles ENTER and focus out events
in order to end the editing.
-
+
@library{wxadv}
@category{FIXME}
*/
virtual wxSize GetSize();
/**
- Overrride this so that the renderer can get the value
+ Overrride this so that the renderer can get the value
from the editor control (pointed to by @e editor):
*/
virtual bool GetValueFromEditorCtrl(wxControl* editor,
/**
@class wxDataViewBitmapRenderer
@wxheader{dataview.h}
-
+
wxDataViewBitmapRenderer
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxDataViewItemAttr
@wxheader{dataview.h}
-
+
This class is used to indicate to a wxDataViewCtrl
that a certain Item has extra font attributes
- for its renderer. For this, it is required to override
+ for its renderer. For this, it is required to override
wxDataViewModel::GetAttr.
-
- Attributes are currently only supported by
+
+ Attributes are currently only supported by
wxDataViewTextRendererText.
-
+
@library{wxadv}
@category{FIXME}
*/
-class wxDataViewItemAttr
+class wxDataViewItemAttr
{
public:
/**
/**
@class wxDataViewItem
@wxheader{dataview.h}
-
+
wxDataViewItem is a small opaque class that represents an
item in a wxDataViewCtrl in a
persistent way, i.e. indepent of the position of the
item in the control or changes to its contents. It must
hold a unique ID of type @e void* in its only field
- and can be converted to a from it.
-
- If the ID is @e @NULL the wxDataViewItem is invalid and
+ and can be converted to a from it.
+
+ If the ID is @e @NULL the wxDataViewItem is invalid and
wxDataViewItem::IsOk will return @e @false
which used in many places in the API of wxDataViewCtrl
to indicate that e.g. no item was found. An ID of @NULL
for this are
wxDataViewModel::GetParent and
wxDataViewModel::GetChildren.
-
+
@library{wxadv}
@category{FIXME}
*/
-class wxDataViewItem
+class wxDataViewItem
{
public:
//@{
*/
wxDataViewItem(void* id = @NULL);
- wxDataViewItem(const wxDataViewItem& item);
+ wxDataViewItem(const wxDataViewItem& item);
//@}
/**
/**
@class wxDataViewCtrl
@wxheader{dataview.h}
-
+
wxDataViewCtrl is a control to display data either
in a tree like fashion or in a tabular form or both.
If you only need to display a simple tree structure
with an API more like the older wxTreeCtrl class,
then the specialized wxDataViewTreeCtrl
can be used.
-
+
A wxDataViewItem is used
to represent a (visible) item in the control.
-
- Unlike wxListCtrl wxDataViewCtrl doesn't
+
+ Unlike wxListCtrl wxDataViewCtrl doesn't
get its data from the user through virtual functions or by
- setting it directly. Instead you need to write your own
+ setting it directly. Instead you need to write your own
wxDataViewModel and associate
it with this control. Then you need to add a number of
wxDataViewColumn to this control to
define what each column shall display. Each wxDataViewColumn
- in turn owns 1 instance of a
+ in turn owns 1 instance of a
wxDataViewRenderer to render its
cells. A number of standard renderers for rendering text, dates,
images, toggle, a progress bar etc. are provided. Additionally,
- the user can write custom renderes deriving from
+ the user can write custom renderes deriving from
wxDataViewCustomRenderer
for displaying anything.
-
+
All data transfer from the control to the model and the user
code is done through wxVariant which can
- be extended to support more data formats as necessary.
+ be extended to support more data formats as necessary.
Accordingly, all type information uses the strings returned
from wxVariant::GetType.
-
+
@beginStyleTable
@style{wxDV_SINGLE}:
Single selection mode. This is the default.
@style{wxDV_VERT_RULES}:
Display fine rules between columns is supported.
@endStyleTable
-
+
@library{wxadv}
@category{ctrl}
@appearance{dataviewctrl.png}
Constructor. Calls Create().
*/
wxDataViewCtrl();
- wxDataViewCtrl(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator);
+ wxDataViewCtrl(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator);
//@}
/**
int width = -1,
wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE);
- wxDataViewColumn* AppendBitmapColumn(const wxBitmap& label,
- unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
- int width = -1,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE);
+ wxDataViewColumn* AppendBitmapColumn(const wxBitmap& label,
+ unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
+ int width = -1,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxDATAVIEW_COL_RESIZABLE);
//@}
/**
@e @true on success.
Note that there is a number of short cut methods which implicitly create
- a wxDataViewColumn and a
+ a wxDataViewColumn and a
wxDataViewRenderer for it (see below).
*/
virtual bool AppendColumn(wxDataViewColumn* col);
int width = -1,
wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE);
- wxDataViewColumn* AppendDateColumn(const wxBitmap& label,
- unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
- int width = -1,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE);
+ wxDataViewColumn* AppendDateColumn(const wxBitmap& label,
+ unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
+ int width = -1,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxDATAVIEW_COL_RESIZABLE);
//@}
//@{
/**
Appends a column for rendering text with an icon. Returns the wxDataViewColumn
- created in the function or @NULL on failure. This uses the
+ created in the function or @NULL on failure. This uses the
wxDataViewIconTextRenderer.
*/
wxDataViewColumn* AppendIconTextColumn(const wxString& label,
int width = -1,
wxAlignment align = wxALIGN_LEFT,
int flags = wxDATAVIEW_COL_RESIZABLE);
- wxDataViewColumn* AppendIconTextColumn(const wxBitmap& label,
- unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
- int width = -1,
- wxAlignment align = wxALIGN_LEFT,
- int flags = wxDATAVIEW_COL_RESIZABLE);
+ wxDataViewColumn* AppendIconTextColumn(const wxBitmap& label,
+ unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
+ int width = -1,
+ wxAlignment align = wxALIGN_LEFT,
+ int flags = wxDATAVIEW_COL_RESIZABLE);
//@}
//@{
int width = 80,
wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE);
- wxDataViewColumn* AppendProgressColumn(const wxBitmap& label,
- unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
- int width = 80,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE);
+ wxDataViewColumn* AppendProgressColumn(const wxBitmap& label,
+ unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
+ int width = 80,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxDATAVIEW_COL_RESIZABLE);
//@}
//@{
int width = -1,
wxAlignment align = wxALIGN_LEFT,
int flags = wxDATAVIEW_COL_RESIZABLE);
- wxDataViewColumn* AppendTextColumn(const wxBitmap& label,
- unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
- int width = -1,
- wxAlignment align = wxALIGN_LEFT,
- int flags = wxDATAVIEW_COL_RESIZABLE);
+ wxDataViewColumn* AppendTextColumn(const wxBitmap& label,
+ unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
+ int width = -1,
+ wxAlignment align = wxALIGN_LEFT,
+ int flags = wxDATAVIEW_COL_RESIZABLE);
//@}
//@{
int width = 30,
wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE);
- wxDataViewColumn* AppendToggleColumn(const wxBitmap& label,
- unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
- int width = 30,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE);
+ wxDataViewColumn* AppendToggleColumn(const wxBitmap& label,
+ unsigned int model_column,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
+ int width = 30,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxDATAVIEW_COL_RESIZABLE);
//@}
/**
void Expand(const wxDataViewItem & item);
/**
- Returns pointer to the column. @e pos refers to the
+ Returns pointer to the column. @e pos refers to the
position in the control which may change after reordering
columns by the user.
*/
/**
@class wxDataViewModelNotifier
@wxheader{dataview.h}
-
+
A wxDataViewModelNotifier instance is owned by a
wxDataViewModel
- and mirrors its notification interface. See
+ and mirrors its notification interface. See
the documentation of that class for further
information.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxDataViewModelNotifier
+class wxDataViewModelNotifier
{
public:
/**
/**
@class wxDataViewRenderer
@wxheader{dataview.h}
-
+
This class is used by wxDataViewCtrl to
render the individual cells. One instance of a renderer class is
owned by wxDataViewColumn. There is
wxDataViewBitmapRenderer,
wxDataViewDateRenderer.
wxDataViewSpinRenderer.
-
+
Additionally, the user can write own renderers by deriving from
wxDataViewCustomRenderer.
-
+
The @e wxDataViewCellMode flag controls, what actions
the cell data allows. @e wxDATAVIEW_CELL_ACTIVATABLE
indicates that the user can double click the cell and
will pop up). @e wxDATAVIEW_CELL_EDITABLE indicates
that the user can edit the data in-place, i.e. an control
will show up after a slow click on the cell. This behaviour
- is best known from changing the filename in most file
+ is best known from changing the filename in most file
managers etc.
-
-
+
+
@code
enum wxDataViewCellMode
{
wxDATAVIEW_CELL_EDITABLE
};
@endcode
-
+
The @e wxDataViewCellRenderState flag controls how the
the renderer should display its contents in a cell:
-
+
@code
enum wxDataViewCellRenderState
{
wxDATAVIEW_CELL_FOCUSED = 8
};
@endcode
-
-
+
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxDataViewTextRenderer
@wxheader{dataview.h}
-
+
wxDataViewTextRenderer is used for rendering text. It supports
in-place editing if desired.
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxDataViewProgressRenderer
@wxheader{dataview.h}
-
+
wxDataViewProgressRenderer
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxDataViewSpinRenderer
@wxheader{dataview.h}
-
+
This is a specialized renderer for rendering integer values. It
supports modifying the values in-place by using a wxSpinCtrl.
The renderer only support variants of type @e long.
-
+
@library{wxbase}
@category{FIXME}
*/
/**
@class wxDataViewToggleRenderer
@wxheader{dataview.h}
-
+
wxDataViewToggleRenderer
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxDataViewTreeCtrl
@wxheader{dataview.h}
-
+
This class is a wxDataViewCtrl which internally
uses a wxDataViewTreeStore and forwards
most of its API to that class. Additionally, it uses a wxImageList
- to store a list of icons. The main purpose of this class is to look
+ to store a list of icons. The main purpose of this class is to look
like a wxTreeCtrl to make a transition from it
to the wxDataViewCtrl class simpler.
-
+
@library{wxbase}
@category{ctrl}
@appearance{dataviewtreectrl.png}
Constructor. Calls Create().
*/
wxDataViewTreeCtrl();
- wxDataViewTreeCtrl(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDV_NO_HEADER,
- const wxValidator& validator = wxDefaultValidator);
+ wxDataViewTreeCtrl(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDV_NO_HEADER,
+ const wxValidator& validator = wxDefaultValidator);
//@}
/**
Returns the store.
*/
wxDataViewTreeStore* GetStore();
- const wxDataViewTreeStore* GetStore();
+ const wxDataViewTreeStore* GetStore();
//@}
/**
/**
@class wxDataViewTreeStore
@wxheader{dataview.h}
-
+
wxDataViewTreeStore is a specialised wxDataViewModel
for displaying simple trees very much like wxTreeCtrl
does and it offers a similar API. This class actually stores the entire
tree (therefore its name) and implements all virtual methods from the base
class so it can be used directly without having to derive any class from it.
This comes at the price of much reduced flexibility.
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxDataViewDateRenderer
@wxheader{dataview.h}
-
+
wxDataViewDateRenderer
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxDataViewTextRendererAttr
@wxheader{dataview.h}
-
+
The same as wxDataViewTextRenderer but with
support for font attributes. Font attributes are currently only supported
under GTK+ and MSW.
-
+
See also wxDataViewModel::GetAttr and
wxDataViewItemAttr.
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxDataViewColumn
@wxheader{dataview.h}
-
+
This class represents a column in a wxDataViewCtrl.
One wxDataViewColumn is bound to one column in the data model,
- to which the wxDataViewCtrl has been associated.
-
+ to which the wxDataViewCtrl has been associated.
+
An instance of wxDataViewRenderer is used by
this class to render its data.
-
+
@library{wxadv}
@category{FIXME}
*/
int width = wxDVC_DEFAULT_WIDTH,
wxAlignment align = wxALIGN_CENTRE,
int flags = wxDATAVIEW_COL_RESIZABLE);
- wxDataViewColumn(const wxBitmap& bitmap,
- wxDataViewRenderer* renderer,
- unsigned int model_column,
- int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTRE,
- int flags = wxDATAVIEW_COL_RESIZABLE);
+ wxDataViewColumn(const wxBitmap& bitmap,
+ wxDataViewRenderer* renderer,
+ unsigned int model_column,
+ int width = wxDVC_DEFAULT_WIDTH,
+ wxAlignment align = wxALIGN_CENTRE,
+ int flags = wxDATAVIEW_COL_RESIZABLE);
//@}
/**
/**
Indicate wether the column can be reordered by the
- user using the mouse. This is typically implemented
+ user using the mouse. This is typically implemented
visually by dragging the header button around.
*/
void SetReorderable(bool reorderable);
/**
Indicate that the column is sortable. This does
not show any sorting indicate yet, but it does
- make the column header clickable. Call
+ make the column header clickable. Call
SetSortOrder()
afterwards to actually make the sort indicator appear.
If @e sortable is @false, the column header is
/**
@class wxDatePickerCtrl
@wxheader{datectrl.h}
-
- This control allows the user to select a date. Unlike
+
+ This control allows the user to select a date. Unlike
wxCalendarCtrl, which is a relatively big control,
wxDatePickerCtrl is implemented as a small window showing the currently
selected date.
The control can be edited using the keyboard, and can also display a popup
window for more user-friendly date selection, depending on the styles used and
the platform, except PalmOS where date is selected using native dialog.
-
+
It is only available if @c wxUSE_DATEPICKCTRL is set to 1.
-
+
@beginStyleTable
@style{wxDP_SPIN}:
Creates a control without a month calendar drop down but with
this style the century could be displayed, or not, depending on the
default date representation in the system.
@endStyleTable
-
+
@beginEventTable
@event{EVT_DATE_CHANGED(id\, func)}:
This event fires when the user changes the current selection in the
control.
@endEventTable
-
+
@library{wxadv}
@category{miscpickers}
@appearance{datepickerctrl.png}
-
+
@seealso
wxCalendarCtrl, wxDateEvent
*/
const wxString& name = "datectrl");
/**
- @param parent
+ @param parent
Parent window, must not be non-@NULL.
- @param id
+ @param id
The identifier for the control.
- @param dt
+ @param dt
The initial value of the control, if an invalid date (such as the
default value) is used, the control is set to today.
- @param pos
+ @param pos
Initial position.
- @param size
+ @param size
Initial size. If left at default value, the control chooses its
own best size by using the height approximately equal to a text control and
width large enough to show the date string fully.
- @param style
+ @param style
The window style, should be left at 0 as there are no
special styles for this control in this version.
- @param validator
+ @param validator
Validator which can be used for additional date checks.
- @param name
+ @param name
Control name.
@returns @true if the control was successfully created or @false if
const wxString& name = "datectrl");
/**
- If the control had been previously limited to a range of dates using
+ If the control had been previously limited to a range of dates using
SetRange(), returns the lower and upper
bounds of this range. If no range is set (or only one of the bounds is set),
@e dt1 and/or @e dt2 are set to be invalid.
- @param dt1
+ @param dt1
Pointer to the object which receives the lower range limit or
becomes invalid if it is not set. May be @NULL if the caller is not
interested in lower limit
- @param dt2
+ @param dt2
Same as above but for the upper limit
@returns @false if no range limits are currently set, @true if at least one
/**
@class wxDateEvent
@wxheader{dateevt.h}
-
+
This event class holds information about a date change and is used together
with wxDatePickerCtrl. It also serves as a base class
for wxCalendarEvent.
-
+
@library{wxadv}
@category{events}
*/
/**
@class wxDateTime
@wxheader{datetime.h}
-
+
wxDateTime class represents an absolute moment in the time.
-
+
@library{wxbase}
@category{data}
-
+
@seealso
@ref overview_wxdatetimeoverview "Date classes overview", wxTimeSpan,
wxDateSpan, wxCalendarCtrl
*/
-class wxDateTime
+class wxDateTime
{
public:
/**
Adds the given date span to this object.
*/
wxDateTime Add(const wxDateSpan& diff);
- wxDateTime Add(const wxDateSpan& diff);
- wxDateTime operator+=(const wxDateSpan& diff);
+ wxDateTime Add(const wxDateSpan& diff);
+ wxDateTime operator+=(const wxDateSpan& diff);
//@}
/**
wxString FormatTime();
/**
- Transform the date from the given time zone to the local one. If @e noDST is
+ Transform the date from the given time zone to the local one. If @e noDST is
@true, no DST adjustments will be made.
Returns the date in the local time zone.
*/
static wxDateTime_t GetNumberOfDays(int year,
Calendar cal = Gregorian);
- static wxDateTime_t GetNumberOfDays(Month month,
- int year = Inv_Year,
- Calendar cal = Gregorian);
+ static wxDateTime_t GetNumberOfDays(Month month,
+ int year = Inv_Year,
+ Calendar cal = Gregorian);
//@}
/**
*/
const char * ParseDate(const wxString& date,
wxString::const_iterator * end = @NULL);
- const char * ParseDate(const char * date);
- const wchar_t * ParseDate(const wchar_t * date);
+ const char * ParseDate(const char * date);
+ const wchar_t * ParseDate(const wchar_t * date);
//@}
//@{
*/
const char * ParseDateTime(const wxString& datetime,
wxString::const_iterator * end = @NULL);
- const char * ParseDateTime(const char * datetime);
- const wchar_t * ParseDateTime(const wchar_t * datetime);
+ const char * ParseDateTime(const char * datetime);
+ const wchar_t * ParseDateTime(const wchar_t * datetime);
//@}
//@{
const wxString& format = wxDefaultDateTimeFormat,
const wxDateTime& dateDef = wxDefaultDateTime,
wxString::const_iterator * end = @NULL);
- const char * ParseFormat(const char * date,
- const wxString& format = wxDefaultDateTimeFormat,
- const wxDateTime& dateDef = wxDefaultDateTime);
- const wchar_t * ParseFormat(const wchar_t * date,
- const wxString& format = wxDefaultDateTimeFormat,
- const wxDateTime& dateDef = wxDefaultDateTime);
+ const char * ParseFormat(const char * date,
+ const wxString& format = wxDefaultDateTimeFormat,
+ const wxDateTime& dateDef = wxDefaultDateTime);
+ const wchar_t * ParseFormat(const wchar_t * date,
+ const wxString& format = wxDefaultDateTimeFormat,
+ const wxDateTime& dateDef = wxDefaultDateTime);
//@}
/**
*/
const char * ParseRfc822Date(const wxString& date,
wxString::const_iterator * end = @NULL);
- const char * ParseRfc822Date(const char* date);
- const wchar_t * ParseRfc822Date(const wchar_t* date);
+ const char * ParseRfc822Date(const char* date);
+ const wchar_t * ParseRfc822Date(const wchar_t* date);
//@}
//@{
*/
const char * ParseTime(const wxString& time,
wxString::const_iterator * end = @NULL);
- const char * ParseTime(const char * time);
- const wchar_t * ParseTime(const wchar_t * time);
+ const char * ParseTime(const char * time);
+ const wchar_t * ParseTime(const wchar_t * time);
//@}
/**
Sets the date and time from the parameters.
*/
#define wxDateTime Set(wxDateTime_t day, Month month = Inv_Month,
- int year = Inv_Year,
- wxDateTime_t hour = 0,
- wxDateTime_t minute = 0,
- wxDateTime_t second = 0,
- wxDateTime_t millisec = 0) /* implementation is private */
+ int year = Inv_Year,
+ wxDateTime_t hour = 0,
+ wxDateTime_t minute = 0,
+ wxDateTime_t second = 0,
+ wxDateTime_t millisec = 0) /* implementation is private */
/**
Sets the country to use by default. This setting influences the DST
*/
bool SetToWeekDay(WeekDay weekday, int n = 1,
Month month = Inv_Month,
- int year = Inv_Year);
+ int year = Inv_Year);
/**
Adjusts the date so that it will still lie in the same week as before, but its
Same as @ref settm() Set.
*/
wxDateTime operator(const struct tm& tm);
-};
+ };
/**
@class wxDateTimeWorkDays
@wxheader{datetime.h}
-
-
+
+
@library{wxbase}
@category{FIXME}
*/
-class wxDateTimeWorkDays
+class wxDateTimeWorkDays
{
public:
-
+
};
/**
@class wxDateSpan
@wxheader{datetime.h}
-
+
This class is a "logical time span" and is useful for implementing program
logic for such things as "add one month to the date" which, in general,
doesn't mean to add 60*60*24*31 seconds to it, but to take the same date
the next month (to understand that this is indeed different consider adding
one month to Feb, 15 -- we want to get Mar, 15, of course).
-
+
When adding a month to the date, all lesser components (days, hours, ...)
won't be changed unless the resulting date would be invalid: for example,
Jan 31 + 1 month will be Feb 28, not (non-existing) Feb 31.
-
+
Because of this feature, adding and subtracting back again the same
wxDateSpan will @b not, in general give back the original date: Feb 28 - 1
month will be Jan 28, not Jan 31!
-
+
wxDateSpan objects can be either positive or negative. They may be
multiplied by scalars which multiply all deltas by the scalar: i.e.
2*(1 month and 1 day) is 2 months and 2 days. They can
- be added together and with wxDateTime or
+ be added together and with wxDateTime or
wxTimeSpan, but the type of result is different for each
case.
-
+
Beware about weeks: if you specify both weeks and days, the total number of
days added will be 7*weeks + days! See also GetTotalDays()
function.
-
+
Equality operators are defined for wxDateSpans. Two datespans are equal if
and only if they both give the same target date when added to @b every
source date. Thus wxDateSpan::Months(1) is not equal to wxDateSpan::Days(30),
because they don't give the same date when added to 1 Feb. But
wxDateSpan::Days(14) is equal to wxDateSpan::Weeks(2)
-
+
Finally, notice that for adding hours, minutes and so on you don't need this
class at all: wxTimeSpan will do the job because there
are no subtleties associated with those (we don't support leap seconds).
-
+
@library{wxbase}
@category{data}
-
+
@seealso
@ref overview_wxdatetimeoverview "Date classes overview", wxDateTime
*/
-class wxDateSpan
+class wxDateSpan
{
public:
/**
second and third ones modify this object in place.
*/
wxDateSpan Add(const wxDateSpan& other);
- wxDateSpan Add(const wxDateSpan& other);
- wxDateSpan operator+=(const wxDateSpan& other);
+ wxDateSpan Add(const wxDateSpan& other);
+ wxDateSpan operator+=(const wxDateSpan& other);
//@}
/**
object in place.
*/
wxDateSpan Multiply(int factor);
- wxDateSpan Multiply(int factor);
- wxDateSpan operator*=(int factor);
+ wxDateSpan Multiply(int factor);
+ wxDateSpan operator*=(int factor);
//@}
//@{
@sa Negate()
*/
wxDateSpan Neg();
- wxDateSpan operator-();
+ wxDateSpan operator-();
//@}
/**
object, the second and third ones modify this object in place.
*/
wxDateSpan Subtract(const wxDateSpan& other);
- wxDateSpan Subtract(const wxDateSpan& other);
- wxDateSpan operator+=(const wxDateSpan& other);
+ wxDateSpan Subtract(const wxDateSpan& other);
+ wxDateSpan operator+=(const wxDateSpan& other);
//@}
/**
/**
@class wxTimeSpan
@wxheader{datetime.h}
-
+
wxTimeSpan class represents a time interval.
-
+
@library{wxbase}
@category{data}
-
+
@seealso
@ref overview_wxdatetimeoverview "Date classes overview", wxDateTime
*/
-class wxTimeSpan
+class wxTimeSpan
{
public:
//@{
minutes, seconds or milliseconds.
*/
wxTimeSpan();
- wxTimeSpan(long hours, long min, long sec, long msec);
+ wxTimeSpan(long hours, long min, long sec, long msec);
//@}
/**
Returns the sum of two timespans.
*/
wxTimeSpan Add(const wxTimeSpan& diff);
- wxTimeSpan Add(const wxTimeSpan& diff);
- wxTimeSpan operator+=(const wxTimeSpan& diff);
+ wxTimeSpan Add(const wxTimeSpan& diff);
+ wxTimeSpan operator+=(const wxTimeSpan& diff);
//@}
/**
Multiplies timespan by a scalar.
*/
wxTimeSpan Multiply(int n);
- wxTimeSpan Multiply(int n);
- wxTimeSpan operator*=(int n);
+ wxTimeSpan Multiply(int n);
+ wxTimeSpan operator*=(int n);
//@}
//@{
Negate the value of the timespan.
*/
wxTimeSpan Neg();
- wxTimeSpan operator-();
+ wxTimeSpan operator-();
//@}
/**
Returns the difference of two timespans.
*/
wxTimeSpan Subtract(const wxTimeSpan& diff);
- wxTimeSpan Subtract(const wxTimeSpan& diff);
- wxTimeSpan operator-=(const wxTimeSpan& diff);
+ wxTimeSpan Subtract(const wxTimeSpan& diff);
+ wxTimeSpan operator-=(const wxTimeSpan& diff);
//@}
/**
/**
@class wxDateTimeHolidayAuthority
@wxheader{datetime.h}
-
-
+
+
@library{wxbase}
@category{FIXME}
*/
-class wxDateTimeHolidayAuthority
+class wxDateTimeHolidayAuthority
{
public:
-
+
};
/**
@class wxDataOutputStream
@wxheader{datstrm.h}
-
+
This class provides functions that write binary data types in a
portable way. Data can be written in either big-endian or little-endian
format, little-endian being the default on all architectures.
-
- If you want to write data to text files (or streams) use
+
+ If you want to write data to text files (or streams) use
wxTextOutputStream instead.
-
- The operator is overloaded and you can use this class like a standard
- C++ iostream. See wxDataInputStream for its
+
+ The operator is overloaded and you can use this class like a standard
+ C++ iostream. See wxDataInputStream for its
usage and caveats.
-
- See also wxDataInputStream.
-
+
+ See also wxDataInputStream.
+
@library{wxbase}
@category{streams}
*/
-class wxDataOutputStream
+class wxDataOutputStream
{
public:
//@{
Constructs a datastream object from an output stream. Only write methods will
be available. The second form is only available in Unicode build of wxWidgets.
- @param stream
+ @param stream
The output stream.
- @param conv
- Charset conversion object object used to encoding Unicode
+ @param conv
+ Charset conversion object object used to encoding Unicode
strings before writing them to the stream
in Unicode mode (see WriteString()
documentation for detailed description). Note that you must not destroy
recommended to use default value (UTF-8).
*/
wxDataOutputStream(wxOutputStream& stream);
- wxDataOutputStream(wxOutputStream& stream);
+ wxDataOutputStream(wxOutputStream& stream);
//@}
/**
16 bit unsigned integer to write is specified with the @e size variable.
*/
void Write16(wxUint16 i16);
- void Write16(const wxUint16 * buffer, size_t size);
+ void Write16(const wxUint16 * buffer, size_t size);
//@}
//@{
32 bit unsigned integer to write is specified with the @e size variable.
*/
void Write32(wxUint32 i32);
- void Write32(const wxUint32 * buffer, size_t size);
+ void Write32(const wxUint32 * buffer, size_t size);
//@}
//@{
64 bit unsigned integer to write is specified with the @e size variable.
*/
void Write64(wxUint64 i64);
- void Write64(const wxUint64 * buffer, size_t size);
+ void Write64(const wxUint64 * buffer, size_t size);
//@}
//@{
specified with the @e size variable.
*/
void Write8(wxUint8 i8);
- void Write8(const wxUint8 * buffer, size_t size);
+ void Write8(const wxUint8 * buffer, size_t size);
//@}
//@{
specified with the @e size variable.
*/
void WriteDouble(double f);
- void WriteDouble(const double * buffer, size_t size);
+ void WriteDouble(const double * buffer, size_t size);
//@}
/**
In ANSI build of wxWidgets, the string is written to the stream in exactly
same way it is represented in memory. In Unicode build, however, the string
is first converted to multibyte representation with @e conv object passed
- to stream's constructor (consequently, ANSI application can read data
+ to stream's constructor (consequently, ANSI application can read data
written by Unicode application, as long as they agree on encoding) and this
representation is written to the stream. UTF-8 is used by default.
*/
/**
@class wxDataInputStream
@wxheader{datstrm.h}
-
+
This class provides functions that read binary data types in a
portable way. Data can be read in either big-endian or little-endian
format, little-endian being the default on all architectures.
-
- If you want to read data from text files (or streams) use
+
+ If you want to read data from text files (or streams) use
wxTextInputStream instead.
-
+
The operator is overloaded and you can use this class like a standard C++
iostream.
Note, however, that the arguments are the fixed size types wxUint32, wxInt32 etc
is defined as signed int on 32-bit architectures) so that you cannot use long.
To avoid
problems (here and elsewhere), make use of the wxInt32, wxUint32, etc types.
-
+
For example:
-
+
@code
wxFileInputStream input( "mytext.dat" );
wxDataInputStream store( input );
wxUint8 i1;
float f2;
wxString line;
-
+
store i1; // read a 8 bit integer.
store i1 f2; // read a 8 bit integer followed by float.
store line; // read a text line
@endcode
-
- See also wxDataOutputStream.
-
+
+ See also wxDataOutputStream.
+
@library{wxbase}
@category{streams}
*/
-class wxDataInputStream
+class wxDataInputStream
{
public:
//@{
Constructs a datastream object from an input stream. Only read methods will
be available. The second form is only available in Unicode build of wxWidgets.
- @param stream
+ @param stream
The input stream.
- @param conv
- Charset conversion object object used to decode strings in Unicode
+ @param conv
+ Charset conversion object object used to decode strings in Unicode
mode (see ReadString()
documentation for detailed description). Note that you must not destroy
conv before you destroy this wxDataInputStream instance!
*/
wxDataInputStream(wxInputStream& stream);
- wxDataInputStream(wxInputStream& stream);
+ wxDataInputStream(wxInputStream& stream);
//@}
/**
/**
If @e be_order is @true, all data will be read in big-endian
- order, such as written by programs on a big endian architecture
- (e.g. Sparc) or written by Java-Streams (which always use
+ order, such as written by programs on a big endian architecture
+ (e.g. Sparc) or written by Java-Streams (which always use
big-endian order).
*/
void BigEndianOrdered(bool be_order);
amount of 16 bit unsigned integer to read is specified by the @e size variable.
*/
wxUint16 Read16();
- void Read16(wxUint16 * buffer, size_t size);
+ void Read16(wxUint16 * buffer, size_t size);
//@}
//@{
32 bit unsigned integer to read is specified by the @e size variable.
*/
wxUint32 Read32();
- void Read32(wxUint32 * buffer, size_t size);
+ void Read32(wxUint32 * buffer, size_t size);
//@}
//@{
64 bit unsigned integer to read is specified by the @e size variable.
*/
wxUint64 Read64();
- void Read64(wxUint64 * buffer, size_t size);
+ void Read64(wxUint64 * buffer, size_t size);
//@}
//@{
bytes to read is specified by the @e size variable.
*/
wxUint8 Read8();
- void Read8(wxUint8 * buffer, size_t size);
+ void Read8(wxUint8 * buffer, size_t size);
//@}
//@{
double to read is specified by the @e size variable.
*/
double ReadDouble();
- void ReadDouble(double * buffer, size_t size);
+ void ReadDouble(double * buffer, size_t size);
//@}
/**
- Reads a string from a stream. Actually, this function first reads a long
- integer specifying the length of the string (without the last null character)
+ Reads a string from a stream. Actually, this function first reads a long
+ integer specifying the length of the string (without the last null character)
and then reads the string.
In Unicode build of wxWidgets, the fuction first reads multibyte (char*)
/**
@class wxDC
@wxheader{dc.h}
-
+
A wxDC is a @e device context onto which graphics and text can be drawn.
It is intended to represent a number of output devices in a generic way,
so a window can have a device context associated with it, and a printer also
has a device context.
In this way, the same piece of code may write to a number of different devices,
if the device context is used as a parameter.
-
+
Notice that wxDC is an abstract base class and can't be created directly,
- please use wxPaintDC, wxClientDC,
- wxWindowDC, wxScreenDC,
+ please use wxPaintDC, wxClientDC,
+ wxWindowDC, wxScreenDC,
wxMemoryDC or wxPrinterDC.
-
+
Please note that in addition to the versions of the methods documented here,
there are also versions which accept single @c wxPoint parameter instead of
two @c wxCoord ones or @c wxPoint and @c wxSize instead of four of
them.
-
+
@library{wxcore}
@category{dc}
-
+
@seealso
Overview
*/
coordinates, size of area to copy, source DC, source coordinates,
logical function, whether to use a bitmap mask, and mask source position.
- @param xdest
+ @param xdest
Destination device context x position.
- @param ydest
+ @param ydest
Destination device context y position.
- @param width
+ @param width
Width of source area to be copied.
- @param height
+ @param height
Height of source area to be copied.
- @param source
+ @param source
Source device context.
- @param xsrc
+ @param xsrc
Source device context x position.
- @param ysrc
+ @param ysrc
Source device context y position.
- @param logicalFunc
+ @param logicalFunc
Logical function to use: see SetLogicalFunction().
- @param useMask
+ @param useMask
If @true, Blit does a transparent blit using the mask that is associated with
the bitmap
selected into the source device context. The Windows implementation does the
whether MaskBlt
or the explicit mask blitting code above is used, by using wxSystemOptions and
setting the no-maskblt option to 1.
- @param xsrcMask
+ @param xsrcMask
Source x position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and
ysrc
will be assumed for the mask source position. Currently only implemented on
Windows.
- @param ysrcMask
+ @param ysrcMask
Source y position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and
ysrc
will be assumed for the mask source position. Currently only implemented on
wxCoord ysrcMask = -1);
/**
- Adds the specified point to the bounding box which can be retrieved with
- MinX(), MaxX() and
+ Adds the specified point to the bounding box which can be retrieved with
+ MinX(), MaxX() and
MinY(), MaxY() functions.
@sa ResetBoundingBox()
/**
Performs all necessary computations for given platform and context type
- after each change of scale and origin parameters. Usually called automatically
+ after each change of scale and origin parameters. Usually called automatically
internally after such changes.
*/
virtual void ComputeScaleAndOrigin();
draw the foreground
of the bitmap (all bits set to 1), and the current text background colour to
draw the background
- (all bits set to 0). See also SetTextForeground(),
+ (all bits set to 0). See also SetTextForeground(),
SetTextBackground() and wxMemoryDC.
*/
void DrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y,
*/
void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
- void DrawCheckMark(const wxRect & rect);
+ void DrawCheckMark(const wxRect & rect);
//@}
//@{
@sa DrawEllipse()
*/
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
- void DrawCircle(const wxPoint& pt, wxCoord radius);
+ void DrawCircle(const wxPoint& pt, wxCoord radius);
//@}
//@{
*/
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
- void DrawEllipse(const wxPoint& pt, const wxSize& size);
- void DrawEllipse(const wxRect& rect);
+ void DrawEllipse(const wxPoint& pt, const wxSize& size);
+ void DrawEllipse(const wxRect& rect);
//@}
/**
int alignment = wxALIGN_LEFT | wxALIGN_TOP,
int indexAccel = -1,
wxRect * rectBounding = @NULL);
- void DrawLabel(const wxString& text, const wxRect& rect,
- int alignment = wxALIGN_LEFT | wxALIGN_TOP,
- int indexAccel = -1);
+ void DrawLabel(const wxString& text, const wxRect& rect,
+ int alignment = wxALIGN_LEFT | wxALIGN_TOP,
+ int indexAccel = -1);
//@}
/**
*/
void DrawLines(int n, wxPoint points[], wxCoord xoffset = 0,
wxCoord yoffset = 0);
- void DrawLines(const wxPointList * points,
- wxCoord xoffset = 0,
- wxCoord yoffset = 0);
+ void DrawLines(const wxPointList * points,
+ wxCoord xoffset = 0,
+ wxCoord yoffset = 0);
//@}
/**
of this function (Windows and PostScript-based wxDC currently), this is more
efficient than using DrawPolygon() in a loop.
- @e n specifies the number of polygons to draw, the array @e count of size
- @e n specifies the number of points in each of the polygons in the
+ @e n specifies the number of polygons to draw, the array @e count of size
+ @e n specifies the number of points in each of the polygons in the
@e points array.
The last argument specifies the fill rule: @b wxODDEVEN_RULE (the default)
void DrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0,
wxCoord yoffset = 0,
int fill_style = wxODDEVEN_RULE);
- void DrawPolygon(const wxPointList * points,
- wxCoord xoffset = 0,
- wxCoord yoffset = 0,
- int fill_style = wxODDEVEN_RULE);
+ void DrawPolygon(const wxPointList * points,
+ wxCoord xoffset = 0,
+ wxCoord yoffset = 0,
+ int fill_style = wxODDEVEN_RULE);
//@}
/**
Draws a three-point spline using the current pen.
*/
void DrawSpline(int n, wxPoint points[]);
- void DrawSpline(const wxPointList * points);
- void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2,
- wxCoord y2,
- wxCoord x3,
- wxCoord y3);
+ void DrawSpline(const wxPointList * points);
+ void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2,
+ wxCoord y2,
+ wxCoord x3,
+ wxCoord y3);
//@}
/**
to get the dimensions of a text string, which can be used to position the
text more precisely.
- @b NB: under wxGTK the current
+ @b NB: under wxGTK the current
@ref getlogicalfunction() "logical function" is used by this function
but it is ignored by wxMSW. Thus, you should avoid using logical functions
with this function in portable programs.
/**
Gets the current font. Notice that even although each device context object has
- some default font after creation, this method would return a @c wxNullFont
+ some default font after creation, this method would return a @c wxNullFont
initially and only after calling SetFont() a valid
font is returned.
*/
/**
Gets the current layout direction of the device context. On platforms where RTL
layout
- is supported, the return value will either be @c wxLayout_LeftToRight or
- @c wxLayout_RightToLeft. If RTL layout is not supported, the return value will
+ is supported, the return value will either be @c wxLayout_LeftToRight or
+ @c wxLayout_RightToLeft. If RTL layout is not supported, the return value will
be @c wxLayout_Default.
@sa SetLayoutDirection()
wxCoord * h,
wxCoord * heightLine = @NULL,
wxFont * font = @NULL);
- wxSize GetMultiLineTextExtent(const wxString& string);
+ wxSize GetMultiLineTextExtent(const wxString& string);
//@}
/**
#define wxSize GetPPI() /* implementation is private */
/**
- Fills the @e widths array with the widths from the beginning of
+ Fills the @e widths array with the widths from the beginning of
@e text to the corresponding character of @e text. The generic
version simply builds a running total of the widths of each character
using GetTextExtent(), however if the
various platforms have a native API function that is faster or more
accurate than the generic implementation then it should be used
- instead.
+ instead.
@sa GetMultiLineTextExtent(), GetTextExtent()
*/
@c ( width, height )
*/
void GetSize(wxCoord * width, wxCoord * height);
- wxSize GetSize();
+ wxSize GetSize();
//@}
//@{
Returns the horizontal and vertical resolution in millimetres.
*/
void GetSizeMM(wxCoord * width, wxCoord * height);
- wxSize GetSizeMM();
+ wxSize GetSizeMM();
//@}
/**
wxCoord * descent = @NULL,
wxCoord * externalLeading = @NULL,
const wxFont * font = @NULL);
- wxSize GetTextExtent(const wxString& string);
+ wxSize GetTextExtent(const wxString& string);
//@}
/**
//@{
/**
- Fill the area specified by rect with a radial gradient, starting from
- @e initialColour at the centre of the circle and fading to @e destColour
+ Fill the area specified by rect with a radial gradient, starting from
+ @e initialColour at the centre of the circle and fading to @e destColour
on the circle outside.
@e circleCenter are the relative coordinates of centre of the circle in
void GradientFillConcentric(const wxRect& rect,
const wxColour& initialColour,
const wxColour& destColour);
- void GradientFillConcentric(const wxRect& rect,
- const wxColour& initialColour,
- const wxColour& destColour,
- const wxPoint& circleCenter);
+ void GradientFillConcentric(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ const wxPoint& circleCenter);
//@}
/**
- Fill the area specified by @e rect with a linear gradient, starting from
- @e initialColour and eventually fading to @e destColour. The
+ Fill the area specified by @e rect with a linear gradient, starting from
+ @e initialColour and eventually fading to @e destColour. The
@e nDirection specifies the direction of the colour change, default is to
- use @e initialColour on the left part of the rectangle and
+ use @e initialColour on the left part of the rectangle and
@e destColour on the right one.
*/
void GradientFillLinear(const wxRect& rect,
/**
Sets the x and y axis orientation (i.e., the direction from lowest to
- highest values on the axis). The default orientation is
+ highest values on the axis). The default orientation is
x axis from left to right and y axis from top down.
- @param xLeftRight
+ @param xLeftRight
True to set the x axis orientation to the natural
left to right orientation, @false to invert it.
- @param yBottomUp
+ @param yBottomUp
True to set the y axis orientation to the natural
bottom up orientation, @false to invert it.
*/
/**
Sets the clipping region for this device context to the intersection of the
given region described by the parameters of this method and the previously set
- clipping region. You should call
+ clipping region. You should call
DestroyClippingRegion() if you want to set
the clipping region exactly to the region specified.
*/
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
- void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
- void SetClippingRegion(const wxRect& rect);
- void SetClippingRegion(const wxRegion& region);
+ void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
+ void SetClippingRegion(const wxRect& rect);
+ void SetClippingRegion(const wxRegion& region);
//@}
/**
/**
Copy from a source DC to this DC, specifying the destination
coordinates, destination size, source DC, source coordinates,
- size of source area to copy, logical function, whether to use a bitmap mask,
+ size of source area to copy, logical function, whether to use a bitmap mask,
and mask source position.
- @param xdest
+ @param xdest
Destination device context x position.
- @param ydest
+ @param ydest
Destination device context y position.
- @param dstWidth
+ @param dstWidth
Width of destination area.
- @param dstHeight
+ @param dstHeight
Height of destination area.
- @param source
+ @param source
Source device context.
- @param xsrc
+ @param xsrc
Source device context x position.
- @param ysrc
+ @param ysrc
Source device context y position.
- @param srcWidth
+ @param srcWidth
Width of source area to be copied.
- @param srcHeight
+ @param srcHeight
Height of source area to be copied.
- @param logicalFunc
+ @param logicalFunc
Logical function to use: see SetLogicalFunction().
- @param useMask
+ @param useMask
If @true, Blit does a transparent blit using the mask that is associated with
the bitmap
selected into the source device context. The Windows implementation does the
whether MaskBlt
or the explicit mask blitting code above is used, by using wxSystemOptions and
setting the no-maskblt option to 1.
- @param xsrcMask
+ @param xsrcMask
Source x position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and
ysrc
will be assumed for the mask source position. Currently only implemented on
Windows.
- @param ysrcMask
+ @param ysrcMask
Source y position on the mask. If both xsrcMask and ysrcMask are -1, xsrc and
ysrc
will be assumed for the mask source position. Currently only implemented on
/**
@class wxDCClipper
@wxheader{dc.h}
-
- wxDCClipper is a small helper class for setting a clipping region on a
+
+ wxDCClipper is a small helper class for setting a clipping region on a
wxDC and unsetting it automatically. An object of wxDCClipper
class is typically created on the stack so that it is automatically destroyed
when the object goes out of scope. A typical usage example:
-
+
@code
void MyFunction(wxDC& dc)
{
wxDCClipper clip(rect);
... drawing functions here are affected by clipping rect ...
}
-
+
void OtherFunction()
{
wxDC dc;
... drawing functions here are not affected by clipping rect ...
}
@endcode
-
+
@library{wxcore}
@category{gdi}
-
+
@seealso
wxDC::SetClippingRegion
*/
-class wxDCClipper
+class wxDCClipper
{
public:
//@{
The clipping region is automatically unset when this object is destroyed.
*/
wxDCClipper(wxDC& dc, const wxRegion& r);
- wxDCClipper(wxDC& dc, const wxRect& rect);
- wxDCClipper(wxDC& dc, int x, int y, int w, int h);
+ wxDCClipper(wxDC& dc, const wxRect& rect);
+ wxDCClipper(wxDC& dc, int x, int y, int w, int h);
//@}
};
/**
@class wxBufferedDC
@wxheader{dcbuffer.h}
-
+
This class provides a simple way to avoid flicker: when drawing on it,
everything is in fact first drawn on an in-memory buffer (a
wxBitmap) and then copied to the screen, using the
is typically associated with wxClientDC, if you want to
use it in your @c EVT_PAINT handler, you should look at
wxBufferedPaintDC instead.
-
+
When used like this, a valid @e dc must be specified in the constructor
while the @e buffer bitmap doesn't have to be explicitly provided, by
default this class will allocate the bitmap of required size itself. However
using a dedicated bitmap can speed up the redrawing process by eliminating the
repeated creation and destruction of a possibly big bitmap. Otherwise,
- wxBufferedDC can be used in the same way as any other device context.
-
+ wxBufferedDC can be used in the same way as any other device context.
+
There is another possible use for wxBufferedDC is to use it to maintain a
backing store for the window contents. In this case, the associated @e dc
may be @NULL but a valid backing store bitmap should be specified.
-
+
Finally, please note that GTK+ 2.0 as well as OS X provide double buffering
- themselves natively. You can either use wxWindow::IsDoubleBuffered
- to determine whether you need to use buffering or not, or use
+ themselves natively. You can either use wxWindow::IsDoubleBuffered
+ to determine whether you need to use buffering or not, or use
wxAutoBufferedPaintDC to avoid needless double
buffering on the systems which already do it automatically.
-
+
@library{wxcore}
@category{dc}
-
+
@seealso
wxDC, wxMemoryDC, wxBufferedPaintDC, wxAutoBufferedPaintDC
*/
public:
//@{
/**
- If you use the first, default, constructor, you must call one of the
+ If you use the first, default, constructor, you must call one of the
Init() methods later in order to use the object.
- The other constructors initialize the object immediately and @c Init()
+ The other constructors initialize the object immediately and @c Init()
must not be called after using them.
- @param dc
+ @param dc
The underlying DC: everything drawn to this object will be
flushed to this DC when this object is destroyed. You may pass @NULL
in order to just initialize the buffer, and not flush it.
- @param area
+ @param area
The size of the bitmap to be used for buffering (this bitmap is
created internally when it is not given explicitly).
- @param buffer
+ @param buffer
Explicitly provided bitmap to be used for buffering: this is
the most efficient solution as the bitmap doesn't have to be recreated each
time but it also requires more memory as the bitmap is never freed. The bitmap
should have appropriate size, anything drawn outside of its bounds is clipped.
- @param style
+ @param style
wxBUFFER_CLIENT_AREA to indicate that just the client area of
the window is buffered, or wxBUFFER_VIRTUAL_AREA to indicate that the buffer
bitmap
device context).
*/
wxBufferedDC();
- wxBufferedDC(wxDC * dc, const wxSize& area,
- int style = wxBUFFER_CLIENT_AREA);
- wxBufferedDC(wxDC * dc, wxBitmap& buffer,
- int style = wxBUFFER_CLIENT_AREA);
+ wxBufferedDC(wxDC * dc, const wxSize& area,
+ int style = wxBUFFER_CLIENT_AREA);
+ wxBufferedDC(wxDC * dc, wxBitmap& buffer,
+ int style = wxBUFFER_CLIENT_AREA);
//@}
/**
*/
void Init(wxDC * dc, const wxSize& area,
int style = wxBUFFER_CLIENT_AREA);
- void Init(wxDC * dc, wxBitmap& buffer,
- int style = wxBUFFER_CLIENT_AREA);
+ void Init(wxDC * dc, wxBitmap& buffer,
+ int style = wxBUFFER_CLIENT_AREA);
//@}
};
/**
@class wxAutoBufferedPaintDC
@wxheader{dcbuffer.h}
-
+
This wxDC derivative can be used inside of an @c OnPaint() event handler to
achieve
double-buffered drawing. Just create an object of this class instead of
with wxBG_STYLE_CUSTOM somewhere in the class initialization code, and that's
all you have
to do to (mostly) avoid flicker.
-
+
The difference between wxBufferedPaintDC and this class,
is the lightweigthness - on platforms which have native double-buffering,
wxAutoBufferedPaintDC is simply
a typedef of wxPaintDC. Otherwise, it is a typedef of wxBufferedPaintDC.
-
+
@library{wxbase}
@category{dc}
-
+
@seealso
wxDC, wxBufferedPaintDC
*/
/**
@class wxBufferedPaintDC
@wxheader{dcbuffer.h}
-
+
This is a subclass of wxBufferedDC which can be used
inside of an @c OnPaint() event handler. Just create an object of this class
instead
using this class together with wxScrolledWindow, you probably
do @b not want to call wxScrolledWindow::PrepareDC on it as it
already does this internally for the real underlying wxPaintDC.
-
+
@library{wxcore}
@category{dc}
-
+
@seealso
wxDC, wxBufferedDC, wxAutoBufferedPaintDC
*/
*/
wxBufferedPaintDC(wxWindow * window, wxBitmap& buffer,
int style = wxBUFFER_CLIENT_AREA);
- wxBufferedPaintDC(wxWindow * window,
- int style = wxBUFFER_CLIENT_AREA);
+ wxBufferedPaintDC(wxWindow * window,
+ int style = wxBUFFER_CLIENT_AREA);
//@}
/**
/**
@class wxPaintDC
@wxheader{dcclient.h}
-
+
A wxPaintDC must be constructed if an application wishes to paint on the
client area of a window from within an @b OnPaint event.
This should normally be constructed as a temporary stack object; don't store
a wxPaintDC object. If you have an OnPaint handler, you @e must create a
wxPaintDC
object within it even if you don't actually use it.
-
+
Using wxPaintDC within OnPaint is important because it automatically
sets the clipping area to the damaged area of the window. Attempts to draw
outside this area do not appear.
-
+
To draw on a window from outside @b OnPaint, construct a wxClientDC object.
-
+
To draw on the whole window including decorations, construct a wxWindowDC object
(Windows only).
-
+
@library{wxcore}
@category{dc}
-
+
@seealso
wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC
*/
/**
@class wxClientDC
@wxheader{dcclient.h}
-
+
A wxClientDC must be constructed if an application wishes to paint on the
client area of a window from outside an @b OnPaint event.
This should normally be constructed as a temporary stack object; don't store
a wxClientDC object.
-
+
To draw on a window from within @b OnPaint, construct a wxPaintDC object.
-
+
To draw on the whole window including decorations, construct a wxWindowDC object
(Windows only).
-
+
@library{wxcore}
@category{dc}
-
+
@seealso
wxDC, wxMemoryDC, wxPaintDC, wxWindowDC, wxScreenDC
*/
/**
@class wxWindowDC
@wxheader{dcclient.h}
-
+
A wxWindowDC must be constructed if an application wishes to paint on the
whole area of a window (client and decorations).
This should normally be constructed as a temporary stack object; don't store
a wxWindowDC object.
-
+
To draw on a window from inside @b OnPaint, construct a wxPaintDC object.
-
+
To draw on the client area of a window from outside @b OnPaint, construct a
wxClientDC object.
-
+
To draw on the whole window including decorations, construct a wxWindowDC object
(Windows only).
-
+
@library{wxcore}
@category{dc}
-
+
@seealso
wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxScreenDC
*/
/**
@class wxMemoryDC
@wxheader{dcmemory.h}
-
+
A memory device context provides a means to draw graphics onto a bitmap. When
drawing in to a mono-bitmap, using @c wxWHITE, @c wxWHITE_PEN and
@c wxWHITE_BRUSH
will draw the background colour (i.e. 0) whereas all other colours will draw the
foreground colour (i.e. 1).
-
+
@library{wxcore}
@category{dc}
-
+
@seealso
wxBitmap, wxDC
*/
in creating a usable device context.
*/
wxMemoryDC();
- wxMemoryDC(wxBitmap& bitmap);
+ wxMemoryDC(wxBitmap& bitmap);
//@}
/**
/**
@class wxMirrorDC
@wxheader{dcmirror.h}
-
- wxMirrorDC is a simple wrapper class which is always associated with a real
+
+ wxMirrorDC is a simple wrapper class which is always associated with a real
wxDC object and either forwards all of its operations to it
- without changes (no mirroring takes place) or exchanges @e x and @e y
+ without changes (no mirroring takes place) or exchanges @e x and @e y
coordinates which makes it possible to reuse the same code to draw a figure and
its mirror -- i.e. reflection related to the diagonal line x == y.
-
+
wxMirrorDC has been added in wxWidgets version 2.5.0.
-
+
@library{wxcore}
@category{dc}
*/
Creates a (maybe) mirrored DC associated with the real @e dc. Everything
drawn on wxMirrorDC will appear (and maybe mirrored) on @e dc.
- @e mirror specifies if we do mirror (if it is @true) or not (if it is
+ @e mirror specifies if we do mirror (if it is @true) or not (if it is
@false).
*/
wxMirrorDC(wxDC& dc, bool mirror);
/**
@class wxPrinterDC
@wxheader{dcprint.h}
-
+
A printer device context is specific to MSW and Mac, and allows access to any
printer with a Windows or Macintosh driver. See wxDC for further
information on device contexts, and wxDC::GetSize for
advice on achieving the correct scaling for the page.
-
+
@library{wxcore}
@category{printing}
-
+
@seealso
@ref overview_printingoverview "Printing framework overview", wxDC
*/
This constructor is deprecated and retained only for backward compatibility.
*/
wxPrinterDC(const wxPrintData& printData);
- wxPrinterDC(const wxString& driver, const wxString& device,
- const wxString& output,
- const bool interactive = @true,
- int orientation = wxPORTRAIT);
+ wxPrinterDC(const wxString& driver, const wxString& device,
+ const wxString& output,
+ const bool interactive = @true,
+ int orientation = wxPORTRAIT);
//@}
/**
/**
@class wxPostScriptDC
@wxheader{dcps.h}
-
+
This defines the wxWidgets Encapsulated PostScript device context,
which can write PostScript files on any platform. See wxDC for
descriptions of the member functions.
-
+
@library{wxbase}
@category{dc}
*/
use the wxPrintData constructor instead.
*/
wxPostScriptDC(const wxPrintData& printData);
- wxPostScriptDC(const wxString& output,
- bool interactive = @true,
- wxWindow * parent);
+ wxPostScriptDC(const wxString& output,
+ bool interactive = @true,
+ wxWindow * parent);
//@}
/**
- Return resolution used in PostScript output. See
+ Return resolution used in PostScript output. See
SetResolution().
*/
static int GetResolution();
/**
@class wxScreenDC
@wxheader{dcscreen.h}
-
+
A wxScreenDC can be used to paint on the screen.
This should normally be constructed as a temporary stack object; don't store
a wxScreenDC object.
-
+
@library{wxcore}
@category{dc}
-
+
@seealso
wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxWindowDC
*/
applications.
*/
bool StartDrawingOnTop(wxWindow* window);
- bool StartDrawingOnTop(wxRect* rect = @NULL);
+ bool StartDrawingOnTop(wxRect* rect = @NULL);
//@}
};
/**
@class wxSVGFileDC
@wxheader{dcsvg.h}
-
+
A wxSVGFileDC is a @e device context onto which graphics and text can be drawn,
and the output
- produced as a vector file, in the SVG format
+ produced as a vector file, in the SVG format
(see W3C specifications).
This format can be read by a range of programs, including a Netscape plugin
- (Adobe), full details
+ (Adobe), full details
in the SVG Implementation and Resource Directory.
Vector formats may often be smaller than raster formats.
-
+
The intention behind wxSVGFileDC is that it can be used to produce a file
- corresponding
+ corresponding
to the screen display context, wxSVGFileDC, by passing the wxSVGFileDC as a
parameter instead of a wxSVGFileDC. Thus the wxSVGFileDC is a write-only class.
-
+
As the wxSVGFileDC is a vector format, raster operations like GetPixel are
unlikely to be supported.
However, the SVG specification allows for PNG format raster files to be
- embedded in the SVG, and so
+ embedded in the SVG, and so
bitmaps, icons and blit operations into the wxSVGFileDC are supported.
-
+
A more substantial SVG library (for reading and writing) is available at the
wxArt2D website.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@b Members
*/
public:
//@{
/**
- Constructors:
+ Constructors:
a filename @e f with default size 340x240 at 72.0 dots per inch (a frequent
screen resolution).
- a filename @e f with size @e Width by @e Height at 72.0 dots per inch
+ a filename @e f with size @e Width by @e Height at 72.0 dots per inch
a filename @e f with size @e Width by @e Height at @e dpi resolution.
*/
wxSVGFileDC(wxString f);
- wxSVGFileDC(wxString f, int Width, int Height);
- wxSVGFileDC(wxString f, int Width, int Height, float dpi);
+ wxSVGFileDC(wxString f, int Width, int Height);
+ wxSVGFileDC(wxString f, int Width, int Height, float dpi);
//@}
/**
wxCoord ysrcMask = -1);
/**
- Adds the specified point to the bounding box which can be retrieved with
- wxDC::MinX, wxDC::MaxX and
+ Adds the specified point to the bounding box which can be retrieved with
+ wxDC::MinX, wxDC::MaxX and
wxDC::MinY, wxDC::MaxY functions.
*/
void CalcBoundingBox(wxCoord x, wxCoord y);
draw the foreground
of the bitmap (all bits set to 1), and the current text background colour to
draw the background
- (all bits set to 0). See also wxDC::SetTextForeground,
+ (all bits set to 0). See also wxDC::SetTextForeground,
wxDC::SetTextBackground and wxMemoryDC.
*/
void DrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y,
*/
void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
- void DrawCheckMark(const wxRect & rect);
+ void DrawCheckMark(const wxRect & rect);
//@}
//@{
@sa wxDC::DrawEllipse
*/
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
- void DrawCircle(const wxPoint& pt, wxCoord radius);
+ void DrawCircle(const wxPoint& pt, wxCoord radius);
//@}
//@{
*/
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
- void DrawEllipse(const wxPoint& pt, const wxSize& size);
- void DrawEllipse(const wxRect& rect);
+ void DrawEllipse(const wxPoint& pt, const wxSize& size);
+ void DrawEllipse(const wxRect& rect);
//@}
/**
*/
void DrawLines(int n, wxPoint points[], wxCoord xoffset = 0,
wxCoord yoffset = 0);
- void DrawLines(wxList * points, wxCoord xoffset = 0,
- wxCoord yoffset = 0);
+ void DrawLines(wxList * points, wxCoord xoffset = 0,
+ wxCoord yoffset = 0);
//@}
/**
void DrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0,
wxCoord yoffset = 0,
int fill_style = wxODDEVEN_RULE);
- void DrawPolygon(wxList * points, wxCoord xoffset = 0,
- wxCoord yoffset = 0,
- int fill_style = wxODDEVEN_RULE);
+ void DrawPolygon(wxList * points, wxCoord xoffset = 0,
+ wxCoord yoffset = 0,
+ int fill_style = wxODDEVEN_RULE);
//@}
/**
Draws a three-point spline using the current pen.
*/
void DrawSpline(wxList * points);
- void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2,
- wxCoord y2,
- wxCoord x3,
- wxCoord y3);
+ void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2,
+ wxCoord y2,
+ wxCoord x3,
+ wxCoord y3);
//@}
/**
wxSVGFileDC::SetBackground).
*/
wxBrush GetBackground();
- const wxBrush GetBackground();
+ const wxBrush GetBackground();
//@}
/**
Gets the current brush (see wxSVGFileDC::SetBrush).
*/
wxBrush GetBrush();
- const wxBrush GetBrush();
+ const wxBrush GetBrush();
//@}
/**
Gets the current font (see wxSVGFileDC::SetFont).
*/
wxFont GetFont();
- const wxFont GetFont();
+ const wxFont GetFont();
//@}
/**
Gets the current pen (see wxSVGFileDC::SetPen).
*/
wxPen GetPen();
- const wxPen GetPen();
+ const wxPen GetPen();
//@}
/**
Gets the current text background colour (see wxSVGFileDC::SetTextBackground).
*/
wxColour GetTextBackground();
- const wxColour GetTextBackground();
+ const wxColour GetTextBackground();
//@}
/**
Gets the current text foreground colour (see wxSVGFileDC::SetTextForeground).
*/
wxColour GetTextForeground();
- const wxColour GetTextForeground();
+ const wxColour GetTextForeground();
//@}
/**
#define wxCoord MinY() /* implementation is private */
/**
- Returns @true if the DC is ok to use; False values arise from being unable to
+ Returns @true if the DC is ok to use; False values arise from being unable to
write the file
*/
#define bool Ok() /* implementation is private */
highest values on the axis). The default orientation is the natural
orientation, e.g. x axis from left to right and y axis from bottom up.
- @param xLeftRight
+ @param xLeftRight
True to set the x axis orientation to the natural
left to right orientation, @false to invert it.
- @param yBottomUp
+ @param yBottomUp
True to set the y axis orientation to the natural
bottom up orientation, @false to invert it.
*/
*/
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
- void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
- void SetClippingRegion(const wxRect& rect);
- void SetClippingRegion(const wxRegion& region);
+ void SetClippingRegion(const wxPoint& pt, const wxSize& sz);
+ void SetClippingRegion(const wxRect& rect);
+ void SetClippingRegion(const wxRegion& region);
//@}
/**
/**
@class wxDDEConnection
@wxheader{dde.h}
-
+
A wxDDEConnection object represents the connection between a client and a
server. It can be created by making a connection using a
wxDDEClient object, or by the acceptance of a connection by a
conversation is controlled by
calling members in a @b wxDDEConnection object or by overriding its
members.
-
+
An application should normally derive a new connection class from
wxDDEConnection, in order to override the communication event handlers
to do something interesting.
-
+
This DDE-based implementation is available on Windows only,
but a platform-independent, socket-based version
of this API is available using wxTCPConnection.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxDDEClient, wxDDEServer, @ref overview_ipcoverview "Interprocess
communications overview"
transactions.
*/
wxDDEConnection();
- wxDDEConnection(void* buffer, size_t size);
+ wxDDEConnection(void* buffer, size_t size);
//@}
//@{
*/
bool Advise(const wxString& item, const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
- bool Advise(const wxString& item, const char* data);
- bool Advise(const wxString& item, const wchar_t* data);
- bool Advise(const wxString& item, const wxString data);
+ bool Advise(const wxString& item, const char* data);
+ bool Advise(const wxString& item, const wchar_t* data);
+ bool Advise(const wxString& item, const wxString data);
//@}
/**
*/
bool Execute(const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
- bool Execute(const char* data);
- bool Execute(const wchar_t* data);
- bool Execute(const wxString data);
+ bool Execute(const char* data);
+ bool Execute(const wchar_t* data);
+ bool Execute(const wxString data);
//@}
/**
*/
bool Poke(const wxString& item, const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
- bool Poke(const wxString& item, const char* data);
- bool Poke(const wxString& item, const wchar_t* data);
- bool Poke(const wxString& item, const wxString data);
+ bool Poke(const wxString& item, const char* data);
+ bool Poke(const wxString& item, const wchar_t* data);
+ bool Poke(const wxString& item, const wxString data);
//@}
/**
/**
@class wxDDEClient
@wxheader{dde.h}
-
+
A wxDDEClient object represents the client part of a client-server DDE
(Dynamic Data Exchange) conversation.
-
+
To create a client which can communicate with a suitable server,
you need to derive a class from wxDDEConnection and another from wxDDEClient.
The custom wxDDEConnection class will intercept communications in
a 'conversation' with a server, and the custom wxDDEServer is required
so that a user-overridden wxDDEClient::OnMakeConnection member can return
a wxDDEConnection of the required class, when a connection is made.
-
+
This DDE-based implementation is
available on Windows only, but a platform-independent, socket-based version
of this API is available using wxTCPClient.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxDDEServer, wxDDEConnection, @ref overview_ipcoverview "Interprocess
communications overview"
/**
@class wxDDEServer
@wxheader{dde.h}
-
+
A wxDDEServer object represents the server part of a client-server DDE
(Dynamic Data Exchange) conversation.
-
+
This DDE-based implementation is
available on Windows only, but a platform-independent, socket-based version
of this API is available using wxTCPServer.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxDDEClient, wxDDEConnection, @ref overview_ipcoverview "IPC overview"
*/
-class wxDDEServer
+class wxDDEServer
{
public:
/**
Called when wxWidgets exits, to clean up the DDE system. This no longer needs
to be
called by the application.
-
+
See also wxDDEInitialize.
*/
void wxDDECleanUp();
/**
Initializes the DDE system. May be called multiple times without harm.
-
+
This no longer needs to be called by the application: it will be called
by wxWidgets if necessary.
-
+
See also wxDDEServer, wxDDEClient, wxDDEConnection,
wxDDECleanUp.
*/
/////////////////////////////////////////////////////////////////////////////
- // Name: debug.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- /**
- Will always generate an assert error if this code is reached (in debug mode).
-
- See also: wxFAIL_MSG
+// Name: debug.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+Will always generate an assert error if this code is reached (in debug mode).
+
+See also: wxFAIL_MSG
*/
#define wxFAIL() /* implementation is private */
- /**
- This function is called whenever one of debugging macros fails (i.e. condition
- is @false in an assertion). It is only defined in the debug mode, in release
- builds the wxCHECK failures don't result in anything.
-
- To override the default behaviour in the debug builds which is to show the user
- a dialog asking whether he wants to abort the program, continue or continue
- ignoring any subsequent assert failures, you may override
- wxApp::OnAssertFailure which is called by this function if
- the global application object exists.
+/**
+This function is called whenever one of debugging macros fails (i.e. condition
+is @false in an assertion). It is only defined in the debug mode, in release
+builds the wxCHECK failures don't result in anything.
+
+To override the default behaviour in the debug builds which is to show the user
+a dialog asking whether he wants to abort the program, continue or continue
+ignoring any subsequent assert failures, you may override
+wxApp::OnAssertFailure which is called by this function if
+the global application object exists.
*/
void wxOnAssert(const char * fileName, int lineNumber,
const char * func,
In debug mode (when @c __WXDEBUG__ is defined) this function generates a
debugger exception meaning that the control is passed to the debugger if one is
attached to the process. Otherwise the program just terminates abnormally.
-
+
In release mode this function does nothing.
*/
void wxTrap();
/**
Will always generate an assert error with specified message if this code is
reached (in debug mode).
-
+
This macro is useful for marking unreachable" code areas, for example
it may be used in the "default:" branch of a switch statement if all possible
cases are processed above.
-
+
@sa wxFAIL
*/
#define wxFAIL_MSG(msg) /* implementation is private */
This macro results in a
@ref overview_wxcompiletimeassert "compile time assertion failure" if the size
of the given type @e type is less than @e size bits.
-
+
You may use it like this, for example:
@code
// we rely on the int being able to hold values up to 2^32
wxASSERT_MIN_BITSIZE(int, 32);
-
+
// can't work with the platforms using UTF-8 for wchar_t
wxASSERT_MIN_BITSIZE(wchar_t, 16);
@endcode
/**
Assert macro with message. An error message will be generated if the condition
is @false.
-
+
@sa wxASSERT, wxCOMPILE_TIME_ASSERT
*/
#define wxASSERT_MSG(condition, msg) /* implementation is private */
/**
Assert macro. An error message will be generated if the condition is @false in
debug mode, but nothing will be done in the release build.
-
+
Please note that the condition in wxASSERT() should have no side effects
because it will not be executed in release mode at all.
-
+
@sa wxASSERT_MSG, wxCOMPILE_TIME_ASSERT
*/
#define wxASSERT(condition) /* implementation is private */
/**
Checks that the condition is @true, and returns if not (FAILs with given error
message in debug mode). This check is done even in release mode.
-
+
This macro should be used in void functions instead of
wxCHECK_MSG.
*/
@e operation if it is not. This is a generalisation of
wxCHECK and may be used when something else than just
returning from the function must be done when the @e condition is @false.
-
+
This check is done even in release mode.
*/
#define wxCHECK2(condition, operation) /* implementation is private */
Checks that the condition is @true, returns with the given return value if not
(FAILs in debug mode).
This check is done even in release mode.
-
+
This macro may be only used in non-void functions, see also
wxCHECK_RET.
*/
specified @e condition is @false. The compiler error message should include
the @e msg identifier - please note that it must be a valid C++ identifier
and not a string unlike in the other cases.
-
+
This macro is mostly useful for testing the expressions involving the
@c sizeof operator as they can't be tested by the preprocessor but it is
sometimes desirable to test them at the compile time.
-
+
Note that this macro internally declares a struct whose name it tries to make
unique by using the @c __LINE__ in it but it may still not work if you
use it on the same line in two different source files. In this case you may
either change the line in which either of them appears on or use the
wxCOMPILE_TIME_ASSERT2 macro.
-
+
Also note that Microsoft Visual C++ has a bug which results in compiler errors
if you use this macro with 'Program Database For Edit And Continue'
(@c /ZI) option, so you shouldn't use it ('Program Database'
(@c /Zi) is ok though) for the code making use of this macro.
-
+
@sa wxASSERT_MSG, wxASSERT_MIN_BITSIZE
*/
#define wxCOMPILE_TIME_ASSERT(condition, msg) /* implementation is private */
/**
@class wxDebugReportPreview
@wxheader{debugrpt.h}
-
+
This class presents the debug report to the user and allows him to veto report
entirely or remove some parts of it. Although not mandatory, using this class
is strongly recommended as data included in the debug report might contain
sensitive private information and the user should be notified about it as well
as having a possibility to examine the data which had been gathered to check
whether this is effectively the case and discard the debug report if it is.
-
+
wxDebugReportPreview is an abstract base class, currently the only concrete
- class deriving from it is
+ class deriving from it is
wxDebugReportPreviewStd.
-
+
@library{wxqa}
@category{debugging}
*/
-class wxDebugReportPreview
+class wxDebugReportPreview
{
public:
/**
/**
@class wxDebugReportCompress
@wxheader{debugrpt.h}
-
+
wxDebugReportCompress is a wxDebugReport which
compresses all the files in this debug report into a single .ZIP file in its
@c @e Process() function.
-
+
@library{wxqa}
@category{debugging}
*/
/**
@class wxDebugReport
@wxheader{debugrpt.h}
-
+
wxDebugReport is used to generate a debug report, containing information about
- the program current state. It is usually used from
- wxApp::OnFatalException as shown in the
+ the program current state. It is usually used from
+ wxApp::OnFatalException as shown in the
sample.
-
+
A wxDebugReport object contains one or more files. A few of them can be created
by the
class itself but more can be created from the outside and then added to the
report. Also note that several virtual functions may be overridden to further
customize the class behaviour.
-
+
Once a report is fully assembled, it can simply be left in the temporary
directory so that the user can email it to the developers (in which case you
should still use wxDebugReportCompress to
- compress it in a single file) or uploaded to a Web server using
+ compress it in a single file) or uploaded to a Web server using
wxDebugReportUpload (setting up the Web server
to accept uploads is your responsibility, of course). Other handlers, for
example for
automatically emailing the report, can be defined as well but are not currently
included in wxWidgets.
-
+
@library{wxqa}
@category{debugging}
*/
-class wxDebugReport
+class wxDebugReport
{
public:
/**
The constructor creates a temporary directory where the files that will
- be included in the report are created. Use
+ be included in the report are created. Use
IsOk() to check for errors.
*/
wxDebugReport();
/**
Adds the minidump file to the debug report.
- Minidumps are only available under recent Win32 versions (@c dbghlp32.dll
+ Minidumps are only available under recent Win32 versions (@c dbghlp32.dll
can be installed under older systems to make minidumps available).
*/
bool AddDump(Context ctx);
const wxString GetDirectory();
/**
- Retrieves the name (relative to
+ Retrieves the name (relative to
wxDebugReport::GetDirectory) and the description of the
file with the given index. If @e n is greater than or equal to the number of
filse, @false is returned.
size_t GetFilesCount();
/**
- Gets the name used as a base name for various files, by default
+ Gets the name used as a base name for various files, by default
wxApp::GetAppName is used.
*/
wxString GetReportName();
/**
Returns @true if the object was successfully initialized. If this method
- returns
+ returns
@false the report can't be used.
*/
#define bool IsOk() /* implementation is private */
bool Process();
/**
- Removes the file from report: this is used by
+ Removes the file from report: this is used by
wxDebugReportPreview to allow the user to
remove files potentially containing private information from the report.
*/
/**
@class wxDebugReportPreviewStd
@wxheader{debugrpt.h}
-
+
wxDebugReportPreviewStd is a standard debug report preview window. It displays
a GUIdialog allowing the user to examine the contents of a debug report, remove
files from and add notes to it.
-
+
@library{wxqa}
@category{debugging}
*/
wxDebugReportPreviewStd();
/**
- Show the dialog, see
+ Show the dialog, see
wxDebugReportPreview::Show for more
information.
*/
/**
@class wxDebugReportUpload
@wxheader{debugrpt.h}
-
+
This class is used to upload a compressed file using HTTP POST request. As this
class derives from wxDebugReportCompress, before upload the report is
compressed in a single .ZIP file.
-
+
@library{wxqa}
@category{debugging}
*/
This function may be overridden in a derived class to show the output from
curl: this may be an HTML page or anything else that the server returned.
- Value returned by this function becomes the return value of
+ Value returned by this function becomes the return value of
wxDebugReport::Process.
*/
bool OnServerReply();
/////////////////////////////////////////////////////////////////////////////
- // Name: defs.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- //@{
+// Name: defs.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+//@{
/**
These macros will swap the bytes of the @e value variable from little
endian to big endian or vice versa unconditionally, i.e. independently of the
current platform.
*/
wxInt32 wxINT32_SWAP_ALWAYS(wxInt32 value);
- wxUint32 wxUINT32_SWAP_ALWAYS(wxUint32 value);
- wxInt16 wxINT16_SWAP_ALWAYS(wxInt16 value);
- wxUint16 wxUINT16_SWAP_ALWAYS(wxUint16 value);
+wxUint32 wxUINT32_SWAP_ALWAYS(wxUint32 value);
+wxInt16 wxINT16_SWAP_ALWAYS(wxInt16 value);
+wxUint16 wxUINT16_SWAP_ALWAYS(wxUint16 value);
//@}
- //@{
+//@{
/**
This macro will swap the bytes of the @e value variable from little
endian to big endian or vice versa if the program is compiled on a
little-endian architecture (such as Intel PCs). If the program has
been compiled on a big-endian architecture, the value will be unchanged.
-
+
Use these macros to read data from and write data to a file that stores
data in big-endian format.
*/
wxInt32 wxINT32_SWAP_ON_LE(wxInt32 value);
- wxUint32 wxUINT32_SWAP_ON_LE(wxUint32 value);
- wxInt16 wxINT16_SWAP_ON_LE(wxInt16 value);
- wxUint16 wxUINT16_SWAP_ON_LE(wxUint16 value);
+wxUint32 wxUINT32_SWAP_ON_LE(wxUint32 value);
+wxInt16 wxINT16_SWAP_ON_LE(wxInt16 value);
+wxUint16 wxUINT16_SWAP_ON_LE(wxUint16 value);
//@}
/**
This macro is similar to wxDEPRECATED but can be used
to not only declare the function @e func as deprecated but to also provide
its (inline) implementation @e body.
-
+
It can be used as following:
-
+
@code
class wxFoo
{
RefCounted() { m_nRef = 1; }
void IncRef() { m_nRef++ ; }
void DecRef() { if ( !--m_nRef ) delete this; }
-
+
private:
~RefCounted() { }
-
+
wxSUPPRESS_GCC_PRIVATE_DTOR(RefCounted)
};
@endcode
-
+
Notice that there should be no semicolon after this macro.
*/
#define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) /* implementation is private */
endian to big endian or vice versa if the program is compiled on a
big-endian architecture (such as Sun work stations). If the program has
been compiled on a little-endian architecture, the value will be unchanged.
-
+
Use these macros to read data from and write data to a file that stores
data in little-endian (for example Intel i386) format.
*/
wxInt32 wxINT32_SWAP_ON_BE(wxInt32 value);
- wxUint32 wxUINT32_SWAP_ON_BE(wxUint32 value);
- wxInt16 wxINT16_SWAP_ON_BE(wxInt16 value);
- wxUint16 wxUINT16_SWAP_ON_BE(wxUint16 value);
+wxUint32 wxUINT32_SWAP_ON_BE(wxUint32 value);
+wxInt16 wxINT16_SWAP_ON_BE(wxInt16 value);
+wxUint16 wxUINT16_SWAP_ON_BE(wxUint16 value);
//@}
/**
indicating that this function is deprecated (i.e. obsolete and planned to be
removed in the future) when it is used. Only Visual C++ 7 and higher and g++
compilers currently support this functionality.
-
+
Example of use:
-
+
@code
// old function, use wxString version instead
wxDEPRECATED( void wxGetSomething(char *buf, size_t len) );
-
+
// ...
wxString wxGetSomething();
@endcode
which support it or its replacement for those that don't. It must be used to
preserve the value of a @c va_list object if you need to use it after
passing it to another function because it can be modified by the latter.
-
+
As with @c va_start, each call to @c wxVaCopy must have a matching
@c va_end.
*/
/**
@class wxDialog
@wxheader{dialog.h}
-
+
A dialog box is a window with a title bar and sometimes a system menu, which
can be moved around the screen. It can contain controls and other windows and
is often used to allow the user to make some choice or to answer a question.
-
+
Dialogs can be made scrollable, automatically: please see @ref
overview_autoscrollingdialogs "Automatic scrolling dialogs" for further details.
-
+
@beginStyleTable
@style{wxCAPTION}:
Puts a caption on the dialog box.
On Mac OS X, frames with this style will be shown with a metallic
look. This is an extra style.
@endStyleTable
-
+
@library{wxcore}
@category{cmndlg}
-
+
@seealso
@ref overview_wxdialogoverview "wxDialog overview", wxFrame, @ref
overview_validatoroverview "Validator overview"
/**
Constructor.
- @param parent
+ @param parent
Can be @NULL, a frame or another dialog box.
- @param id
+ @param id
An identifier for the dialog. A value of -1 is taken to mean a default.
- @param title
+ @param title
The title of the dialog.
- @param pos
+ @param pos
The dialog position. The value wxDefaultPosition indicates a default position, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param size
+ @param size
The dialog size. The value wxDefaultSize indicates a default size, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param style
+ @param style
The window style. See wxDialog.
- @param name
+ @param name
Used to associate a name with the window,
allowing the application user to set Motif resource values for
individual dialog boxes.
@sa Create()
*/
wxDialog();
- wxDialog(wxWindow* parent, wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_DIALOG_STYLE,
- const wxString& name = "dialogBox");
+ wxDialog(wxWindow* parent, wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_DIALOG_STYLE,
+ const wxString& name = "dialogBox");
//@}
/**
/**
Centres the dialog box on the display.
- @param direction
+ @param direction
May be wxHORIZONTAL, wxVERTICAL or wxBOTH.
*/
void Centre(int direction = wxBOTH);
/**
Creates a sizer with standard buttons. @e flags is a bit list
- of the following flags: wxOK, wxCANCEL, wxYES, wxNO, wxAPPLY, wxCLOSE,
+ of the following flags: wxOK, wxCANCEL, wxYES, wxNO, wxAPPLY, wxCLOSE,
wxHELP, wxNO_DEFAULT.
The sizer lays out the buttons in a manner appropriate to the platform.
- This function uses CreateStdDialogButtonSizer()
+ This function uses CreateStdDialogButtonSizer()
internally for most platforms but doesn't create the sizer at all for the
platforms with hardware buttons (such as smartphones) for which it sets up the
hardware buttons appropriately and returns @NULL, so don't forget to test that
wxSizer* CreateButtonSizer(long flags);
/**
- Creates a sizer with standard buttons using
+ Creates a sizer with standard buttons using
CreateButtonSizer() separated from the rest
of the dialog contents by a horizontal wxStaticLine.
Please notice that just like CreateButtonSizer() this function may return @c
- @NULL
+ @NULL
if no buttons were created.
*/
wxSizer* CreateSeparatedButtonSizer(long flags);
Ends a modal dialog, passing a value to be returned from the ShowModal()
invocation.
- @param retCode
+ @param retCode
The value that should be returned by ShowModal.
@sa ShowModal(), GetReturnCode(), SetReturnCode()
/**
Iconizes or restores the dialog. Windows only.
- @param iconize
+ @param iconize
If @true, iconizes the dialog box; if @false, shows and restores it.
@remarks Note that in Windows, iconization has no effect since dialog
/**
The default handler for wxEVT_SYS_COLOUR_CHANGED.
- @param event
+ @param event
The colour change event.
@remarks Changes the dialog's colour to conform to the current settings
/**
Sets the identifier to be used as OK button. When the button with this
- identifier is pressed, the dialog calls wxWindow::Validate
- and wxWindow::TransferDataFromWindow
+ identifier is pressed, the dialog calls wxWindow::Validate
+ and wxWindow::TransferDataFromWindow
and, if they both return @true, closes the dialog with @c wxID_OK return
code.
void SetAffirmativeId(int id);
/**
- Sets the identifier of the button which should work like the standard
+ Sets the identifier of the button which should work like the standard
@c CANCEL button in this dialog. When the button with this id is
- clicked, the dialog is closed. Also, when the user presses @c ESC
+ clicked, the dialog is closed. Also, when the user presses @c ESC
key in the dialog or closes the dialog using the close button in the title bar,
this is mapped to the click of the button with the specified id.
- By default, the escape id is the special value @c wxID_ANY meaning that
+ By default, the escape id is the special value @c wxID_ANY meaning that
@c wxID_CANCEL button is used if it's present in the dialog and
- otherwise the button with GetAffirmativeId()
+ otherwise the button with GetAffirmativeId()
is used. Another special value for @e id is @c wxID_NONE meaning that
@c ESC presses should be ignored. If any other value is given, it
is interpreted as the id of the button to map the escape key to.
/**
Sets the icon for this dialog.
- @param icon
+ @param icon
The icon to associate with this dialog.
*/
void SetIcon(const wxIcon& icon);
/**
Sets the icons for this dialog.
- @param icons
+ @param icons
The icons to associate with this dialog.
*/
void SetIcons(const wxIconBundle& icons);
control
until the dialog is hidden) or modeless (control returns immediately).
- @param flag
+ @param flag
If @true, the dialog will be modal, otherwise it will be modeless.
*/
void SetModal(bool flag);
/**
Sets the return code for this window.
- @param retCode
+ @param retCode
The integer return code, usually a control identifier.
@remarks A return code is normally associated with a modal dialog, where
/**
Hides or shows the dialog.
- @param show
+ @param show
If @true, the dialog box is shown and brought to the front;
otherwise the box is hidden. If @false and the dialog is
modal, control is returned to the calling program.
/**
@class wxDialogLayoutAdapter
@wxheader{dialog.h}
-
+
This abstract class is the base for classes that help wxWidgets peform run-time
- layout adaptation of dialogs. Principally,\r
+ layout adaptation of dialogs. Principally,
this is to cater for small displays by making part of the dialog scroll, but
- the application developer may find other\r
- uses for layout adaption.\r
-
- By default, there is one instance of wxStandardDialogLayoutAdapter\r
+ the application developer may find other
+ uses for layout adaption.
+
+ By default, there is one instance of wxStandardDialogLayoutAdapter
which can perform adaptation for most custom dialogs and dialogs with book
- controls\r
- such as wxPropertySheetDialog.\r
-
+ controls
+ such as wxPropertySheetDialog.
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@ref overview_autoscrollingdialogs "Automatic scrolling dialogs"
*/
-class wxDialogLayoutAdapter
+class wxDialogLayoutAdapter
{
public:
/**
/**
Override this to perform layout adaptation, such as making parts of the dialog
- scroll and resizing the dialog to fit the display.\r
+ scroll and resizing the dialog to fit the display.
Normally this function will be called just before the dialog is shown.
*/
bool DoLayoutAdaptation(wxDialog* dialog);
/**
@class wxDialUpManager
@wxheader{dialup.h}
-
+
This class encapsulates functions dealing with verifying the connection status
of the workstation (connected to the Internet via a direct connection,
connected through a modem or not connected at all) and to establish this
connection if possible/required (i.e. in the case of the modem).
-
+
The program may also wish to be notified about the change in the connection
status (for example, to perform some action when the user connects to the
network the next time or, on the contrary, to stop receiving data from the net
when the user hangs up the modem). For this, you need to use one of the event
macros described below.
-
+
This class is different from other wxWidgets classes in that there is at most
- one instance of this class in the program accessed via
+ one instance of this class in the program accessed via
wxDialUpManager::Create and you can't
create the objects of this class directly.
-
+
@library{wxcore}
@category{net}
-
+
@seealso
@ref overview_sampledialup "dialup sample", wxDialUpEvent
*/
-class wxDialUpManager
+class wxDialUpManager
{
public:
/**
~wxDialUpManager();
/**
- Cancel dialing the number initiated with Dial()
+ Cancel dialing the number initiated with Dial()
with async parameter equal to @true.
Note that this won't result in DISCONNECTED event being sent.
/**
Dial the given ISP, use @e username and @e password to authenticate.
- The parameters are only used under Windows currently, for Unix you should use
+ The parameters are only used under Windows currently, for Unix you should use
SetConnectCommand() to customize this
functions behaviour.
void DisableAutoCheckOnlineStatus();
/**
- Enable automatic checks for the connection status and sending of
+ Enable automatic checks for the connection status and sending of
@c wxEVT_DIALUP_CONNECTED/wxEVT_DIALUP_DISCONNECTED events. The interval
parameter is only for Unix where we do the check manually and specifies how
often should we repeat the check (each minute by default). Under Windows, the
/**
Returns @true if the computer is connected to the network: under Windows,
this just means that a RAS connection exists, under Unix we check that
- the "well-known host" (as specified by
+ the "well-known host" (as specified by
wxDialUpManager::SetWellKnownHost) is reachable.
*/
bool IsOnline();
/**
@class wxDialUpEvent
@wxheader{dialup.h}
-
- This is the event class for the dialup events sent by
+
+ This is the event class for the dialup events sent by
wxDialUpManager.
-
+
@library{wxcore}
@category{events}
*/
/**
@class wxDirTraverser
@wxheader{dir.h}
-
+
wxDirTraverser is an abstract interface which must be implemented by objects
passed to wxDir::Traverse function.
-
+
Example of use (this works almost like wxDir::GetAllFiles):
-
+
@code
class wxDirTraverserSimple : public wxDirTraverser
{
public:
wxDirTraverserSimple(wxArrayString& files) : m_files(files) { }
-
+
virtual wxDirTraverseResult OnFile(const wxString& filename)
{
m_files.Add(filename);
return wxDIR_CONTINUE;
}
-
+
virtual wxDirTraverseResult OnDir(const wxString& WXUNUSED(dirname))
{
return wxDIR_CONTINUE;
}
-
+
private:
wxArrayString& m_files;
};
-
+
// get the names of all files in the array
wxArrayString files;
wxDirTraverserSimple traverser(files);
-
+
wxDir dir(dirname);
dir.Traverse(traverser);
@endcode
-
+
@library{wxbase}
@category{file}
*/
-class wxDirTraverser
+class wxDirTraverser
{
public:
/**
- This function is called for each directory. It may return @c wxSIR_STOP
+ This function is called for each directory. It may return @c wxSIR_STOP
to abort traversing completely, @c wxDIR_IGNORE to skip this directory but
continue with others or @c wxDIR_CONTINUE to enumerate all files and
subdirectories in this directory.
/**
This function is called for each file. It may return @c wxDIR_STOP to abort
- traversing (for example, if the file being searched is found) or
+ traversing (for example, if the file being searched is found) or
@c wxDIR_CONTINUE to proceed.
This is a pure virtual function and must be implemented in the derived class.
/**
This function is called for each directory which we failed to open for
enumerating. It may return @c wxSIR_STOP to abort traversing completely,
- @c wxDIR_IGNORE to skip this directory but continue with others or
+ @c wxDIR_IGNORE to skip this directory but continue with others or
@c wxDIR_CONTINUE to retry opening this directory once again.
The base class version always returns @c wxDIR_IGNORE.
/**
@class wxDir
@wxheader{dir.h}
-
+
wxDir is a portable equivalent of Unix open/read/closedir functions which
allow enumerating of the files in a directory. wxDir allows to enumerate files
as well as directories.
-
- wxDir also provides a flexible way to enumerate files recursively using
- wxDir::Traverse or a simpler
+
+ wxDir also provides a flexible way to enumerate files recursively using
+ wxDir::Traverse or a simpler
wxDir::GetAllFiles function.
-
+
Example of use:
-
+
@code
wxDir dir(wxGetCwd());
-
+
if ( !dir.IsOpened() )
{
// deal with the error here - wxDir would already log an error message
// explaining the exact reason of the failure
return;
}
-
+
puts("Enumerating object files in current directory:");
-
+
wxString filename;
-
+
bool cont = dir.GetFirst(, filespec, flags);
while ( cont )
{
printf("%s\n", filename.c_str());
-
+
cont = dir.GetNext();
}
@endcode
-
+
@library{wxbase}
@category{file}
*/
-class wxDir
+class wxDir
{
public:
//@{
/**
- Opens the directory for enumeration, use IsOpened()
+ Opens the directory for enumeration, use IsOpened()
to test for errors.
*/
wxDir();
- wxDir(const wxString& dir);
+ wxDir(const wxString& dir);
//@}
/**
or an empty string if there are no files matching it.
The @e flags parameter may or may not include @c wxDIR_FILES, the
- function always behaves as if it were specified. By default, @e flags
+ function always behaves as if it were specified. By default, @e flags
includes @c wxDIR_DIRS and so the function recurses into the subdirectories
but if this flag is not specified, the function restricts the search only to
the directory @e dirname itself.
int flags = wxDIR_DEFAULT);
/**
- The function appends the names of all the files under directory @e dirname
+ The function appends the names of all the files under directory @e dirname
to the array @e files (note that its old content is preserved). Only files
matching the @e filespec are taken, with empty spec matching all the files.
wxArrayString* filesSkipped = @NULL);
/**
- Returns @true if the directory contains any files matching the given
+ Returns @true if the directory contains any files matching the given
@e filespec. If @e filespec is empty, look for any files at all. In any
case, even hidden files are taken into account.
*/
bool HasSubDirs(const wxString& dirspec = wxEmptyString);
/**
- Returns @true if the directory was successfully opened by a previous call to
+ Returns @true if the directory was successfully opened by a previous call to
Open().
*/
bool IsOpened();
/**
Enumerate all files and directories under the given directory recursively
- calling the element of the provided wxDirTraverser
+ calling the element of the provided wxDirTraverser
object for each of them.
- More precisely, the function will really recurse into subdirectories if
+ More precisely, the function will really recurse into subdirectories if
@e flags contains @c wxDIR_DIRS flag. It will ignore the files (but
still possibly recurse into subdirectories) if @c wxDIR_FILES flag is
given.
/**
@class wxGenericDirCtrl
@wxheader{dirctrl.h}
-
+
This control can be used to place a directory listing (with optional files) on
an arbitrary window.
-
+
The control contains a wxTreeCtrl window representing the directory
hierarchy, and optionally, a wxChoice window containing a list of filters.
-
+
@library{wxbase}
@category{ctrl}
@appearance{genericdirctrl.png}
/**
Main constructor.
- @param parent
+ @param parent
Parent window.
- @param id
+ @param id
Window identifier.
- @param dir
+ @param dir
Initial folder.
- @param pos
+ @param pos
Position.
- @param size
+ @param size
Size.
- @param style
+ @param style
Window style. Please see wxGenericDirCtrl for a list of possible styles.
- @param filter
+ @param filter
A filter string, using the same syntax as that for wxFileDialog. This may be
empty if filters
are not being used.
Example: "All files (*.*)|*.*|JPEG files (*.jpg)|*.jpg"
- @param defaultFilter
+ @param defaultFilter
The zero-indexed default filter setting.
- @param name
+ @param name
The window name.
*/
wxGenericDirCtrl();
- wxGenericDirCtrl(wxWindow* parent, const wxWindowID id = -1,
- const wxString& dir = wxDirDialogDefaultFolderStr,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDIRCTRL_3D_INTERNAL|wxBORDER_SUNKEN,
- const wxString& filter = wxEmptyString,
- int defaultFilter = 0,
- const wxString& name = wxTreeCtrlNameStr);
+ wxGenericDirCtrl(wxWindow* parent, const wxWindowID id = -1,
+ const wxString& dir = wxDirDialogDefaultFolderStr,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDIRCTRL_3D_INTERNAL|wxBORDER_SUNKEN,
+ const wxString& filter = wxEmptyString,
+ int defaultFilter = 0,
+ const wxString& name = wxTreeCtrlNameStr);
//@}
/**
void SetPath(const wxString& path);
/**
- @param show
+ @param show
If @true, hidden folders and files will be displayed by the
control. If @false, they will not be displayed.
*/
/**
@class wxDirDialog
@wxheader{dirdlg.h}
-
+
This class represents the directory chooser dialog.
-
+
@beginStyleTable
@style{wxDD_DEFAULT_STYLE}:
Equivalent to a combination of wxDEFAULT_DIALOG_STYLE and
Change the current working directory to the directory chosen by the
user.
@endStyleTable
-
+
@library{wxcore}
@category{cmndlg}
-
+
@seealso
@ref overview_wxdirdialogoverview "wxDirDialog overview", wxFileDialog
*/
Constructor. Use ShowModal() to show
the dialog.
- @param parent
+ @param parent
Parent window.
- @param message
+ @param message
Message to show on the dialog.
- @param defaultPath
+ @param defaultPath
The default path, or the empty string.
- @param style
+ @param style
The dialog style. See wxDirDialog
- @param pos
+ @param pos
Dialog position. Ignored under Windows.
- @param size
+ @param size
Dialog size. Ignored under Windows.
- @param name
+ @param name
The dialog name, not used.
*/
wxDirDialog(wxWindow* parent,
Pops up a directory selector dialog. The arguments have the same meaning as
those of wxDirDialog::wxDirDialog(). The message is displayed at the top,
and the default_path, if specified, is set as the initial selection.
-
+
The application must check for an empty return value (if the user pressed
Cancel). For example:
@code
/**
@class wxDisplay
@wxheader{display.h}
-
+
Determines the sizes and locations of displays connected to the system.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxClientDisplayRect, wxDisplaySize, wxDisplaySizeMM
*/
-class wxDisplay
+class wxDisplay
{
public:
/**
Constructor, setting up a wxDisplay instance with the specified display.
- @param index
+ @param index
The index of the display to use. This must be non-negative
and lower than the value returned by GetCount().
*/
If wxDefaultVideoMode is passed in as the mode parameter,
the defined behaviour is that wxDisplay will reset the video
- mode to the default mode used by the display. On Windows,
+ mode to the default mode used by the display. On Windows,
the behavior is normal. However, there are differences on other
platforms. On Unix variations using X11 extensions it should
- behave as defined, but some irregularities may occur.
+ behave as defined, but some irregularities may occur.
On wxMac passing in wxDefaultVideoMode as the mode
- parameter does nothing. This happens because carbon
+ parameter does nothing. This happens because carbon
no longer has access to DMUseScreenPrefs, an undocumented
function that changed the video mode to the system
default by using the system's 'scrn' resource.
int GetDepth();
/**
- Returns the index of the display on which the given point lies. Returns
+ Returns the index of the display on which the given point lies. Returns
@c wxNOT_FOUND if the point is not on any connected display.
- @param pt
+ @param pt
The point to locate.
*/
static int GetFromPoint(const wxPoint& pt);
Returns @c wxNOT_FOUND if the window is not on any connected display.
- @param win
+ @param win
The window to locate.
*/
static int GetFromWindow(const wxWindow* win);
/**
Fills and returns an array with all the video modes that
- are supported by this display, or video modes that are
+ are supported by this display, or video modes that are
supported by this display and match the mode parameter
(if mode is not wxDefaultVideoMode).
*/
/**
@class wxTextDropTarget
@wxheader{dnd.h}
-
+
A predefined drop target for dealing with text data.
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
@ref overview_wxdndoverview "Drag and drop overview", wxDropSource,
wxDropTarget, wxFileDropTarget
/**
Override this function to receive dropped text.
- @param x
+ @param x
The x coordinate of the mouse.
- @param y
+ @param y
The y coordinate of the mouse.
- @param data
+ @param data
The data being dropped: a wxString.
*/
virtual bool OnDropText(wxCoord x, wxCoord y,
/**
@class wxDropTarget
@wxheader{dnd.h}
-
+
This class represents a target for a drag and drop operation. A wxDataObject
can be associated with it and by default, this object will be filled with the
data from the
drag source, if the data formats supported by the data object match the drag
- source data
+ source data
format.
-
+
There are various virtual handler functions defined in this class which may be
overridden
to give visual feedback or react in a more fine-tuned way, e.g. by not
calls is
wxDropTarget::OnEnter, possibly many times wxDropTarget::OnDragOver,
wxDropTarget::OnDrop and finally wxDropTarget::OnData.
-
+
See @ref overview_wxdndoverview "Drag and drop overview" and @ref
overview_wxdataobjectoverview "wxDataObject overview"
for more information.
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
wxDropSource, wxTextDropTarget, wxFileDropTarget, wxDataFormat, wxDataObject
*/
-class wxDropTarget
+class wxDropTarget
{
public:
/**
/**
This method may only be called from within OnData().
- By default, this method copies the data from the drop source to the
+ By default, this method copies the data from the drop source to the
wxDataObject associated with this drop target,
calling its wxDataObject::SetData method.
*/
wxDragResult def);
/**
- Called when the mouse is being dragged over the drop target. By default,
+ Called when the mouse is being dragged over the drop target. By default,
this calls functions return the suggested return value @e def.
- @param x
+ @param x
The x coordinate of the mouse.
- @param y
+ @param y
The y coordinate of the mouse.
- @param def
+ @param def
Suggested value for return value. Determined by SHIFT or CONTROL key states.
@returns Returns the desired operation or wxDragNone. This is used for
Called when the user drops a data object on the target. Return @false to veto
the operation.
- @param x
+ @param x
The x coordinate of the mouse.
- @param y
+ @param y
The y coordinate of the mouse.
@returns Return @true to accept the data, @false to veto the operation.
Called when the mouse enters the drop target. By default, this calls
OnDragOver().
- @param x
+ @param x
The x coordinate of the mouse.
- @param y
+ @param y
The y coordinate of the mouse.
- @param def
+ @param def
Suggested default for return value. Determined by SHIFT or CONTROL key states.
@returns Returns the desired operation or wxDragNone. This is used for
virtual void OnLeave();
/**
- Sets the data wxDataObject associated with the
+ Sets the data wxDataObject associated with the
drop target and deletes any previously associated data object.
*/
void SetDataObject(wxDataObject* data);
/**
@class wxDropSource
@wxheader{dnd.h}
-
+
This class represents a source for a drag and drop operation.
-
+
See @ref overview_wxdndoverview "Drag and drop overview" and @ref
- overview_wxdataobjectoverview "wxDataObject overview"
+ overview_wxdataobjectoverview "wxDataObject overview"
for more information.
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
wxDropTarget, wxTextDropTarget, wxFileDropTarget
*/
-class wxDropSource
+class wxDropSource
{
public:
//@{
/**
The constructors for wxDataObject.
- If you use the constructor without @e data parameter you must call
+ If you use the constructor without @e data parameter you must call
SetData() later.
Note that the exact type of @e iconCopy and subsequent parameters differs
You should use the macro wxDROP_ICON in portable
programs instead of directly using either of these types.
- @param win
+ @param win
The window which initiates the drag and drop operation.
- @param iconCopy
+ @param iconCopy
The icon or cursor used for feedback for copy operation.
- @param iconMove
+ @param iconMove
The icon or cursor used for feedback for move operation.
- @param iconNone
+ @param iconNone
The icon or cursor used for feedback when operation can't be done.
*/
wxDropSource(wxWindow* win = @NULL,
const wxIconOrCursor& iconCopy = wxNullIconOrCursor,
const wxIconOrCursor& iconMove = wxNullIconOrCursor,
const wxIconOrCursor& iconNone = wxNullIconOrCursor);
- wxDropSource(wxDataObject& data, wxWindow* win = @NULL,
- const wxIconOrCursor& iconCopy = wxNullIconOrCursor,
- const wxIconOrCursor& iconMove = wxNullIconOrCursor,
- const wxIconOrCursor& iconNone = wxNullIconOrCursor);
+ wxDropSource(wxDataObject& data, wxWindow* win = @NULL,
+ const wxIconOrCursor& iconCopy = wxNullIconOrCursor,
+ const wxIconOrCursor& iconMove = wxNullIconOrCursor,
+ const wxIconOrCursor& iconNone = wxNullIconOrCursor);
//@}
/**
the drag-and-drop operation which will terminate when the user releases the
mouse.
- @param flags
+ @param flags
If wxDrag_AllowMove is included in the flags, data may
be moved and not only copied (default). If wxDrag_DefaultMove is
specified (which includes the previous flag), this is even the default
operation
- @returns Returns the operation requested by the user, may be wxDragCopy,
+ @returns Returns the operation requested by the user, may be wxDragCopy,
wxDragMove, wxDragLink, wxDragCancel or wxDragNone if
an error occurred.
*/
not be too
slow.
- @param effect
+ @param effect
The effect to implement. One of wxDragCopy, wxDragMove, wxDragLink and
wxDragNone.
- @param scrolling
+ @param scrolling
@true if the window is scrolling. MSW only.
@returns Return @false if you want default feedback, or @true if you
/**
Set the icon to use for a certain drag result.
- @param res
+ @param res
The drag result to set the icon for.
- @param cursor
+ @param cursor
The ion to show when this drag result occurs.
*/
void SetCursor(wxDragResult res, const wxCursor& cursor);
/**
- Sets the data wxDataObject associated with the
+ Sets the data wxDataObject associated with the
drop source. This will not delete any previously associated data.
*/
void SetData(wxDataObject& data);
/**
@class wxFileDropTarget
@wxheader{dnd.h}
-
+
This is a @ref overview_wxdroptarget "drop target" which accepts files (dragged
from File Manager or Explorer).
-
+
@library{wxcore}
@category{dnd}
-
+
@seealso
@ref overview_wxdndoverview "Drag and drop overview", wxDropSource,
wxDropTarget, wxTextDropTarget
/**
Override this function to receive dropped files.
- @param x
+ @param x
The x coordinate of the mouse.
- @param y
+ @param y
The y coordinate of the mouse.
- @param filenames
+ @param filenames
An array of filenames.
*/
virtual bool OnDropFiles(wxCoord x, wxCoord y,
This macro creates either a cursor (MSW) or an icon (elsewhere) with the given
name. Under MSW, the cursor is loaded from the resource file and the icon is
loaded from XPM file under other platforms.
-
+
This macro should be used with
@ref wxDropSource::wxdropsource "wxDropSource constructor".
*/
/**
@class wxDocMDIParentFrame
@wxheader{docmdi.h}
-
+
The wxDocMDIParentFrame class provides a default top-level frame for
applications using the document/view framework. This class can only be used for
MDI parent frames.
-
+
It cooperates with the wxView, wxDocument,
wxDocManager and wxDocTemplates classes.
-
+
See the example application in @c samples/docview.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@ref overview_docviewoverview "Document/view overview", wxMDIParentFrame
*/
Constructor.
*/
wxDocMDIParentFrame();
- wxDocMDIParentFrame(wxDocManager* manager, wxFrame * parent,
- wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = "frame");
+ wxDocMDIParentFrame(wxDocManager* manager, wxFrame * parent,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = "frame");
//@}
/**
/**
@class wxDocMDIChildFrame
@wxheader{docmdi.h}
-
+
The wxDocMDIChildFrame class provides a default frame for displaying documents
on separate windows. This class can only be used for MDI child frames.
-
+
The class is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocument,
wxDocManager and wxDocTemplate classes.
-
+
See the example application in @c samples/docview.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@ref overview_docviewoverview "Document/view overview", wxMDIChildFrame
*/
/**
@class wxDocTemplate
@wxheader{docview.h}
-
+
The wxDocTemplate class is used to model the relationship between a
document class and a view class.
-
+
@library{wxcore}
@category{dvf}
-
+
@seealso
@ref overview_wxdoctemplateoverview "wxDocTemplate overview", wxDocument, wxView
*/
/**
@class wxDocManager
@wxheader{docview.h}
-
+
The wxDocManager class is part of the document/view framework supported by
wxWidgets,
and cooperates with the wxView, wxDocument
and wxDocTemplate classes.
-
+
@library{wxcore}
@category{dvf}
-
+
@seealso
@ref overview_wxdocmanageroverview "wxDocManager overview", wxDocument, wxView,
wxDocTemplate, wxFileHistory
Appends the files in the history list, to the given menu only.
*/
void FileHistoryAddFilesToMenu();
- void FileHistoryAddFilesToMenu(wxMenu* menu);
+ void FileHistoryAddFilesToMenu(wxMenu* menu);
//@}
/**
template).
This function is used in CreateDocument().
- @param templates
+ @param templates
Pointer to an array of templates from which to choose a desired template.
- @param noTemplates
+ @param noTemplates
Number of templates being pointed to by the templates pointer.
- @param sort
- If more than one template is passed in in templates,
- then this parameter indicates whether the list of templates that the user
- will have to choose from is sorted or not when shown the choice box dialog.
+ @param sort
+ If more than one template is passed in in templates,
+ then this parameter indicates whether the list of templates that the user
+ will have to choose from is sorted or not when shown the choice box dialog.
Default is @false.
*/
wxDocTemplate * SelectDocumentType(wxDocTemplate ** templates,
those relevant to the document in question, and often there will only be one
such.
- @param templates
+ @param templates
Pointer to an array of templates from which to choose a desired template.
- @param noTemplates
+ @param noTemplates
Number of templates being pointed to by the templates pointer.
- @param sort
- If more than one template is passed in in templates,
- then this parameter indicates whether the list of templates that the user
- will have to choose from is sorted or not when shown the choice box dialog.
+ @param sort
+ If more than one template is passed in in templates,
+ then this parameter indicates whether the list of templates that the user
+ will have to choose from is sorted or not when shown the choice box dialog.
Default is @false.
*/
wxDocTemplate * SelectViewType(wxDocTemplate ** templates,
/**
@class wxView
@wxheader{docview.h}
-
+
The view class can be used to model the viewing and editing component of
an application's file-based data. It is part of the document/view framework
supported by wxWidgets,
and cooperates with the wxDocument, wxDocTemplate
and wxDocManager classes.
-
+
@library{wxcore}
@category{dvf}
-
+
@seealso
@ref overview_wxviewoverview "wxView overview", wxDocument, wxDocTemplate,
wxDocManager
/**
@class wxDocChildFrame
@wxheader{docview.h}
-
+
The wxDocChildFrame class provides a default frame for displaying documents
on separate windows. This class can only be used for SDI (not MDI) child frames.
-
+
The class is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocument,
wxDocManager and wxDocTemplate classes.
-
+
See the example application in @c samples/docview.
-
+
@library{wxcore}
@category{dvf}
-
+
@seealso
@ref overview_docviewoverview "Document/view overview", wxFrame
*/
/**
@class wxDocParentFrame
@wxheader{docview.h}
-
+
The wxDocParentFrame class provides a default top-level frame for
applications using the document/view framework. This class can only be used for
SDI (not MDI) parent frames.
-
+
It cooperates with the wxView, wxDocument,
wxDocManager and wxDocTemplates classes.
-
+
See the example application in @c samples/docview.
-
+
@library{wxcore}
@category{dvf}
-
+
@seealso
@ref overview_docviewoverview "Document/view overview", wxFrame
*/
Constructor.
*/
wxDocParentFrame();
- wxDocParentFrame(wxDocManager* manager, wxFrame * parent,
- wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = "frame");
+ wxDocParentFrame(wxDocManager* manager, wxFrame * parent,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = "frame");
//@}
/**
/**
@class wxDocument
@wxheader{docview.h}
-
+
The document class can be used to model an application's file-based
data. It is part of the document/view framework supported by wxWidgets,
and cooperates with the wxView, wxDocTemplate
and wxDocManager classes.
-
+
@library{wxcore}
@category{dvf}
-
+
@seealso
@ref overview_wxdocumentoverview "wxDocument overview", wxView, wxDocTemplate,
wxDocManager
was configured.
*/
virtual istream LoadObject(istream& stream);
- virtual wxInputStream LoadObject(wxInputStream& stream);
+ virtual wxInputStream LoadObject(wxInputStream& stream);
//@}
/**
was configured.
*/
virtual ostream SaveObject(ostream& stream);
- virtual wxOutputStream SaveObject(wxOutputStream& stream);
+ virtual wxOutputStream SaveObject(wxOutputStream& stream);
//@}
/**
/**
@class wxFileHistory
@wxheader{docview.h}
-
+
The wxFileHistory encapsulates a user interface convenience, the
list of most recently visited files as shown on a menu (usually the File menu).
-
+
wxFileHistory can manage one or more file menus. More than one menu may be
required
in an MDI application, where the file history should appear on each MDI child
menu
as well as the MDI parent frame.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@ref overview_wxfilehistoryoverview "wxFileHistory overview", wxDocManager
*/
Appends the files in the history list, to the given menu only.
*/
void AddFilesToMenu();
- void AddFilesToMenu(wxMenu* menu);
+ void AddFilesToMenu(wxMenu* menu);
//@}
/**
/**
@class wxDragImage
@wxheader{dragimag.h}
-
+
This class is used when you wish to drag an object on the screen,
and a simple cursor is not enough.
-
+
On Windows, the Win32 API is used to achieve smooth dragging. On other
platforms,
wxGenericDragImage is used. Applications may also prefer to use
wxGenericDragImage on Windows, too.
-
+
@b wxPython note: wxPython uses wxGenericDragImage on all platforms, but
uses the wxDragImage name.
-
+
To use this class, when you wish to start dragging an image, create a
wxDragImage
object and store it somewhere you can access it as the drag progresses.
during the drag (for example, highlight an item as in the dragimag sample),
first call Hide,
update the screen, call Move, and then call Show.
-
+
You can drag within one window, or you can use full-screen dragging
either across the whole screen, or just restricted to one area
of the screen to save resources. If you want the user to drag between
two windows, then you will need to use full-screen dragging.
-
+
If you wish to draw the image yourself, use wxGenericDragImage and
- override wxDragImage::DoDrawImage and
+ override wxDragImage::DoDrawImage and
wxDragImage::GetImageRect.
-
+
Please see @c samples/dragimag for an example.
-
+
@library{wxcore}
@category{FIXME}
*/
wxGenericDragImage, and can be used when the application
supplies DoDrawImage() and GetImageRect().
- @param image
+ @param image
Icon or bitmap to be used as the drag image. The bitmap can
have a mask.
- @param text
+ @param text
Text used to construct a drag image.
- @param cursor
+ @param cursor
Optional cursor to combine with the image.
- @param hotspot
+ @param hotspot
This parameter is deprecated.
- @param treeCtrl
+ @param treeCtrl
Tree control for constructing a tree drag image.
- @param listCtrl
+ @param listCtrl
List control for constructing a list drag image.
- @param id
+ @param id
Tree or list control item id.
*/
wxDragImage();
- wxDragImage(const wxBitmap& image,
- const wxCursor& cursor = wxNullCursor);
- wxDragImage(const wxIcon& image,
- const wxCursor& cursor = wxNullCursor);
- wxDragImage(const wxString& text,
- const wxCursor& cursor = wxNullCursor);
- wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
- wxDragImage(const wxListCtrl& treeCtrl, long id);
- wxDragImage(const wxCursor& cursor = wxNullCursor);
+ wxDragImage(const wxBitmap& image,
+ const wxCursor& cursor = wxNullCursor);
+ wxDragImage(const wxIcon& image,
+ const wxCursor& cursor = wxNullCursor);
+ wxDragImage(const wxString& text,
+ const wxCursor& cursor = wxNullCursor);
+ wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
+ wxDragImage(const wxListCtrl& treeCtrl, long id);
+ wxDragImage(const wxCursor& cursor = wxNullCursor);
//@}
//@{
to specify the bounding area. This form is equivalent to using the first form,
but more convenient than working out the bounding rectangle explicitly.
- You need to then call Show()
+ You need to then call Show()
and Move() to show the image on the screen.
Call EndDrag() when the drag has finished.
Note that this call automatically calls CaptureMouse.
- @param hotspot
+ @param hotspot
The location of the drag position relative to the upper-left corner
of the image.
- @param window
+ @param window
The window that captures the mouse, and within which the dragging
is limited unless fullScreen is @true.
- @param boundingWindow
+ @param boundingWindow
In the second form of the function, specifies the
area within which the drag occurs.
- @param fullScreen
+ @param fullScreen
If @true, specifies that the drag will be visible over the full
screen, or over as much of the screen as is specified by rect. Note that the
mouse will
still be captured in window.
- @param rect
+ @param rect
If non-@NULL, specifies the rectangle (in screen coordinates) that
bounds the dragging operation. Specifying this can make the operation more
efficient
bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
bool fullScreen = @false,
wxRect* rect = @NULL);
- bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
- wxWindow* boundingWindow);
+ bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
+ wxWindow* boundingWindow);
//@}
/**
top-left corner at the given point.
This function is available in wxGenericDragImage only, and may be overridden
- (together with
+ (together with
wxDragImage::DoDrawImage) to provide a virtual drawing capability.
*/
virtual wxRect GetImageRect(const wxPoint& pos);
/**
Hides the image. You may wish to call this before updating the window
- contents (perhaps highlighting an item). Then call Move()
+ contents (perhaps highlighting an item). Then call Move()
and Show().
*/
bool Hide();
/**
- Call this to move the image to a new position. The image will only be shown if
+ Call this to move the image to a new position. The image will only be shown if
Show() has been called previously (for example
at the start of the drag).
/**
@class wxArrayT
@wxheader{dynarray.h}
-
+
This section describes the so called @e dynamic arrays. This is a C
array-like type safe data structure i.e. the member access time is constant
(and not
automatically expand the array but provokes an assertion failure instead in
debug build and does nothing (except possibly crashing your program) in the
release build.
-
+
The array classes were designed to be reasonably efficient, both in terms of
run-time speed and memory consumption and the executable size. The speed of
array item access is, of course, constant (independent of the number of
you may find some useful hints about optimizing wxArray memory usage. As for
executable size, all
wxArray functions are inline, so they do not take @e any space at all.
-
+
wxWidgets has three different kinds of array. All of them derive from
wxBaseArray class which works with untyped data and can not be used directly.
The standard macros WX_DEFINE_ARRAY(), WX_DEFINE_SORTED_ARRAY() and
with a new name. In fact, these names are "template" names and each usage of one
of the macros mentioned above creates a template specialization for the given
element type.
-
+
wxArray is suitable for storing integer types and pointers which it does not
treat as objects in any way, i.e. the element pointed to by the pointer is not
deleted when the element is removed from the array. It should be noted that
runtime assertion failure, however declaring a wxArray of floats will not (on
the machines where sizeof(float) = sizeof(long)), yet it will @b not work,
please use wxObjArray for storing floats and doubles.
-
+
wxSortedArray is a wxArray variant which should be used when searching in the
array is a frequently used operation. It requires you to define an additional
function for comparing two elements of the array element type and always stores
huge performance improvements compared to wxArray. Finally, it should be
noticed that, as wxArray, wxSortedArray can be only used for storing integral
types or pointers.
-
+
wxObjArray class treats its elements like "objects". It may delete them when
they are removed from the array (invoking the correct destructor) and copies
them using the objects copy constructor. In order to implement this behaviour
from a point where the full (as opposed to 'forward') declaration of the array
elements class is in scope. As it probably sounds very complicated here is an
example:
-
+
@code
#include wx/dynarray.h
-
+
// we must forward declare the array because it is used inside the class
// declaration
class MyDirectory;
class MyFile;
-
+
// this defines two new types: ArrayOfDirectories and ArrayOfFiles which can be
// now used as shown below
WX_DECLARE_OBJARRAY(MyDirectory, ArrayOfDirectories);
WX_DECLARE_OBJARRAY(MyFile, ArrayOfFiles);
-
+
class MyDirectory
{
...
ArrayOfDirectories m_subdirectories; // all subdirectories
ArrayOfFiles m_files; // all files in this directory
};
-
+
...
-
+
// now that we have MyDirectory declaration in scope we may finish the
// definition of ArrayOfDirectories -- note that this expands into some C++
// code and so should only be compiled once (i.e., don't put this in the
// header, but into a source file or you will get linking errors)
#include wx/arrimpl.cpp // this is a magic incantation which must be done!
WX_DEFINE_OBJARRAY(ArrayOfDirectories);
-
+
// that's all!
@endcode
-
+
It is not as elegant as writing
-
+
@code
typedef std::vectorMyDirectory ArrayOfDirectories;
@endcode
-
+
but is not that complicated and allows the code to be compiled with any, however
dumb, C++ compiler in the world.
-
- Remember to include wx/arrimpl.cpp just before each WX_DEFINE_OBJARRAY
+
+ Remember to include wx/arrimpl.cpp just before each WX_DEFINE_OBJARRAY
ocurrence in your code, even if you have several in the same file.
-
+
Things are much simpler for wxArray and wxSortedArray however: it is enough
just to write
-
+
@code
WX_DEFINE_ARRAY_INT(int, ArrayOfInts);
WX_DEFINE_SORTED_ARRAY_INT(int, ArrayOfSortedInts);
@endcode
-
+
i.e. there is only one @c DEFINE macro and no need for separate
- @c DECLARE one. For the arrays of the primitive types, the macros
+ @c DECLARE one. For the arrays of the primitive types, the macros
@c WX_DEFINE_ARRAY_CHAR/SHORT/INT/SIZE_T/LONG/DOUBLE should be used
depending on the sizeof of the values (notice that storing values of smaller
type, e.g. shorts, in an array of larger one, e.g. @c ARRAY_INT, does
not work on all architectures!).
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxcontaineroverview "Container classes overview", wxListT,
wxVectorT
*/
-class wxArray<T>
+class wxArray<T>
{
public:
//@{
append a lot of items.
*/
void Add(T item, size_t copies = 1);
- size_t Add(T item);
- void Add(T * item);
- void Add(T & item, size_t copies = 1);
+ size_t Add(T item);
+ void Add(T * item);
+ void Add(T & item, size_t copies = 1);
//@}
/**
Be aware that you will set out the order of the array if you give a wrong
position.
- This function is useful in conjunction with
+ This function is useful in conjunction with
wxArray::IndexForInsert for a common operation
of "insert only if not found".
*/
should return a negative, zero or positive value according to whether the first
element passed to it is less than, equal to or greater than the second one.
*/
- wxArray();
- wxObjArray();
- wxSortedArray();
+ wxArray();
+ wxObjArray();
+ wxSortedArray();
//@}
/**
in the array.
*/
int Index(T& item, bool searchFromEnd = @false);
- int Index(T& item);
+ int Index(T& item);
//@}
/**
You have to do extra work to know if the @e item already exists in array.
- This function is useful in conjunction with
+ This function is useful in conjunction with
wxArray::AddAt for a common operation
of "insert only if not found".
*/
between the overloaded versions of this function.
*/
void Insert(T item, size_t n, size_t copies = 1);
- void Insert(T * item, size_t n);
- void Insert(T & item, size_t n, size_t copies = 1);
+ void Insert(T * item, size_t n);
+ void Insert(T & item, size_t n, size_t copies = 1);
//@}
/**
See also WX_CLEAR_ARRAY macro which deletes all
elements of a wxArray (supposed to contain pointers).
*/
- Remove(T item);
+ Remove(T item);
/**
Removes @e count elements starting at @e index from the array. When an
See also WX_CLEAR_ARRAY macro which deletes all
elements of a wxArray (supposed to contain pointers).
*/
- RemoveAt(size_t index, size_t count = 1);
+ RemoveAt(size_t index, size_t count = 1);
/**
WX_CLEAR_ARRAY
You must use WX_DEFINE_OBJARRAY macro to define
the array class - otherwise you would get link errors.
*/
- WX_DECLARE_OBJARRAY(T, name);
- WX_DECLARE_EXPORTED_OBJARRAY(T, name);
- WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name);
+ WX_DECLARE_OBJARRAY(T, name);
+ WX_DECLARE_EXPORTED_OBJARRAY(T, name);
+ WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name);
//@}
//@{
wxArrayInt,
@b wxArrayLong, @b wxArrayShort, @b wxArrayDouble, @b wxArrayPtrVoid.
*/
- WX_DEFINE_ARRAY(T, name);
- WX_DEFINE_EXPORTED_ARRAY(T, name);
- WX_DEFINE_USER_EXPORTED_ARRAY(T, name, exportspec);
+ WX_DEFINE_ARRAY(T, name);
+ WX_DEFINE_EXPORTED_ARRAY(T, name);
+ WX_DEFINE_USER_EXPORTED_ARRAY(T, name, exportspec);
//@}
//@{
Example of usage:
*/
- WX_DEFINE_OBJARRAY(name);
- WX_DEFINE_EXPORTED_OBJARRAY(name);
- WX_DEFINE_USER_EXPORTED_OBJARRAY(name);
+ WX_DEFINE_OBJARRAY(name);
+ WX_DEFINE_EXPORTED_OBJARRAY(name);
+ WX_DEFINE_USER_EXPORTED_OBJARRAY(name);
//@}
//@{
You will have to initialize the objects of this class by passing a comparison
function to the array object constructor like this:
*/
- WX_DEFINE_SORTED_ARRAY(T, name);
- WX_DEFINE_SORTED_EXPORTED_ARRAY(T, name);
- WX_DEFINE_SORTED_USER_EXPORTED_ARRAY(T, name);
+ WX_DEFINE_SORTED_ARRAY(T, name);
+ WX_DEFINE_SORTED_EXPORTED_ARRAY(T, name);
+ WX_DEFINE_SORTED_USER_EXPORTED_ARRAY(T, name);
//@}
/**
the items of pointer type) for wxArray and wxSortedArray and a deep copy (i.e.
the array element are copied too) for wxObjArray.
*/
- wxArray(const wxArray& array);
- wxSortedArray(const wxSortedArray& array);
- wxObjArray(const wxObjArray& array);
- wxArray operator=(const wxArray& array);
- wxSortedArray operator=(const wxSortedArray& array);
- wxObjArray operator=(const wxObjArray& array);
+ wxArray(const wxArray& array);
+ wxSortedArray(const wxSortedArray& array);
+ wxObjArray(const wxObjArray& array);
+ wxArray operator=(const wxArray& array);
+ wxSortedArray operator=(const wxSortedArray& array);
+ wxObjArray operator=(const wxObjArray& array);
//@}
//@{
done by wxArray and wxSortedArray versions - you may use
WX_CLEAR_ARRAY macro for this.
*/
- ~wxArray();
- ~wxSortedArray();
- ~wxObjArray();
+ ~wxArray();
+ ~wxSortedArray();
+ ~wxObjArray();
//@}
};
/**
@class wxDynamicLibraryDetails
@wxheader{dynlib.h}
-
- This class is used for the objects returned by
+
+ This class is used for the objects returned by
wxDynamicLibrary::ListLoaded method and
contains the information about a single module loaded into the address space of
the current process. A module in this context may be either a dynamic library
or the main program itself.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxDynamicLibraryDetails
+class wxDynamicLibraryDetails
{
public:
/**
Retrieves the load address and the size of this module.
- @param addr
+ @param addr
the pointer to the location to return load address in, may be
@NULL
- @param len
+ @param len
pointer to the location to return the size of this module in
memory in, may be @NULL
bool GetAddress(void ** addr, size_t len);
/**
- Returns the base name of this module, e.g. @c kernel32.dll or
+ Returns the base name of this module, e.g. @c kernel32.dll or
@c libc-2.3.2.so.
*/
wxString GetName();
/**
- Returns the full path of this module if available, e.g.
- @c c:\windows\system32\kernel32.dll or
+ Returns the full path of this module if available, e.g.
+ @c c:\windows\system32\kernel32.dll or
@c /lib/libc-2.3.2.so.
*/
wxString GetPath();
/**
- Returns the version of this module, e.g. @c 5.2.3790.0 or
+ Returns the version of this module, e.g. @c 5.2.3790.0 or
@c 2.3.2. The returned string is empty if the version information is not
available.
*/
/**
@class wxDllLoader
@wxheader{dynlib.h}
-
+
@b Deprecation note: This class is deprecated since version 2.4 and is
not compiled in by default in version 2.6 and will be removed in 2.8. Please
use wxDynamicLibrary instead.
-
+
wxDllLoader is a class providing an interface similar to Unix's @c dlopen(). It
is used by the wxLibrary framework and manages the actual
loading of shared libraries and the resolving of symbols in them. There are no
instances of this class, it simply serves as a namespace for its static member
functions.
-
- Please note that class wxDynamicLibrary provides
+
+ Please note that class wxDynamicLibrary provides
alternative, friendlier interface to wxDllLoader.
-
+
The terms @e DLL and @e shared library/object will both be used in the
- documentation to refer to the same thing: a @c .dll file under Windows or
+ documentation to refer to the same thing: a @c .dll file under Windows or
@c .so or @c .sl one under Unix.
-
+
Example of using this class to dynamically load the @c strlen() function:
-
+
@code
#if defined(__WXMSW__)
static const wxChar *LIB_NAME = _T("kernel32");
static const wxChar *LIB_NAME = _T("/lib/libc-2.0.7.so");
static const wxChar *FUNC_NAME = _T("strlen");
#endif
-
+
wxDllType dllHandle = wxDllLoader::LoadLibrary(LIB_NAME);
if ( !dllHandle )
{
... ok! ...
}
}
-
+
wxDllLoader::UnloadLibrary(dllHandle);
}
@endcode
-
+
@library{wxbase}
@category{appmanagement}
*/
-class wxDllLoader
+class wxDllLoader
{
public:
/**
Returns the string containing the usual extension for shared libraries for the
given systems (including the leading dot if not empty).
- For example, this function will return @c ".dll" under Windows or (usually)
+ For example, this function will return @c ".dll" under Windows or (usually)
@c ".so" under Unix.
*/
static wxString GetDllExt();
Returned value will be @NULL if the symbol was not found in the DLL or if
an error occurred.
- @param dllHandle
- Valid handle previously returned by
+ @param dllHandle
+ Valid handle previously returned by
LoadLibrary
- @param name
+ @param name
Name of the symbol.
*/
void * GetSymbol(wxDllType dllHandle, const wxString& name);
searched in all standard locations.
Returns a handle to the loaded DLL. Use @e success parameter to test if it
- is valid. If the handle is valid, the library must be unloaded later with
+ is valid. If the handle is valid, the library must be unloaded later with
UnloadLibrary().
- @param libname
+ @param libname
Name of the shared object to load.
- @param success
+ @param success
May point to a bool variable which will be set to @true or
@false; may also be @NULL.
*/
/**
@class wxDynamicLibrary
@wxheader{dynlib.h}
-
+
wxDynamicLibrary is a class representing dynamically loadable library
(Windows DLL, shared library under Unix etc.). Just create an object of
this class to load a library and don't worry about unloading it -- it will be
done in the objects destructor automatically.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxDynamicLibrary::CanonicalizePluginName
*/
-class wxDynamicLibrary
+class wxDynamicLibrary
{
public:
//@{
Constructor. Second form calls Load().
*/
wxDynamicLibrary();
- wxDynamicLibrary(const wxString& name,
- int flags = wxDL_DEFAULT);
+ wxDynamicLibrary(const wxString& name,
+ int flags = wxDL_DEFAULT);
//@}
/**
Returns the platform-specific full name for the library called @e name. E.g.
- it adds a @c ".dll" extension under Windows and @c "lib" prefix and
+ it adds a @c ".dll" extension under Windows and @c "lib" prefix and
@c ".so", @c ".sl" or maybe @c ".dylib" extension under Unix.
The possible values for @e cat are:
-
+
wxDL_LIBRARY
normal library
-
+
wxDL_MODULE
wxDynamicLibraryCategory cat = wxDL_LIBRARY);
/**
- This function does the same thing as
+ This function does the same thing as
CanonicalizeName() but for wxWidgets
plugins. The only difference is that compiler and version information are added
to the name to ensure that the plugin which is going to be loaded will be
The possible values for @e cat are:
-
+
wxDL_PLUGIN_GUI
plugin which uses GUI classes (default)
-
+
wxDL_PLUGIN_BASE
the handle somewhere and call this static method later to unload it.
*/
void Unload();
- static void Unload(wxDllType handle);
+ static void Unload(wxDllType handle);
//@}
};
@c void * pointer to the correct type and, even more annoyingly, you have to
repeat this type twice if you want to declare and define a function pointer all
in one line
-
+
This macro makes this slightly less painful by allowing you to specify the
type only once, as the first parameter, and creating a variable of this type
named after the function but with @c pfn prefix and initialized with the
function @e name from the wxDynamicLibrary
@e dynlib.
-
- @param type
+
+ @param type
the type of the function
-
- @param name
+
+ @param name
the name of the function to load, not a string (without quotes,
it is quoted automatically by the macro)
-
- @param dynlib
+
+ @param dynlib
the library to load the function from
*/
#define wxDYNLIB_FUNCTION(type, name, dynlib) /* implementation is private */
/**
@class wxEditableListBox
@wxheader{editlbox.h}
-
+
An editable listbox is composite control that lets the
user easily enter, delete and reorder a list of strings.
-
+
@beginStyleTable
@style{wxEL_ALLOW_NEW}:
Allows the user to enter new strings.
@style{wxEL_DEFAULT_STYLE}:
wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE
@endStyleTable
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxListBox
*/
/**
Constructor, creating and showing a list box.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param label
+ @param label
The text shown just before the list control.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then the window is sized
appropriately.
- @param style
+ @param style
Window style. See wxEditableListBox.
- @param name
+ @param name
Window name.
@sa Create()
*/
wxEditableListBox();
- wxEditableListBox(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxEL_DEFAULT_STYLE,
- const wxString& name = "editableListBox");
+ wxEditableListBox(wxWindow* parent, wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxEL_DEFAULT_STYLE,
+ const wxString& name = "editableListBox");
//@}
/**
/**
@class wxEncodingConverter
@wxheader{encconv.h}
-
+
This class is capable of converting strings between two
8-bit encodings/charsets. It can also convert from/to Unicode (but only
if you compiled wxWidgets with wxUSE_WCHAR_T set to 1). Only a limited subset
of encodings is supported by wxEncodingConverter:
- @c wxFONTENCODING_ISO8859_1..15, @c wxFONTENCODING_CP1250..1257 and
+ @c wxFONTENCODING_ISO8859_1..15, @c wxFONTENCODING_CP1250..1257 and
@c wxFONTENCODING_KOI8.
-
+
@library{wxbase}
@category{misc}
-
+
@seealso
wxFontMapper, wxMBConv, @ref overview_nonenglishoverview "Writing non-English
applications"
Convert wxString and return new wxString object.
*/
bool Convert(const char* input, char* output);
- bool Convert(const wchar_t* input, wchar_t* output);
- bool Convert(const char* input, wchar_t* output);
- bool Convert(const wchar_t* input, char* output);
- bool Convert(char* str);
- bool Convert(wchar_t* str);
- wxString Convert(const wxString& input);
+ bool Convert(const wchar_t* input, wchar_t* output);
+ bool Convert(const char* input, wchar_t* output);
+ bool Convert(const wchar_t* input, char* output);
+ bool Convert(char* str);
+ bool Convert(wchar_t* str);
+ wxString Convert(const wxString& input);
//@}
/**
- Similar to
- GetPlatformEquivalents(),
- but this one will return ALL
+ Similar to
+ GetPlatformEquivalents(),
+ but this one will return ALL
equivalent encodings, regardless of the platform, and including itself.
This platform's encodings are before others in the array. And again, if @e enc
encodings. (It usually returns only one encoding.)
*/
static wxFontEncodingArray GetPlatformEquivalents(wxFontEncoding enc,
- int platform = wxPLATFORM_CURRENT);
+ int platform = wxPLATFORM_CURRENT);
/**
Initialize conversion. Both output or input encoding may
be wxFONTENCODING_UNICODE, but only if wxUSE_ENCODING is set to 1.
- All subsequent calls to Convert()
+ All subsequent calls to Convert()
will interpret its argument
- as a string in @e input_enc encoding and will output string in
+ as a string in @e input_enc encoding and will output string in
@e output_enc encoding.
- You must call this method before calling Convert. You may call
+ You must call this method before calling Convert. You may call
it more than once in order to switch to another conversion.
@e Method affects behaviour of Convert() in case input character
cannot be converted because it does not exist in output encoding:
follow behaviour of GNU Recode -
- just copy unconvertible characters to output and don't change them
+ just copy unconvertible characters to output and don't change them
(its integer value will stay the same)
@b wxCONVERT_SUBSTITUTE
- try some (lossy) substitutions
+ try some (lossy) substitutions
- e.g. replace unconvertible latin capitals with acute by ordinary
capitals, replace en-dash or em-dash by '-' etc.
/**
@class wxKeyEvent
@wxheader{event.h}
-
+
This event class contains information about keypress (character) events.
-
+
Notice that there are three different kinds of keyboard events in wxWidgets:
key down and up events and char events. The difference between the first two
is clear - the first corresponds to a key press and the second to a key
maintained in a pressed state you will typically get a lot of (automatically
generated) down events but only one up so it is wrong to assume that there is
one up event corresponding to each down one.
-
+
Both key events provide untranslated key codes while the char event carries
the translated one. The untranslated code for alphanumeric keys is always
an upper case value. For the other keys it is one of @c WXK_XXX values
from the @ref overview_keycodes "keycodes table". The translated key is, in
general, the character the user expects to appear as the result of the key
combination when typing the text into a text entry zone, for example.
-
+
A few examples to clarify this (all assume that CAPS LOCK is unpressed
and the standard US keyboard): when the @c 'A' key is pressed, the key down
event key code is equal to @c ASCII A == 65. But the char event key code
@c 'A' keys simultaneously , the key code in key down event will still be
just @c 'A' while the char event key code parameter will now be @c 'A'
as well.
-
+
Although in this simple case it is clear that the correct key code could be
found in the key down event handler by checking the value returned by
wxKeyEvent::ShiftDown, in general you should use
@c EVT_CHAR for this as for non-alphanumeric keys the translation is
keyboard-layout dependent and can only be done properly by the system itself.
-
+
Another kind of translation is done when the control key is pressed: for
example, for CTRL-A key press the key down event still carries the
same key code @c 'a' as usual but the char event will have key code of
1, the ASCII value of this key combination.
-
+
You may discover how the other keys on your system behave interactively by
running the text wxWidgets sample and pressing some keys
in any of the text controls shown in it.
-
+
@b Note: If a key down (@c EVT_KEY_DOWN) event is caught and
the event handler does not call @c event.Skip() then the corresponding
char event (@c EVT_CHAR) will not happen. This is by design and
enables the programs that handle both types of events to be a bit
simpler.
-
+
@b Note for Windows programmers: The key and char events in wxWidgets are
similar to but slightly different from Windows @c WM_KEYDOWN and
@c WM_CHAR events. In particular, Alt-x combination will generate a char
event in wxWidgets (unless it is used as an accelerator).
-
+
@b Tip: be sure to call @c event.Skip() for events that you don't process in
key event function, otherwise menu shortcuts may cease to work under Windows.
-
+
@library{wxcore}
@category{events}
*/
list
of modifiers.
- Notice that this function is easier to use correctly than, for example,
+ Notice that this function is easier to use correctly than, for example,
ControlDown() because when using the latter you
also have to remember to test that none of the other modifiers is pressed:
and forgetting to do it can result in serious program bugs (e.g. program not
Obtains the position (in client coordinates) at which the key was pressed.
*/
wxPoint GetPosition();
- void GetPosition(long * x, long * y);
+ void GetPosition(long * x, long * y);
//@}
/**
/**
@class wxJoystickEvent
@wxheader{event.h}
-
+
This event class contains information about mouse events, particularly
events received by windows.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxJoystick
*/
Returns @true if the event was a down event from the specified button (or any
button).
- @param button
+ @param button
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.
*/
/**
Returns @true if the specified button (or any button) was in a down state.
- @param button
+ @param button
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.
*/
Returns @true if the event was an up event from the specified button (or any
button).
- @param button
+ @param button
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.
*/
/**
@class wxScrollWinEvent
@wxheader{event.h}
-
+
A scroll event holds information about events sent from scrolling windows.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxScrollEvent, @ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxSysColourChangedEvent
@wxheader{event.h}
-
+
This class is used for system colour change events, which are generated
when the user changes the colour settings using the control panel.
This is only appropriate under Windows.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxWindowCreateEvent
@wxheader{event.h}
-
+
This event is sent just after the actual window associated with a wxWindow
object
has been created. Since it is derived from wxCommandEvent, the event propagates
up
the window hierarchy.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview",
wxWindowDestroyEvent
/**
@class wxPaintEvent
@wxheader{event.h}
-
+
A paint event is sent when a window's contents needs to be repainted.
-
+
Please notice that in general it is impossible to change the drawing of a
standard control (such as wxButton) and so you shouldn't
attempt to handle paint events for them as even if it might work on some
platforms, this is inherently not portable and won't work everywhere.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxMaximizeEvent
@wxheader{event.h}
-
+
An event being sent when a top level window is maximized. Notice that it is
not sent when the window is restored to its original size after it had been
maximized, only a normal wxSizeEvent is generated in
this case.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview",
wxTopLevelWindow::Maximize, wxTopLevelWindow::IsMaximized
/**
@class wxUpdateUIEvent
@wxheader{event.h}
-
+
This class is used for pseudo-events which are called by wxWidgets
to give an application the chance to update various user interface elements.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview"
*/
Use this to reduce the overhead of UI update events if your application
has a lot of windows. If you set the value to -1 or greater than 0,
- you may also need to call wxWindow::UpdateWindowUI
+ you may also need to call wxWindow::UpdateWindowUI
at appropriate points in your application, such as when a dialog
is about to be shown.
*/
/**
@class wxClipboardTextEvent
@wxheader{event.h}
-
- This class represents the events generated by a control (typically a
+
+ This class represents the events generated by a control (typically a
wxTextCtrl but other windows can generate these events as
well) when its content gets copied or cut to, or pasted from the clipboard.
There are three types of corresponding events wxEVT_COMMAND_TEXT_COPY,
wxEVT_COMMAND_TEXT_CUT and wxEVT_COMMAND_TEXT_PASTE.
-
+
If any of these events is processed (without being skipped) by an event
handler, the corresponding operation doesn't take place which allows to prevent
the text from being copied from or pasted to a control. It is also possible to
examine the clipboard contents in the PASTE event handler and transform it in
some way before inserting in a control -- for example, changing its case or
removing invalid characters.
-
+
Finally notice that a CUT event is always preceded by the COPY event which
makes it possible to only process the latter if it doesn't matter if the text
was copied or cut.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxClipboard
*/
/**
@class wxMouseEvent
@wxheader{event.h}
-
+
This event class contains information about the events generated by the mouse:
they include mouse buttons press and release events and mouse move events.
-
+
All mouse events involving the buttons use @c wxMOUSE_BTN_LEFT for the
left mouse button, @c wxMOUSE_BTN_MIDDLE for the middle one and
@c wxMOUSE_BTN_RIGHT for the right one. And if the system supports more
portable application should avoid relying on the events from it (but the right
button click can be emulated using the left mouse button with the control key
under Mac platforms with a single button mouse).
-
+
For the @c wxEVT_ENTER_WINDOW and @c wxEVT_LEAVE_WINDOW events
purposes, the mouse is considered to be inside the window if it is in the
window client area and not inside one of its children. In other words, the
parent window receives @c wxEVT_LEAVE_WINDOW event not only when the
mouse leaves the window entirely but also when it enters one of its children.
-
+
@b NB: Note that under Windows CE mouse enter and leave events are not natively
supported
by the system but are generated by wxWidgets itself. This has several
drawbacks: the LEAVE_WINDOW event might be received some time after the mouse
left the window and the state variables for it may have changed during this
time.
-
+
@b NB: Note the difference between methods like
wxMouseEvent::LeftDown and
wxMouseEvent::LeftIsDown: the former returns @true
wxWidgets whatever the underlying GUI behaviour is (which is
platform-dependent). The same applies, of course, to other mouse buttons as
well.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxKeyEvent::CmdDown
*/
bool ButtonUp(int but = -1);
/**
- Same as MetaDown() under Mac, same as
+ Same as MetaDown() under Mac, same as
ControlDown() elsewhere.
@sa wxKeyEvent::CmdDown
bool Entering();
/**
- Returns the mouse button which generated this event or @c wxMOUSE_BTN_NONE
+ Returns the mouse button which generated this event or @c wxMOUSE_BTN_NONE
if no button is involved (for mouse move, enter or leave event, for example).
Otherwise @c wxMOUSE_BTN_LEFT is returned for the left button down, up and
- double click events, @c wxMOUSE_BTN_MIDDLE and @c wxMOUSE_BTN_RIGHT
+ double click events, @c wxMOUSE_BTN_MIDDLE and @c wxMOUSE_BTN_RIGHT
for the same events for the middle and the right buttons respectively.
*/
int GetButton();
returned position is @c wxDefaultPosition.
*/
wxPoint GetPosition();
- void GetPosition(wxCoord* x, wxCoord* y);
- void GetPosition(long* x, long* y);
+ void GetPosition(wxCoord* x, wxCoord* y);
+ void GetPosition(long* x, long* y);
//@}
/**
Returns @true if the left mouse button is currently down, independent
of the current event type.
- Please notice that it is not the same as
+ Please notice that it is not the same as
LeftDown() which returns @true if the event was
generated by the left mouse button being pressed. Rather, it simply describes
the state of the left mouse button at the time when the event was generated
bool MiddleUp();
/**
- Returns @true if this was a motion event and no mouse buttons were pressed.
- If any mouse button is held pressed, then this method returns @false and
+ Returns @true if this was a motion event and no mouse buttons were pressed.
+ If any mouse button is held pressed, then this method returns @false and
Dragging() returns @true.
*/
bool Moving();
/**
@class wxDropFilesEvent
@wxheader{event.h}
-
+
This class is used for drop files events, that is, when files have been dropped
onto the window. This functionality is currently only available under Windows.
- The window must have previously been enabled for dropping by calling
+ The window must have previously been enabled for dropping by calling
wxWindow::DragAcceptFiles.
-
+
Important note: this is a separate implementation to the more general
drag and drop implementation documented here. It uses the
older, Windows message-based approach of dropping files.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxCommandEvent
@wxheader{event.h}
-
+
This event class contains information about command events, which originate
from a variety of
simple controls. More complex controls, such as wxTreeCtrl, have separate
command event classes.
-
+
@library{wxcore}
@category{events}
*/
just has become checked or unchecked (and thus only makes sense for checkable
menu items).
- Notice that this method can not be used with
+ Notice that this method can not be used with
wxCheckListBox currently.
*/
bool IsChecked();
/**
@class wxActivateEvent
@wxheader{event.h}
-
+
An activate event is sent when a window or application is being activated
or deactivated.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview", wxApp::IsActive
*/
/**
@class wxContextMenuEvent
@wxheader{event.h}
-
+
This class is used for context menu events, sent to give
the application a chance to show a context (popup) menu.
-
+
Note that if wxContextMenuEvent::GetPosition returns wxDefaultPosition, this
means that the event originated
from a keyboard context button event, and you should compute a suitable
position yourself,
for example by calling wxGetMousePosition.
-
+
When a keyboard context menu button is pressed on Windows, a right-click event
with default position is sent first,
and if this event is not processed, the context menu event is sent. So if you
process mouse events and you find your context menu event handler
is not being called, you could call wxEvent::Skip for mouse right-down events.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_wxcommandevent "Command events", @ref
overview_eventhandlingoverview "Event handling overview"
/**
@class wxEraseEvent
@wxheader{event.h}
-
+
An erase event is sent when a window's background needs to be repainted.
-
+
On some platforms, such as GTK+, this event is simulated (simply generated just
before the
paint event) and may cause flicker. It is therefore recommended that
you set the text background colour explicitly in order to prevent flicker.
The default background colour under GTK+ is grey.
-
+
To intercept this event, use the EVT_ERASE_BACKGROUND macro in an event table
definition.
-
+
You must call wxEraseEvent::GetDC and use the returned device context if it is
non-@NULL.
- If it is @NULL, create your own temporary wxClientDC object.
-
+ If it is @NULL, create your own temporary wxClientDC object.
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxFocusEvent
@wxheader{event.h}
-
+
A focus event is sent when a window's focus changes. The window losing focus
receives a "kill focus'' event while the window gaining it gets a "set
focus'' one.
-
+
Notice that the set focus event happens both when the user gives focus to the
window (whether using the mouse or keyboard) and when it is done from the
program itself using wxWindow::SetFocus.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxChildFocusEvent
@wxheader{event.h}
-
+
A child focus event is sent to a (parent-)window when one of its child windows
gains focus,
so that the window could restore the focus back to its corresponding child
if it loses it now and regains later.
-
+
Notice that child window is the direct child of the window receiving event.
- Use wxWindow::FindFocus to retreive the window which is actually getting focus.
-
+ Use wxWindow::FindFocus to retreive the window which is actually getting focus.
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview"
*/
/**
Constructor.
- @param win
+ @param win
The direct child which is (or which contains the window which is) receiving the
focus.
*/
/**
@class wxMouseCaptureLostEvent
@wxheader{event.h}
-
+
An mouse capture lost event is sent to a window that obtained mouse capture,
which was subsequently loss due to "external" event, for example when a dialog
box is shown or if another application captures the mouse.
-
+
If this happens, this event is sent to all windows that are on capture stack
(i.e. called CaptureMouse, but didn't call ReleaseMouse yet). The event is
not sent if the capture changes because of a call to CaptureMouse or
ReleaseMouse.
-
+
This event is currently emitted under Windows only.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxMouseCaptureChangedEvent, @ref overview_eventhandlingoverview "Event handling
overview", wxWindow::CaptureMouse, wxWindow::ReleaseMouse, wxWindow::GetCapture
/**
@class wxNotifyEvent
@wxheader{event.h}
-
+
This class is not used by the event handlers by itself, but is a base class
for other event classes (such as wxNotebookEvent).
-
+
It (or an object of a derived class) is sent when the controls state is being
changed and allows the program to wxNotifyEvent::Veto this
change if it wants to prevent it from happening.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxNotebookEvent
*/
void Allow();
/**
- Returns @true if the change is allowed (Veto()
+ Returns @true if the change is allowed (Veto()
hasn't been called) or @false otherwise (if it was).
*/
bool IsAllowed();
/**
@class wxHelpEvent
@wxheader{event.h}
-
+
A help event is sent when the user has requested context-sensitive help.
This can either be caused by the application requesting
context-sensitive help mode via wxContextHelp, or
(on MS Windows) by the system generating a WM_HELP message when the user
pressed F1 or clicked
on the query button in a dialog caption.
-
+
A help event is sent to the window that the user clicked on, and is propagated
up the
window hierarchy until the event is processed or there are no more event
of the clicked-on window. Otherwise it would be impossible to show help for
container windows,
since processing would stop after the first window found.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxContextHelp, wxDialog, @ref overview_eventhandlingoverview "Event handling
overview"
@b Origin_HelpButton
- Event generated by
+ Event generated by
wxContextHelp or using the "?" title bur button under
MS Windows.
The application may handle events generated using the keyboard or mouse
- differently, e.g. by using wxGetMousePosition
+ differently, e.g. by using wxGetMousePosition
for the mouse events.
@sa SetOrigin()
/**
@class wxScrollEvent
@wxheader{event.h}
-
+
A scroll event holds information about events sent from stand-alone
scrollbars and sliders. Note that
- starting from wxWidgets 2.1, scrolled windows send the
+ starting from wxWidgets 2.1, scrolled windows send the
wxScrollWinEvent which does not derive from
wxCommandEvent, but from wxEvent directly - don't confuse these two kinds of
events and use the event table macros mentioned below only for the
scrollbar-like controls.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxScrollBar, wxSlider, wxSpinButton, , wxScrollWinEvent, @ref
overview_eventhandlingoverview "Event handling overview"
/**
@class wxIdleEvent
@wxheader{event.h}
-
+
This class is used for idle events, which are generated when the system becomes
idle. Note that, unless you do something specifically, the idle events are not
sent if the system remains idle once it has become it, e.g. only a single idle
event will be generated until something else resulting in more normal events
happens and only then is the next idle event sent again. If you need to ensure
- a continuous stream of idle events, you can either use
- wxIdleEvent::RequestMore method in your handler or call
+ a continuous stream of idle events, you can either use
+ wxIdleEvent::RequestMore method in your handler or call
wxWakeUpIdle periodically (for example from timer
event), but note that both of these approaches (and especially the first one)
increase the system load and so should be avoided if possible.
-
- By default, idle events are sent to all windows (and also
+
+ By default, idle events are sent to all windows (and also
wxApp, as usual). If this is causing a significant
overhead in your application, you can call wxIdleEvent::SetMode with
the value wxIDLE_PROCESS_SPECIFIED, and set the wxWS_EX_PROCESS_IDLE extra
window style for every window which should receive idle events.
-
+
@library{wxbase}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview", wxUpdateUIEvent,
wxWindow::OnInternalIdle
/**
@class wxInitDialogEvent
@wxheader{event.h}
-
+
A wxInitDialogEvent is sent as a dialog or panel is being initialised.
Handlers for this event can transfer data to the window.
The default handler calls wxWindow::TransferDataToWindow.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxWindowDestroyEvent
@wxheader{event.h}
-
+
This event is sent from the wxWindow destructor wxWindow::~wxWindow() when a
window is destroyed.
-
+
When a class derived from wxWindow is destroyed its destructor will have
already run by the time this event is sent. Therefore this event will not
usually be received at all.
-
+
To receive this event wxEvtHandler::Connect
must be used (using an event table macro will not work). Since it is
received after the destructor has run, an object should not handle its
own wxWindowDestroyEvent, but it can be used to get notification of the
destruction of another window.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview",
wxWindowCreateEvent
/**
@class wxNavigationKeyEvent
@wxheader{event.h}
-
- This event class contains information about navigation events,\r
- generated by navigation keys such as tab and page down.\r
-
- This event is mainly used by wxWidgets implementations. A\r
- wxNavigationKeyEvent handler is automatically provided by wxWidgets\r
+
+ This event class contains information about navigation events,
+ generated by navigation keys such as tab and page down.
+
+ This event is mainly used by wxWidgets implementations. A
+ wxNavigationKeyEvent handler is automatically provided by wxWidgets
when you make a class into a control container with the macro
- WX_DECLARE_CONTROL_CONTAINER.\r
-
+ WX_DECLARE_CONTROL_CONTAINER.
+
@library{wxcore}
@category{events}
-
+
@seealso
wxWindow::Navigate, wxWindow::NavigateIn
*/
-class wxNavigationKeyEvent
+class wxNavigationKeyEvent
{
public:
//@{
Constructor.
*/
wxNavigationKeyEvent();
- wxNavigationKeyEvent(const wxNavigationKeyEvent& event);
+ wxNavigationKeyEvent(const wxNavigationKeyEvent& event);
//@}
/**
/**
Returns @true if the navigation event represents a window change (for
- example, from Ctrl-Page Down\r
+ example, from Ctrl-Page Down
in a notebook).
*/
bool IsWindowChange();
/**
@class wxMouseCaptureChangedEvent
@wxheader{event.h}
-
+
An mouse capture changed event is sent to a window that loses its
mouse capture. This is called even if wxWindow::ReleaseCapture
was called by the application code. Handling this event allows
an application to cater for unexpected capture releases which
might otherwise confuse mouse handling code.
-
+
This event is implemented under Windows only.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxMouseCaptureLostEvent, @ref overview_eventhandlingoverview "Event handling
overview", wxWindow::CaptureMouse, wxWindow::ReleaseMouse, wxWindow::GetCapture
/**
@class wxCloseEvent
@wxheader{event.h}
-
+
This event class contains information about window and session close events.
-
+
The handler function for EVT_CLOSE is called when the user has tried to close a
a frame
or dialog box using the window manager (X) or system menu (Windows). It can
also be invoked by the application itself programmatically, for example by
calling the wxWindow::Close function.
-
+
You should check whether the application is forcing the deletion of the window
using wxCloseEvent::CanVeto. If this is @false,
you @e must destroy the window using wxWindow::Destroy.
If the return value is @true, it is up to you whether you respond by destroying
the window.
-
+
If you don't destroy the window, you should call wxCloseEvent::Veto to
let the calling code know that you did not destroy the window. This allows the
wxWindow::Close function
to return @true or @false depending on whether the close instruction was
honoured or not.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxWindow::Close, @ref overview_windowdeletionoverview "Window deletion overview"
*/
/**
@class wxMenuEvent
@wxheader{event.h}
-
+
This class is used for a variety of menu-related events. Note that
these do not include menu command events, which are
handled using wxCommandEvent objects.
-
+
The default handler for wxEVT_MENU_HIGHLIGHT displays help
text in the first field of the status bar.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_wxcommandevent "Command events", @ref
overview_eventhandlingoverview "Event handling overview"
int GetMenuId();
/**
- Returns @true if the menu which is being opened or closed is a popup menu,
+ Returns @true if the menu which is being opened or closed is a popup menu,
@false if it is a normal one.
This method should only be used with the @c OPEN and @c CLOSE events.
/**
@class wxEventBlocker
@wxheader{event.h}
-
+
This class is a special event handler which allows to discard
any event (or a set of event types) directed to a specific window.
-
+
Example:
-
+
@code
{
// block all events directed to this window while
// we do the 1000 FuncWhichSendsEvents() calls
wxEventBlocker blocker(this);
-
+
for ( int i = 0; i 1000; i++ )
FuncWhichSendsEvents(i);
-
+
} // ~wxEventBlocker called, old event handler is restored
-
+
// the event generated by this call will be processed
FuncWhichSendsEvents(0)
@endcode
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview", wxEvtHandler
*/
/**
@class wxEvtHandler
@wxheader{event.h}
-
+
A class that can handle events from the windowing system.
wxWindow (and therefore all window classes) are derived from
this class.
-
+
When events are received, wxEvtHandler invokes the method listed in the
event table using itself as the object. When using multiple inheritance
it is imperative that the wxEvtHandler(-derived) class be the first
class inherited such that the "this" pointer for the overall object
will be identical to the "this" pointer for the wxEvtHandler portion.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview"
*/
/**
This function posts an event to be processed later.
- @param event
+ @param event
Event to add to process queue.
@remarks The difference between sending an event (using the ProcessEvent
is an alternative to the use of static event tables. See the 'event' or the old
'dynamic' sample for usage.
- @param id
+ @param id
The identifier (or first of the identifier range) to be
associated with the event handler function. For the version not taking this
argument, it defaults to wxID_ANY.
- @param lastId
+ @param lastId
The second part of the identifier range to be associated with the event handler
function.
- @param eventType
+ @param eventType
The event type to be associated with this event handler.
- @param function
+ @param function
The event handler function. Note that this function should
be explicitly converted to the correct type which can be done using a macro
called wxFooEventHandler for the handler for any wxFooEvent.
- @param userData
+ @param userData
Data to be associated with the event table entry.
- @param eventSink
+ @param eventSink
Object whose member function should be called. If this is @NULL,
this will be used.
*/
wxObjectEventFunction function,
wxObject* userData = @NULL,
wxEvtHandler* eventSink = @NULL);
- void Connect(int id, wxEventType eventType,
- wxObjectEventFunction function,
- wxObject* userData = @NULL,
- wxEvtHandler* eventSink = @NULL);
- void Connect(wxEventType eventType,
- wxObjectEventFunction function,
- wxObject* userData = @NULL,
- wxEvtHandler* eventSink = @NULL);
+ void Connect(int id, wxEventType eventType,
+ wxObjectEventFunction function,
+ wxObject* userData = @NULL,
+ wxEvtHandler* eventSink = @NULL);
+ void Connect(wxEventType eventType,
+ wxObjectEventFunction function,
+ wxObject* userData = @NULL,
+ wxEvtHandler* eventSink = @NULL);
//@}
//@{
using the Connect() method. There is no way
to disconnect functions connected using the (static) event tables.
- @param id
+ @param id
The identifier (or first of the identifier range) associated with the event
handler function.
- @param lastId
+ @param lastId
The second part of the identifier range associated with the event handler
function.
- @param eventType
+ @param eventType
The event type associated with this event handler.
- @param function
+ @param function
The event handler function.
- @param userData
+ @param userData
Data associated with the event table entry.
- @param eventSink
+ @param eventSink
Object whose member function should be called.
*/
bool Disconnect(wxEventType eventType = wxEVT_@NULL,
wxObjectEventFunction function = @NULL,
wxObject* userData = @NULL,
wxEvtHandler* eventSink = @NULL);
- bool Disconnect(int id = wxID_ANY,
- wxEventType eventType = wxEVT_@NULL,
- wxObjectEventFunction function = @NULL,
- wxObject* userData = @NULL,
- wxEvtHandler* eventSink = @NULL);
- bool Disconnect(int id, int lastId = wxID_ANY,
- wxEventType eventType = wxEVT_@NULL,
- wxObjectEventFunction function = @NULL,
- wxObject* userData = @NULL,
- wxEvtHandler* eventSink = @NULL);
+ bool Disconnect(int id = wxID_ANY,
+ wxEventType eventType = wxEVT_@NULL,
+ wxObjectEventFunction function = @NULL,
+ wxObject* userData = @NULL,
+ wxEvtHandler* eventSink = @NULL);
+ bool Disconnect(int id, int lastId = wxID_ANY,
+ wxEventType eventType = wxEVT_@NULL,
+ wxObjectEventFunction function = @NULL,
+ wxObject* userData = @NULL,
+ wxEvtHandler* eventSink = @NULL);
//@}
/**
Processes an event, searching event tables and calling zero or more suitable
event handler function(s).
- @param event
+ @param event
Event to process.
@returns @true if a suitable event handler function was found and
thrown in event handler, wxApp::OnExceptionInMainLoop
is called.
- @param event
+ @param event
Event to process.
@returns @true if the event was processed, @false if no handler was found
one
is found.
- @param table
+ @param table
Event table to be searched.
- @param event
+ @param event
Event to be matched against an event table entry.
@returns @true if a suitable event handler function was found and
/**
Sets user-supplied client data.
- @param data
+ @param data
Data to be associated with the event handler.
@remarks Normally, any extra data the programmer wishes to associate with
/**
Enables or disables the event handler.
- @param enabled
+ @param enabled
@true if the event handler is to be enabled, @false if it is to be disabled.
@remarks You can use this function to avoid having to remove the event
/**
Sets the pointer to the next handler.
- @param handler
+ @param handler
Event handler to be set as the next handler.
@sa GetNextHandler(), SetPreviousHandler(),
/**
Sets the pointer to the previous handler.
- @param handler
+ @param handler
Event handler to be set as the previous handler.
*/
void SetPreviousHandler(wxEvtHandler* handler);
/**
@class wxIconizeEvent
@wxheader{event.h}
-
+
An event being sent when the frame is iconized (minimized) or restored.
-
+
Currently only wxMSW and wxGTK generate such events.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview",
wxTopLevelWindow::Iconize, wxTopLevelWindow::IsIconized
/**
@class wxMoveEvent
@wxheader{event.h}
-
+
A move event holds information about move change events.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxPoint, @ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxEvent
@wxheader{event.h}
-
+
An event is a structure holding information about an event passed to a
callback or member function. @b wxEvent used to be a multipurpose
event object, and is an abstract base class for other event classes (see below).
-
+
For more information about events, see the @ref overview_eventhandlingoverview
"Event handling overview".
-
+
@b wxPerl note: In wxPerl custom event classes should be derived from
@c Wx::PlEvent and @c Wx::PlCommandEvent.
-
+
@library{wxbase}
@category{events}
-
+
@seealso
wxCommandEvent, wxMouseEvent
*/
/**
Stop the event from propagating to its parent window.
- Returns the old propagation level value which may be later passed to
+ Returns the old propagation level value which may be later passed to
ResumePropagation() to allow propagating the
event again.
*/
Indicates how many levels the event can propagate. This member is protected and
should typically only be set in the constructors of the derived classes. It
- may be temporarily changed by StopPropagation()
- and ResumePropagation() and tested with
+ may be temporarily changed by StopPropagation()
+ and ResumePropagation() and tested with
ShouldPropagate().
The initial value is set to either @c wxEVENT_PROPAGATE_NONE (by
- default) meaning that the event shouldn't be propagated at all or to
+ default) meaning that the event shouldn't be propagated at all or to
@c wxEVENT_PROPAGATE_MAX (for command events) meaning that it should be
propagated as much as necessary.
/**
@class wxSizeEvent
@wxheader{event.h}
-
+
A size event holds information about size change events.
-
+
The EVT_SIZE handler function will be called when the window has been resized.
-
+
You may wish to use this for frames to resize their child windows as
appropriate.
-
+
Note that the size passed is of
the whole window: call wxWindow::GetClientSize for the area which may be
used by the application.
-
+
When a window is resized, usually only a small part of the window is damaged
and you
may only need to repaint that area. However, if your drawing depends on the
you may need to clear the DC explicitly and repaint the whole window. In which
case, you
may need to call wxWindow::Refresh to invalidate the entire window.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxSize, @ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxSetCursorEvent
@wxheader{event.h}
-
+
A SetCursorEvent is generated when the mouse cursor is about to be set as a
result of mouse motion. This event gives the application the chance to perform
specific mouse cursor processing based on the current position of the mouse
within the window. Use wxSetCursorEvent::SetCursor to
specify the cursor you want to be displayed.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
::wxSetCursor, wxWindow::wxSetCursor
*/
/**
@class wxFindDialogEvent
@wxheader{fdrepdlg.h}
-
+
wxFindReplaceDialog events
-
+
@library{wxcore}
@category{events}
*/
/**
@class wxFindReplaceData
@wxheader{fdrepdlg.h}
-
- wxFindReplaceData holds the data for
+
+ wxFindReplaceData holds the data for
wxFindReplaceDialog. It is used to initialize
the dialog with the default values and will keep the last values from the
- dialog when it is closed. It is also updated each time a
+ dialog when it is closed. It is also updated each time a
wxFindDialogEvent is generated so instead of
using the wxFindDialogEvent methods you can also directly query this object.
-
+
Note that all @c SetXXX() methods may only be called before showing the
dialog and calling them has no effect later.
-
+
@library{wxcore}
@category{FIXME}
*/
/**
@class wxFindReplaceDialog
@wxheader{fdrepdlg.h}
-
+
wxFindReplaceDialog is a standard modeless dialog which is used to allow the
user to search for some text (and possibly replace it with something else).
The actual searching is supposed to be done in the owner window which is the
dialogs this one @b must have a parent window. Also note that there is no
way to use this dialog in a modal way; it is always, by design and
implementation, modeless.
-
+
Please see the dialogs sample for an example of using it.
-
+
@library{wxcore}
@category{cmndlg}
*/
public:
//@{
/**
- After using default constructor Create()
+ After using default constructor Create()
must be called.
The @e parent and @e data parameters must be non-@NULL.
*/
wxFindReplaceDialog();
- wxFindReplaceDialog(wxWindow * parent,
- wxFindReplaceData* data,
- const wxString& title,
- int style = 0);
+ wxFindReplaceDialog(wxWindow * parent,
+ wxFindReplaceData* data,
+ const wxString& title,
+ int style = 0);
//@}
/**
/**
@class wxFFile
@wxheader{ffile.h}
-
+
wxFFile implements buffered file I/O. This is a very small class designed to
minimize the overhead of using it - in fact, there is hardly any overhead at
all, but using it brings you automatic error checking and hides differences
between platforms and compilers. It wraps inside it a @c FILE * handle used
by standard C IO library (also known as @c stdio).
-
+
@library{wxbase}
@category{file}
-
+
@seealso
wxFFile::IsOpened
*/
-class wxFFile
+class wxFFile
{
public:
//@{
/**
Opens a file with the given file pointer, which has already been opened.
- @param filename
+ @param filename
The filename.
- @param mode
+ @param mode
The mode in which to open the file using standard C strings.
Note that you should use "b" flag if you use binary files under Windows
or the results might be unexpected due to automatic newline conversion done
for the text files.
- @param fp
+ @param fp
An existing file descriptor, such as stderr.
*/
wxFFile();
- wxFFile(const wxString& filename, const wxString& mode = "r");
- wxFFile(FILE* fp);
+ wxFFile(const wxString& filename, const wxString& mode = "r");
+ wxFFile(FILE* fp);
//@}
/**
/**
Returns @true if the an attempt has been made to read @e past
- the end of the file.
+ the end of the file.
Note that the behaviour of the file descriptor based class
wxFile is different as wxFile::Eof
/**
Opens the file, returning @true if successful.
- @param filename
+ @param filename
The filename.
- @param mode
+ @param mode
The mode in which to open the file.
*/
bool Open(const wxString& filename, const wxString& mode = "r");
Reads the specified number of bytes into a buffer, returning the actual number
read.
- @param buffer
+ @param buffer
A buffer to receive the data.
- @param count
+ @param count
The number of bytes to read.
@returns The number of bytes read.
Reads the entire contents of the file into a string.
- @param str
+ @param str
String to read data into.
- @param conv
+ @param conv
Conversion object to use in Unicode build; by default supposes
that file contents is encoded in UTF-8.
/**
Seeks to the specified position and returns @true on success.
- @param ofs
+ @param ofs
Offset to seek to.
- @param mode
+ @param mode
One of wxFromStart, wxFromEnd, wxFromCurrent.
*/
bool Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart);
file
and returns @true on success.
- @param ofs
+ @param ofs
Number of bytes before the end of the file.
*/
bool SeekEnd(wxFileOffset ofs = 0);
/**
@class wxTempFile
@wxheader{file.h}
-
+
wxTempFile provides a relatively safe way to replace the contents of the
existing file. The name is explained by the fact that it may be also used as
just a temporary file if you don't replace the old file contents.
-
+
Usually, when a program replaces the contents of some file it first opens it for
writing, thus losing all of the old data and then starts recreating it. This
approach is not very safe because during the regeneration of the file bad things
generation takes long time) and, finally, any other external interrupts (power
supply failure or a disk error) will leave you without either the original file
or the new one.
-
+
wxTempFile addresses this problem by creating a temporary file which is meant to
replace the original file - but only after it is fully written. So, if the user
interrupts the program during the file generation, the old file won't be lost.
Also, if the program discovers itself that it doesn't want to replace the old
file there is no problem - in fact, wxTempFile will @b not replace the old
- file by default, you should explicitly call wxTempFile::Commit
+ file by default, you should explicitly call wxTempFile::Commit
to do it. Calling wxTempFile::Discard explicitly discards any
modifications: it closes and deletes the temporary file and leaves the original
file unchanged. If you don't call neither of Commit() and Discard(), the
destructor will call Discard() automatically.
-
+
To summarize: if you want to replace another file, create an instance of
wxTempFile passing the name of the file to be replaced to the constructor (you
- may also use default constructor and pass the file name to
- wxTempFile::Open). Then you can wxTempFile::write
+ may also use default constructor and pass the file name to
+ wxTempFile::Open). Then you can wxTempFile::write
to wxTempFile using wxFile-like functions and later call
Commit() to replace the old file (and close this one) or call Discard() to
cancel
the modifications.
-
+
@library{wxbase}
@category{file}
*/
-class wxTempFile
+class wxTempFile
{
public:
/**
- Associates wxTempFile with the file to be replaced and opens it. You should use
+ Associates wxTempFile with the file to be replaced and opens it. You should use
IsOpened() to verify if the constructor succeeded.
*/
wxTempFile(const wxString& strName);
occurred.
@e strName is the name of file to be replaced. The temporary file is always
- created in the directory where @e strName is. In particular, if
+ created in the directory where @e strName is. In particular, if
@e strName doesn't include the path, it is created in the current directory
and the program should have write access to it for the function to succeed.
*/
/**
@class wxFile
@wxheader{file.h}
-
+
A wxFile performs raw file I/O. This is a very small class designed to
minimize the overhead of using it - in fact, there is hardly any overhead at
all, but using it brings you automatic error checking and hides differences
between platforms and compilers. wxFile also automatically closes the file in
its destructor making it unnecessary to worry about forgetting to do it.
- wxFile is a wrapper around @c file descriptor. - see also
+ wxFile is a wrapper around @c file descriptor. - see also
wxFFile for a wrapper around @c FILE structure.
-
- @c wxFileOffset is used by the wxFile functions which require offsets as
+
+ @c wxFileOffset is used by the wxFile functions which require offsets as
parameter or return them. If the platform supports it, wxFileOffset is a typedef
for a native 64 bit integer, otherwise a 32 bit integer is used for
wxFileOffset.
-
+
@library{wxbase}
@category{file}
*/
-class wxFile
+class wxFile
{
public:
//@{
Associates the file with the given file descriptor, which has already been
opened.
- @param filename
+ @param filename
The filename.
- @param mode
+ @param mode
The mode in which to open the file. May be one of read(), write() and
wxFile::read_write.
- @param fd
+ @param fd
An existing file descriptor (see Attach() for the list of predefined
descriptors)
*/
wxFile();
- wxFile(const wxString& filename,
- wxFile::OpenMode mode = wxFile::read);
- wxFile(int fd);
+ wxFile(const wxString& filename,
+ wxFile::OpenMode mode = wxFile::read);
+ wxFile(int fd);
//@}
/**
/**
Returns @true if the end of the file has been reached.
- Note that the behaviour of the file pointer based class
- wxFFile is different as wxFFile::Eof
- will return @true here only if an attempt has been made to read
+ Note that the behaviour of the file pointer based class
+ wxFFile is different as wxFFile::Eof
+ will return @true here only if an attempt has been made to read
@e past the last byte of the file, while wxFile::Eof() will return @true
even before such attempt is made if the file pointer is at the last position
in the file.
Note also that this function doesn't work on unseekable file descriptors
(examples include pipes, terminals and sockets under Unix) and an attempt to
use it will result in an error message in such case. So, to read the entire
- file into memory, you should write a loop which uses
+ file into memory, you should write a loop which uses
Read() repeatedly and tests its return condition instead
of using Eof() as this will not work for special files under Unix.
*/
/**
Opens the file, returning @true if successful.
- @param filename
+ @param filename
The filename.
- @param mode
+ @param mode
The mode in which to open the file. May be one of read(), write() and
wxFile::read_write.
*/
if there was an error.
*/
size_t Read(void* buffer, size_t count);
- Parameters Return value
-The number of bytes read, or the symbol wxInvalidOffset();
+ Parameters Return value
+ The number of bytes read, or the symbol wxInvalidOffset();
//@}
/**
Seeks to the specified position.
- @param ofs
+ @param ofs
Offset to seek to.
- @param mode
+ @param mode
One of wxFromStart, wxFromEnd, wxFromCurrent.
@returns The actual offset position achieved, or wxInvalidOffset on
the file. For example, @c SeekEnd(-5) would position the pointer 5
bytes before the end.
- @param ofs
+ @param ofs
Number of bytes before the end of the file.
@returns The actual offset position achieved, or wxInvalidOffset on
@e conv is used to convert @e s to multibyte representation.
Note that this method only works with @c NUL-terminated strings, if you want
- to write data with embedded @c NULs to the file you should use the other
+ to write data with embedded @c NULs to the file you should use the other
@ref write() "Write() overload".
*/
bool Write(const wxString& s, const wxMBConv& conv = wxConvUTF8);
/**
@class wxFileConfig
@wxheader{fileconf.h}
-
+
wxFileConfig implements wxConfigBase interface for
storing and retrieving configuration information using plain text files. The
files have a simple format reminiscent of Windows INI files with lines of the
form @c key = value defining the keys and lines of special form
@c [group] indicating the start of each group.
-
+
This class is used by default for wxConfig on Unix platforms but may also be
used explicitly if you want to use files and not the registry even under
Windows.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxFileConfig::Save
*/
user-specific, file if it were constructed with @e basename as "local
filename'' parameter in the constructor.
- @e style has the same meaning as in @ref wxConfigBase::ctor constructor
+ @e style has the same meaning as in @ref wxConfigBase::ctor constructor
and can contain any combination of styles but only wxCONFIG_USE_SUBDIR bit is
examined by this function.
/**
Allows to set the mode to be used for the config file creation. For example, to
create a config file which is not readable by other users (useful if it stores
- some sensitive information, such as passwords), you could use
+ some sensitive information, such as passwords), you could use
@c SetUmask(0077).
This function doesn't do anything on non-Unix platforms.
/**
@class wxFileCtrl
@wxheader{filectrl.h}
-
+
This control allows the user to select a file. two implemetations exist, one
for Gtk and another generic one for anything other than Gtk.
It is only available if @c wxUSE_FILECTRL is set to 1.
-
+
@beginStyleTable
@style{wxFC_DEFAULT_STYLE}:
The default style: wxFC_OPEN
@style{wxFC_NOSHOWHIDDEN}:
Hides the "Show Hidden Files" checkbox (Generic only)
@endStyleTable
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxGenericDirCtrl
*/
public:
//@{
/**
- @param parent
+ @param parent
Parent window, must not be non-@NULL.
- @param id
+ @param id
The identifier for the control.
- @param defaultDirectory
+ @param defaultDirectory
The initial directory shown in the control. Must be
a valid path to a directory or the empty string.
In case it is the empty string, the current working directory is used.
- @param defaultFilename
+ @param defaultFilename
The default filename, or the empty string.
- @param wildcard
+ @param wildcard
A wildcard specifying which files can be selected,
such as "*.*" or "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".
- @param style
+ @param style
The window style, see wxFC_* flags.
- @param pos
+ @param pos
Initial position.
- @param size
+ @param size
Initial size.
- @param name
+ @param name
Control name.
@returns @true if the control was successfully created or @false if
creation failed.
*/
wxFileCtrl();
- wxFileCtrl(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 wxSize& size = wxDefaultSize,
- const wxString& name = "filectrl");
+ wxFileCtrl(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 wxSize& size = wxDefaultSize,
+ const wxString& name = "filectrl");
//@}
/**
/**
@class wxFileCtrlEvent
@wxheader{filectrl.h}
-
+
A file control event holds information about events associated with
wxFileCtrl objects.
-
+
@library{wxbase}
@category{FIXME}
*/
/**
Sets the files changed by this event.
*/
- wxFileCtrlEvent::SetFiles(const wxArrayString files);
+ wxFileCtrlEvent::SetFiles(const wxArrayString files);
};
/**
@class wxFileDialog
@wxheader{filedlg.h}
-
+
This class represents the file chooser dialog.
-
+
@beginStyleTable
@style{wxFD_DEFAULT_STYLE}:
Equivalent to wxFD_OPEN.
Show the preview of the selected files (currently only supported by
wxGTK using GTK+ 2.4 or later).
@endStyleTable
-
+
@library{wxcore}
@category{cmndlg}
-
+
@seealso
@ref overview_wxfiledialogoverview "wxFileDialog overview", wxFileSelector
*/
/**
Constructor. Use ShowModal() to show the dialog.
- @param parent
+ @param parent
Parent window.
- @param message
+ @param message
Message to show on the dialog.
- @param defaultDir
+ @param defaultDir
The default directory, or the empty string.
- @param defaultFile
+ @param defaultFile
The default filename, or the empty string.
- @param wildcard
+ @param wildcard
A wildcard, such as "*.*" or "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".
Note that the native Motif dialog has some limitations with respect to
wildcards; see the Remarks section above.
- @param style
+ @param style
A dialog style. See wxFD_* styles for more info.
- @param pos
+ @param pos
Dialog position. Not implemented.
- @param size
+ @param size
Dialog size. Not implemented.
- @param name
+ @param name
Dialog name. Not implemented.
*/
wxFileDialog(wxWindow* parent,
wxString GetDirectory();
/**
- If functions
+ If functions
SetExtraControlCreator()
and ShowModal() were called,
returns the extra window. Otherwise returns @NULL.
wxFD_MULTIPLE
can only be used with wxFileDialog and not here as this
function only returns a single file name.
-
+
Both the Unix and Windows versions implement a wildcard filter. Typing a
filename containing wildcards (*, ?) in the filename text item, and
clicking on Ok, will result in only those files matching the pattern being
displayed.
-
+
The wildcard may be a specification for multiple types of file
with a description for each, such as:
@code
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
@endcode
-
+
The application must check for an empty return value (the user pressed
Cancel). For example:
@code
/**
@class wxPathList
@wxheader{filefn.h}
-
+
The path list is a convenient way of storing a number of directories, and
when presented with a filename without a directory, searching for an existing
file
in those directories.
-
+
Be sure to look also at wxStandardPaths if you only
want to search files in some standard paths.
-
+
@library{wxbase}
@category{file}
-
+
@seealso
wxArrayString, wxStandardPaths, wxFileName
*/
Constructs the object calling the Add() function.
*/
wxPathList();
- wxPathList(const wxArrayString& arr);
+ wxPathList(const wxArrayString& arr);
//@}
//@{
(this is why FindValidPath() may return relative paths).
*/
bool Add(const wxString& path);
- void Add(const wxArrayString& arr);
+ void Add(const wxArrayString& arr);
//@}
/**
On platforms where native dialogs handle only one filter per entry,
entries in arrays are automatically adjusted.
@e wildCard is in the form:
-
+
@code
"All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
@endcode
/**
This function is deprecated, use wxFileName instead.
-
+
Converts a Unix to a DOS filename by replacing forward
slashes with backslashes.
*/
/**
@b NB: This function is obsolete, please use
wxFileName::SplitPath instead.
-
+
This function splits a full file name into components: the path (including
possible disk/drive
specification under Windows), the base name and the extension. Any of the
(@e path, @e name or @e ext) may be @NULL if you are not interested in the value
of
a particular component.
-
+
wxSplitPath() will correctly handle filenames with both DOS and Unix path
separators under
Windows, however it will not consider backslashes as path separators under Unix
(where backslash
is a valid character in a filename).
-
+
On entry, @e fullname should be non-@NULL (it may be empty though).
-
+
On return, @e path contains the file path (without the trailing separator), @e
name
contains the file name and @e ext contains the file extension without leading
unless it is equal to -1 in which case nothing is done, and restores it to
the original value on scope exit. It works by declaring a variable which sets
umask to @e mask in its constructor and restores it in its destructor.
-
+
Under other platforms this macro expands to nothing.
*/
#define wxCHANGE_UMASK(int mask) /* implementation is private */
/**
Returns time of last modification of given file.
-
+
The function returns @c (time_t)-1 if an error occurred (e.g. file not
found).
*/
/**
@b NB: This function is obsolete, please use
wxFileName::SplitPath instead.
-
+
Returns the filename for a full path. The second form returns a pointer to
temporary storage that should not be deallocated.
*/
wxString wxFileNameFromPath(const wxString& path);
- char * wxFileNameFromPath(char * path);
+char * wxFileNameFromPath(char * path);
//@}
/**
Renames @e file1 to @e file2, returning @true if successful.
-
+
If @e overwrite parameter is @true (default), the destination file is
overwritten if it exists, but if @e overwrite is @false, the functions fails
in this case.
@e overwrite parameter is @true (default), the destination file is overwritten
if it exists, but if @e overwrite is @false, the functions fails in this
case.
-
+
This function supports resources forks under Mac OS.
*/
bool wxCopyFile(const wxString& file1, const wxString& file2,
/**
@b NB: This function is deprecated: use wxGetCwd instead.
-
+
Copies the current working directory into the buffer if supplied, or
copies the working directory into new storage (which you must delete
yourself) if the buffer is @NULL.
-
+
@e sz is the size of the buffer if supplied.
*/
wxString wxGetWorkingDirectory(char * buf=@NULL, int sz=1000);
/**
Makes the directory @e dir, returning @true if successful.
-
+
@e perm is the access mask for the directory for the systems on which it is
supported (Unix) and doesn't have any effect on the other ones.
*/
/**
Returns the next file that matches the path passed to wxFindFirstFile.
-
+
See wxFindFirstFile for an example.
*/
wxString wxFindNextFile();
@endcode
*/
wxFileKind wxGetFileKind(int fd);
- wxFileKind wxGetFileKind(FILE * fp);
+wxFileKind wxGetFileKind(FILE * fp);
//@}
//@{
instead.
*/
char * wxGetTempFileName(const wxString& prefix, char * buf=@NULL);
- bool wxGetTempFileName(const wxString& prefix, wxString& buf);
+bool wxGetTempFileName(const wxString& prefix, wxString& buf);
//@}
/**
Removes the directory @e dir, returning @true if successful. Does not work under
VMS.
-
+
The @e flags parameter is reserved for future use.
-
+
Please notice that there is also a wxRmDir() function which simply wraps the
standard POSIX rmdir() function and so return an integer error code instead of
a boolean value (but otherwise is currently identical to wxRmdir), don't
/**
@class wxFileName
@wxheader{filename.h}
-
+
wxFileName encapsulates a file name. This class serves two purposes: first, it
provides the functions to split the file names into components and to recombine
these components in the full file name which can then be passed to the OS file
Second, it includes the functions for working with the files itself. Note that
to change the file data you should use wxFile class instead.
wxFileName provides functions for working with the file attributes.
-
+
When working with directory names (i.e. without filename and extension)
make sure not to misuse the file name part of this class with the last
directory. Instead initialize the wxFileName instance like this:
-
+
@code
wxFileName dirname( "C:\mydir", "" );
MyMethod( dirname.GetPath() );
@endcode
-
+
The same can be done using the static method wxFileName::DirName:
-
+
@code
wxFileName dirname = wxFileName::DirName( "C:\mydir" );
MyMethod( dirname.GetPath() );
@endcode
-
+
Accordingly, methods dealing with directories or directory names
like wxFileName::IsDirReadable use
- wxFileName::GetPath whereas methods dealing
+ wxFileName::GetPath whereas methods dealing
with file names like wxFileName::IsFileReadable
use wxFileName::GetFullPath.
-
+
If it is not known wether a string contains a directory name or
a complete file name (such as when interpreting user input) you need to use
the static function wxFileName::DirExists
wxDirExists) and construct the wxFileName
instance accordingly. This will only work if the directory actually exists,
of course:
-
+
@code
wxString user_input;
// get input from user
-
+
wxFileName fname;
if (wxDirExists(user_input))
fname.AssignDir( user_input );
else
fname.Assign( user_input );
@endcode
-
+
@library{wxbase}
@category{file}
-
+
@seealso
wxFileName::GetCwd
*/
-class wxFileName
+class wxFileName
{
public:
//@{
Constructor from a volume name, a directory name, base file name and extension.
*/
wxFileName();
- wxFileName(const wxFileName& filename);
- wxFileName(const wxString& fullpath,
- wxPathFormat format = wxPATH_NATIVE);
- wxFileName(const wxString& path, const wxString& name,
- wxPathFormat format = wxPATH_NATIVE);
- wxFileName(const wxString& path, const wxString& name,
- const wxString& ext,
- wxPathFormat format = wxPATH_NATIVE);
- wxFileName(const wxString& volume, const wxString& path,
- const wxString& name,
- const wxString& ext,
- wxPathFormat format = wxPATH_NATIVE);
+ wxFileName(const wxFileName& filename);
+ wxFileName(const wxString& fullpath,
+ wxPathFormat format = wxPATH_NATIVE);
+ wxFileName(const wxString& path, const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE);
+ wxFileName(const wxString& path, const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE);
+ wxFileName(const wxString& volume, const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE);
//@}
/**
Creates the file name from various combinations of data.
*/
void Assign(const wxFileName& filepath);
- void Assign(const wxString& fullpath,
- wxPathFormat format = wxPATH_NATIVE);
- void Assign(const wxString& volume, const wxString& path,
- const wxString& name,
- const wxString& ext,
- bool hasExt,
- wxPathFormat format = wxPATH_NATIVE);
- void Assign(const wxString& volume, const wxString& path,
- const wxString& name,
- const wxString& ext,
- wxPathFormat format = wxPATH_NATIVE);
- void Assign(const wxString& path, const wxString& name,
- wxPathFormat format = wxPATH_NATIVE);
- void Assign(const wxString& path, const wxString& name,
- const wxString& ext,
- wxPathFormat format = wxPATH_NATIVE);
+ void Assign(const wxString& fullpath,
+ wxPathFormat format = wxPATH_NATIVE);
+ void Assign(const wxString& volume, const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ bool hasExt,
+ wxPathFormat format = wxPATH_NATIVE);
+ void Assign(const wxString& volume, const wxString& path,
+ const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE);
+ void Assign(const wxString& path, const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE);
+ void Assign(const wxString& path, const wxString& name,
+ const wxString& ext,
+ wxPathFormat format = wxPATH_NATIVE);
//@}
/**
void Clear();
/**
- Removes the extension from the file name resulting in a
+ Removes the extension from the file name resulting in a
file name with no trailing dot.
@sa SetExt(), SetEmptyExt()
Under Unix, the temporary file will have read and write permissions for the
owner only to minimize the security problems.
- @param prefix
+ @param prefix
Prefix to use for the temporary file name construction
- @param fileTemp
+ @param fileTemp
The file to open or @NULL to just get the name
@returns The full temporary file name or an empty string on error.
Returns @true if the directory with this name exists.
*/
bool DirExists();
- static bool DirExists(const wxString& dir);
+ static bool DirExists(const wxString& dir);
//@}
/**
question is to use IsAbsolute() or
IsRelative() method. Note that on Windows, "X:"
refers to the current working directory on drive X. Therefore, a wxFileName
- instance constructed from for example "X:dir/file.ext" treats the portion
+ instance constructed from for example "X:dir/file.ext" treats the portion
beyond drive separator as being relative to that directory.
To ensure that the filename is absolute, you may use
@sa DirExists()
*/
bool FileExists();
- static bool FileExists(const wxString& file);
+ static bool FileExists(const wxString& file);
//@}
/**
*/
wxString GetHumanReadableSize(const wxString& failmsg = "Not available",
int precision = 1);
- static wxString GetHumanReadableSize(const wxULongLong& bytes,
- const wxString& nullsize = "Not available",
- int precision = 1);
+ static wxString GetHumanReadableSize(const wxULongLong& bytes,
+ const wxString& nullsize = "Not available",
+ int precision = 1);
//@}
/**
wxPathFormat format = wxPATH_NATIVE);
/**
- Returns the usually used path separator for this format. For all formats but
+ Returns the usually used path separator for this format. For all formats but
@c wxPATH_DOS there is only one path separator anyhow, but for DOS there
are two of them and the native one, i.e. the backslash is returned by this
method.
by another process) the returned value is @c wxInvalidSize.
*/
wxULongLong GetSize();
- static wxULongLong GetSize(const wxString& filename);
+ static wxULongLong GetSize(const wxString& filename);
//@}
/**
/**
Returns @true if this object represents a directory, @false otherwise
(i.e. if it is a file). Note that this method doesn't test whether the
- directory or file really exists, you should use
- DirExists() or
+ directory or file really exists, you should use
+ DirExists() or
FileExists() for this.
*/
bool IsDir();
doesn't imply that you have read permissions on the files contained.
*/
bool IsDirReadable();
- static bool IsDirReadable(const wxString& dir);
+ static bool IsDirReadable(const wxString& dir);
//@}
//@{
directory.
*/
bool IsDirWritable();
- static bool IsDirWritable(const wxString& dir);
+ static bool IsDirWritable(const wxString& dir);
//@}
//@{
permissions on it.
*/
bool IsFileExecutable();
- static bool IsFileExecutable(const wxString& file);
+ static bool IsFileExecutable(const wxString& file);
//@}
//@{
permissions on it.
*/
bool IsFileReadable();
- static bool IsFileReadable(const wxString& file);
+ static bool IsFileReadable(const wxString& file);
//@}
//@{
permissions on it.
*/
bool IsFileWritable();
- static bool IsFileWritable(const wxString& file);
+ static bool IsFileWritable(const wxString& file);
//@}
/**
On Mac OS, gets the common type and creator for the given extension.
*/
static bool MacFindDefaultTypeAndCreator(const wxString& ext,
- wxUint32* type,
- wxUint32* creator);
+ wxUint32* type,
+ wxUint32* creator);
/**
On Mac OS, registers application defined extensions and their default type and
creator.
*/
static void MacRegisterDefaultTypeAndCreator(const wxString& ext,
- wxUint32 type,
- wxUint32 creator);
+ wxUint32 type,
+ wxUint32 creator);
/**
On Mac OS, looks up the appropriate type and creator from the registration and
wxPathFormat format = wxPATH_NATIVE);
/**
- This function tries to put this file name in a form relative to
+ This function tries to put this file name in a form relative to
@param pathBase.
In other words, it returns the file name which should be used to access this
file if the current directory were pathBase.
- pathBase
+ pathBase
the directory to use as root, current directory is used by
default
- @param format
+ @param format
the file name format, native by default
@returns @true if the file name has been changed, @false if we failed to do
//@{
/**
- @param dir
+ @param dir
the directory to create
- @param parm
+ @param parm
the permissions for the newly created directory
- @param flags
+ @param flags
if the flags contain wxPATH_MKDIR_FULL flag,
try to create each directory in the path and also don't return an error
if the target directory already exists.
otherwise.
*/
bool Mkdir(int perm = 0777, int flags = 0);
- static bool Mkdir(const wxString& dir, int perm = 0777,
- int flags = 0);
+ static bool Mkdir(const wxString& dir, int perm = 0777,
+ int flags = 0);
//@}
/**
made absolute, without any ".." and "." and all environment
variables will be expanded in it.
- @param flags
+ @param flags
The kind of normalization to do with the file name. It can be
any or-combination of the following constants:
all of previous flags except wxPATH_NORM_CASE
- @param cwd
+ @param cwd
If not empty, this directory will be used instead of current
working directory in normalization (see wxPATH_NORM_ABSOLUTE).
- @param format
+ @param format
The file name format to use when processing the paths, native by default.
@returns @true if normalization was successfully or @false otherwise.
/**
- Prepends a directory to the file path. Please see
+ Prepends a directory to the file path. Please see
AppendDir() for important notes.
*/
void PrependDir(const wxString& dir);
Deletes the specified directory from the file system.
*/
bool Rmdir();
- static bool Rmdir(const wxString& dir);
+ static bool Rmdir(const wxString& dir);
//@}
/**
Changes the current working directory.
*/
bool SetCwd();
- static bool SetCwd(const wxString& cwd);
+ static bool SetCwd(const wxString& cwd);
//@}
/**
- Sets the extension of the file name to be an empty extension.
- This is different from having no extension at all as the file
+ Sets the extension of the file name to be an empty extension.
+ This is different from having no extension at all as the file
name will have a trailing dot after a call to this method.
@sa SetExt(), ClearExt()
/**
Sets the extension of the file name. Setting an empty string
- as the extension will remove the extension resulting in a file
- name without a trailing dot, unlike a call to
+ as the extension will remove the extension resulting in a file
+ name without a trailing dot, unlike a call to
SetEmptyExt().
@sa SetEmptyExt(), ClearExt()
/**
This function splits a full file name into components: the volume (with the
first version) path (including the volume in the second version), the base name
- and the extension. Any of the output parameters (@e volume, @e path,
+ and the extension. Any of the output parameters (@e volume, @e path,
@e name or @e ext) may be @NULL if you are not interested in the
value of a particular component. Also, @e fullpath may be empty on entry.
- On return, @e path contains the file path (without the trailing separator),
+ On return, @e path contains the file path (without the trailing separator),
@e name contains the file name and @e ext contains the file extension
without leading dot. All three of them may be empty if the corresponding
component is. The old contents of the strings pointed to by these parameters
will be overwritten in any case (if the pointers are not @NULL).
Note that for a filename "foo.'' the extension is present, as indicated by the
- trailing dot, but empty. If you need to cope with such cases, you should use
+ trailing dot, but empty. If you need to cope with such cases, you should use
@e hasExt instead of relying on testing whether @e ext is empty or not.
*/
static void SplitPath(const wxString& fullpath, wxString* volume,
wxString* ext,
bool hasExt = @NULL,
wxPathFormat format = wxPATH_NATIVE);
- static void SplitPath(const wxString& fullpath,
- wxString* volume,
- wxString* path,
- wxString* name,
- wxString* ext,
- wxPathFormat format = wxPATH_NATIVE);
- static void SplitPath(const wxString& fullpath,
- wxString* path,
- wxString* name,
- wxString* ext,
- wxPathFormat format = wxPATH_NATIVE);
+ static void SplitPath(const wxString& fullpath,
+ wxString* volume,
+ wxString* path,
+ wxString* name,
+ wxString* ext,
+ wxPathFormat format = wxPATH_NATIVE);
+ static void SplitPath(const wxString& fullpath,
+ wxString* path,
+ wxString* name,
+ wxString* ext,
+ wxPathFormat format = wxPATH_NATIVE);
//@}
/**
is interpreted as a path in the native filename format.
*/
bool operator operator!=(const wxFileName& filename);
- bool operator operator!=(const wxString& filename);
+ bool operator operator!=(const wxString& filename);
//@}
//@{
Assigns the new value to this filename object.
*/
wxFileName& operator operator=(const wxFileName& filename);
- wxFileName& operator operator=(const wxString& filename);
+ wxFileName& operator operator=(const wxString& filename);
//@}
//@{
interpreted as a path in the native filename format.
*/
bool operator operator==(const wxFileName& filename);
- bool operator operator==(const wxString& filename);
+ bool operator operator==(const wxString& filename);
//@}
};
/**
@class wxFilePickerCtrl
@wxheader{filepicker.h}
-
+
This control allows the user to select a file. The generic implementation is
a button which brings up a wxFileDialog when clicked. Native implementation
may differ but this is usually a (small) widget which give access to the
file-chooser
dialog.
It is only available if @c wxUSE_FILEPICKERCTRL is set to 1 (the default).
-
+
@beginStyleTable
@style{wxFLP_DEFAULT_STYLE}:
The default style: includes wxFLP_OPEN | wxFLP_FILE_MUST_EXIST and,
@style{wxFLP_CHANGE_DIR}:
Change current working directory on each user file selection change.
@endStyleTable
-
+
@library{wxcore}
@category{miscpickers}
@appearance{filepickerctrl.png}
-
+
@seealso
wxFileDialog, wxFileDirPickerEvent
*/
const wxString& name = "filepickerctrl");
/**
- @param parent
+ @param parent
Parent window, must not be non-@NULL.
- @param id
+ @param id
The identifier for the control.
- @param path
+ @param path
The initial file shown in the control. Must be a valid path to a file or the
empty string.
- @param message
+ @param message
The message shown to the user in the wxFileDialog shown by the control.
- @param wildcard
+ @param wildcard
A wildcard which defines user-selectable files (use the same syntax as for
wxFileDialog's wildcards).
- @param pos
+ @param pos
Initial position.
- @param size
+ @param size
Initial size.
- @param style
+ @param style
The window style, see wxFLP_* flags.
- @param validator
+ @param validator
Validator which can be used for additional date checks.
- @param name
+ @param name
Control name.
@returns @true if the control was successfully created or @false if
/**
@class wxDirPickerCtrl
@wxheader{filepicker.h}
-
+
This control allows the user to select a directory. The generic implementation
is
a button which brings up a wxDirDialog when clicked. Native implementation
dir-chooser
dialog.
It is only available if @c wxUSE_DIRPICKERCTRL is set to 1 (the default).
-
+
@beginStyleTable
@style{wxDIRP_DEFAULT_STYLE}:
The default style: includes wxDIRP_DIR_MUST_EXIST and, under wxMSW
Change current working directory on each user directory selection
change.
@endStyleTable
-
+
@library{wxcore}
@category{miscpickers}
@appearance{dirpickerctrl.png}
-
+
@seealso
wxDirDialog, wxFileDirPickerEvent
*/
const wxString& name = "dirpickerctrl");
/**
- @param parent
+ @param parent
Parent window, must not be non-@NULL.
- @param id
+ @param id
The identifier for the control.
- @param path
+ @param path
The initial directory shown in the control. Must be a valid path to a directory
or the empty string.
- @param message
+ @param message
The message shown to the user in the wxDirDialog shown by the control.
- @param pos
+ @param pos
Initial position.
- @param size
+ @param size
Initial size.
- @param style
+ @param style
The window style, see wxDIRP_* flags.
- @param validator
+ @param validator
Validator which can be used for additional date checks.
- @param name
+ @param name
Control name.
@returns @true if the control was successfully created or @false if
/**
@class wxFileDirPickerEvent
@wxheader{filepicker.h}
-
+
This event class is used for the events generated by
wxFilePickerCtrl and by wxDirPickerCtrl.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxfilepickerctrl
*/
/**
@class wxFileSystem
@wxheader{filesys.h}
-
+
This class provides an interface for opening files on different
file systems. It can handle absolute and/or local filenames.
It uses a system of handlers to
provide access to user-defined virtual file systems.
-
+
@library{wxbase}
@category{vfs}
-
+
@seealso
wxFileSystemHandler, wxFSFile, Overview
*/
wxFileSystem();
/**
- This static function adds new handler into the list of
+ This static function adds new handler into the list of
handlers which provide access to virtual FS.
Note that if two handlers for the same protocol are added, the last one added
takes precedence.
static void AddHandler(wxFileSystemHandler handler);
/**
- Sets the current location. @e location parameter passed to
+ Sets the current location. @e location parameter passed to
OpenFile() is relative to this path.
@b Caution! Unless @e is_dir is @true the @e location parameter
is not the directory name but the name of the file in this directory. All these
commands change the path to "dir/subdir/":
- @param location
+ @param location
the new location. Its meaning depends on the value of is_dir
- @param is_dir
- if @true location is new directory. If @false (default)
+ @param is_dir
+ if @true location is new directory. If @false (default)
location is file in the new directory.
*/
void ChangePathTo(const wxString& location, bool is_dir = @false);
Looks for the file with the given name @e file in a colon or semi-colon
(depending on the current platform) separated list of directories in
@e path. If the file is found in any directory, returns @true and the full
- path of the file in @e str, otherwise returns @false and doesn't modify
+ path of the file in @e str, otherwise returns @false and doesn't modify
@e str.
- @param str
+ @param str
Receives the full path of the file, must not be @NULL
- @param path
+ @param path
wxPATH_SEP-separated list of directories
- @param file
+ @param file
the name of the file to look for
*/
bool FindFileInPath(wxString str, const wxString& path,
or @NULL if failed. It first tries to open the file in relative scope
(based on value passed to ChangePathTo() method) and then as an
absolute path. Note that the user is responsible for deleting the returned
- wxFSFile.
+ wxFSFile.
@e flags can be one or more of the following bit values ored together:
A stream opened with just the default @e wxFS_READ flag may
int flags = wxFS_READ);
/**
- Converts URL into a well-formed filename. The URL must use the @c file
+ Converts URL into a well-formed filename. The URL must use the @c file
protocol.
*/
static wxFileName URLToFileName(const wxString& url);
/**
@class wxFSFile
@wxheader{filesys.h}
-
+
This class represents a single file opened by wxFileSystem.
- It provides more information than wxWindow's input stream
+ It provides more information than wxWindow's input stream
(stream, filename, mime type, anchor).
-
+
@b Note: Any pointer returned by a method of wxFSFile is valid
only as long as the wxFSFile object exists. For example a call to GetStream()
doesn't @e create the stream but only returns the pointer to it. In
other words after 10 calls to GetStream() you will have obtained ten identical
pointers.
-
+
@library{wxbase}
@category{vfs}
-
+
@seealso
wxFileSystemHandler, wxFileSystem, Overview
*/
/**
Constructor. You probably won't use it. See Notes for details.
- @param stream
+ @param stream
The input stream that will be used to access data
- @param location
+ @param location
The full location (aka filename) of the file
- @param mimetype
+ @param mimetype
MIME type of this file. It may be left empty, in which
case the type will be determined from file's extension (location must
not be empty in this case).
- @param anchor
+ @param anchor
Anchor. See GetAnchor() for details.
*/
wxFSFile(wxInputStream stream, const wxString& loc,
const wxString GetAnchor();
/**
- Returns full location of the file, including path and protocol.
+ Returns full location of the file, including path and protocol.
Examples :
*/
const wxString GetLocation();
/**
@class wxFileSystemHandler
@wxheader{filesys.h}
-
+
Classes derived from wxFileSystemHandler are used
to access virtual file systems. Its public interface consists
- of two methods: wxFileSystemHandler::CanOpen
- and wxFileSystemHandler::OpenFile.
+ of two methods: wxFileSystemHandler::CanOpen
+ and wxFileSystemHandler::OpenFile.
It provides additional protected methods to simplify the process
of opening the file: GetProtocol, GetLeftLocation, GetRightLocation,
GetAnchor, GetMimeTypeFromExt.
-
+
Please have a look at overview if you don't know how locations
are constructed.
-
+
Also consult @ref overview_fs "list of available handlers".
-
+
@b wxPerl note: In wxPerl, you need to derive your file system handler class
from Wx::PlFileSystemHandler.
-
+
@library{wxbase}
@category{vfs}
-
+
@seealso
wxFileSystem, wxFSFile, Overview
*/
wxString GetAnchor(const wxString& location);
/**
- Returns the left location string extracted from @e location.
+ Returns the left location string extracted from @e location.
Example: GetLeftLocation("file:myzipfile.zip#zip:index.htm") ==
"file:myzipfile.zip"
wxString GetMimeTypeFromExt(const wxString& location);
/**
- Returns the protocol string extracted from @e location.
+ Returns the protocol string extracted from @e location.
Example: GetProtocol("file:myzipfile.zip#zip:index.htm") == "zip"
*/
wxString GetProtocol(const wxString& location);
/**
- Returns the right location string extracted from @e location.
+ Returns the right location string extracted from @e location.
Example : GetRightLocation("file:myzipfile.zip#zip:index.htm") == "index.htm"
*/
Must be overridden in derived handlers.
- @param fs
+ @param fs
Parent FS (the FS from that OpenFile was called). See ZIP handler
for details of how to use it.
- @param location
+ @param location
The absolute location of file.
*/
virtual wxFSFile* OpenFile(wxFileSystem& fs,
/**
@class wxFont
@wxheader{font.h}
-
+
A font is an object which determines the appearance of text. Fonts are
used for drawing text to a device context, and setting the appearance of
a window's text.
-
+
This class uses @ref overview_trefcount "reference counting and copy-on-write"
internally so that assignments between two instances of this class are very
cheap. You can therefore use actual objects instead of pointers without
efficiency problems. If an instance of this class is changed it will create
its own data internally so that other instances, which previously shared the
data using the reference counting, are not affected.
-
+
You can retrieve the current system font settings with wxSystemSettings.
-
+
wxSystemSettings
-
+
@library{wxcore}
@category{gdi}
-
+
@stdobjects
Objects:
wxNullFont
Pointers:
wxNORMAL_FONT
-
+
wxSMALL_FONT
-
+
wxITALIC_FONT
-
+
wxSWISS_FONT
-
+
@seealso
@ref overview_wxfontoverview "wxFont overview", wxDC::SetFont, wxDC::DrawText,
wxDC::GetTextExtent, wxFontDialog, wxSystemSettings
/**
Creates a font object with the specified attributes.
- @param pointSize
+ @param pointSize
Size in points.
- @param pixelSize
+ @param pixelSize
Size in pixels: this is directly supported only under MSW
currently where this constructor can be used directly, under other platforms a
font with the closest size to the given one is found using binary search and
the static New method must be used.
- @param family
+ @param family
Font family, a generic way of referring to fonts without specifying actual
facename. One of:
A teletype font.
- @param style
+ @param style
One of wxFONTSTYLE_NORMAL, wxFONTSTYLE_SLANT and wxFONTSTYLE_ITALIC.
- @param weight
+ @param weight
Font weight, sometimes also referred to as font boldness. One of:
Bold font.
- @param underline
+ @param underline
The value can be @true or @false. At present this has an effect on Windows and
Motif 2.x only.
- @param faceName
+ @param faceName
An optional string specifying the actual typeface to be used. If it is an empty
string,
a default typeface will be chosen based on the family.
- @param encoding
+ @param encoding
An encoding which may be one of
wxFONTENCODING_SYSTEM
are used.
*/
wxFont();
- wxFont(const wxFont& font);
- wxFont(int pointSize, wxFontFamily family, int style,
- wxFontWeight weight,
- const bool underline = @false,
- const wxString& faceName = "",
- wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
- wxFont(const wxSize& pixelSize, wxFontFamily family,
- int style, wxFontWeight weight,
- const bool underline = @false,
- const wxString& faceName = "",
- wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+ wxFont(const wxFont& font);
+ wxFont(int pointSize, wxFontFamily family, int style,
+ wxFontWeight weight,
+ const bool underline = @false,
+ const wxString& faceName = "",
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+ wxFont(const wxSize& pixelSize, wxFontFamily family,
+ int style, wxFontWeight weight,
+ const bool underline = @false,
+ const wxString& faceName = "",
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
//@}
/**
const bool underline = @false,
const wxString& faceName = "",
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
- static wxFont * New(int pointSize, wxFontFamily family,
- int flags = wxFONTFLAG_DEFAULT,
- const wxString& faceName = "",
- wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
- static wxFont * New(const wxSize& pixelSize,
- wxFontFamily family,
- int style,
- wxFontWeight weight,
- const bool underline = @false,
- const wxString& faceName = "",
- wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
- static wxFont * New(const wxSize& pixelSize,
- wxFontFamily family,
- int flags = wxFONTFLAG_DEFAULT,
- const wxString& faceName = "",
- wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+ static wxFont * New(int pointSize, wxFontFamily family,
+ int flags = wxFONTFLAG_DEFAULT,
+ const wxString& faceName = "",
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+ static wxFont * New(const wxSize& pixelSize,
+ wxFontFamily family,
+ int style,
+ wxFontWeight weight,
+ const bool underline = @false,
+ const wxString& faceName = "",
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+ static wxFont * New(const wxSize& pixelSize,
+ wxFontFamily family,
+ int flags = wxFONTFLAG_DEFAULT,
+ const wxString& faceName = "",
+ wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
//@}
/**
Sets the facename for the font.
Returns @true if the given face name exists; @false otherwise.
- @param faceName
+ @param faceName
A valid facename, which should be on the end-user's system.
@remarks To avoid portability problems, don't rely on a specific face,
/**
Sets the font family.
- @param family
+ @param family
One of:
/**
Sets the point size.
- @param pointSize
+ @param pointSize
Size in points.
@sa GetPointSize()
/**
Sets the font style.
- @param style
+ @param style
One of wxFONTSTYLE_NORMAL, wxFONTSTYLE_SLANT and wxFONTSTYLE_ITALIC.
@sa GetStyle()
/**
Sets underlining.
- @param underlining
+ @param underlining
@true to underline, @false otherwise.
@sa GetUnderlined()
/**
Sets the font weight.
- @param weight
+ @param weight
One of:
/**
@class wxFontDialog
@wxheader{fontdlg.h}
-
+
This class represents the font chooser dialog.
-
+
@library{wxcore}
@category{cmndlg}
-
+
@seealso
Overview, wxFontData, wxGetFontFromUser
*/
public:
//@{
/**
- Constructor. Pass a parent window, and optionally the
+ Constructor. Pass a parent window, and optionally the
@ref overview_wxfontdata "font data" object to be used to initialize the dialog
- controls. If the default constructor is used,
+ controls. If the default constructor is used,
Create() must be called before the dialog can be
shown.
*/
wxFontDialog();
- wxFontDialog(wxWindow* parent);
- wxFontDialog(wxWindow* parent, const wxFontData& data);
+ wxFontDialog(wxWindow* parent);
+ wxFontDialog(wxWindow* parent, const wxFontData& data);
//@}
//@{
occurred.
*/
bool Create(wxWindow* parent);
- bool Create(wxWindow* parent, const wxFontData& data);
+ bool Create(wxWindow* parent, const wxFontData& data);
//@}
//@{
dialog.
*/
const wxFontData GetFontData();
- wxFontData GetFontData();
+ wxFontData GetFontData();
//@}
/**
- Shows the dialog, returning @c wxID_OK if the user pressed Ok, and
+ Shows the dialog, returning @c wxID_OK if the user pressed Ok, and
@c wxID_CANCEL otherwise.
If the user cancels the dialog (ShowModal returns @c wxID_CANCEL), no font
Shows the font selection dialog and returns the font selected by user or
invalid font (use @ref wxFont::isok wxFont:IsOk to test whether a font
is valid) if the dialog was cancelled.
-
- @param parent
+
+ @param parent
The parent window for the font selection dialog
-
- @param fontInit
+
+ @param fontInit
If given, this will be the font initially selected in the dialog.
-
- @param caption
+
+ @param caption
If given, this will be used for the dialog caption.
*/
wxFont wxGetFontFromUser(wxWindow * parent,
/**
@class wxFontEnumerator
@wxheader{fontenum.h}
-
+
wxFontEnumerator enumerates either all available fonts on the system or only
the ones with given attributes - either only fixed-width (suited for use in
programs such as terminal emulators and the like) or the fonts available in
the given encoding.
-
- To do this, you just have to call one of EnumerateXXX() functions - either
- wxFontEnumerator::EnumerateFacenames or
+
+ To do this, you just have to call one of EnumerateXXX() functions - either
+ wxFontEnumerator::EnumerateFacenames or
wxFontEnumerator::EnumerateEncodings and the
- corresponding callback (wxFontEnumerator::OnFacename or
+ corresponding callback (wxFontEnumerator::OnFacename or
wxFontEnumerator::OnFontEncoding) will be called
repeatedly until either all fonts satisfying the specified criteria are
exhausted or the callback returns @false.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@ref overview_wxfontencodingoverview "Font encoding overview", @ref
overview_samplefont "Font sample", wxFont, wxFontMapper
*/
-class wxFontEnumerator
+class wxFontEnumerator
{
public:
/**
bool fixedWidthOnly = @false);
/**
- Return array of strings containing all encodings found by
+ Return array of strings containing all encodings found by
EnumerateEncodings().
*/
static wxArrayString GetEncodings(const wxString& facename = "");
/**
- Return array of strings containing all facenames found by
+ Return array of strings containing all facenames found by
EnumerateFacenames().
*/
static wxArrayString GetFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM,
/**
@class wxFontMapper
@wxheader{fontmap.h}
-
+
wxFontMapper manages user-definable correspondence between logical font
names and the fonts present on the machine.
-
+
The default implementations of all functions will ask the user if they are
not capable of finding the answer themselves and store the answer in a
config file (configurable via SetConfigXXX functions). This behaviour may
be disabled by giving the value of @false to "interactive" parameter.
-
+
However, the functions will always consult the config file to allow the
user-defined values override the default logic and there is no way to
disable this - which shouldn't be ever needed because if "interactive" was
never @true, the config file is never created anyhow.
-
+
In case everything else fails (i.e. there is no record in config file
- and "interactive" is @false or user denied to choose any replacement),
- the class queries wxEncodingConverter
+ and "interactive" is @false or user denied to choose any replacement),
+ the class queries wxEncodingConverter
for "equivalent" encodings (e.g. iso8859-2 and cp1250) and tries them.
-
+
@library{wxcore}
@category{misc}
-
+
@seealso
wxEncodingConverter, @ref overview_nonenglishoverview "Writing non-English
applications"
*/
-class wxFontMapper
+class wxFontMapper
{
public:
/**
/**
Returns the array of all possible names for the given encoding. The array is
@NULL-terminated. IF it isn't empty, the first name in it is the canonical
- encoding name, i.e. the same string as returned by
+ encoding name, i.e. the same string as returned by
GetEncodingName().
*/
static const wxChar** GetAllEncodingNames(wxFontEncoding encoding);
wxNativeEncodingInfo* info,
const wxString& facename = wxEmptyString,
bool interactive = @true);
- bool GetAltForEncoding(wxFontEncoding encoding,
- wxFontEncoding* alt_encoding,
- const wxString& facename = wxEmptyString,
- bool interactive = @true);
+ bool GetAltForEncoding(wxFontEncoding encoding,
+ wxFontEncoding* alt_encoding,
+ const wxString& facename = wxEmptyString,
+ bool interactive = @true);
//@}
/**
- Returns the @e n-th supported encoding. Together with
- GetSupportedEncodingsCount()
+ Returns the @e n-th supported encoding. Together with
+ GetSupportedEncodingsCount()
this method may be used to get all supported encodings.
*/
static wxFontEncoding GetEncoding(size_t n);
/**
Return the encoding corresponding to the given internal name. This function is
the inverse of GetEncodingName() and is
- intentionally less general than
+ intentionally less general than
CharsetToEncoding(), i.e. it doesn't
try to make any guesses nor ever asks the user. It is meant just as a way of
- restoring objects previously serialized using
+ restoring objects previously serialized using
GetEncodingName().
*/
static wxFontEncoding GetEncodingFromName(const wxString& encoding);
/**
- Return internal string identifier for the encoding (see also
+ Return internal string identifier for the encoding (see also
wxFontMapper::GetEncodingDescription)
@sa GetEncodingFromName()
static wxString GetEncodingName(wxFontEncoding encoding);
/**
- Returns the number of the font encodings supported by this class. Together with
+ Returns the number of the font encodings supported by this class. Together with
GetEncoding() this method may be used to get
all supported encodings.
*/
/**
Set the config object to use (may be @NULL to use default).
- By default, the global one (from wxConfigBase::Get() will be used)
+ By default, the global one (from wxConfigBase::Get() will be used)
and the default root path for the config settings is the string returned by
GetDefaultConfigPath().
*/
/**
@class wxFontPickerCtrl
@wxheader{fontpicker.h}
-
+
This control allows the user to select a font. The generic implementation is
a button which brings up a wxFontDialog when clicked. Native implementation
may differ but this is usually a (small) widget which give access to the
font-chooser
dialog.
It is only available if @c wxUSE_FONTPICKERCTRL is set to 1 (the default).
-
+
@beginStyleTable
@style{wxFNTP_DEFAULT_STYLE}:
The default style: wxFNTP_FONTDESC_AS_LABEL |
@style{wxFNTP_USEFONT_FOR_LABEL}:
Uses the currently selected font to draw the label of the button.
@endStyleTable
-
+
@library{wxcore}
@category{miscpickers}
@appearance{fontpickerctrl.png}
-
+
@seealso
wxFontDialog, wxFontPickerEvent
*/
const wxString& name = "fontpickerctrl");
/**
- @param parent
+ @param parent
Parent window, must not be non-@NULL.
- @param id
+ @param id
The identifier for the control.
- @param font
- The initial font shown in the control. If wxNullFont
+ @param font
+ The initial font shown in the control. If wxNullFont
is given, the default font is used.
- @param pos
+ @param pos
Initial position.
- @param size
+ @param size
Initial size.
- @param style
+ @param style
The window style, see wxFNTP_* flags.
- @param validator
+ @param validator
Validator which can be used for additional date checks.
- @param name
+ @param name
Control name.
@returns @true if the control was successfully created or @false if
/**
@class wxFontPickerEvent
@wxheader{fontpicker.h}
-
+
This event class is used for the events generated by
wxFontPickerCtrl.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxFontPickerCtrl
*/
/**
@class wxFrame
@wxheader{frame.h}
-
+
A frame is a window whose size and position can (usually) be changed by the
user. It usually has thick borders and a title bar, and can optionally contain
a menu bar, toolbar and status bar. A frame can contain any window that is not
a frame or dialog.
-
+
A frame that has a status bar and toolbar created via the
CreateStatusBar/CreateToolBar functions manages these windows, and adjusts the
value returned by GetClientSize to reflect the remaining size available to
application windows.
-
+
@beginStyleTable
@style{wxDEFAULT_FRAME_STYLE}:
- Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxRESIZE_BORDER |
+ Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxRESIZE_BORDER |
wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN.
@style{wxICONIZE}:
Display the frame iconized (minimized). Windows only.
desktop window under Windows which may seem strange to the users
and thus it might be better to use this style only without
wxMINIMIZE_BOX style). In wxGTK, the flag is respected only if GTK+
- is at least version 2.2 and the window manager supports
+ is at least version 2.2 and the window manager supports
_NET_WM_STATE_SKIP_TASKBAR hint. Has no effect under other
platforms.
@style{wxFRAME_FLOAT_ON_PARENT}:
On Mac OS X, frames with this style will be shown with a metallic
look. This is an extra style.
@endStyleTable
-
+
@library{wxcore}
@category{managedwnd}
-
+
@seealso
wxMDIParentFrame, wxMDIChildFrame, wxMiniFrame, wxDialog
*/
/**
Constructor, creating the window.
- @param parent
+ @param parent
The window parent. This may be @NULL. If it is non-@NULL, the frame will
always be displayed on top of the parent window on Windows.
- @param id
+ @param id
The window identifier. It may take a value of -1 to indicate a default value.
- @param title
+ @param title
The caption to be displayed on the frame's title bar.
- @param pos
+ @param pos
The window position. The value wxDefaultPosition indicates a default position, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param size
+ @param size
The window size. The value wxDefaultSize indicates a default size, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param style
+ @param style
The window style. See wxFrame.
- @param name
+ @param name
The name of the window. This parameter is used to associate a name with the
item,
allowing the application user to set Motif resource values for
@sa Create()
*/
wxFrame();
- wxFrame(wxWindow* parent, wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = "frame");
+ wxFrame(wxWindow* parent, wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = "frame");
//@}
/**
/**
Centres the frame on the display.
- @param direction
+ @param direction
The parameter may be wxHORIZONTAL, wxVERTICAL or wxBOTH.
*/
void Centre(int direction = wxBOTH);
/**
Creates a status bar at the bottom of the frame.
- @param number
+ @param number
The number of fields to create. Specify a
value greater than 1 to create a multi-field status bar.
- @param style
+ @param style
The status bar style. See wxStatusBar for a list
of valid styles.
- @param id
+ @param id
The status bar window identifier. If -1, an identifier will be chosen by
wxWidgets.
- @param name
+ @param name
The status bar window name.
@returns A pointer to the status bar if it was created successfully, @NULL
/**
Creates a toolbar at the top or left of the frame.
- @param style
+ @param style
The toolbar style. See wxToolBar for a list
of valid styles.
- @param id
+ @param id
The toolbar window identifier. If -1, an identifier will be chosen by
wxWidgets.
- @param name
+ @param name
The toolbar window name.
@returns A pointer to the toolbar if it was created successfully, @NULL
/**
Virtual function called when a status bar is requested by CreateStatusBar().
- @param number
+ @param number
The number of fields to create.
- @param style
+ @param style
The window style. See wxStatusBar for a list
of valid styles.
- @param id
+ @param id
The window identifier. If -1, an identifier will be chosen by
wxWidgets.
- @param name
+ @param name
The window name.
@returns A status bar object.
/**
Virtual function called when a toolbar is requested by CreateToolBar().
- @param style
+ @param style
The toolbar style. See wxToolBar for a list
of valid styles.
- @param id
+ @param id
The toolbar window identifier. If -1, an identifier will be chosen by
wxWidgets.
- @param name
+ @param name
The toolbar window name.
@returns A toolbar object.
/**
Simulate a menu command.
- @param id
+ @param id
The identifier for a menu item.
*/
void ProcessCommand(int id);
/**
Tells the frame to show the given menu bar.
- @param menuBar
+ @param menuBar
The menu bar to associate with the frame.
@remarks If the frame is destroyed, the menu bar and its menus will be
/**
Sets the status bar text and redraws the status bar.
- @param text
+ @param text
The text for the status field.
- @param number
+ @param number
The status field (starting from zero).
@remarks Use an empty string to clear the status bar.
/**
Sets the widths of the fields in the status bar.
- @param n
+ @param n
The number of fields in the status bar. It must be the
same used in CreateStatusBar.
- @param widths
+ @param widths
Must contain an array of n integers, each of which is a status field width
in pixels. A value of -1 indicates that the field is variable width; at least
one
/**
@class wxMemoryFSHandler
@wxheader{fs_mem.h}
-
- This wxFileSystem handler can store arbitrary
+
+ This wxFileSystem handler can store arbitrary
data in memory stream and make them accessible via URL. It is particularly
suitable for storing bitmaps from resources or included XPM files so that
they can be used with wxHTML.
-
+
Filenames are prefixed with "memory:", e.g. "memory:myfile.html".
-
+
Example:
-
+
@code
#ifndef __WXMSW__
#include "logo.xpm"
#endif
-
+
void MyFrame::OnAbout(wxCommandEvent&)
{
wxBusyCursor bcur;
wxFileSystem::AddHandler(new wxMemoryFSHandler);
wxMemoryFSHandler::AddFile("logo.pcx", wxBITMAP(logo), wxBITMAP_TYPE_PCX);
- wxMemoryFSHandler::AddFile("about.htm",
+ wxMemoryFSHandler::AddFile("about.htm",
"htmlbodyAbout: "
"img src=\"memory:logo.pcx\"/body/html");
-
+
wxDialog dlg(this, -1, wxString(_("About")));
wxBoxSizer *topsizer;
wxHtmlWindow *html;
topsizer = new wxBoxSizer(wxVERTICAL);
- html = new wxHtmlWindow(, -1, wxDefaultPosition,
+ html = new wxHtmlWindow(, -1, wxDefaultPosition,
wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
html-SetBorders(0);
html-LoadPage("memory:about.htm");
- html-SetSize(html-GetInternalRepresentation()-GetWidth(),
+ html-SetSize(html-GetInternalRepresentation()-GetWidth(),
html-GetInternalRepresentation()-GetHeight());
topsizer-Add(html, 1, wxALL, 10);
topsizer-Add(new wxStaticLine(, -1), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
- topsizer-Add(new wxButton(, wxID_OK, "Ok"),
+ topsizer-Add(new wxButton(, wxID_OK, "Ok"),
0, wxALL | wxALIGN_RIGHT, 15);
dlg.SetAutoLayout(@true);
dlg.SetSizer(topsizer);
topsizer-Fit();
dlg.Centre();
dlg.ShowModal();
-
+
wxMemoryFSHandler::RemoveFile("logo.pcx");
wxMemoryFSHandler::RemoveFile("about.htm");
}
@endcode
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxMemoryFSHandler::AddFileWithMimeType
*/
//@{
/**
- Add file to list of files stored in memory. Stored
+ Add file to list of files stored in memory. Stored
data (bitmap, text or raw data)
- will be copied into private memory stream and available under
+ will be copied into private memory stream and available under
name "memory:" + @e filename.
The @e type argument is one of @c wxBITMAP_TYPE_XXX constants.
*/
static void AddFile(const wxString& filename, wxImage& image,
long type);
- static void AddFile(const wxString& filename,
- const wxBitmap& bitmap,
- long type);
+ static void AddFile(const wxString& filename,
+ const wxBitmap& bitmap,
+ long type);
//@}
//@{
static void AddFileWithMimeType(const wxString& filename,
const wxString& textdata,
const wxString& mimetype);
- static void AddFileWithMimeType(const wxString& filename,
- const void* binarydata,
- size_t size,
- const wxString& mimetype);
+ static void AddFileWithMimeType(const wxString& filename,
+ const void* binarydata,
+ size_t size,
+ const wxString& mimetype);
//@}
/**
/**
@class wxGauge
@wxheader{gauge.h}
-
+
A gauge is a horizontal or vertical bar which shows a quantity (often time).
-
+
wxGauge supports two working modes: determinate and indeterminate progress.
-
+
The first is the usual working mode (see wxGauge::SetValue
and wxGauge::SetRange) while the second can be used when
the program is doing some processing but you don't know how much progress is
In this case, you can periodically call the wxGauge::Pulse
function to make the progress bar switch to indeterminate mode (graphically
it's usually a set of blocks which move or bounce in the bar control).
-
+
wxGauge supports dynamic switch between these two work modes.
-
+
There are no user commands for the gauge.
-
+
@beginStyleTable
@style{wxGA_HORIZONTAL}:
Creates a horizontal gauge.
Creates smooth progress bar with one pixel wide update step (not
supported by all platforms).
@endStyleTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{gauge.png}
-
+
@seealso
wxSlider, wxScrollBar
*/
/**
Constructor, creating and showing a gauge.
- @param parent
+ @param parent
Window parent.
- @param id
+ @param id
Window identifier.
- @param range
+ @param range
Integer range (maximum value) of the gauge. It is ignored when the gauge is
used in indeterminate mode.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size.
- @param style
+ @param style
Gauge style. See wxGauge.
- @param name
+ @param name
Window name.
@sa Create()
*/
wxGauge();
- wxGauge(wxWindow* parent, wxWindowID id, int range,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxGA_HORIZONTAL,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "gauge");
+ wxGauge(wxWindow* parent, wxWindowID id, int range,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxGA_HORIZONTAL,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "gauge");
//@}
/**
int GetValue();
/**
- Returns @true if the gauge is vertical (has @c wxGA_VERTICAL style) and
+ Returns @true if the gauge is vertical (has @c wxGA_VERTICAL style) and
@false otherwise.
*/
bool IsVertical();
This function makes the gauge switch to determinate mode, if it was in
indeterminate mode before.
- @param pos
+ @param pos
Position for the gauge level.
@sa GetValue()
/**
@class wxGBPosition
@wxheader{gbsizer.h}
-
+
This class represents the position of an item in a virtual grid of
rows and columns managed by a wxGridBagSizer.
-
+
@library{wxcore}
@category{FIXME}
*/
-class wxGBPosition
+class wxGBPosition
{
public:
//@{
The default is (0,0).
*/
wxGBPosition();
- wxGBPosition(int row, int col);
+ wxGBPosition(int row, int col);
//@}
/**
/**
@class wxGridBagSizer
@wxheader{gbsizer.h}
-
+
A wxSizer that can lay out items in a virtual grid
like a wxFlexGridSizer but in this case
- explicit positioning of the items is allowed using
+ explicit positioning of the items is allowed using
wxGBPosition, and items can optionally span
more than one row and/or column using wxGBSpan.
-
+
@library{wxcore}
@category{winlayout}
*/
int flag = 0,
int border = 0,
wxObject* userData = @NULL);
- wxSizerItem* Add(wxSizer* sizer, const wxGBPosition& pos,
- const wxGBSpan& span = wxDefaultSpan,
- int flag = 0,
- int border = 0,
- wxObject* userData = @NULL);
- wxSizerItem* Add(int width, int height,
- const wxGBPosition& pos,
- const wxGBSpan& span = wxDefaultSpan,
- int flag = 0,
- int border = 0,
- wxObject* userData = @NULL);
- wxSizerItem* Add(wxGBSizerItem* item);
+ wxSizerItem* Add(wxSizer* sizer, const wxGBPosition& pos,
+ const wxGBSpan& span = wxDefaultSpan,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = @NULL);
+ wxSizerItem* Add(int width, int height,
+ const wxGBPosition& pos,
+ const wxGBSpan& span = wxDefaultSpan,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = @NULL);
+ wxSizerItem* Add(wxGBSizerItem* item);
//@}
/**
*/
bool CheckForIntersection(wxGBSizerItem* item,
wxGBSizerItem* excludeItem = @NULL);
- bool CheckForIntersection(const wxGBPosition& pos,
- const wxGBSpan& span,
- wxGBSizerItem* excludeItem = @NULL);
+ bool CheckForIntersection(const wxGBPosition& pos,
+ const wxGBSpan& span,
+ wxGBSizerItem* excludeItem = @NULL);
//@}
//@{
not found. (non-recursive)
*/
wxGBSizerItem* FindItem(wxWindow* window);
- wxGBSizerItem* FindItem(wxSizer* sizer);
+ wxGBSizerItem* FindItem(wxSizer* sizer);
//@}
/**
Get the grid position of the specified item.
*/
wxGBPosition GetItemPosition(wxWindow* window);
- wxGBPosition GetItemPosition(wxSizer* sizer);
- wxGBPosition GetItemPosition(size_t index);
+ wxGBPosition GetItemPosition(wxSizer* sizer);
+ wxGBPosition GetItemPosition(size_t index);
//@}
//@{
Get the row/col spanning of the specified item
*/
wxGBSpan GetItemSpan(wxWindow* window);
- wxGBSpan GetItemSpan(wxSizer* sizer);
- wxGBSpan GetItemSpan(size_t index);
+ wxGBSpan GetItemSpan(wxSizer* sizer);
+ wxGBSpan GetItemSpan(size_t index);
//@}
/**
@false is returned.
*/
bool SetItemPosition(wxWindow* window, const wxGBPosition& pos);
- bool SetItemPosition(wxSizer* sizer, const wxGBPosition& pos);
- bool SetItemPosition(size_t index, const wxGBPosition& pos);
+ bool SetItemPosition(wxSizer* sizer, const wxGBPosition& pos);
+ bool SetItemPosition(size_t index, const wxGBPosition& pos);
//@}
//@{
then @false is returned.
*/
bool SetItemSpan(wxWindow* window, const wxGBSpan& span);
- bool SetItemSpan(wxSizer* sizer, const wxGBSpan& span);
- bool SetItemSpan(size_t index, const wxGBSpan& span);
+ bool SetItemSpan(wxSizer* sizer, const wxGBSpan& span);
+ bool SetItemSpan(size_t index, const wxGBSpan& span);
//@}
};
/**
@class wxGBSizerItem
@wxheader{gbsizer.h}
-
- The wxGBSizerItem class is used by the
+
+ The wxGBSizerItem class is used by the
wxGridBagSizer for tracking the items in the
- sizer. It adds grid position and spanning information to the normal
+ sizer. It adds grid position and spanning information to the normal
wxSizerItem by adding
wxGBPosition and wxGBSpan
attrbibutes. Most of the time you will not need to use a
wxGBSizerItem directly in your code, but there are a couple of cases
where it is handy.
-
+
@library{wxcore}
@category{FIXME}
*/
wxGBSizerItem(int width, int height, const wxGBPosition& pos,
const wxGBSpan& span, int flag,
int border, wxObject* userData);
- wxGBSizerItem(wxWindow* window, const wxGBPosition& pos,
- const wxGBSpan& span,
- int flag, int border,
- wxObject* userData);
- wxGBSizerItem(wxSizer* sizer, const wxGBPosition& pos,
- const wxGBSpan& span,
- int flag, int border,
- wxObject* userData);
+ wxGBSizerItem(wxWindow* window, const wxGBPosition& pos,
+ const wxGBSpan& span,
+ int flag, int border,
+ wxObject* userData);
+ wxGBSizerItem(wxSizer* sizer, const wxGBPosition& pos,
+ const wxGBSpan& span,
+ int flag, int border,
+ wxObject* userData);
//@}
/**
Get the grid position of the item.
*/
wxGBPosition GetPos();
- void GetPos(int& row, int& col);
+ void GetPos(int& row, int& col);
//@}
//@{
Get the row and column spanning of the item.
*/
wxGBSpan GetSpan();
- void GetSpan(int& rowspan, int& colspan);
+ void GetSpan(int& rowspan, int& colspan);
//@}
//@{
Returns @true if the given pos/span would intersect with this item.
*/
bool Intersects(const wxGBSizerItem& other);
- bool Intersects(const wxGBPosition& pos,
- const wxGBSpan& span);
+ bool Intersects(const wxGBPosition& pos,
+ const wxGBSpan& span);
//@}
/**
/**
@class wxGBSpan
@wxheader{gbsizer.h}
-
+
This class is used to hold the row and column spanning attributes of
items in a wxGridBagSizer.
-
+
@library{wxcore}
@category{FIXME}
*/
-class wxGBSpan
+class wxGBSpan
{
public:
//@{
each direction.
*/
wxGBSpan();
- wxGBSpan(int rowspan, int colspan);
+ wxGBSpan(int rowspan, int colspan);
//@}
/**
/**
@class wxRealPoint
@wxheader{gdicmn.h}
-
+
A @b wxRealPoint is a useful data structure for graphics operations.
It contains floating point @e x and @e y members.
See also wxPoint for an integer version.
-
+
@library{wxcore}
@category{data}
-
+
@seealso
wxPoint
*/
-class wxRealPoint
+class wxRealPoint
{
public:
//@{
Members of the @b wxRealPoint object.
*/
wxRealPoint();
- wxRealPoint(double x, double y);
+ wxRealPoint(double x, double y);
//@}
};
/**
@class wxRect
@wxheader{gdicmn.h}
-
+
A class for manipulating rectangles.
-
+
@library{wxcore}
@category{data}
-
+
@seealso
wxPoint, wxSize
*/
-class wxRect
+class wxRect
{
public:
//@{
Creates a wxRect object from size values at the origin.
*/
wxRect();
- wxRect(int x, int y, int width, int height);
- wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
- wxRect(const wxPoint& pos, const wxSize& size);
- wxRect(const wxSize& size);
+ wxRect(int x, int y, int width, int height);
+ wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
+ wxRect(const wxPoint& pos, const wxSize& size);
+ wxRect(const wxSize& size);
//@}
//@{
/**
Returns the rectangle having the same size as this one but centered relatively
to the given rectangle @e r. By default, rectangle is centred in both
- directions but if @e dir includes only @c wxVERTICAL or only
+ directions but if @e dir includes only @c wxVERTICAL or only
@c wxHORIZONTAL flag, then it is only centered in this direction while
the other component of its position remains unchanged.
*/
wxRect CentreIn(const wxRect& r, int dir = wxBOTH);
- wxRect CenterIn(const wxRect& r, int dir = wxBOTH);
+ wxRect CenterIn(const wxRect& r, int dir = wxBOTH);
//@}
//@{
(or touches its boundary) and @false otherwise.
*/
bool Contains(int x, int y);
- bool Contains(const wxPoint& pt);
- bool Contains(const wxRect& rect);
+ bool Contains(const wxPoint& pt);
+ bool Contains(const wxRect& rect);
//@}
//@{
@sa Inflate()
*/
void Deflate(wxCoord dx, wxCoord dy);
- void Deflate(const wxSize& diff);
- void Deflate(wxCoord diff);
- wxRect Deflate(wxCoord dx, wxCoord dy);
+ void Deflate(const wxSize& diff);
+ void Deflate(wxCoord diff);
+ wxRect Deflate(wxCoord dx, wxCoord dy);
//@}
/**
int GetTop();
/**
- Gets the position of the top left corner of the rectangle, same as
+ Gets the position of the top left corner of the rectangle, same as
GetPosition().
*/
wxPoint GetTopLeft();
@sa Deflate()
*/
void Inflate(wxCoord dx, wxCoord dy);
- void Inflate(const wxSize& diff);
- void Inflate(wxCoord diff);
- wxRect Inflate(wxCoord dx, wxCoord dy);
+ void Inflate(const wxSize& diff);
+ void Inflate(wxCoord diff);
+ wxRect Inflate(wxCoord dx, wxCoord dy);
//@}
//@{
other one modifies this rectangle in place.
*/
wxRect Intersect(const wxRect& rect);
- wxRect Intersect(const wxRect& rect);
+ wxRect Intersect(const wxRect& rect);
//@}
/**
bool Intersects(const wxRect& rect);
/**
- Returns @true if this rectangle has a width or height less than or equal to
+ Returns @true if this rectangle has a width or height less than or equal to
0 and @false otherwise.
*/
bool IsEmpty();
bottom, otherwise it is moved to the left or top respectively.
*/
void Offset(wxCoord dx, wxCoord dy);
- void Offset(const wxPoint& pt);
+ void Offset(const wxPoint& pt);
//@}
/**
other one modifies this rectangle in place.
*/
wxRect Union(const wxRect& rect);
- wxRect Union(const wxRect& rect);
+ wxRect Union(const wxRect& rect);
//@}
/**
Returns the intersection of two rectangles (which may be empty).
*/
bool operator !=(const wxRect& r1, const wxRect& r2);
- wxRect operator +(const wxRect& r1, const wxRect& r2);
- wxRect operator +=(const wxRect& r);
- See also wxRect operator *(const wxRect& r1,
- const wxRect& r2);
- wxRect operator *=(const wxRect& r);
+ wxRect operator +(const wxRect& r1, const wxRect& r2);
+ wxRect operator +=(const wxRect& r);
+ See also wxRect operator *(const wxRect& r1,
+ const wxRect& r2);
+ wxRect operator *=(const wxRect& r);
//@}
/**
/**
@class wxBrushList
@wxheader{gdicmn.h}
-
+
A brush list is a list containing all brushes which have been created.
-
+
@library{wxcore}
@category{gdi}
-
+
@seealso
wxBrush
*/
brush, adds it
to the brush list, and returns it.
- @param colour
+ @param colour
Colour object.
- @param style
+ @param style
Brush style. See wxBrush::SetStyle for a list of styles.
*/
wxBrush * FindOrCreateBrush(const wxColour& colour,
/**
@class wxPoint
@wxheader{gdicmn.h}
-
+
A @b wxPoint is a useful data structure for graphics operations.
It simply contains integer @e x and @e y members.
-
+
See also wxRealPoint for a floating point version.
-
+
@library{wxcore}
@category{data}
-
+
@seealso
wxRealPoint
*/
-class wxPoint
+class wxPoint
{
public:
//@{
Create a point.
*/
wxPoint();
- wxPoint(int x, int y);
+ wxPoint(int x, int y);
//@}
//@{
wxSize object.
*/
void operator =(const wxPoint& pt);
- bool operator ==(const wxPoint& p1, const wxPoint& p2);
- bool operator !=(const wxPoint& p1, const wxPoint& p2);
- wxPoint operator +(const wxPoint& p1, const wxPoint& p2);
- wxPoint operator -(const wxPoint& p1, const wxPoint& p2);
- wxPoint operator +=(const wxPoint& pt);
- wxPoint operator -=(const wxPoint& pt);
- wxPoint operator +(const wxPoint& pt, const wxSize& sz);
- wxPoint operator -(const wxPoint& pt, const wxSize& sz);
- wxPoint operator +(const wxSize& sz, const wxPoint& pt);
- wxPoint operator -(const wxSize& sz, const wxPoint& pt);
- wxPoint operator +=(const wxSize& sz);
- wxPoint operator -=(const wxSize& sz);
+ bool operator ==(const wxPoint& p1, const wxPoint& p2);
+ bool operator !=(const wxPoint& p1, const wxPoint& p2);
+ wxPoint operator +(const wxPoint& p1, const wxPoint& p2);
+ wxPoint operator -(const wxPoint& p1, const wxPoint& p2);
+ wxPoint operator +=(const wxPoint& pt);
+ wxPoint operator -=(const wxPoint& pt);
+ wxPoint operator +(const wxPoint& pt, const wxSize& sz);
+ wxPoint operator -(const wxPoint& pt, const wxSize& sz);
+ wxPoint operator +(const wxSize& sz, const wxPoint& pt);
+ wxPoint operator -(const wxSize& sz, const wxPoint& pt);
+ wxPoint operator +=(const wxSize& sz);
+ wxPoint operator -=(const wxSize& sz);
//@}
/**
/**
@class wxColourDatabase
@wxheader{gdicmn.h}
-
+
wxWidgets maintains a database of standard RGB colours for a predefined
set of named colours (such as "BLACK'', "LIGHT GREY''). The
application may add to this set if desired by using
wxColourDatabase::AddColour and may use it to look up
colours by names using wxColourDatabase::Find or find the names
for the standard colour suing wxColourDatabase::FindName.
-
+
There is one predefined instance of this class called
@b wxTheColourDatabase.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxColour
*/
-class wxColourDatabase
+class wxColourDatabase
{
public:
/**
*/
void AddColour(const wxString& colourName,
const wxColour& colour);
- void AddColour(const wxString& colourName, wxColour* colour);
+ void AddColour(const wxString& colourName, wxColour* colour);
//@}
/**
/**
@class wxFontList
@wxheader{gdicmn.h}
-
+
A font list is a list containing all fonts which have been created. There
is only one instance of this class: @b wxTheFontList. Use this object to search
for a previously created font of the desired type and create it if not already
be
deleted and their resources freed, eliminating the possibility of 'memory
leaks'.
-
+
@library{wxcore}
@category{gdi}
-
+
@seealso
wxFont
*/
/**
@class wxSize
@wxheader{gdicmn.h}
-
+
A @b wxSize is a useful data structure for graphics operations.
It simply contains integer @e width and @e height members.
-
+
wxSize is used throughout wxWidgets as well as wxPoint which, although almost
equivalent to wxSize, has a different meaning: wxPoint represents a position
while wxSize - the size.
-
+
@b wxPython note: wxPython defines aliases for the @c x and @c y members
named @c width and @c height since it makes much more sense for
sizes.
-
-
+
+
@library{wxcore}
@category{data}
-
+
@seealso
wxPoint, wxRealPoint
*/
-class wxSize
+class wxSize
{
public:
//@{
Creates a size object.
*/
wxSize();
- wxSize(int width, int height);
+ wxSize(int width, int height);
//@}
//@{
@sa IncBy()
*/
void DecBy(const wxSize& size);
- void DecBy(int dx, int dy);
- void DecBy(int d);
+ void DecBy(int dx, int dy);
+ void DecBy(int d);
//@}
/**
@sa DecBy()
*/
void IncBy(const wxSize& size);
- void IncBy(int dx, int dy);
- void IncBy(int d);
+ void IncBy(int dx, int dy);
+ void IncBy(int d);
//@}
/**
integer.
*/
void operator =(const wxSize& sz);
- bool operator ==(const wxSize& s1, const wxSize& s2);
- bool operator !=(const wxSize& s1, const wxSize& s2);
- wxSize operator +(const wxSize& s1, const wxSize& s2);
- wxSize operator -(const wxSize& s1, const wxSize& s2);
- wxSize operator +=(const wxSize& sz);
- wxSize operator -=(const wxSize& sz);
- wxSize operator /(const wxSize& sz, int factor);
- wxSize operator *(const wxSize& sz, int factor);
- wxSize operator *(int factor, const wxSize& sz);
- wxSize operator /=(int factor);
- wxSize operator *=(int factor);
+ bool operator ==(const wxSize& s1, const wxSize& s2);
+ bool operator !=(const wxSize& s1, const wxSize& s2);
+ wxSize operator +(const wxSize& s1, const wxSize& s2);
+ wxSize operator -(const wxSize& s1, const wxSize& s2);
+ wxSize operator +=(const wxSize& sz);
+ wxSize operator -=(const wxSize& sz);
+ wxSize operator /(const wxSize& sz, int factor);
+ wxSize operator *(const wxSize& sz, int factor);
+ wxSize operator *(int factor, const wxSize& sz);
+ wxSize operator /=(int factor);
+ wxSize operator *=(int factor);
//@}
/**
/**
@class wxPenList
@wxheader{gdicmn.h}
-
+
There is only one instance of this class: @b wxThePenList. Use
this object to search for a previously created pen of the desired
type and create it if not already found. In some windowing systems,
be deleted and their resources freed, eliminating the possibility of
'memory leaks'. However, it is best not to rely on this automatic
cleanup because it can lead to double deletion in some circumstances.
-
+
There are two mechanisms in recent versions of wxWidgets which make the
pen list less useful than it once was. Under Windows, scarce resources
are cleaned up internally if they are not being used. Also, a referencing
working out when it is safe delete a pen, because the referencing counting does
it for you. For example, you can set a pen in a device context, and then
immediately delete the pen you passed, because the pen is 'copied'.
-
+
So you may find it easier to ignore the pen list, and instead create
and copy pens as you see fit. If your Windows resource meter suggests
your application is using too many resources, you can resort to using
GDI lists to share objects explicitly.
-
+
The only compelling use for the pen list is for wxWidgets to keep
track of pens in order to clean them up on exit. It is also kept for
backward compatibility with earlier versions of wxWidgets.
-
+
@library{wxcore}
@category{gdi}
-
+
@seealso
wxPen
*/
-class wxPenList
+class wxPenList
{
public:
/**
pen, adds it
to the pen list, and returns it.
- @param colour
+ @param colour
Colour object.
- @param colourName
+ @param colourName
Colour name, which should be in the colour database.
- @param width
+ @param width
Width of pen.
- @param style
+ @param style
Pen style. See wxPen::wxPen for a list of styles.
*/
wxPen* FindOrCreatePen(const wxColour& colour, int width,
int style);
- wxPen* FindOrCreatePen(const wxString& colourName, int width,
- int style);
+ wxPen* FindOrCreatePen(const wxString& colourName, int width,
+ int style);
//@}
};
*/
void wxClientDisplayRect(int * x, int * y, int * width,
int * height);
- wxRect wxGetClientDisplayRect();
+wxRect wxGetClientDisplayRect();
//@}
//@{
Returns the display size in pixels.
*/
void wxDisplaySize(int * width, int * height);
- wxSize wxGetDisplaySize();
+wxSize wxGetDisplaySize();
//@}
//@{
Returns the display size in millimeters.
*/
void wxDisplaySizeMM(int * width, int * height);
- wxSize wxGetDisplaySizeMM();
+wxSize wxGetDisplaySizeMM();
//@}
/**
This macro loads an icon from either application resources (on the platforms
for which they exist, i.e. Windows and OS2) or from an XPM file. It allows to
avoid using @c #ifdefs when creating icons.
-
+
@sa @ref overview_wxbitmapoverview "Bitmaps and icons overview", wxBITMAP
*/
#define wxICON() /* implementation is private */
This macro loads a bitmap from either application resources (on the platforms
for which they exist, i.e. Windows and OS2) or from an XPM file. It allows to
avoid using @c #ifdefs when creating bitmaps.
-
+
@sa @ref overview_wxbitmapoverview "Bitmaps and icons overview", wxICON
*/
#define wxBITMAP() /* implementation is private */
/**
@class wxGDIObject
@wxheader{gdiobj.h}
-
+
This class allows platforms to implement functionality to optimise GDI objects,
such
as wxPen, wxBrush and wxFont. On Windows, the underling GDI objects are a
scarce resource
and are cleaned up when a usage count goes to zero. On some platforms this
class may not have any special functionality.
-
+
Since the functionality of this class is platform-specific, it is not
documented here in detail.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxPen, wxBrush, wxFont
*/
/**
@class wxGLContext
@wxheader{glcanvas.h}
-
+
An instance of a wxGLContext represents the state of an OpenGL state machine
and the connection between OpenGL and the system.
-
+
The OpenGL state includes everything that can be set with the OpenGL API:
colors, rendering variables, display lists, texture objects, etc.
Although it is possible to have multiple rendering contexts share display lists
in order to save resources,
this method is hardly used today any more, because display lists are only a
tiny fraction of the overall state.
-
+
Therefore, one rendering context is usually used with or bound to multiple
output windows in turn,
so that the application has access to the complete and identical state while
rendering into each window.
-
+
Binding (making current) a rendering context with another instance of a
wxGLCanvas however works only
if the other wxGLCanvas was created with the same attributes as the wxGLCanvas
from which the wxGLContext
was initialized. (This applies to sharing display lists among contexts
analogously.)
-
+
Note that some wxGLContext features are extremely platform-specific - its best
to check your native platform's glcanvas header (on windows include/wx/msw/glcanvas.h) to see what features your native platform provides.
-
+
@library{wxgl}
@category{gl}
-
+
@seealso
wxGLCanvas
*/
/**
Constructor.
- @param win
+ @param win
The canvas that is used to initialize this context. This parameter is needed
only temporarily,
and the caller may do anything with it (e.g. destroy the window) after the
that has been created
with equivalent attributes as win.
- @param other
+ @param other
Context to share display lists with or @NULL (the default) for no sharing.
*/
wxGLContext(wxGLCanvas* win, const wxGLContext* other=@NULL);
/**
@class wxGLCanvas
@wxheader{glcanvas.h}
-
+
wxGLCanvas is a class for displaying OpenGL graphics. It is always used in
conjunction with wxGLContext as the context can only be
be made current (i.e. active for the OpenGL commands) when it is associated to
a wxGLCanvas.
-
+
More precisely, you first need to create a wxGLCanvas window and then create an
instance of a wxGLContext that is initialized with this
- wxGLCanvas and then later use either wxGLCanvas::SetCurrent
- with the instance of the wxGLContext or
+ wxGLCanvas and then later use either wxGLCanvas::SetCurrent
+ with the instance of the wxGLContext or
wxGLContext::SetCurrent with the instance of
the wxGLCanvas (which might be not the same as was used
for the creation of the context) to bind the OpenGL state that is represented
- by the rendering context to the canvas, and then finally call
+ by the rendering context to the canvas, and then finally call
wxGLCanvas::SwapBuffers to swap the buffers of
the OpenGL canvas and thus show your current output.
-
+
Notice that previous versions of wxWidgets used to implicitly create a
wxGLContext inside wxGLCanvas itself. This is still supported in the current
version but is deprecated now and will be removed in the future, please update
your code to create the rendering contexts explicitly.
-
+
To set up the attributes for the canvas (number of bits for the depth buffer,
number of bits for the stencil buffer and so on) you should set up the correct
values of
the @e attribList parameter. The values that should be set up and their
meanings will be described below.
-
+
Notice that OpenGL is not enabled by default. To switch it on, you need to edit
setup.h under Windows and set @c wxUSE_GLCANVAS to 1 (you may also need
to have to add @c opengl32.lib and @c glu32.lib to the list of libraries
your program is linked with). On Unix, pass @c --with-opengl to configure.
-
+
@library{wxgl}
@category{gl}
-
+
@seealso
wxGLContext
*/
Creates a window with the given parameters. Notice that you need to create and
use a wxGLContext to output to this window.
- If
+ If
@param attribList is not specified, double buffered RGBA mode is used.
- parent
+ parent
Pointer to a parent window.
- @param id
+ @param id
Window identifier. If -1, will automatically create an identifier.
- @param pos
+ @param pos
Window position. wxDefaultPosition is (-1, -1) which indicates that wxWidgets
should generate a default position for the window.
- @param size
+ @param size
Window size. wxDefaultSize is (-1, -1) which indicates that wxWidgets should
generate a default size for the window. If no suitable size can be found, the
window will be sized to 20x20 pixels so that the window is visible but obviously not correctly sized.
- @param style
+ @param style
Window style.
- @param name
+ @param name
Window name.
- @param attribList
+ @param attribList
Array of integers. With this parameter you can set the device context
attributes associated to this window.
This array is zero-terminated: it should be set up with constants described in
indicates the number of
bits for the depth buffer, so:
- @param palette
+ @param palette
Palette for indexed colour (i.e. non WX_GL_RGBA) mode.
Ignored under most platforms.
*/
Returns @true if attributes are supported.
- @param attribList
+ @param attribList
See attribList for wxGLCanvas().
*/
static bool IsDisplaySupported(const int * attribList = @NULL);
Makes the OpenGL state that is represented by the OpenGL rendering context
@e context current, i.e. it will be used by all subsequent OpenGL calls.
- This is equivalent to wxGLContext::SetCurrent
+ This is equivalent to wxGLContext::SetCurrent
called with this window as parameter.
Note that this function may only be called when the window is shown on screen,
/**
@class wxGraphicsPath
@wxheader{graphics.h}
-
+
A wxGraphicsPath is a native representation of an geometric path. The contents
- are specific an private to the respective renderer. Instances are ref counted and can
+ are specific an private to the respective renderer. Instances are ref counted and can
therefore be assigned as usual. The only way to get a valid instance is via a
CreatePath call on the graphics context or the renderer instance.
-
+
@library{wxcore}
@category{FIXME}
*/
void AddArc(wxDouble x, wxDouble y, wxDouble r,
wxDouble startAngle,
wxDouble endAngle, bool clockwise);
- void AddArc(const wxPoint2DDouble& c, wxDouble r,
- wxDouble startAngle,
- wxDouble endAngle,
- bool clockwise);
+ void AddArc(const wxPoint2DDouble& c, wxDouble r,
+ wxDouble startAngle,
+ wxDouble endAngle,
+ bool clockwise);
//@}
/**
wxDouble cy2,
wxDouble x,
wxDouble y);
- void AddCurveToPoint(const wxPoint2DDouble& c1,
- const wxPoint2DDouble& c2,
- const wxPoint2DDouble& e);
+ void AddCurveToPoint(const wxPoint2DDouble& c1,
+ const wxPoint2DDouble& c2,
+ const wxPoint2DDouble& e);
//@}
/**
*/
void AddLineToPoint(wxDouble x, wxDouble y);
- void AddLineToPoint(const wxPoint2DDouble& p);
+ void AddLineToPoint(const wxPoint2DDouble& p);
//@}
/**
*/
bool Contains(const wxPoint2DDouble& c,
int fillStyle = wxODDEVEN_RULE);
- bool Contains(wxDouble x, wxDouble y,
- int fillStyle = wxODDEVEN_RULE);
+ bool Contains(wxDouble x, wxDouble y,
+ int fillStyle = wxODDEVEN_RULE);
//@}
//@{
Gets the bounding box enclosing all points (possibly including control points).
*/
wxRect2DDouble GetBox();
- void GetBox(wxDouble* x, wxDouble* y, wxDouble* w,
- wxDouble* h);
+ void GetBox(wxDouble* x, wxDouble* y, wxDouble* w,
+ wxDouble* h);
//@}
//@{
Gets the last point of the current path, (0,0) if not yet set.
*/
void GetCurrentPoint(wxDouble* x, wxDouble* y);
- wxPoint2DDouble GetCurrentPoint();
+ wxPoint2DDouble GetCurrentPoint();
//@}
/**
Begins a new subpath at (x,y)
*/
void MoveToPoint(wxDouble x, wxDouble y);
- void MoveToPoint(const wxPoint2DDouble& p);
+ void MoveToPoint(const wxPoint2DDouble& p);
//@}
/**
/**
Gives back the native path returned by GetNativePath() because there might be
- some deallocations necessary (eg on cairo the native path returned by
+ some deallocations necessary (eg on cairo the native path returned by
GetNativePath is newly allocated each time).
*/
void UnGetNativePath(void* p);
/**
@class wxGraphicsObject
@wxheader{graphics.h}
-
+
This class is the superclass of native graphics objects like pens etc. It
allows reference counting. Not instantiated by user code.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxGraphicsBrush, wxGraphicsPen, wxGraphicsMatrix, wxGraphicsPath
*/
/**
@class wxGraphicsContext
@wxheader{graphics.h}
-
+
A wxGraphicsContext instance is the object that is drawn upon. It is created by
- a renderer using the CreateContext calls.., this can be either directly using a renderer
+ a renderer using the CreateContext calls.., this can be either directly using a renderer
instance, or indirectly using the static convenience CreateXXX functions of
wxGraphicsContext that always delegate the task to the default renderer.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxGraphicsRenderer:: CreateContext
*/
Clips drawings to the rectangle.
*/
void Clip(const wxRegion& region);
- void Clip(wxDouble x, wxDouble y, wxDouble w, wxDouble h);
+ void Clip(wxDouble x, wxDouble y, wxDouble w, wxDouble h);
//@}
/**
@sa wxGraphicsRenderer:: CreateContext
*/
wxGraphicsContext* Create(const wxWindowDC& dc);
- wxGraphicsContext* Create(wxWindow* window);
+ wxGraphicsContext* Create(wxWindow* window);
//@}
/**
/**
Creates a wxGraphicsContext from a native context. This native context must be
- eg a CGContextRef for Core Graphics, a Graphics pointer for GDIPlus or a
+ eg a CGContextRef for Core Graphics, a Graphics pointer for GDIPlus or a
cairo_t pointer for cairo.
- Creates a wxGraphicsContext from a native window.
+ Creates a wxGraphicsContext from a native window.
@sa wxGraphicsRenderer:: CreateContextFromNativeContext
*/
color c1 to (x2,y2) with color c2
*/
wxGraphicsBrush CreateLinearGradientBrush(wxDouble x1,
- wxDouble y1,
- wxDouble x2,
- wxDouble y2,
- const wxColouramp;c1,
- const wxColouramp;c2);
+ wxDouble y1,
+ wxDouble x2,
+ wxDouble y2,
+ const wxColouramp;c1,
+ const wxColouramp;c2);
/**
Creates a native affine transformation matrix from the passed in values. The
color oColour and ends on a circle around (xc,yc) with radius r and color cColour
*/
wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo,
- wxDouble yo,
- wxDouble xc,
- wxDouble yc,
- wxDouble radius,
- const wxColour& oColor,
- const wxColour& cColor);
+ wxDouble yo,
+ wxDouble xc,
+ wxDouble yc,
+ wxDouble radius,
+ const wxColour& oColor,
+ const wxColour& cColor);
/**
Draws the bitmap. In case of a mono bitmap, this is treated as a mask and the
*/
void DrawText(const wxString& str, wxDouble x, wxDouble y,
wxDouble angle);
- void DrawText(const wxString& str, wxDouble x, wxDouble y);
+ void DrawText(const wxString& str, wxDouble x, wxDouble y);
//@}
/**
void * GetNativeContext();
/**
- Fills the @e widths array with the widths from the beginning of
+ Fills the @e widths array with the widths from the beginning of
@e text to the corresponding character of @e text.
*/
void GetPartialTextExtents(const wxString& text,
Sets the brush for filling paths.
*/
void SetBrush(const wxBrush& brush);
- void SetBrush(const wxGraphicsBrush& brush);
+ void SetBrush(const wxGraphicsBrush& brush);
//@}
//@{
Sets the font for drawing text.
*/
void SetFont(const wxFont& font, const wxColour& colour);
- void SetFont(const wxGraphicsFont& font);
+ void SetFont(const wxGraphicsFont& font);
//@}
//@{
Sets the pen used for stroking.
*/
void SetPen(const wxGraphicsPen& pen);
- void SetPen(const wxPen& pen);
+ void SetPen(const wxPen& pen);
//@}
/**
*/
void StrokeLines(size_t n, const wxPoint2DDouble* beginPoints,
const wxPoint2DDouble* endPoints);
- void StrokeLines(size_t n, const wxPoint2DDouble* points);
+ void StrokeLines(size_t n, const wxPoint2DDouble* points);
//@}
/**
/**
@class wxGraphicsRenderer
@wxheader{graphics.h}
-
+
A wxGraphicsRenderer is the instance corresponding to the rendering engine
used. There may be multiple instances on a system, if there are different rendering engines present, but there is always one instance per engine, eg there is ONE core graphics renderer instance on OSX. This instance is pointed back to by all objects created by it (wxGraphicsContext, wxGraphicsPath etc). Therefore you can create ag additional instances of paths etc. by calling GetRenderer() and then using the appropriate CreateXXX function.
-
+
@library{wxcore}
@category{FIXME}
*/
Creates a wxGraphicsContext from a wxWindow.
*/
wxGraphicsContext * CreateContext(const wxWindowDC& dc);
- wxGraphicsContext * CreateContext(wxWindow* window);
+ wxGraphicsContext * CreateContext(wxWindow* window);
//@}
/**
color c1 to (x2,y2) with color c2
*/
wxGraphicsBrush CreateLinearGradientBrush(wxDouble x1,
- wxDouble y1,
- wxDouble x2,
- wxDouble y2,
- const wxColouramp;c1,
- const wxColouramp;c2);
+ wxDouble y1,
+ wxDouble x2,
+ wxDouble y2,
+ const wxColouramp;c1,
+ const wxColouramp;c2);
/**
Creates a native affine transformation matrix from the passed in values. The
color oColour and ends on a circle around (xc,yc) with radius r and color cColour
*/
wxGraphicsBrush CreateRadialGradientBrush(wxDouble xo,
- wxDouble yo,
- wxDouble xc,
- wxDouble yc,
- wxDouble radius,
- const wxColour& oColour,
- const wxColour& cColour);
+ wxDouble yo,
+ wxDouble xc,
+ wxDouble yc,
+ wxDouble radius,
+ const wxColour& oColour,
+ const wxColour& cColour);
/**
Returns the default renderer on this platform. On OS X this is the Core
/**
@class wxGraphicsBrush
@wxheader{graphics.h}
-
-
+
+
@library{wxcore}
@category{FIXME}
*/
class wxGraphicsBrush : public wxGraphicsObject
{
public:
-
+
};
/**
@class wxGraphicsFont
@wxheader{graphics.h}
-
-
+
+
@library{wxcore}
@category{FIXME}
*/
class wxGraphicsFont : public wxGraphicsObject
{
public:
-
+
};
/**
@class wxGraphicsPen
@wxheader{graphics.h}
-
-
+
+
@library{wxcore}
@category{FIXME}
*/
class wxGraphicsPen : public wxGraphicsObject
{
public:
-
+
};
/**
@class wxGraphicsMatrix
@wxheader{graphics.h}
-
+
A wxGraphicsMatrix is a native representation of an affine matrix. The contents
are specific and private to the respective renderer. Instances are ref counted and can therefore be assigned as usual. The only way to get a valid instance is via a CreateMatrix call on the graphics context or the renderer instance.
-
+
@library{wxcore}
@category{FIXME}
*/
*/
void Concat(const wxGraphicsMatrix* t);
- void Concat(const wxGraphicsMatrix& t);
+ void Concat(const wxGraphicsMatrix& t);
//@}
/**
Returns the component values of the matrix via the argument pointers.
*/
#define void Get(wxDouble* a=@NULL, wxDouble* b=@NULL, wxDouble* c=@NULL,
- wxDouble* d=@NULL, wxDouble* tx=@NULL,
- wxDouble* ty=@NULL) /* implementation is private */
+ wxDouble* d=@NULL, wxDouble* tx=@NULL,
+ wxDouble* ty=@NULL) /* implementation is private */
/**
Returns the native representation of the matrix. For CoreGraphics this is a
matrix)
*/
#define 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) /* implementation is private */
+ wxDouble d = 1.0, wxDouble tx = 0.0,
+ wxDouble ty = 0.0) /* implementation is private */
/**
Applies this matrix to a distance (ie. performs all transforms except
/**
@class wxGridCellFloatRenderer
@wxheader{grid.h}
-
+
This class may be used to format floating point data in a cell.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellRenderer, wxGridCellNumberRenderer, wxGridCellStringRenderer,
wxGridCellBoolRenderer
{
public:
/**
- @param width
+ @param width
Minimum number of characters to be shown.
- @param precision
+ @param precision
Number of digits after the decimal dot.
*/
wxGridCellFloatRenderer(int width = -1, int precision = -1);
/**
@class wxGridTableBase
@wxheader{grid.h}
-
+
Grid table classes.
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxGridCellEditor
@wxheader{grid.h}
-
+
This class is responsible for providing and manipulating
the in-place edit controls for the grid. Instances of wxGridCellEditor
(actually, instances of derived classes since it is an abstract class) can be
associated with the cell attributes for individual cells, rows, columns, or
even for the entire grid.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellTextEditor, wxGridCellFloatEditor, wxGridCellBoolEditor,
wxGridCellNumberEditor, wxGridCellChoiceEditor
*/
-class wxGridCellEditor
+class wxGridCellEditor
{
public:
/**
/**
@class wxGridCellTextEditor
@wxheader{grid.h}
-
+
The editor for string/text data.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellEditor, wxGridCellFloatEditor, wxGridCellBoolEditor,
wxGridCellNumberEditor, wxGridCellChoiceEditor
/**
@class wxGridCellStringRenderer
@wxheader{grid.h}
-
+
This class may be used to format string data in a cell; it is the default
for string cells.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellRenderer, wxGridCellNumberRenderer, wxGridCellFloatRenderer,
wxGridCellBoolRenderer
/**
@class wxGridCellChoiceEditor
@wxheader{grid.h}
-
+
The editor for string data allowing to choose from a list of strings.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellEditor, wxGridCellFloatEditor, wxGridCellBoolEditor,
wxGridCellTextEditor, wxGridCellNumberEditor
public:
//@{
/**
- @param count
+ @param count
Number of strings from which the user can choose.
- @param choices
+ @param choices
An array of strings from which the user can choose.
- @param allowOthers
+ @param allowOthers
If allowOthers is @true, the user can type a string not in choices array.
*/
wxGridCellChoiceEditor(size_t count = 0,
const wxString choices[] = @NULL,
bool allowOthers = @false);
- wxGridCellChoiceEditor(const wxArrayString& choices,
- bool allowOthers = @false);
+ wxGridCellChoiceEditor(const wxArrayString& choices,
+ bool allowOthers = @false);
//@}
/**
/**
@class wxGridEditorCreatedEvent
@wxheader{grid.h}
-
-
+
+
@library{wxadv}
@category{FIXME}
*/
*/
wxGridEditorCreatedEvent();
- wxGridEditorCreatedEvent(int id, wxEventType type,
- wxObject* obj,
- int row,
- int col,
- wxControl* ctrl);
+ wxGridEditorCreatedEvent(int id, wxEventType type,
+ wxObject* obj,
+ int row,
+ int col,
+ wxControl* ctrl);
//@}
/**
/**
@class wxGridRangeSelectEvent
@wxheader{grid.h}
-
-
+
+
@library{wxadv}
@category{FIXME}
*/
*/
wxGridRangeSelectEvent();
- wxGridRangeSelectEvent(int id, wxEventType type,
- wxObject* obj,
- const wxGridCellCoords& topLeft,
- const wxGridCellCoords& bottomRight,
- bool sel = @true,
- bool control = @false,
- bool shift = @false,
- bool alt = @false,
- bool meta = @false);
+ wxGridRangeSelectEvent(int id, wxEventType type,
+ wxObject* obj,
+ const wxGridCellCoords& topLeft,
+ const wxGridCellCoords& bottomRight,
+ bool sel = @true,
+ bool control = @false,
+ bool shift = @false,
+ bool alt = @false,
+ bool meta = @false);
//@}
/**
/**
@class wxGridCellRenderer
@wxheader{grid.h}
-
+
This class is responsible for actually drawing the cell
in the grid. You may pass it to the wxGridCellAttr (below) to change the
format of one given cell or to wxGrid::SetDefaultRenderer() to change the
view of all cells. This is an abstract class, and you will normally use one of
the
predefined derived classes or derive your own class from it.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellStringRenderer, wxGridCellNumberRenderer, wxGridCellFloatRenderer,
wxGridCellBoolRenderer
*/
-class wxGridCellRenderer
+class wxGridCellRenderer
{
public:
/**
/**
@class wxGridCellNumberEditor
@wxheader{grid.h}
-
+
The editor for numeric integer data.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellEditor, wxGridCellFloatEditor, wxGridCellBoolEditor,
wxGridCellTextEditor, wxGridCellChoiceEditor
/**
@class wxGridSizeEvent
@wxheader{grid.h}
-
+
This event class contains information about a row/column resize event.
-
+
@library{wxadv}
@category{FIXME}
*/
*/
wxGridSizeEvent();
- wxGridSizeEvent(int id, wxEventType type, wxObject* obj,
- int rowOrCol = -1,
- int x = -1,
- int y = -1,
- bool control = @false,
- bool shift = @false,
- bool alt = @false,
- bool meta = @false);
+ wxGridSizeEvent(int id, wxEventType type, wxObject* obj,
+ int rowOrCol = -1,
+ int x = -1,
+ int y = -1,
+ bool control = @false,
+ bool shift = @false,
+ bool alt = @false,
+ bool meta = @false);
//@}
/**
/**
@class wxGridCellNumberRenderer
@wxheader{grid.h}
-
+
This class may be used to format integer data in a cell.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellRenderer, wxGridCellStringRenderer, wxGridCellFloatRenderer,
wxGridCellBoolRenderer
/**
@class wxGridCellAttr
@wxheader{grid.h}
-
+
This class can be used to alter the cells' appearance in
the grid by changing their colour/font/... from default. An object of this
class may be returned by wxGridTableBase::GetAttr.
-
+
@library{wxadv}
@category{FIXME}
*/
-class wxGridCellAttr
+class wxGridCellAttr
{
public:
//@{
Constructor specifying some of the often used attributes.
*/
wxGridCellAttr();
- wxGridCellAttr(const wxColour& colText,
- const wxColour& colBack,
- const wxFont& font,
- int hAlign, int vAlign);
+ wxGridCellAttr(const wxColour& colText,
+ const wxColour& colBack,
+ const wxFont& font,
+ int hAlign, int vAlign);
//@}
/**
bool IsReadOnly();
/**
- Sets the alignment. @e hAlign can be one of @c wxALIGN_LEFT,
+ Sets the alignment. @e hAlign can be one of @c wxALIGN_LEFT,
@c wxALIGN_CENTRE or @c wxALIGN_RIGHT and @e vAlign can be one
of @c wxALIGN_TOP, @c wxALIGN_CENTRE or @c wxALIGN_BOTTOM.
*/
/**
@class wxGridCellBoolRenderer
@wxheader{grid.h}
-
+
This class may be used to format boolean data in a cell.
for string cells.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellRenderer, wxGridCellStringRenderer, wxGridCellFloatRenderer,
wxGridCellNumberRenderer
/**
@class wxGridEvent
@wxheader{grid.h}
-
+
This event class contains information about various grid events.
-
+
@library{wxadv}
@category{FIXME}
*/
*/
wxGridEvent();
- wxGridEvent(int id, wxEventType type, wxObject* obj,
- int row = -1, int col = -1,
- int x = -1, int y = -1,
- bool sel = @true,
- bool control = @false,
- bool shift = @false,
- bool alt = @false,
- bool meta = @false);
+ wxGridEvent(int id, wxEventType type, wxObject* obj,
+ int row = -1, int col = -1,
+ int x = -1, int y = -1,
+ bool sel = @true,
+ bool control = @false,
+ bool shift = @false,
+ bool alt = @false,
+ bool meta = @false);
//@}
/**
/**
@class wxGridCellFloatEditor
@wxheader{grid.h}
-
+
The editor for floating point numbers data.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellEditor, wxGridCellNumberEditor, wxGridCellBoolEditor,
wxGridCellTextEditor, wxGridCellChoiceEditor
{
public:
/**
- @param width
+ @param width
Minimum number of characters to be shown.
- @param precision
+ @param precision
Number of digits after the decimal dot.
*/
wxGridCellFloatEditor(int width = -1, int precision = -1);
/**
@class wxGrid
@wxheader{grid.h}
-
+
wxGrid and its related classes are used for displaying and editing tabular
data. They provide a rich set of features for display, editing, and
interacting with a variety of data sources. For simple applications, and to
examples of simple and more complex applications, explains the
relationship between the various grid classes and has a summary of the
keyboard shortcuts and mouse functions provided by wxGrid.
-
+
wxGrid has been greatly expanded and redesigned for wxWidgets 2.2
onwards. The new grid classes are reasonably backward-compatible
but there are some exceptions. There are also easier ways of doing many things
compared to
the previous implementation.
-
+
A wxGridTableBase class holds the actual
data to be displayed by a wxGrid class. One or more wxGrid classes
- may act as a view for one table class.
+ may act as a view for one table class.
The default table class is called wxGridStringTable and
holds an array of strings. An instance of such a class is created
by wxGrid::CreateGrid.
-
+
wxGridCellRenderer is the abstract base
class for rendereing contents in a cell. The following renderers are
predefined:
wxGridCellNumberRenderer. The
look of a cell can be further defined using wxGridCellAttr.
An object of this type may be returned by wxGridTableBase::GetAttr.
-
+
wxGridCellEditor is the abstract base
class for editing the value of a cell. The following editors are
predefined:
wxGridCellBoolEditor
wxGridCellChoiceEditor
wxGridCellNumberEditor.
-
+
@library{wxadv}
@category{miscwnd}
-
+
@seealso
@ref overview_gridoverview "wxGrid overview"
*/
it.
*/
wxGrid();
- wxGrid(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxWANTS_CHARS,
- const wxString& name = wxPanelNameStr);
+ wxGrid(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxWANTS_CHARS,
+ const wxString& name = wxPanelNameStr);
//@}
/**
coordinates.
*/
wxRect CellToRect(int row, int col);
- wxRect CellToRect(const wxGridCellCoords& coords);
+ wxRect CellToRect(const wxGridCellCoords& coords);
//@}
/**
grid cell at the specified location.
Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE or
- wxALIGN_RIGHT.
+ wxALIGN_RIGHT.
Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.
*/
and the @ref overview_gridoverview "wxGrid overview" for more information.
*/
wxString GetCellValue(int row, int col);
- wxString GetCellValue(const wxGridCellCoords& coords);
+ wxString GetCellValue(const wxGridCellCoords& coords);
//@}
/**
values.
Horizontal alignment will be one of wxALIGN_LEFT, wxALIGN_CENTRE or
- wxALIGN_RIGHT.
+ wxALIGN_RIGHT.
Vertical alignment will be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM.
*/
*/
wxGridCellEditor* GetDefaultEditorForCell(int row, int col);
- wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c);
+ wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c);
//@}
/**
/**
Sets the arguments to the current row label alignment values.
- Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT.
+ Horizontal alignment will be one of wxLEFT, wxCENTRE or wxRIGHT.
Vertical alignment will be one of wxTOP, wxCENTRE or wxBOTTOM.
*/
Is this cell currently selected.
*/
bool IsInSelection(int row, int col);
- bool IsInSelection(const wxGridCellCoords& coords);
+ bool IsInSelection(const wxGridCellCoords& coords);
//@}
/**
visible in the grid window.
*/
bool IsVisible(int row, int col, bool wholeCellVisible = @true);
- bool IsVisible(const wxGridCellCoords& coords,
- bool wholeCellVisible = @true);
+ bool IsVisible(const wxGridCellCoords& coords,
+ bool wholeCellVisible = @true);
//@}
//@{
nothing if the cell is already visible.
*/
void MakeCellVisible(int row, int col);
- void MakeCellVisible(const wxGridCellCoords& coords);
+ void MakeCellVisible(const wxGridCellCoords& coords);
//@}
/**
void SelectBlock(int topRow, int leftCol, int bottomRow,
int rightCol,
bool addToSelected = @false);
- void SelectBlock(const wxGridCellCoords& topLeft,
- const wxGridCellCoords& bottomRight,
- bool addToSelected = @false);
+ void SelectBlock(const wxGridCellCoords& topLeft,
+ const wxGridCellCoords& bottomRight,
+ bool addToSelected = @false);
//@}
/**
location.
Horizontal alignment should be one of wxALIGN_LEFT, wxALIGN_CENTRE or
- wxALIGN_RIGHT.
+ wxALIGN_RIGHT.
Vertical alignment should be one of wxALIGN_TOP, wxALIGN_CENTRE or
wxALIGN_BOTTOM.
*/
void SetCellAlignment(int row, int col, int horiz, int vert);
- void SetCellAlignment(int align, int row, int col);
+ void SetCellAlignment(int align, int row, int col);
//@}
/**
Sets the text colour for the grid cell at the specified location.
*/
void SetCellTextColour(int row, int col, const wxColour& colour);
- void SetCellTextColour(const wxColour& val, int row, int col);
- void SetCellTextColour(const wxColour& colour);
+ void SetCellTextColour(const wxColour& val, int row, int col);
+ void SetCellTextColour(const wxColour& colour);
//@}
//@{
and the @ref overview_gridoverview "wxGrid overview" for more information.
*/
void SetCellValue(int row, int col, const wxString& s);
- void SetCellValue(const wxGridCellCoords& coords,
- const wxString& s);
- void SetCellValue(const wxString& val, int row, int col);
+ void SetCellValue(const wxGridCellCoords& coords,
+ const wxString& s);
+ void SetCellValue(const wxString& val, int row, int col);
//@}
/**
/**
Set the selection behaviour of the grid.
- @param wxGridSelectCells()
+ @param wxGridSelectCells()
The default mode where individual cells are selected.
- @param wxGridSelectRows()
+ @param wxGridSelectRows()
Selections will consist of whole rows.
- @param wxGridSelectColumns()
+ @param wxGridSelectColumns()
Selections will consist of whole columns.
*/
void SetSelectionMode(wxGrid::wxGridSelectionModes selmode);
void ShowCellEditControl();
/**
- @param x
+ @param x
The x position to evaluate.
- @param clipToMinMax
+ @param clipToMinMax
If @true, rather than returning wxNOT_FOUND, it returns either the first or last
column depending on whether x is too far to the left or right respectively.
*/
/**
@class wxGridCellBoolEditor
@wxheader{grid.h}
-
+
The editor for boolean data.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxGridCellEditor, wxGridCellFloatEditor, wxGridCellNumberEditor,
wxGridCellTextEditor, wxGridCellChoiceEditor
/**
Returns @true if the given @e value is equal to the string representation of
- the truth value we currently use (see
+ the truth value we currently use (see
wxGridCellBoolEditor::UseStringValues).
*/
static bool IsTrueValue(const wxString& value);
/**
@class wxGridUpdateLocker
@wxheader{grid.h}
-
+
This small class can be used to prevent wxGrid from redrawing
during its lifetime by calling wxGrid::BeginBatch
in its constructor and wxGrid::EndBatch in its
destructor. It is typically used in a function performing several operations
with a grid which would otherwise result in flicker. For example:
-
+
@code
void MyFrame::Foo()
{
m_grid = new wxGrid(this, ...);
-
+
wxGridUpdateLocker noUpdates(m_grid);
m_grid-AppendColumn();
... many other operations with m_grid...
m_grid-AppendRow();
-
+
// destructor called, grid refreshed
}
@endcode
-
- Using this class is easier and safer than calling
+
+ Using this class is easier and safer than calling
wxGrid::BeginBatch and wxGrid::EndBatch
because you don't risk not to call the latter (due to an exception for example).
-
+
@library{wxadv}
@category{FIXME}
*/
-class wxGridUpdateLocker
+class wxGridUpdateLocker
{
public:
/**
non-@NULL then the grid must exist for longer than wxGridUpdateLocker object
itself.
- The default constructor could be followed by a call to
+ The default constructor could be followed by a call to
Create() to set the
grid object later.
*/
/**
@class wxHashTable
@wxheader{hash.h}
-
+
@b Please note that this class is retained for backward compatibility
reasons; you should use wxHashMap.
-
+
This class provides hash table functionality for wxWidgets, and for an
application if it wishes. Data can be hashed on an integer or string
key.
-
+
@library{wxbase}
@category{containers}
-
+
@seealso
wxList
*/
Deletes entry in hash table and returns the user's data (if found).
*/
wxObject * Delete(long key);
- wxObject * Delete(const wxString& key);
+ wxObject * Delete(const wxString& key);
//@}
/**
has table constructor was used).
*/
wxObject * Get(long key);
- wxObject * Get(const char* key);
+ wxObject * Get(const char* key);
//@}
/**
table implementation.
*/
void Put(long key, wxObject * object);
- void Put(const char* key, wxObject * object);
+ void Put(const char* key, wxObject * object);
//@}
};
/**
@class wxHashMap
@wxheader{hashmap.h}
-
+
This is a simple, type-safe, and reasonably efficient hash map class,
whose interface is a subset of the interface of STL containers. In
particular, the interface is modeled after std::map, and the various,
non-standard, std::hash_map.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxHashMap
+class wxHashMap
{
public:
//@{
Copy constructor.
*/
wxHashMap(size_type size = 10);
- wxHashMap(const wxHashMap& map);
+ wxHashMap(const wxHashMap& map);
//@}
//@{
Please remember that hash maps do not guarantee ordering.
*/
const_iterator begin();
- iterator begin();
+ iterator begin();
//@}
/**
Please remember that hash maps do not guarantee ordering.
*/
const_iterator end();
- iterator end();
+ iterator end();
//@}
//@{
the iterator is no longer valid and must not be used.
*/
size_type erase(const key_type& key);
- void erase(iterator it);
- void erase(const_iterator it);
+ void erase(iterator it);
+ void erase(const_iterator it);
//@}
//@{
is returned (i.e. hashmap.find( non_existent_key ) == hashmap.end()).
*/
iterator find(const key_type& key);
- const_iterator find(const key_type& key);
+ const_iterator find(const key_type& key);
//@}
/**
/**
@class wxHashSet
@wxheader{hashset.h}
-
+
This is a simple, type-safe, and reasonably efficient hash set class,
whose interface is a subset of the interface of STL containers. In
particular, the interface is modeled after std::set, and the various,
non-standard, std::hash_map.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxHashSet
+class wxHashSet
{
public:
//@{
Copy constructor.
*/
wxHashSet(size_type size = 10);
- wxHashSet(const wxHashSet& set);
+ wxHashSet(const wxHashSet& set);
//@}
//@{
Please remember that hash sets do not guarantee ordering.
*/
const_iterator begin();
- iterator begin();
+ iterator begin();
//@}
/**
Please remember that hash sets do not guarantee ordering.
*/
const_iterator end();
- iterator end();
+ iterator end();
//@}
//@{
the iterator is no longer valid and must not be used.
*/
size_type erase(const key_type& key);
- void erase(iterator it);
- void erase(const_iterator it);
+ void erase(iterator it);
+ void erase(const_iterator it);
//@}
//@{
is returned (i.e. hashset.find( non_existent_key ) == hashset.end()).
*/
iterator find(const key_type& key);
- const_iterator find(const key_type& key);
+ const_iterator find(const key_type& key);
//@}
/**
/**
@class wxHelpController
@wxheader{help.h}
-
+
This is a family of classes by which
applications may invoke a help viewer to provide on-line help.
-
+
A help controller allows an application to display help, at the contents
or at a particular topic, and shut the help program down on termination.
This avoids proliferation of many instances of the help viewer whenever the
user requests a different topic via the application's menus or buttons.
-
+
Typically, an application will create a help controller instance
when it starts, and immediately call @b Initialize
to associate a filename with it. The help viewer will only get run, however,
just before the first call to display something.
-
+
Most help controller classes actually derive from wxHelpControllerBase and have
names of the form wxXXXHelpController or wxHelpControllerXXX. An
appropriate class is aliased to the name wxHelpController for each platform, as
follows:
-
+
On desktop Windows, wxCHMHelpController is used (MS HTML Help).
On Windows CE, wxWinceHelpController is used.
On all other platforms, wxHtmlHelpController is used if wxHTML is
compiled into wxWidgets; otherwise wxExtHelpController is used (for invoking an
external
browser).
-
+
The remaining help controller classes need to be named
explicitly by an application that wishes to make use of them.
-
+
There are currently the following help controller classes defined:
-
+
wxWinHelpController, for controlling Windows Help.
wxCHMHelpController, for controlling MS HTML Help. To use this, you need to
set wxUSE_MS_HTML_HELP
must add this line to your application initialization: @c
wxFileSystem::AddHandler(new wxArchiveFSHandler);
or nothing will be shown in your help window.
-
-
+
+
@library{wxbase}
@category{help}
-
+
@seealso
wxHtmlHelpController, wxHTML
*/
as
wxCHMHelpController, wxWinHelpController and wxHtmlHelpController, as the
parent for the help window instead of the value of wxApp::GetTopWindow. You can
- also change the parent window later with
+ also change the parent window later with
SetParentWindow().
*/
wxHelpController(wxWindow* parentWindow = @NULL);
various help file formats.
*/
virtual bool DisplaySection(const wxString& section);
- virtual bool DisplaySection(int sectionNo);
+ virtual bool DisplaySection(int sectionNo);
//@}
/**
For all other help controllers, this function does nothing
and just returns @NULL.
- @param viewer
+ @param viewer
This defaults to "netscape" for wxExtHelpController.
- @param flags
+ @param flags
This defaults to wxHELP_NETSCAPE for wxExtHelpController, indicating
that the viewer is a variant of Netscape Navigator.
*/
a suitable file. For WinHelp, the hlp extension is appended.
*/
virtual bool Initialize(const wxString& file);
- virtual bool Initialize(const wxString& file, int server);
+ virtual bool Initialize(const wxString& file, int server);
//@}
/**
(wxHELP_SEARCH_INDEX) but this currently only supported by the
wxHtmlHelpController.
- @e WinHelp, MS HTML Help: If more than one match is found,
+ @e WinHelp, MS HTML Help: If more than one match is found,
the first topic is displayed.
- @e External HTML help, simple wxHTML help: If more than one match is found,
+ @e External HTML help, simple wxHTML help: If more than one match is found,
a choice of topics is displayed.
@e wxHtmlHelpController: see wxHtmlHelpController::KeywordSearch.
/**
@class wxHtmlHelpController
@headerfile helpctrl.h wx/html/helpctrl.h
-
+
This help controller provides an easy way of displaying HTML help in your
- application (see @e test sample). The help system is based on @b books
+ application (see @e test sample). The help system is based on @b books
(see wxHtmlHelpController::AddBook). A book is a logical
section of documentation (for example "User's Guide" or "Programmer's Guide" or
"C++ Reference" or "wxWidgets Reference"). The help controller can handle as
many books as you want.
-
+
Although this class has an API compatible with other wxWidgets
help controllers as documented by wxHelpController, it
is recommended that you use the enhanced capabilities of wxHtmlHelpController's
API.
-
+
wxHTML uses Microsoft's HTML Help Workshop project files (.hhp, .hhk, .hhc) as
its
native format. The file format is described here.
Have a look at docs/html/ directory where sample project files are stored.
-
+
You can use Tex2RTF to produce these files when generating HTML, if you set @b
htmlWorkshopFiles to @b @true in
your tex2rtf.ini file. The commercial tool HelpBlocks (www.helpblocks.com) can
also create these files.
-
+
@library{wxhtml}
@category{help}
-
+
@seealso
@ref overview_wxhelpcontroller "Information about wxBestHelpController",
wxHtmlHelpFrame, wxHtmlHelpDialog, wxHtmlHelpWindow, wxHtmlModalHelp
*/
-class wxHtmlHelpController
+class wxHtmlHelpController
{
public:
/**
This must be called at least once before displaying any help.
@e bookFile or @e bookUrl may be either .hhp file or ZIP archive
- that contains arbitrary number of .hhp files in
+ that contains arbitrary number of .hhp files in
top-level directory. This ZIP archive must have .zip or .htb extension
(the latter stands for "HTML book"). In other words, @c
- AddBook(wxFileName("help.zip"))
+ AddBook(wxFileName("help.zip"))
is possible and is the recommended way.
- @param showWaitMsg
+ @param showWaitMsg
If @true then a decoration-less window with progress message is displayed.
- @param bookFile
+ @param bookFile
Help book filename. It is recommended to use this prototype
instead of the one taking URL, because it is less error-prone.
- @param bookUrl
- Help book URL (note that syntax of filename and URL is
+ @param bookUrl
+ Help book URL (note that syntax of filename and URL is
different on most platforms)
*/
bool AddBook(const wxFileName& bookFile, bool showWaitMsg);
- bool AddBook(const wxString& bookUrl, bool showWaitMsg);
+ bool AddBook(const wxString& bookUrl, bool showWaitMsg);
//@}
/**
This alternative form is used to search help contents by numeric IDs.
*/
void Display(const wxString& x);
- void Display(const int id);
+ void Display(const int id);
//@}
/**
Sets the path for storing temporary files - cached binary versions of index and
contents files. These binary
forms are much faster to read. Default value is empty string (empty string means
- that no cached data are stored). Note that these files are @e not
+ that no cached data are stored). Note that these files are @e not
deleted when program exits.
- Once created these cached files will be used in all subsequent executions
+ Once created these cached files will be used in all subsequent executions
of your application. If cached files become older than corresponding .hhp
file (e.g. if you regenerate documentation) it will be refreshed.
*/
The only thing you must do is create wxConfig object and call UseConfig.
- If you do not use @e UseConfig, wxHtmlHelpController will use
- default wxConfig object if available (for details see
- wxConfigBase::Get and
+ If you do not use @e UseConfig, wxHtmlHelpController will use
+ default wxConfig object if available (for details see
+ wxConfigBase::Get and
wxConfigBase::Set).
*/
void UseConfig(wxConfigBase* config,
/**
@class wxHtmlModalHelp
@headerfile helpctrl.h wx/html/helpctrl.h
-
- This class uses wxHtmlHelpController
+
+ This class uses wxHtmlHelpController
to display help in a modal dialog. This is useful on platforms such as wxMac
where if you display help from a modal dialog, the help window must itself be a
modal
dialog.
-
+
Create objects of this class on the stack, for example:
-
+
@code
// The help can be browsed during the lifetime of this object; when the user
quits
// the help, program execution will continue.
wxHtmlModalHelp help(parent, wxT("help"), wxT("My topic"));
@endcode
-
+
@library{wxhtml}
@category{FIXME}
*/
-class wxHtmlModalHelp
+class wxHtmlModalHelp
{
public:
/**
- @param parent
+ @param parent
is the parent of the dialog.
- @param helpFile
+ @param helpFile
is the HTML help file to show.
- @param topic
+ @param topic
is an optional topic. If this is empty, the help contents will be shown.
- @param style
+ @param style
is a combination of the flags described in the wxHtmlHelpController
documentation.
*/
/**
@class wxHtmlHelpData
@headerfile helpdata.h wx/html/helpdata.h
-
- This class is used by wxHtmlHelpController
+
+ This class is used by wxHtmlHelpController
and wxHtmlHelpFrame to access HTML help items.
- It is internal class and should not be used directly - except for the case
+ It is internal class and should not be used directly - except for the case
you're writing your own HTML help controller.
-
+
@library{wxhtml}
@category{FIXME}
*/
/**
@class wxHtmlHelpDialog
@headerfile helpdlg.h wx/html/helpdlg.h
-
- This class is used by wxHtmlHelpController
+
+ This class is used by wxHtmlHelpController
to display help.
It is an internal class and should not be used directly - except for the case
when you're writing your own HTML help controller.
-
+
@library{wxhtml}
@category{FIXME}
*/
wxHtmlHelpController.
*/
wxHtmlHelpDialog(wxHtmlHelpData* data = @NULL);
- wxHtmlHelpDialog(wxWindow* parent, int wxWindowID,
- const wxString& title = wxEmptyString,
- int style = wxHF_DEFAULT_STYLE,
- wxHtmlHelpData* data = @NULL);
+ wxHtmlHelpDialog(wxWindow* parent, int wxWindowID,
+ const wxString& title = wxEmptyString,
+ int style = wxHF_DEFAULT_STYLE,
+ wxHtmlHelpData* data = @NULL);
//@}
/**
/**
@class wxHtmlHelpFrame
@headerfile helpfrm.h wx/html/helpfrm.h
-
- This class is used by wxHtmlHelpController
+
+ This class is used by wxHtmlHelpController
to display help.
It is an internal class and should not be used directly - except for the case
when you're writing your own HTML help controller.
-
+
@library{wxhtml}
@category{FIXME}
*/
wxHtmlHelpController.
*/
wxHtmlHelpFrame(wxHtmlHelpData* data = @NULL);
- wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
- const wxString& title = wxEmptyString,
- int style = wxHF_DEFAULT_STYLE,
- wxHtmlHelpData* data = @NULL);
+ wxHtmlHelpFrame(wxWindow* parent, int wxWindowID,
+ const wxString& title = wxEmptyString,
+ int style = wxHF_DEFAULT_STYLE,
+ wxHtmlHelpData* data = @NULL);
//@}
/**
/**
@class wxHtmlHelpWindow
@headerfile helpwnd.h wx/html/helpwnd.h
-
- This class is used by wxHtmlHelpController
+
+ This class is used by wxHtmlHelpController
to display help within a frame or dialog, but you can use it yourself to create
an embedded HTML help window.
-
+
For example:
-
+
@code
// m_embeddedHelpWindow is a wxHtmlHelpWindow
// m_embeddedHtmlHelp is a wxHtmlHelpController
-
+
// Create embedded HTML Help window
m_embeddedHelpWindow = new wxHtmlHelpWindow;
m_embeddedHtmlHelp.UseConfig(config, rootPath); // Set your own config
object here
- m_embeddedHtmlHelp.SetHelpWindow(m_embeddedHelpWindow);
+ m_embeddedHtmlHelp.SetHelpWindow(m_embeddedHelpWindow);
m_embeddedHelpWindow-Create(this,
wxID_ANY, wxDefaultPosition, GetClientSize(),
- wxTAB_TRAVERSAL|wxBORDER_NONE, wxHF_DEFAULT_STYLE);
+ wxTAB_TRAVERSAL|wxBORDER_NONE, wxHF_DEFAULT_STYLE);
m_embeddedHtmlHelp.AddBook(wxFileName(_T("doc.zip")));
@endcode
-
+
You should pass the style wxHF_EMBEDDED to the style parameter of
wxHtmlHelpController to allow
the embedded window to be destroyed independently of the help controller.
-
+
@library{wxhtml}
@category{FIXME}
*/
wxHtmlHelpController.
*/
wxHtmlHelpWindow(wxHtmlHelpData* data = @NULL);
- wxHtmlHelpWindow(wxWindow* parent, int wxWindowID,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& pos = wxDefaultSize,
- int style = wxTAB_TRAVERSAL|wxBORDER_NONE,
- int helpStyle = wxHF_DEFAULT_STYLE,
- wxHtmlHelpData* data = @NULL);
+ wxHtmlHelpWindow(wxWindow* parent, int wxWindowID,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& pos = wxDefaultSize,
+ int style = wxTAB_TRAVERSAL|wxBORDER_NONE,
+ int helpStyle = wxHF_DEFAULT_STYLE,
+ wxHtmlHelpData* data = @NULL);
//@}
/**
(uses extension to MS format, param name="ID" value=id)
*/
bool Display(const wxString& x);
- bool Display(const int id);
+ bool Display(const int id);
//@}
/**
/**
@class wxHtmlColourCell
@headerfile htmlcell.h wx/html/htmlcell.h
-
- This cell changes the colour of either the background or the foreground.
-
+
+ This cell changes the colour of either the background or the foreground.
+
@library{wxhtml}
@category{FIXME}
*/
/**
Constructor.
- @param clr
+ @param clr
The color
- @param flags
+ @param flags
Can be one of following:
wxHTML_CLR_FOREGROUND
/**
@class wxHtmlWidgetCell
@headerfile htmlcell.h wx/html/htmlcell.h
-
+
wxHtmlWidgetCell is a class that provides a connection between HTML cells and
widgets (an object derived
from wxWindow). You can use it to display things like forms, input boxes etc.
in an HTML window.
-
+
wxHtmlWidgetCell takes care of resizing and moving window.
-
+
@library{wxhtml}
@category{FIXME}
*/
/**
Constructor.
- @param wnd
+ @param wnd
Connected window. It is parent window must be the wxHtmlWindow object within
which it is displayed!
- @param w
+ @param w
Floating width. If non-zero width of wnd window is adjusted so that it is
always w percents of parent container's width. (For example w = 100 means that
the window
/**
@class wxHtmlCell
@headerfile htmlcell.h wx/html/htmlcell.h
-
+
Internal data structure. It represents fragments of parsed HTML
page, the so-called @b cell - a word, picture, table, horizontal line and so on.
- It is used by wxHtmlWindow and
+ It is used by wxHtmlWindow and
wxHtmlWinParser to represent HTML page in memory.
-
+
You can divide cells into two groups : @e visible cells with non-zero width and
height and @e helper cells (usually with zero width and height) that
perform special actions such as color or font change.
-
+
@library{wxhtml}
@category{FIXME}
-
+
@seealso
@ref overview_cells "Cells Overview", wxHtmlContainerCell
*/
/**
Renders the cell.
- @param dc
+ @param dc
Device context to which the cell is to be drawn
- @param x,y
+ @param x,y
Coordinates of parent's upper left corner (origin). You must
add this to m_PosX,m_PosY when passing coordinates to dc's methods
Example : dc - DrawText("hello", x + m_PosX, y + m_PosY)
- @param view_y1
+ @param view_y1
y-coord of the first line visible in window. This is
used to optimize rendering speed
- @param view_y2
+ @param view_y2
y-coord of the last line visible in window. This is
used to optimize rendering speed
*/
nonsense - some tags (like wxHtmlColourCell
or font setter) must be drawn even if they are invisible!
- @param dc
+ @param dc
Device context to which the cell is to be drawn
- @param x,y
+ @param x,y
Coordinates of parent's upper left corner. You must
add this to m_PosX,m_PosY when passing coordinates to dc's methods
Example : dc - DrawText("hello", x + m_PosX, y + m_PosY)
to cell of some type (e.g. wxHtmlAnchorCell reacts on
wxHTML_COND_ISANCHOR condition)
- @param condition
+ @param condition
Unique integer identifier of condition
- @param param
+ @param param
Optional parameters
*/
virtual const wxHtmlCell* Find(int condition, const void* param);
/**
- Returns descent value of the cell (m_Descent member).
+ Returns descent value of the cell (m_Descent member).
See explanation:
*/
int GetDescent();
See wxHtmlLinkInfo.
(Note: this makes sense only for visible tags).
- @param x,y
+ @param x,y
Coordinates of position where the user pressed mouse button.
These coordinates are used e.g. by COLORMAP. Values are relative to the
upper left corner of THIS cell (i.e. from 0 to m_Width or m_Height)
/**
Returns cursor to show when mouse pointer is over the cell.
- @param window
+ @param window
interface to the parent HTML window
*/
virtual wxCursor GetMouseCursor(wxHtmlWindowInterface* window);
cell is called. Default behavior is to call
wxHtmlWindow::LoadPage.
- @param window
+ @param window
interface to the parent HTML window
- @param pos
+ @param pos
coordinates of mouse click (this is relative to cell's origin
- @param event
+ @param event
mouse event that triggered the call
@returns @true if a link was clicked, @false otherwise.
/**
@class wxHtmlContainerCell
@headerfile htmlcell.h wx/html/htmlcell.h
-
+
The wxHtmlContainerCell class is an implementation of a cell that may
contain more cells in it. It is heavily used in the wxHTML layout algorithm.
-
+
@library{wxhtml}
@category{FIXME}
-
+
@seealso
@ref overview_cells "Cells Overview"
*/
/**
Returns the indentation. @e ind is one of the @b wxHTML_INDENT_* constants.
- @b Note: You must call GetIndentUnits()
+ @b Note: You must call GetIndentUnits()
with same @e ind parameter in order to correctly interpret the returned integer
value.
It is NOT always in pixels!
/**
Sets the container's alignment (both horizontal and vertical) according to
the values stored in @e tag. (Tags @c ALIGN parameter is extracted.) In fact
- it is only a front-end to SetAlignHor()
+ it is only a front-end to SetAlignHor()
and SetAlignVer().
*/
void SetAlign(const wxHtmlTag& tag);
/**
- Sets the container's @e horizontal alignment. During wxHtmlCell::Layout
+ Sets the container's @e horizontal alignment. During wxHtmlCell::Layout
each line is aligned according to @e al value.
- @param al
+ @param al
new horizontal alignment. May be one of these values:
wxHTML_ALIGN_LEFT
/**
Sets the container's @e vertical alignment. This is per-line alignment!
- @param al
+ @param al
new vertical alignment. May be one of these values:
wxHTML_ALIGN_BOTTOM
/**
Sets the border (frame) colours. A border is a rectangle around the container.
- @param clr1
+ @param clr1
Colour of top and left lines
- @param clr2
+ @param clr2
Colour of bottom and right lines
*/
void SetBorder(const wxColour& clr1, const wxColour& clr2);
/**
Sets the indentation (free space between borders of container and subcells).
- @param i
+ @param i
Indentation value.
- @param what
+ @param what
Determines which of the four borders we're setting. It is OR
combination of following constants:
all 4 borders
- @param units
+ @param units
Units of i. This parameter affects interpretation of value.
wxHTML_UNITS_PIXELS
of container is never smaller than @e h - even if the subcells cover
much smaller area.
- @param h
+ @param h
The minimal height.
- @param align
+ @param align
If height of the container is lower than the minimum height, empty space must
be inserted
somewhere in order to ensure minimal height. This parameter is one of
@e pixel_scale is number of real pixels that equals to 1 HTML pixel.
- @param w
+ @param w
Width of the container. If the value is negative it means
complement to full width of parent container (e.g.
SetWidthFloat(-50, wxHTML_UNITS_PIXELS) sets the width
of container to parent's width minus 50 pixels. This is useful when
creating tables - you can call SetWidthFloat(50) and SetWidthFloat(-50))
- @param units
+ @param units
Units of w This parameter affects the interpretation of value.
wxHTML_UNITS_PIXELS
w is interpreted as percents of width
of parent container
- @param tag
+ @param tag
In the second version of method, w and units
info is extracted from tag's WIDTH parameter.
*/
void SetWidthFloat(int w, int units);
- void SetWidthFloat(const wxHtmlTag& tag,
- double pixel_scale = 1.0);
+ void SetWidthFloat(const wxHtmlTag& tag,
+ double pixel_scale = 1.0);
//@}
};
/**
@class wxHtmlLinkInfo
@headerfile htmlcell.h wx/html/htmlcell.h
-
+
This class stores all necessary information about hypertext
- links (as represented by @c A tag in HTML documents). In
- current implementation it stores URL and target frame name.
+ links (as represented by @c A tag in HTML documents). In
+ current implementation it stores URL and target frame name.
@e Note that frames are not currently supported by wxHTML!
-
+
@library{wxhtml}
@category{FIXME}
*/
frame).
*/
wxHtmlLinkInfo();
- wxHtmlLinkInfo(const wxString& href,
- const wxString& target = wxEmptyString);
+ wxHtmlLinkInfo(const wxString& href,
+ const wxString& target = wxEmptyString);
//@}
/**
/**
@class wxHtmlFilter
@headerfile htmlfilt.h wx/html/htmlfilt.h
-
+
This class is the parent class of input filters for wxHtmlWindow.
It allows you to read and display files of different file formats.
-
+
@library{wxhtml}
@category{FIXME}
-
+
@seealso
Overview
*/
/**
@class wxHtmlTagHandler
@headerfile htmlpars.h wx/html/htmlpars.h
-
-
+
+
@library{wxhtml}
@category{html}
-
+
@seealso
Overview, wxHtmlTag
*/
void ParseInner(const wxHtmlTag& tag);
/**
- Assigns @e parser to this handler. Each @b instance of handler
+ Assigns @e parser to this handler. Each @b instance of handler
is guaranteed to be called only from the parser.
*/
virtual void SetParser(wxHtmlParser parser);
/**
@class wxHtmlParser
@headerfile htmlpars.h wx/html/htmlpars.h
-
+
Classes derived from this handle the @b generic parsing of HTML documents: it
scans
the document and divide it into blocks of tags (where one block
consists of beginning and ending tag and of text between these
two tags).
-
+
It is independent from wxHtmlWindow and can be used as stand-alone parser
(Julian Smart's idea of speech-only HTML viewer or wget-like utility -
see InetGet sample for example).
-
+
It uses system of tag handlers to parse the HTML document. Tag handlers
are not statically shared by all instances but are created for each
wxHtmlParser instance. The reason is that the handler may contain
document-specific temporary data used during parsing (e.g. complicated
structures like tables).
-
+
Typically the user calls only the wxHtmlParser::Parse method.
-
+
@library{wxhtml}
@category{html}
-
+
@seealso
@ref overview_cells "Cells Overview", @ref overview_handlers "Tag Handlers
Overview", wxHtmlTag
*/
-class wxHtmlParser
+class wxHtmlParser
{
public:
/**
/**
This may (and may not) be overwritten in derived class.
- This method is called each time new tag is about to be added.
+ This method is called each time new tag is about to be added.
@e tag contains information about the tag. (See wxHtmlTag
for details.)
(in noparams version it parses whole m_Source)
*/
void DoParsing(int begin_pos, int end_pos);
- void DoParsing();
+ void DoParsing();
//@}
/**
point to any valid resource or the URL is blocked by overridden implementation
of @e OpenURL in derived class.
- @param type
+ @param type
Indicates type of the resource. Is one of:
wxHTML_URL_PAGE
Opening a resource that doesn't fall into
any other category.
- @param url
+ @param url
URL being opened.
*/
virtual wxFSFile* OpenURL(wxHtmlURLType type,
wxObject* Parse(const wxString& source);
/**
- Restores parser's state before last call to
+ Restores parser's state before last call to
PushTagHandler().
*/
void PopTagHandler();
/**
- Forces the handler to handle additional tags
- (not returned by wxHtmlTagHandler::GetSupportedTags).
+ Forces the handler to handle additional tags
+ (not returned by wxHtmlTagHandler::GetSupportedTags).
The handler should already be added to this parser.
- @param handler
+ @param handler
the handler
- @param tags
+ @param tags
List of tags (in same format as GetSupportedTags's return value). The parser
will redirect these tags to handler (until call to PopTagHandler).
*/
/**
@class wxHtmlTag
@headerfile htmltag.h wx/html/htmltag.h
-
- This class represents a single HTML tag.
+
+ This class represents a single HTML tag.
It is used by @ref overview_handlers "tag handlers".
-
+
@library{wxhtml}
@category{FIXME}
*/
-class wxHtmlTag
+class wxHtmlTag
{
public:
/**
/**
Returns beginning position of the text @e between this tag and paired
- ending tag.
+ ending tag.
See explanation (returned position is marked with '|'):
*/
int GetBeginPos();
Returns the value of the parameter. You should check whether the
parameter exists or not (use wxHtmlTag::HasParam) first.
- @param par
+ @param par
The parameter's name.
- @param with_quotes
+ @param with_quotes
@true if you want to get quotes as well. See example.
*/
wxString GetParam(const wxString& par, bool with_quotes = @false);
Returns @true if this tag is paired with ending tag, @false otherwise.
See the example of HTML document:
- In this example tags HTML and BODY have ending tags, first P and BR
+ In this example tags HTML and BODY have ending tags, first P and BR
doesn't have ending tag while the second P has. The third P tag (which
is ending itself) of course doesn't have ending tag.
*/
bool HasEnding();
/**
- Returns @true if the tag has a parameter of the given name.
+ Returns @true if the tag has a parameter of the given name.
Example : @c FONT SIZE=+2 COLOR="#FF00FF" has two parameters named
"SIZE" and "COLOR".
- @param par
+ @param par
the parameter you're looking for.
*/
bool HasParam(const wxString& par);
/**
- This method scans the given parameter. Usage is exactly the same as sscanf's
+ This method scans the given parameter. Usage is exactly the same as sscanf's
usage except that you don't pass a string but a parameter name as the first
argument
and you can only retrieve one value (i.e. you can use only one "%" element
in @e format).
- @param par
+ @param par
The name of the tag you want to query
- @param format
+ @param format
scanf()-like format string.
- @param value
+ @param value
pointer to a variable to store the value in
*/
wxString ScanParam(const wxString& par, const wxChar * format,
/**
@class wxHtmlWindow
@headerfile htmlwin.h wx/html/htmlwin.h
-
+
wxHtmlWindow is probably the only class you will directly use
unless you want to do something special (like adding new tag
handlers or MIME filters).
-
+
The purpose of this class is to display HTML pages (either local
file or downloaded via HTTP protocol) in a window. The width
of the window is constant - given in the constructor - and virtual height
is changed dynamically depending on page size.
- Once the window is created you can set its content by calling
+ Once the window is created you can set its content by calling
@ref wxHtmlWindow::setpage SetPage(text),
@ref wxHtmlWindow::loadpage LoadPage(filename) or
wxHtmlWindow::LoadFile.
-
+
@beginStyleTable
@style{wxHW_SCROLLBAR_NEVER}:
Never display scrollbars, not even when the page is larger than the
@style{wxHW_NO_SELECTION}:
Don't allow the user to select text.
@endStyleTable
-
+
@library{wxhtml}
@category{html}
-
+
@seealso
wxHtmlLinkEvent, wxHtmlCellEvent
*/
Constructor. The parameters are the same as for the wxScrolledWindow
constructor.
- @param style
+ @param style
Window style. See wxHtmlWindow.
*/
wxHtmlWindow();
- wxHtmlWindow(wxWindow parent, wxWindowID id = -1,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxHW_DEFAULT_STYLE,
- const wxString& name = "htmlWindow");
+ wxHtmlWindow(wxWindow parent, wxWindowID id = -1,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxHW_DEFAULT_STYLE,
+ const wxString& name = "htmlWindow");
//@}
/**
static void AddFilter(wxHtmlFilter filter);
/**
- Appends HTML fragment to currently displayed text and refreshes the window.
+ Appends HTML fragment to currently displayed text and refreshes the window.
- @param source
+ @param source
HTML code fragment
@returns @false if an error occurred, @true otherwise.
/**
Returns pointer to the top-level container.
- See also: @ref overview_cells "Cells Overview",
+ See also: @ref overview_cells "Cells Overview",
@ref overview_printing "Printing Overview"
*/
wxHtmlContainerCell* GetInternalRepresentation();
/**
Returns anchor within currently opened page
- (see wxHtmlWindow::GetOpenedPage).
+ (see wxHtmlWindow::GetOpenedPage).
If no page is opened or if the displayed page wasn't
produced by call to LoadPage, empty string is returned.
*/
wxFrame* GetRelatedFrame();
/**
- Moves back to the previous page. (each page displayed using
+ Moves back to the previous page. (each page displayed using
LoadPage() is stored in history list.)
*/
bool HistoryBack();
virtual bool LoadFile(const wxFileName& filename);
/**
- Unlike SetPage this function first loads HTML page from @e location
+ Unlike SetPage this function first loads HTML page from @e location
and then displays it. See example:
- @param location
+ @param location
The address of document. See wxFileSystem for details on address format and
behaviour of "opener".
Overloading this method is deprecated; intercept the event instead.
- @param cell
+ @param cell
The cell inside which the mouse was clicked, always a simple
(i.e. non-container) cell
- @param x, y
+ @param x, y
The logical coordinates of the click point
- @param event
+ @param event
The mouse event containing other information about the click
@returns @true if a link was clicked, @false otherwise.
Default behaviour is to emit a wxHtmlCellEvent.
Overloading this method is deprecated; intercept the event instead.
- @param cell
+ @param cell
The cell inside which the mouse is currently, always a simple
(i.e. non-container) cell
- @param x, y
+ @param x, y
The logical coordinates of the click point
*/
virtual void OnCellMouseHover(wxHtmlCell cell, wxCoord x,
/**
Called when an URL is being opened (either when the user clicks on a link or
- an image is loaded). The URL will be opened only if OnOpeningURL returns
+ an image is loaded). The URL will be opened only if OnOpeningURL returns
@c wxHTML_OPEN. This method is called by
wxHtmlParser::OpenURL.
You can override OnOpeningURL to selectively block some
URLs (e.g. for security reasons) or to redirect them elsewhere. Default
behaviour is to always return @c wxHTML_OPEN.
- @param type
+ @param type
Indicates type of the resource. Is one of
Opening a resource that doesn't fall into
any other category.
- @param url
+ @param url
URL being opened.
- @param redirect
+ @param redirect
Pointer to wxString variable that must be filled with an
URL if OnOpeningURL returns wxHTML_REDIRECT.
*/
virtual wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,
- const wxString& url,
- wxString * redirect);
+ const wxString& url,
+ wxString * redirect);
/**
Called on parsing @c TITLE tag.
Read values: all things set by SetFonts, SetBorders.
- @param cfg
+ @param cfg
wxConfig from which you want to read the configuration.
- @param path
+ @param path
Optional path in config tree. If not given current path is used.
*/
virtual void ReadCustomization(wxConfigBase cfg,
This function sets the space between border of window and HTML contents. See
image:
- @param b
+ @param b
indentation from borders in pixels
*/
void SetBorders(int b);
/**
This function sets font sizes and faces.
- @param normal_face
- This is face name for normal (i.e. non-fixed) font.
+ @param normal_face
+ This is face name for normal (i.e. non-fixed) font.
It can be either empty string (then the default face is chosen) or
platform-specific face name. Examples are "helvetica" under Unix or
"Times New Roman" under Windows.
- @param fixed_face
+ @param fixed_face
The same thing for fixed face ( TT../TT )
- @param sizes
+ @param sizes
This is an array of 7 items of int type.
The values represent size of font with HTML size from -2 to +4
( FONT SIZE=-2 to FONT SIZE=+4 ). Default sizes are used if sizes
/**
Sets HTML page and display it. This won't @b load the page!!
It will display the @e source. See example:
- If you want to load a document from some location use
+ If you want to load a document from some location use
LoadPage() instead.
- @param source
+ @param source
The HTML document source to be displayed.
@returns @false if an error occurred, @true otherwise.
this sets statusbar slot where messages will be displayed.
(Default is -1 = no messages.)
- @param bar
+ @param bar
statusbar slot number (0..n)
*/
void SetRelatedStatusBar(int bar);
/**
Saves custom settings into wxConfig. It uses the path 'path'
if given, otherwise it saves info into currently selected path.
- Regardless of whether the path is given or not, the function creates sub-path
+ Regardless of whether the path is given or not, the function creates sub-path
@c wxHtmlWindow.
Saved values: all things set by SetFonts, SetBorders.
- @param cfg
+ @param cfg
wxConfig to which you want to save the configuration.
- @param path
+ @param path
Optional path in config tree. If not given, the current path is used.
*/
virtual void WriteCustomization(wxConfigBase cfg,
/**
@class wxHtmlLinkEvent
@headerfile htmlwin.h wx/html/htmlwin.h
-
+
This event class is used for the events generated by wxHtmlWindow.
-
+
@library{wxhtml}
@category{FIXME}
*/
/**
@class wxHtmlCellEvent
@headerfile htmlwin.h wx/html/htmlwin.h
-
+
This event class is used for the events generated by wxHtmlWindow.
-
+
@library{wxhtml}
@category{FIXME}
*/
/**
@class wxHtmlDCRenderer
@headerfile htmprint.h wx/html/htmprint.h
-
+
This class can render HTML document into a specified area of a DC. You can use
it
- in your own printing code, although use of wxHtmlEasyPrinting
+ in your own printing code, although use of wxHtmlEasyPrinting
or wxHtmlPrintout is strongly recommended.
-
+
@library{wxhtml}
@category{FIXME}
*/
/**
Renders HTML text to the DC.
- @param x,y
+ @param x,y
position of upper-left corner of printing rectangle (see SetSize)
- @param from
+ @param from
y-coordinate of the very first visible cell
- @param dont_render
+ @param dont_render
if @true then this method only returns y coordinate of the next page
and does not output anything
*/
const int sizes = @NULL);
/**
- Assign text to the renderer. Render() then draws
+ Assign text to the renderer. Render() then draws
the text onto DC.
- @param html
+ @param html
HTML text. This is not a filename.
- @param basepath
+ @param basepath
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
- @param isdir
+ @param isdir
@false if basepath is filename, @true if it is directory name
(see wxFileSystem for detailed explanation)
*/
/**
@class wxHtmlEasyPrinting
@headerfile htmprint.h wx/html/htmprint.h
-
- This class provides very simple interface to printing
+
+ This class provides very simple interface to printing
architecture. It allows you to print HTML documents using
- only a few commands.
-
+ only a few commands.
+
@library{wxhtml}
@category{html}
*/
/**
Constructor.
- @param name
+ @param name
Name of the printing object. Used by preview frames and setup dialogs.
- @param parentWindow
+ @param parentWindow
pointer to the window that will own the preview frame and setup dialogs. May be
@NULL.
*/
wxWindow* parentWindow = @NULL);
/**
- Returns a pointer to wxPageSetupDialogData instance used by
+ Returns a pointer to wxPageSetupDialogData instance used by
this class. You can set its parameters (via SetXXXX methods).
*/
wxPageSetupDialogData* GetPageSetupData();
void PageSetup();
/**
- Preview HTML file.
+ Preview HTML file.
Returns @false in case of error -- call
wxPrinter::GetLastError to get detailed
bool PreviewFile(const wxString& htmlfile);
/**
- Preview HTML text (not file!).
+ Preview HTML text (not file!).
Returns @false in case of error -- call
wxPrinter::GetLastError to get detailed
information about the kind of the error.
- @param htmltext
+ @param htmltext
HTML text.
- @param basepath
+ @param basepath
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
*/
bool PrintFile(const wxString& htmlfile);
/**
- Print HTML text (not file!).
+ Print HTML text (not file!).
Returns @false in case of error -- call
wxPrinter::GetLastError to get detailed
information about the kind of the error.
- @param htmltext
+ @param htmltext
HTML text.
- @param basepath
+ @param basepath
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
*/
@TIME@ is replaced by the current time in default format
@TITLE@ is replaced with the title of the document
- @param footer
+ @param footer
HTML text to be used as footer.
- @param pg
+ @param pg
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
*/
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
@TIME@ is replaced by the current time in default format
@TITLE@ is replaced with the title of the document
- @param header
+ @param header
HTML text to be used as header.
- @param pg
+ @param pg
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
*/
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
/**
@class wxHtmlPrintout
@headerfile htmprint.h wx/html/htmprint.h
-
+
This class serves as printout class for HTML documents.
-
+
@library{wxhtml}
@category{html}
*/
@TIME@ is replaced by the current time in default format
@TITLE@ is replaced with the title of the document
- @param footer
+ @param footer
HTML text to be used as footer.
- @param pg
+ @param pg
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
*/
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
@TIME@ is replaced by the current time in default format
@TITLE@ is replaced with the title of the document
- @param header
+ @param header
HTML text to be used as header.
- @param pg
+ @param pg
one of wxPAGE_ODD, wxPAGE_EVEN and wxPAGE_ALL constants.
*/
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
/**
- Prepare the class for printing this HTML @b file. The file may be located on
+ Prepare the class for printing this HTML @b file. The file may be located on
any virtual file system or it may be normal file.
*/
void SetHtmlFile(const wxString& htmlfile);
/**
Prepare the class for printing this HTML text.
- @param html
+ @param html
HTML text. (NOT file!)
- @param basepath
+ @param basepath
base directory (html string would be stored there if it was in
file). It is used to determine path for loading images, for example.
- @param isdir
+ @param isdir
@false if basepath is filename, @true if it is directory name
(see wxFileSystem for detailed explanation)
*/
/**
@class wxHtmlTagsModule
@headerfile winpars.h wx/html/winpars.h
-
+
This class provides easy way of filling wxHtmlWinParser's table of
tag handlers. It is used almost exclusively together with the set of
@ref overview_handlers "TAGS_MODULE_* macros"
-
+
@library{wxhtml}
@category{FIXME}
-
+
@seealso
@ref overview_handlers "Tag Handlers", wxHtmlTagHandler, wxHtmlWinTagHandler,
*/
only of lines of the following type:
I recommend using the @b TAGS_MODULE_* macros.
- @param parser
+ @param parser
Pointer to the parser that requested tables filling.
*/
virtual void FillHandlersTable(wxHtmlWinParser parser);
/**
@class wxHtmlWinTagHandler
@headerfile winpars.h wx/html/winpars.h
-
+
This is basically wxHtmlTagHandler except that
it is extended with protected member m_WParser pointing to
the wxHtmlWinParser object (value of this member is identical
to wxHtmlParser's m_Parser).
-
+
@library{wxhtml}
@category{html}
*/
/**
@class wxHtmlWinParser
@headerfile winpars.h wx/html/winpars.h
-
+
This class is derived from wxHtmlParser and
its main goal is to parse HTML input so that it can be displayed in
- wxHtmlWindow. It uses a special
+ wxHtmlWindow. It uses a special
wxHtmlWinTagHandler.
-
+
@library{wxhtml}
@category{html}
-
+
@seealso
@ref overview_handlers "Handlers overview"
*/
window such as wxHtmlListBox).
*/
wxHtmlWinParser();
- wxHtmlWinParser(wxHtmlWindowInterface wndIface);
+ wxHtmlWinParser(wxHtmlWindowInterface wndIface);
//@}
/**
wxHtmlContainerCell* CloseContainer();
/**
- Creates font based on current setting (see
- SetFontSize(),
- SetFontBold(),
- SetFontItalic(),
- SetFontFixed(),
+ Creates font based on current setting (see
+ SetFontSize(),
+ SetFontBold(),
+ SetFontItalic(),
+ SetFontFixed(),
wxHtmlWinParser::SetFontUnderlined)
and returns pointer to it.
If the font was already created only a pointer is returned.
/**
Returns wxEncodingConverter class used
- to do conversion between @ref getinputencoding() "input encoding"
+ to do conversion between @ref getinputencoding() "input encoding"
and @ref getoutputencoding() "output encoding".
*/
wxEncodingConverter * GetEncodingConverter();
wxFontEncoding GetInputEncoding();
/**
- Returns actual hypertext link. (This value has a non-empty
+ Returns actual hypertext link. (This value has a non-empty
@ref wxHtmlLinkInfo::gethref Href string
if the parser is between @c A and @c /A tags,
wxEmptyString otherwise.)
void SetActualColor(const wxColour& clr);
/**
- Sets default horizontal alignment (see
+ Sets default horizontal alignment (see
wxHtmlContainerCell::SetAlignHor.)
Alignment of newly opened container is set to this value.
*/
/**
Sets the DC. This must be called before wxHtmlParser::Parse!
- @e pixel_scale can be used when rendering to high-resolution
- DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
+ @e pixel_scale can be used when rendering to high-resolution
+ DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
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.)
*/
/**
Sets current font face to @e face. This affects either fixed size
- font or proportional, depending on context (whether the parser is
+ font or proportional, depending on context (whether the parser is
inside @c TT tag or not).
*/
void SetFontFace(const wxString& face);
/**
@class wxHtmlListBox
@wxheader{htmllbox.h}
-
+
wxHtmlListBox is an implementation of wxVListBox which
shows HTML content in the listbox rows. This is still an abstract base class
and you will need to derive your own class from it (see htlbox sample for the
example) but you will only need to override a single
wxHtmlListBox::OnGetItem function.
-
+
@library{wxhtml}
@category{ctrl}
@appearance{htmllistbox.png}
-
+
@seealso
wxSimpleHtmlListBox
*/
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxHtmlListBoxNameStr);
- wxHtmlListBox();
+ wxHtmlListBox();
//@}
/**
relative paths for the images or other resources embedded in your HTML.
*/
wxFileSystem GetFileSystem();
- const wxFileSystem GetFileSystem();
+ const wxFileSystem GetFileSystem();
//@}
/**
Called when the user clicks on hypertext link. Does nothing by default.
Overloading this method is deprecated; intercept the event instead.
- @param n
+ @param n
Index of the item containing the link.
- @param link
+ @param link
Description of the link.
@sa See also wxHtmlLinkInfo.
/**
@class wxSimpleHtmlListBox
@wxheader{htmllbox.h}
-
+
wxSimpleHtmlListBox is an implementation of wxHtmlListBox which
shows HTML content in the listbox rows.
-
+
Unlike wxHtmlListBox, this is not an abstract class and thus it
has the advantage that you can use it without deriving your own class from it.
However, it also has the disadvantage that this is not a virtual control and
well-suited for those cases where you need to show a huge number of items:
every time you
add/insert a string, it will be stored internally and thus will take memory.
-
+
The interface exposed by wxSimpleHtmlListBox fully implements the
wxControlWithItems interface, thus you should refer to
wxControlWithItems's documentation for the API reference
@c protected in wxSimpleHtmlListBox's context so that you cannot call it
directly,
wxSimpleHtmlListBox will do it for you.
-
+
Note: in case you need to append a lot of items to the control at once, make
sure to use the
@ref wxControlWithItems::append "Append(const wxArrayString )" function.
-
+
Thus the only difference between a wxListBox and a wxSimpleHtmlListBox
is that the latter stores strings which can contain HTML fragments (see the
list of
@ref overview_htmltagssupported "tags supported by wxHTML").
-
+
Note that the HTML strings you fetch to wxSimpleHtmlListBox should not contain
- the @c html
+ the @c html
or @c body tags.
-
+
@beginStyleTable
@style{wxHLB_DEFAULT_STYLE}:
The default style: wxBORDER_SUNKEN
Multiple-selection list: the user can toggle multiple items on and
off.
@endStyleTable
-
+
@library{wxhtml}
@category{ctrl}
@appearance{simplehtmllistbox.png}
-
+
@seealso
wxSimpleHtmlListBox::Create
*/
long style = wxHLB_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "simpleHtmlListBox");
- wxHtmlListBox(wxWindow* parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = wxHLB_DEFAULT_STYLE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "simpleHtmlListBox");
- See also
-wxSimpleHtmlListBox::Create
-
- wxSimpleHtmlListBox();
+ wxHtmlListBox(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = wxHLB_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "simpleHtmlListBox");
+ See also
+ wxSimpleHtmlListBox::Create
+
+ wxSimpleHtmlListBox();
//@}
/**
//@{
/**
- Creates the HTML listbox for two-step construction.
+ Creates the HTML listbox for two-step construction.
See wxSimpleHtmlListBox() for further details.
*/
bool Create(wxWindow* parent, wxWindowID id,
long style = wxHLB_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "simpleHtmlListBox");
- bool Create(wxWindow* parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = wxHLB_DEFAULT_STYLE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "simpleHtmlListBox");
+ bool Create(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = wxHLB_DEFAULT_STYLE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "simpleHtmlListBox");
//@}
};
/**
@class wxHyperlinkEvent
@wxheader{hyperlink.h}
-
+
This event class is used for the events generated by
wxHyperlinkCtrl.
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxHyperlinkCtrl
@wxheader{hyperlink.h}
-
+
This class shows a static text element which links to an URL.
Appearance and behaviour is completely customizable. In fact, when the user
clicks on the hyperlink, a wxHyperlinkEvent is
wxEvent::Skip), then a call to
wxLaunchDefaultBrowser is done with the
hyperlink's URL.
-
+
Note that standard wxWindow functions like wxWindow::SetBackgroundColour,
wxWindow::SetFont, wxWindow::SetCursor, wxWindow::SetLabel can be used to customize appearance of the hyperlink.
-
+
@beginStyleTable
@style{wxHL_ALIGN_LEFT}:
Align the text to the left.
The default style for wxHyperlinkCtrl:
wxBORDER_NONE|wxHL_CONTEXTMENU|wxHL_ALIGN_CENTRE.
@endStyleTable
-
+
@library{wxadv}
@category{ctrl}
@appearance{hyperlinkctrl.png}
-
+
@seealso
wxURL, wxHyperlinkEvent
*/
/**
Creates the hyperlink control.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. A value of wxID_ANY indicates a default value.
- @param label
+ @param label
The label of the hyperlink.
- @param url
+ @param url
The URL associated with the given label.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If the wxDefaultSize is specified then the window is sized
appropriately.
- @param style
+ @param style
Window style. See wxHyperlinkCtrl.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
*/
bool Create(wxWindow* parent, wxWindowID id,
/**
Constructor. See Create() for more info.
*/
- wxHyperLink(wxWindow* parent, wxWindowID id,
- const wxString & label,
- const wxString & url,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style,
- const wxString& name = "hyperlink");
+ wxHyperLink(wxWindow* parent, wxWindowID id,
+ const wxString & label,
+ const wxString & url,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style,
+ const wxString& name = "hyperlink");
};
/**
@class wxIcon
@wxheader{icon.h}
-
+
An icon is a small rectangular bitmap usually used for denoting a
minimized application. It differs from a wxBitmap in always
having a mask associated with it for transparent drawing. On some platforms,
bitmaps
and icons). However, some platforms (such as Windows) make the distinction, so
a separate class is provided.
-
+
@library{wxcore}
@category{gdi}
-
+
@stdobjects
Objects:
wxNullIcon
-
+
@seealso
@ref overview_wxbitmapoverview "Bitmap and icon overview", @ref
overview_supportedbitmapformats "supported bitmap file formats", wxDC::DrawIcon, wxCursor
/**
Loads an icon from the specified location.
- @param bits
+ @param bits
Specifies an array of pixel values.
- @param width
+ @param width
Specifies the width of the icon.
- @param height
+ @param height
Specifies the height of the icon.
- @param desiredWidth
+ @param desiredWidth
Specifies the desired width of the icon. This
parameter only has an effect in Windows (32-bit) where icon resources can
contain
several icons of different sizes.
- @param desiredWidth
+ @param desiredWidth
Specifies the desired height of the icon. This
parameter only has an effect in Windows (32-bit) where icon resources can
contain
several icons of different sizes.
- @param depth
+ @param depth
Specifies the depth of the icon. If this is omitted, the display depth of the
screen is used.
- @param name
+ @param name
This can refer to a resource name under MS Windows, or a filename under MS
Windows and X.
Its meaning is determined by the flags parameter.
- @param loc
- The object describing the location of the native icon, see
+ @param loc
+ The object describing the location of the native icon, see
wxIconLocation.
- @param type
+ @param type
May be one of the following:
or LoadFile must be called subsequently.
*/
wxIcon();
- wxIcon(const wxIcon& icon);
- wxIcon(void* data, int type, int width, int height,
- int depth = -1);
- wxIcon(const char bits[], int width, int height,
- int depth = 1);
- wxIcon(int width, int height, int depth = -1);
- wxIcon(const char* const* bits);
- wxIcon(const wxString& name, wxBitmapType type,
- int desiredWidth = -1,
- int desiredHeight = -1);
- wxIcon(const wxIconLocation& loc);
+ wxIcon(const wxIcon& icon);
+ wxIcon(void* data, int type, int width, int height,
+ int depth = -1);
+ wxIcon(const char bits[], int width, int height,
+ int depth = 1);
+ wxIcon(int width, int height, int depth = -1);
+ wxIcon(const char* const* bits);
+ wxIcon(const wxString& name, wxBitmapType type,
+ int desiredWidth = -1,
+ int desiredHeight = -1);
+ wxIcon(const wxIconLocation& loc);
//@}
/**
/**
Loads an icon from a file or resource.
- @param name
+ @param name
Either a filename or a Windows resource name.
The meaning of name is determined by the type parameter.
- @param type
+ @param type
One of the following values:
/**
Sets the depth member (does not affect the icon data).
- @param depth
+ @param depth
Icon depth.
*/
void SetDepth(int depth);
/**
Sets the height member (does not affect the icon data).
- @param height
+ @param height
Icon height in pixels.
*/
void SetHeight(int height);
/**
Sets the width member (does not affect the icon data).
- @param width
+ @param width
Icon width in pixels.
*/
void SetWidth(int width);
/**
Assignment operator, using @ref overview_trefcount "reference counting".
- @param icon
+ @param icon
Icon to assign.
*/
wxIcon operator =(const wxIcon& icon);
/**
@class wxIconBundle
@wxheader{iconbndl.h}
-
+
This class contains multiple copies of an icon in different sizes,
see also wxDialog::SetIcons and
wxTopLevelWindow::SetIcons.
-
+
@library{wxcore}
@category{FIXME}
-
+
@stdobjects
wxNullIconBundle
*/
Copy constructor.
*/
wxIconBundle();
- wxIconBundle(const wxString& file, long type);
- wxIconBundle(const wxIcon& icon);
- wxIconBundle(const wxIconBundle& ic);
+ wxIconBundle(const wxString& file, long type);
+ wxIconBundle(const wxIcon& icon);
+ wxIconBundle(const wxIconBundle& ic);
//@}
/**
replaced by the new one.
*/
void AddIcon(const wxString& file, long type);
- void AddIcon(const wxIcon& icon);
+ void AddIcon(const wxIcon& icon);
//@}
//@{
Same as GetIcon( wxSize( size, size ) ).
*/
wxIcon GetIcon(const wxSize& size);
- wxIcon GetIcon(wxCoord size = -1);
+ wxIcon GetIcon(wxCoord size = -1);
//@}
/**
/**
@class wxIconLocation
@wxheader{iconloc.h}
-
+
wxIconLocation is a tiny class describing the location of an (external, i.e.
not embedded into the application resources) icon. For most platforms it simply
contains the file name but under some others (notably Windows) the same file
may contain multiple icons and so this class also stores the index of the icon
inside the file.
-
+
In any case, its details should be of no interest to the application code and
most of them are not even documented here (on purpose) as it is only meant to
be used as an opaque class: the application may get the object of this class
from somewhere and the only reasonable thing to do with it later is to create
a wxIcon from it.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxIcon, wxFileType::GetIcon
*/
-class wxIconLocation
+class wxIconLocation
{
public:
/**
- Returns @true if the object is valid, i.e. was properly initialized, and
+ Returns @true if the object is valid, i.e. was properly initialized, and
@false otherwise.
*/
#define bool IsOk() /* implementation is private */
/**
@class wxImageHandler
@wxheader{image.h}
-
+
This is the base class for implementing image file loading/saving, and image
creation from data.
It is used within wxImage and is not normally seen by the application.
-
+
If you wish to extend the capabilities of wxImage, derive a class from
wxImageHandler
and add the handler using wxImage::AddHandler in your
application initialisation.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxImage, wxInitAllImageHandlers
*/
of retrieving these individually, this function will return the number of
available images.
- @param stream
+ @param stream
Opened input stream for reading image data. Currently, the stream must support
seeking.
individually, @e index
indicates which image to read from the stream.
- @param image
+ @param image
The image object which is to be affected by this operation.
- @param stream
+ @param stream
Opened input stream for reading image data.
- @param verbose
+ @param verbose
If set to @true, errors reported by the image handler will produce wxLogMessages.
- @param index
+ @param index
The index of the image in the file (starting from zero).
@returns @true if the operation succeeded, @false otherwise.
/**
Saves a image in the output stream.
- @param image
+ @param image
The image object which is to be affected by this operation.
- @param stream
+ @param stream
Opened output stream for writing the data.
@returns @true if the operation succeeded, @false otherwise.
/**
Sets the handler extension.
- @param extension
+ @param extension
Handler extension.
*/
void SetExtension(const wxString& extension);
/**
Sets the handler MIME type.
- @param mimename
+ @param mimename
Handler MIME type.
*/
void SetMimeType(const wxString& mimetype);
/**
Sets the handler name.
- @param name
+ @param name
Handler name.
*/
void SetName(const wxString& name);
/**
@class wxImage
@wxheader{image.h}
-
+
This class encapsulates a platform-independent image. An image can be created
from data, or using wxBitmap::ConvertToImage. An image
can be loaded from a file in a variety of formats, and is extensible to new
formats
via image format handlers. Functions are available to set and get image bits, so
it can be used for basic image manipulation.
-
+
A wxImage cannot (currently) be drawn directly to a wxDC. Instead,
a platform-specific wxBitmap object must be created from it using
the wxBitmap::wxBitmap(wxImage,int depth) constructor.
This bitmap can then
be drawn in a device context, using wxDC::DrawBitmap.
-
+
One colour value of the image may be used as a mask colour which will lead to
the automatic
creation of a wxMask object associated to the bitmap object.
-
+
@library{wxcore}
@category{gdi}
-
+
@seealso
wxBitmap, wxInitAllImageHandlers
*/
/**
Creates an image from XPM data.
- @param width
+ @param width
Specifies the width of the image.
- @param height
+ @param height
Specifies the height of the image.
- @param name
+ @param name
Name of the file from which to load the image.
- @param stream
+ @param stream
Opened input stream from which to load the image. Currently, the stream must
support seeking.
- @param type
+ @param type
May be one of the following:
wxBITMAP_TYPE_BMP
Will try to autodetect the format.
- @param mimetype
+ @param mimetype
MIME type string (for example 'image/jpeg')
- @param index
+ @param index
Index of the image to load in the case that the image file contains multiple
images.
This is only used by GIF, ICO and TIFF handlers. The default value (-1) means
the GIF and TIFF handler and as the largest and most colourful one by the ICO
handler.
- @param xpmData
+ @param xpmData
A pointer to XPM image data.
@remarks Depending on how wxWidgets has been configured, not all formats
@sa LoadFile()
*/
wxImage();
- wxImage(const wxImage& image);
- wxImage(const wxBitmap& bitmap);
- wxImage(int width, int height, bool clear=@true);
- wxImage(int width, int height, unsigned char* data,
- bool static_data = @false);
- wxImage(const wxString& name, long type = wxBITMAP_TYPE_ANY,
- int index = -1);
- wxImage(const wxString& name, const wxString& mimetype,
- int index = -1);
- wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY,
- int index = -1);
- wxImage(wxInputStream& stream, const wxString& mimetype,
- int index = -1);
- wxImage(const char* const* xpmData);
+ wxImage(const wxImage& image);
+ wxImage(const wxBitmap& bitmap);
+ wxImage(int width, int height, bool clear=@true);
+ wxImage(int width, int height, unsigned char* data,
+ bool static_data = @false);
+ wxImage(const wxString& name, long type = wxBITMAP_TYPE_ANY,
+ int index = -1);
+ wxImage(const wxString& name, const wxString& mimetype,
+ int index = -1);
+ wxImage(wxInputStream& stream, long type = wxBITMAP_TYPE_ANY,
+ int index = -1);
+ wxImage(wxInputStream& stream, const wxString& mimetype,
+ int index = -1);
+ wxImage(const char* const* xpmData);
//@}
/**
returns @true if the current image handlers can read this file
*/
static void AddHandler(wxImageHandler* handler);
- See also bool CanRead(const wxString& filename);
+ See also bool CanRead(const wxString& filename);
//@}
/**
to black.
Otherwise, the image data will be uninitialized.
- @param width
+ @param width
The width of the image in pixels.
- @param height
+ @param height
The height of the image in pixels.
@returns @true if the call succeeded, @false otherwise.
void Destroy();
/**
- @param r,g,b
+ @param r,g,b
Pointers to variables to save the colour.
- @param startR,startG,startB
+ @param startR,startG,startB
Initial values of the colour. Returned colour
will have RGB values equal to or greater than these.
/**
Finds the handler associated with the given MIME type.
- @param name
+ @param name
The handler name.
- @param extension
+ @param extension
The file extension, such as "bmp".
- @param imageType
+ @param imageType
The image type, such as wxBITMAP_TYPE_BMP.
- @param mimetype
+ @param mimetype
MIME type.
@returns A pointer to the handler if found, @NULL otherwise.
@sa wxImageHandler
*/
static wxImageHandler* FindHandler(const wxString& name);
- static wxImageHandler* FindHandler(const wxString& extension,
- long imageType);
- static wxImageHandler* FindHandler(long imageType);
- static wxImageHandler* FindHandlerMime(const wxString& mimetype);
+ static wxImageHandler* FindHandler(const wxString& extension,
+ long imageType);
+ static wxImageHandler* FindHandler(long imageType);
+ static wxImageHandler* FindHandlerMime(const wxString& mimetype);
//@}
//@{
which are stored as the @ref getdata() RGB ones.
*/
unsigned char GetAlpha(int x, int y);
- unsigned char * GetAlpha();
+ unsigned char * GetAlpha();
//@}
/**
of retrieving these individually, this function will return the number of
available images.
- @param name
+ @param name
Name of the file to query.
- @param stream
+ @param stream
Opened input stream with image data. Currently, the stream must support seeking.
- @param type
+ @param type
May be one of the following:
wxBITMAP_TYPE_BMP
*/
static int GetImageCount(const wxString& filename,
long type = wxBITMAP_TYPE_ANY);
- static int GetImageCount(wxInputStream& stream,
- long type = wxBITMAP_TYPE_ANY);
+ static int GetImageCount(wxInputStream& stream,
+ long type = wxBITMAP_TYPE_ANY);
//@}
/**
and RGBtoHSV(), which
converts between HSV color space and RGB color space.
*/
- HSVValue(double h = 0.0, double s = 0.0, double v = 0.0);
+ HSVValue(double h = 0.0, double s = 0.0, double v = 0.0);
/**
Converts a color in HSV color space to RGB color space.
/**
Adds a handler at the start of the static list of format handlers.
- @param handler
+ @param handler
A new image format handler object. There is usually only one instance
of a given handler class in an application session.
/**
Loads an image from an input stream.
- @param name
+ @param name
Name of the file from which to load the image.
- @param stream
+ @param stream
Opened input stream from which to load the image. Currently, the stream must
support seeking.
- @param type
+ @param type
One of the following values:
wxBITMAP_TYPE_BMP
Will try to autodetect the format.
- @param mimetype
+ @param mimetype
MIME type string (for example 'image/jpeg')
- @param index
+ @param index
Index of the image to load in the case that the image file contains multiple
images.
This is only used by GIF, ICO and TIFF handlers. The default value (-1) means
bool LoadFile(const wxString& name,
long type = wxBITMAP_TYPE_ANY,
int index = -1);
- bool LoadFile(const wxString& name, const wxString& mimetype,
- int index = -1);
- bool LoadFile(wxInputStream& stream, long type,
- int index = -1);
- bool LoadFile(wxInputStream& stream,
- const wxString& mimetype,
- int index = -1);
+ bool LoadFile(const wxString& name, const wxString& mimetype,
+ int index = -1);
+ bool LoadFile(wxInputStream& stream, long type,
+ int index = -1);
+ bool LoadFile(wxInputStream& stream,
+ const wxString& mimetype,
+ int index = -1);
//@}
/**
and RGBtoHSV(), which
converts between HSV color space and RGB color space.
*/
- RGBValue(unsigned char r = 0, unsigned char g = 0,
- unsigned char b = 0);
+ RGBValue(unsigned char r = 0, unsigned char g = 0,
+ unsigned char b = 0);
/**
Converts a color in RGB color space to HSV color space.
Finds the handler with the given name, and removes it. The handler
is not deleted.
- @param name
+ @param name
The handler name.
@returns @true if the handler was found and removed, @false otherwise.
/**
Saves an image in the given stream.
- @param name
+ @param name
Name of the file to save the image to.
- @param stream
+ @param stream
Opened output stream to save the image to.
- @param type
+ @param type
Currently these types can be used:
wxBITMAP_TYPE_BMP
Save a Windows cursor file (CUR).
- @param mimetype
+ @param mimetype
MIME type.
@returns @true if the operation succeeded, @false otherwise.
@sa LoadFile()
*/
bool SaveFile(const wxString& name, int type);
- bool SaveFile(const wxString& name, const wxString& mimetype);
- bool SaveFile(const wxString& name);
- bool SaveFile(wxOutputStream& stream, int type);
- bool SaveFile(wxOutputStream& stream,
- const wxString& mimetype);
+ bool SaveFile(const wxString& name, const wxString& mimetype);
+ bool SaveFile(const wxString& name);
+ bool SaveFile(wxOutputStream& stream, int type);
+ bool SaveFile(wxOutputStream& stream,
+ const wxString& mimetype);
//@}
/**
Example:
- @param quality
+ @param quality
Determines what method to use for resampling the image. Can be one of the
following:
*/
void SetAlpha(unsigned char * alpha = @NULL,
bool static_data = @false);
- void SetAlpha(int x, int y, unsigned char alpha);
+ void SetAlpha(int x, int y, unsigned char alpha);
//@}
/**
unsigned char blue);
/**
- @param mask
+ @param mask
The mask image to extract mask shape from. Must have same dimensions as the
image.
- @param mr,mg,mb
+ @param mr,mg,mb
RGB value of pixels in mask that will be used to create the mask.
@returns Returns @false if mask does not have same dimensions as the image
@sa GetOption(), GetOptionInt(), HasOption()
*/
void SetOption(const wxString& name, const wxString& value);
- void SetOption(const wxString& name, int value);
+ void SetOption(const wxString& name, int value);
//@}
/**
data.
*/
#define void SetRGB(wxRect & rect, unsigned char red,
- unsigned char green,
- unsigned char blue) /* implementation is private */
+ unsigned char green,
+ unsigned char blue) /* implementation is private */
/**
Returns a resized version of this image without scaling it by adding either a
/**
Assignment operator, using @ref overview_trefcount "reference counting".
- @param image
+ @param image
Image to assign.
@returns Returns 'this' object.
/**
Initializes all available image handlers. For a list of available handlers,
see wxImage.
-
+
@sa wxImage, wxImageHandler
*/
void wxInitAllImageHandlers();
/**
@class wxImageList
@wxheader{imaglist.h}
-
+
A wxImageList contains a list of images, which are stored in
an unspecified form. Images can have masks for transparent
drawing, and can be made from a variety of sources including bitmaps
and icons.
-
+
wxImageList is used principally in conjunction with wxTreeCtrl and
wxListCtrl classes.
-
+
@library{wxcore}
@category{gdi}
-
+
@seealso
wxTreeCtrl, wxListCtrl
*/
Constructor specifying the image size, whether image masks should be created,
and the initial size of the list.
- @param width
+ @param width
Width of the images in the list.
- @param height
+ @param height
Height of the images in the list.
- @param mask
+ @param mask
@true if masks should be created for all images.
- @param initialCount
+ @param initialCount
The initial size of the list.
@sa Create()
*/
wxImageList();
- wxImageList(int width, int height, bool mask = @true,
- int initialCount = 1);
+ wxImageList(int width, int height, bool mask = @true,
+ int initialCount = 1);
//@}
//@{
/**
Adds a new image using an icon.
- @param bitmap
+ @param bitmap
Bitmap representing the opaque areas of the image.
- @param mask
+ @param mask
Monochrome mask bitmap, representing the transparent areas of the image.
- @param maskColour
+ @param maskColour
Colour indicating which parts of the image are transparent.
- @param icon
+ @param icon
Icon to use as the image.
@returns The new zero-based image index.
*/
int Add(const wxBitmap& bitmap,
const wxBitmap& mask = wxNullBitmap);
- int Add(const wxBitmap& bitmap, const wxColour& maskColour);
- int Add(const wxIcon& icon);
+ int Add(const wxBitmap& bitmap, const wxColour& maskColour);
+ int Add(const wxIcon& icon);
//@}
/**
/**
Draws a specified image onto a device context.
- @param index
+ @param index
Image index, starting from zero.
- @param dc
+ @param dc
Device context to draw on.
- @param x
+ @param x
X position on the device context.
- @param y
+ @param y
Y position on the device context.
- @param flags
+ @param flags
How to draw the image. A bitlist of a selection of the following:
wxIMAGELIST_DRAW_NORMAL
Draw the image in a focused state.
- @param solidBackground
+ @param solidBackground
For optimisation - drawing can be faster if the function is told
that the background is solid.
*/
int GetImageCount();
/**
- Retrieves the size of the images in the list. Currently, the @e index
+ Retrieves the size of the images in the list. Currently, the @e index
parameter is ignored as all images in the list have the same size.
- @param index
+ @param index
currently unused, should be 0
- @param width
+ @param width
receives the width of the images in the list
- @param height
+ @param height
receives the height of the images in the list
@returns @true if the function succeeded, @false if it failed (for example,
/**
Replaces the existing image with the new image.
- @param bitmap
+ @param bitmap
Bitmap representing the opaque areas of the image.
- @param mask
+ @param mask
Monochrome mask bitmap, representing the transparent areas of the image.
- @param icon
+ @param icon
Icon to use as the image.
@returns @true if the replacement was successful, @false otherwise.
*/
bool Replace(int index, const wxBitmap& bitmap,
const wxBitmap& mask = wxNullBitmap);
- bool Replace(int index, const wxIcon& icon);
+ bool Replace(int index, const wxIcon& icon);
//@}
};
/////////////////////////////////////////////////////////////////////////////
- // Name: init.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- /**
- Free resources allocated by a successful call to wxEntryStart.
+// Name: init.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+Free resources allocated by a successful call to wxEntryStart.
*/
void wxEntryCleanup();
- //@{
+//@{
/**
- (notice that under Windows CE platform, and only there, the type of
+ (notice that under Windows CE platform, and only there, the type of
@e pCmdLine is @c wchar_t *, otherwise it is @c char *, even in
Unicode build).
*/
bool wxEntryStart(int& argc, wxChar ** argv);
- bool wxEntryStart(HINSTANCE hInstance,
- HINSTANCE hPrevInstance = @NULL,
- char * pCmdLine = @NULL,
- int nCmdShow = SW_SHOWNORMAL);
+bool wxEntryStart(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance = @NULL,
+ char * pCmdLine = @NULL,
+ int nCmdShow = SW_SHOWNORMAL);
//@}
/**
@class wxLocale
@wxheader{intl.h}
-
+
wxLocale class encapsulates all language-dependent settings and is a
generalization of the C locale concept.
-
+
In wxWidgets this class manages message catalogs which contain the translations
of the strings used to the current language.
-
+
@b wxPerl note: In wxPerl you can't use the '_' function name, so
- the @c Wx::Locale module can export the @c gettext and
- @c gettext_noop under any given name.
-
+ the @c Wx::Locale module can export the @c gettext and
+ @c gettext_noop under any given name.
+
@code
# this imports gettext ( equivalent to Wx::GetTranslation
# and gettext_noop ( a noop )
# into your module
use Wx::Locale qw(:default);
-
+
# ....
-
+
# use the functions
- print gettext( ``Panic!'' );
-
+ print gettext( ``Panic!'' );
+
button = Wx::Button-new( window, -1, gettext( ``Label'' ) );
@endcode
-
+
If you need to translate a lot of strings, then adding gettext( ) around
each one is a long task ( that is why _( ) was introduced ), so just choose
a shorter name for gettext:
-
+
@code
#
use Wx::Locale 'gettext' = 't',
'gettext_noop' = 'gettext_noop';
-
+
# ...
-
+
# use the functions
print t( ``Panic!!'' );
-
+
# ...
@endcode
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_internationalization "Internationalization overview", @ref
overview_sampleinternat "Internat sample", wxXLocale
*/
-class wxLocale
+class wxLocale
{
public:
//@{
translate the messages using the message catalogs for this locale.
*/
wxLocale();
- wxLocale(int language,
- int flags =
- wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
- wxLocale(const wxString& name,
- const wxString& short = wxEmptyString,
- const wxString& locale = wxEmptyString,
- bool bLoadDefault = @true,
- bool bConvertEncoding = @false);
+ wxLocale(int language,
+ int flags =
+ wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
+ wxLocale(const wxString& name,
+ const wxString& short = wxEmptyString,
+ const wxString& locale = wxEmptyString,
+ bool bLoadDefault = @true,
+ bool bConvertEncoding = @false);
//@}
/**
The destructor, like the constructor, also has global side effects: the
previously
- set locale is restored and so the changes described in
+ set locale is restored and so the changes described in
Init() documentation are rolled back.
*/
~wxLocale();
/**
Add a catalog for use with the current locale: it is searched for in standard
places (current directory first, then the system one), but you may also prepend
- additional directories to the search path with
+ additional directories to the search path with
AddCatalogLookupPathPrefix().
All loaded catalogs will be used for message lookup by
@e msgIdLanguage specifies the language of "msgid" strings in source code
(i.e. arguments to GetString(),
- wxGetTranslation and the
+ wxGetTranslation and the
_ macro). It is used if AddCatalog cannot find any
catalog for current language: if the language is same as source code language,
- then strings from source code are used instead.
+ then strings from source code are used instead.
@e msgIdCharset lets you specify the charset used for msgids in sources
in case they use 8-bit characters (e.g. German or French strings). This
to be in English and written only using 7-bit ASCII characters.
If you have to deal with non-English strings or 8-bit characters in the source
- code, see the instructions in
+ code, see the instructions in
@ref overview_nonenglishoverview "Writing non-English applications".
*/
bool AddCatalog(const wxString& domain);
- bool AddCatalog(const wxString& domain,
- wxLanguage msgIdLanguage,
- const wxString& msgIdCharset);
+ bool AddCatalog(const wxString& domain,
+ wxLanguage msgIdLanguage,
+ const wxString& msgIdCharset);
//@}
/**
/**
Adds custom, user-defined language to the database of known languages. This
- database is used in conjunction with the first form of
- Init().
+ database is used in conjunction with the first form of
+ Init().
wxLanguageInfo is defined as follows:
static wxString GetLanguageName(int lang);
/**
- Returns the locale name as passed to the constructor or
+ Returns the locale name as passed to the constructor or
Init(). This is full, human-readable name,
e.g. "English" or "French".
*/
*/
const wxString GetString(const wxString& origString,
const wxString& domain = wxEmptyString);
- const wxString GetString(const wxString& origString,
- const wxString& origString2,
- size_t n,
- const wxString& domain = @NULL);
+ const wxString GetString(const wxString& origString,
+ const wxString& origString2,
+ size_t n,
+ const wxString& domain = @NULL);
//@}
/**
/**
Tries to detect the user's default font encoding.
- Returns wxFontEncoding value or
+ Returns wxFontEncoding value or
@b wxFONTENCODING_SYSTEM if it couldn't be determined.
*/
static wxFontEncoding GetSystemEncoding();
/**
Tries to detect the name of the user's default font encoding. This string isn't
particularly useful for the application as its form is platform-dependent and
- so you should probably use
+ so you should probably use
GetSystemEncoding() instead.
Returns a user-readable string value or an empty string if it couldn't be
/**
Tries to detect the user's default language setting.
- Returns wxLanguage value or
+ Returns wxLanguage value or
@b wxLANGUAGE_UNKNOWN if the language-guessing algorithm failed.
*/
static int GetSystemLanguage();
//@{
/**
The second form is deprecated, use the first one unless you know what you are
- doing.
+ doing.
- @param language
- wxLanguage identifier of the locale.
- wxLANGUAGE_DEFAULT has special meaning -- wxLocale will use system's default
+ @param language
+ wxLanguage identifier of the locale.
+ wxLANGUAGE_DEFAULT has special meaning -- wxLocale will use system's default
language (see GetSystemLanguage).
- @param flags
+ @param flags
Combination of the following:
Automatically convert message
- catalogs to platform's default encoding. Note that it will do only basic
+ catalogs to platform's default encoding. Note that it will do only basic
conversion between well-known pair like iso8859-1 and windows-1252 or
iso8859-2 and windows-1250. See Writing non-English applications for detailed
description of this behaviour. Note that this flag is meaningless in Unicode
build.
- @param name
+ @param name
The name of the locale. Only used in diagnostic messages.
- @param short
+ @param short
The standard 2 letter locale abbreviation; it is used as the
directory prefix when looking for the message catalog files.
- @param locale
+ @param locale
The parameter for the call to setlocale(). Note that it is
platform-specific.
- @param bLoadDefault
+ @param bLoadDefault
May be set to @false to prevent loading of the message catalog
for the given locale containing the translations of standard wxWidgets messages.
This parameter would be rarely used in normal circumstances.
- @param bConvertEncoding
+ @param bConvertEncoding
May be set to @true to do automatic conversion of message
- catalogs to platform's native encoding. Note that it will do only basic
+ catalogs to platform's native encoding. Note that it will do only basic
conversion between well-known pair like iso8859-1 and windows-1252 or
- iso8859-2 and windows-1250.
+ iso8859-2 and windows-1250.
See Writing non-English applications for detailed
description of this behaviour.
*/
bool Init(int language = wxLANGUAGE_DEFAULT,
int flags =
- wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
- bool Init(const wxString& name,
- const wxString& short = wxEmptyString,
- const wxString& locale = wxEmptyString,
- bool bLoadDefault = @true,
- bool bConvertEncoding = @false);
+ wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
+ bool Init(const wxString& name,
+ const wxString& short = wxEmptyString,
+ const wxString& locale = wxEmptyString,
+ bool bLoadDefault = @true,
+ bool bConvertEncoding = @false);
//@}
/**
supported.
The argument @e lang is the wxLanguage identifier. To obtain this for a
- given a two letter ISO language code, use
+ given a two letter ISO language code, use
FindLanguageInfo() to obtain its
wxLanguageInfo structure. See AddLanguage() for
the wxLanguageInfo description.
/**
See @ref overview_languagecodes "list of recognized language constants".
These constants may be used to specify the language
- in Init() and are returned by
+ in Init() and are returned by
GetSystemLanguage():
*/
};
/**
@class wxXLocale
@wxheader{intl.h}
-
-
+
+
wxXLocale::wxXLocale
wxXLocale::GetCLocale
wxXLocale::IsOk
-
-
+
+
Introduction
-
- This class represents a locale object used by so-called xlocale API. Unlike
+
+ This class represents a locale object used by so-called xlocale API. Unlike
wxLocale it doesn't provide any non-trivial operations but
simply provides a portable wrapper for POSIX @c locale_t type. It exists
solely to be provided as an argument to various @c wxFoo_l() functions
use @c wxPrintf_l(wxXLocale::GetCLocale(), "%g", number) to do it.
Conversely, if a program wanted to output the number in French locale, even if
the current locale is different, it could use wxXLocale(wxLANGUAGE_FRENCH).
-
-
+
+
Availability
-
+
This class is fully implemented only under the platforms where xlocale POSIX
API or equivalent is available. Currently the xlocale API is available under
most of the recent Unix systems (including Linux, various BSD and Mac OS X) and
Microsoft Visual C++ standard library provides a similar API starting from
version 8 (Visual Studio 2005).
-
+
If neither POSIX API nor Microsoft proprietary equivalent are available, this
class is still available but works in degraded mode: the only supported locale
is the C one and attempts to create wxXLocale object for any other locale will
fail. You can use the preprocessor macro @c wxHAS_XLOCALE_SUPPORT to
test if full xlocale API is available or only skeleton C locale support is
present.
-
- Notice that wxXLocale is new in wxWidgets 2.9.0 and is not compiled in if
+
+ Notice that wxXLocale is new in wxWidgets 2.9.0 and is not compiled in if
@c wxUSE_XLOCALE was set to 0 during the library compilation.
-
-
+
+
Locale-dependent functions
-
+
Currently the following @c _l-functions are available:
-
+
Character classification functions: @c wxIsxxx_l(), e.g.
@c wxIsalpha_l(), @c wxIslower_l() and all the others.
Character transformation functions: @c wxTolower_l() and
@c wxToupper_l()
-
+
We hope to provide many more functions (covering numbers, time and formatted
IO) in the near future.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxLocale
*/
-class wxXLocale
+class wxXLocale
{
public:
//@{
portability.
*/
wxLocale();
- wxLocale(wxLanguage lang);
- wxLocale(const char * loc);
+ wxLocale(wxLanguage lang);
+ wxLocale(const char * loc);
//@}
/**
test if full xlocale API is available or only skeleton C locale support is
present.
- Notice that wxXLocale is new in wxWidgets 2.9.0 and is not compiled in if
+ Notice that wxXLocale is new in wxWidgets 2.9.0 and is not compiled in if
@c wxUSE_XLOCALE was set to 0 during the library compilation.
*/
static wxXLocale GetCLocale();
/**
- This class represents a locale object used by so-called xlocale API. Unlike
+ This class represents a locale object used by so-called xlocale API. Unlike
wxLocale it doesn't provide any non-trivial operations but
simply provides a portable wrapper for POSIX @c locale_t type. It exists
solely to be provided as an argument to various @c wxFoo_l() functions
/**
Returns @true if this object is initialized, i.e. represents a valid locale
- or
+ or
@false otherwise.
*/
#define bool IsOk() /* implementation is private */
of wxGetTranslation.
*/
#define const wxString wxPLURAL(const wxString& sing,
- const wxString& plur,
- size_t n) /* implementation is private */
+const wxString& plur,
+size_t n) /* implementation is private */
/**
This macro doesn't do anything in the program code -- it simply expands to the
value of its argument.
-
+
However it does have a purpose which is to mark the literal strings for the
extraction into the message catalog created by @c xgettext program. Usually
this is achieved using _ but that macro not only marks
wxGetTranslation function call which means that it
cannot be used in some situations, notably for static array
initialization.
-
+
Here is an example which should make it more clear: suppose that you have a
static array of strings containing the weekday names and which have to be
translated (note that it is a bad example, really, as
...
// use weekdays[n] as usual
@endcode
-
+
the code wouldn't compile because the function calls are forbidden in the array
initializer. So instead you should do
@code
...
// use wxGetTranslation(weekdays[n])
@endcode
-
+
here.
-
+
Note that although the code @b would compile if you simply omit
wxTRANSLATE() in the above, it wouldn't work as expected because there would be
no translations for the weekday names in the program message catalog and
function, so it marks the message for the extraction by @c xgettext just as
wxTRANSLATE does, but also returns the translation of
the string for the current locale during execution.
-
+
Don't confuse this macro with _T!
*/
#define const wxString _(const wxString& s) /* implementation is private */
is used very often, an alternative (and also common in Unix world) syntax is
provided: the _ macro is defined to do the same thing
as wxGetTranslation.
-
+
The second form is used when retrieving translation of string that has
different singular and plural form in English or different plural forms in some
other language. It takes two extra arguments: as above, @e str
is the plural form (in English). The parameter @e n is used to determine the
plural form. If no message catalog is found @e str is returned if 'n == 1',
otherwise @e strPlural.
-
+
See GNU gettext manual
for additional information on plural forms handling. For a shorter alternative
see the wxPLURAL macro.
-
+
Both versions call wxLocale::GetString.
-
+
Note that this function is not suitable for literal strings in Unicode
builds, since the literal strings must be enclosed into
_T or wxT macro which makes them
*/
const wxString wxGetTranslation(const wxString& str,
const wxString& domain = wxEmptyString);
- const wxString wxGetTranslation(const wxString& str,
- const wxString& strPlural,
- size_t n,
- const wxString& domain = wxEmptyString);
+const wxString wxGetTranslation(const wxString& str,
+ const wxString& strPlural,
+ size_t n,
+ const wxString& domain = wxEmptyString);
//@}
/**
@class wxConnection
@wxheader{ipc.h}
-
+
A wxConnection object represents the connection between a client
and a server. It is created by making a connection using a
wxClient object, or by the acceptance of a
using wxDDEConnection is available on Windows only, but a
platform-independent, socket-based version of this API is
available using wxTCPConnection, which has the same API.
-
+
An application should normally derive a new connection class from
wxConnection, in order to override the communication event
handlers to do something interesting.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxClient, wxServer, @ref overview_ipcoverview "Interprocess communications
overview"
object will be provided on requesting (or accepting) a
connection. However, if the user defines his or her own derived
connection object, the wxServer::OnAcceptConnection
- and/or wxClient::OnMakeConnection
+ and/or wxClient::OnMakeConnection
members should be replaced by functions which construct the new
connection object.
mainly for backwards compatibility.
*/
wxConnection();
- wxConnection(void* buffer, size_t size);
+ wxConnection(void* buffer, size_t size);
//@}
//@{
*/
bool Advise(const wxString& item, const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
- bool Advise(const wxString& item, const char* data);
- bool Advise(const wxString& item, const wchar_t* data);
- bool Advise(const wxString& item, const wxString data);
+ bool Advise(const wxString& item, const char* data);
+ bool Advise(const wxString& item, const wchar_t* data);
+ bool Advise(const wxString& item, const wxString data);
//@}
/**
Called by the client or server application to disconnect from the
- other program; it causes the OnDisconnect()
+ other program; it causes the OnDisconnect()
message to be sent to the corresponding connection object in the
other program. Returns @true if successful or already disconnected.
The application that calls @b Disconnect must explicitly delete
Called by the client application to execute a command on the
server. Can also be used to transfer arbitrary data to the server
(similar to Poke() in
- that respect). Causes the server connection's OnExec()
+ that respect). Causes the server connection's OnExec()
member to be called. Returns @true if successful.
*/
bool Execute(const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
- bool Execute(const char* data);
- bool Execute(const wchar_t* data);
- bool Execute(const wxString data);
+ bool Execute(const char* data);
+ bool Execute(const wchar_t* data);
+ bool Execute(const wxString data);
//@}
/**
wxIPCFormat format);
/**
- Message sent to the server application when the client calls
+ Message sent to the server application when the client calls
Request(). The
server's OnRequest() method
should respond by returning a character string, or @NULL to
*/
bool Poke(const wxString& item, const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
- bool Poke(const wxString& item, const char* data);
- bool Poke(const wxString& item, const wchar_t* data);
- bool Poke(const wxString& item, const wxString data);
+ bool Poke(const wxString& item, const char* data);
+ bool Poke(const wxString& item, const wchar_t* data);
+ bool Poke(const wxString& item, const wxString data);
//@}
/**
Called by the client application to request data from the server.
- Causes the server connection's OnRequest()
+ Causes the server connection's OnRequest()
member to be called. Size may be @NULL or a pointer to a variable
to receive the size of the requested item.
/**
Called by the client application to ask if an advise loop can be
- started with the server. Causes the server connection's
+ started with the server. Causes the server connection's
OnStartAdvise()
member to be called. Returns @true if the server okays it, @false
otherwise.
/**
Called by the client application to ask if an advise loop can be
- stopped. Causes the server connection's OnStopAdvise()
+ stopped. Causes the server connection's OnStopAdvise()
member to be called. Returns @true if the server okays it, @false
otherwise.
*/
/**
@class wxClient
@wxheader{ipc.h}
-
+
A wxClient object represents the client part of a client-server
DDE-like (Dynamic Data Exchange) conversation. The actual
DDE-based implementation using wxDDEClient is available on Windows
only, but a platform-independent, socket-based version of this
API is available using wxTCPClient, which has the same API.
-
+
To create a client which can communicate with a suitable server,
you need to derive a class from wxConnection and another from
wxClient. The custom wxConnection class will intercept
communications in a 'conversation' with a server, and the custom
wxClient is required so that a user-overridden
- wxClient::OnMakeConnection
+ wxClient::OnMakeConnection
member can return a wxConnection of the required class, when a
- connection is made. Look at the IPC sample and the
+ connection is made. Look at the IPC sample and the
@ref overview_ipcoverview "Interprocess communications overview" for
an example of how to do this.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxServer, wxConnection, @ref overview_ipcoverview "Interprocess communications
overview"
native DDE in Windows), service name and topic string. If the
server allows a connection, a wxConnection object will be
returned. The type of wxConnection returned can be altered by
- overriding the
- OnMakeConnection()
+ overriding the
+ OnMakeConnection()
member to return your own derived connection object.
Under Unix, the service name may be either an integer port
/**
@class wxServer
@wxheader{ipc.h}
-
+
A wxServer object represents the server part of a client-server
DDE-like (Dynamic Data Exchange) conversation. The actual
DDE-based implementation using wxDDEServer is available on Windows
only, but a platform-independent, socket-based version of this
API is available using wxTCPServer, which has the same API.
-
+
To create a server which can communicate with a suitable client,
you need to derive a class from wxConnection and another from
wxServer. The custom wxConnection class will intercept
communications in a 'conversation' with a client, and the custom
- wxServer is required so that a user-overridden wxServer::OnAcceptConnection
+ wxServer is required so that a user-overridden wxServer::OnAcceptConnection
member can return a wxConnection of the required class, when a
connection is made. Look at the IPC sample and the @ref overview_ipcoverview
"Interprocess communications overview" for
an example of how to do this.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxClient, wxConnection, IPC, overview
*/
-class wxServer
+class wxServer
{
public:
/**
/**
@class wxJoystick
@wxheader{joystick.h}
-
+
wxJoystick allows an application to control one or more joysticks.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxJoystickEvent
*/
/**
Returns the state of the specified joystick button.
- @param id
+ @param id
The button id to report, from 0 to GetNumberButtons() - 1
*/
int GetButtonState();
- bool GetButtonState(unsigned id);
+ bool GetButtonState(unsigned id);
//@}
/**
/**
Returns the position of the specified joystick axis.
- @param axis
+ @param axis
The joystick axis to report, from 0 to GetNumberAxes() - 1.
*/
wxPoint GetPosition();
- int GetPosition(unsigned axis);
+ int GetPosition(unsigned axis);
//@}
/**
/**
Sets the capture to direct joystick events to @e win.
- @param win
+ @param win
The window that will receive joystick events.
- @param pollingFreq
+ @param pollingFreq
If zero, movement events are sent when above the
threshold. If greater than zero, events are received every pollingFreq
milliseconds.
/**
@class wxIndividualLayoutConstraint
@wxheader{layout.h}
-
+
Objects of this class are stored in the wxLayoutConstraint class
as one of eight possible constraints that a window can be involved in.
-
+
Constraints are initially set to have the relationship wxUnconstrained,
which means that their values should be calculated by looking at known
constraints.
-
+
@library{wxcore}
@category{winlayout}
-
+
@seealso
@ref overview_constraintsoverview "Overview and examples", wxLayoutConstraints,
wxWindow::SetConstraints.
functions such as Above, RightOf, SameAs.
*/
#define void Set(wxRelationship rel, wxWindow * otherWin,
- wxEdge otherEdge, int value = 0,
- int margin = 0) /* implementation is private */
+ wxEdge otherEdge, int value = 0,
+ int margin = 0) /* implementation is private */
/**
Sets this edge or dimension to be unconstrained, that is, dependent on
/**
@class wxLayoutConstraints
@wxheader{layout.h}
-
+
@b Note: constraints are now deprecated and you should use sizers instead.
-
+
Objects of this class can be associated with a window to define its
layout constraints, with respect to siblings or its parent.
-
+
The class consists of the following eight constraints of class
wxIndividualLayoutConstraint,
some or all of which should be accessed directly to set the appropriate
constraints.
-
+
@b left: represents the left hand edge of the window
@b right: represents the right hand edge of the window
@b top: represents the top edge of the window
@b height: represents the height of the window
@b centreX: represents the horizontal centre point of the window
@b centreY: represents the vertical centre point of the window
-
+
Most constraints are initially set to have the relationship wxUnconstrained,
which means that their values should be calculated by looking at known
constraints.
width and height will be used, to be compatible with panel items which often
have take a default size. If the constraint is wxAsIs, the dimension will
not be changed.
-
+
@b wxPerl note: In wxPerl the constraints are accessed as
-
+
@code
constraint = Wx::LayoutConstraints-new();
constraint-centreX-AsIs();
constraint-centreY-Unconstrained();
@endcode
-
-
+
+
@library{wxcore}
@category{winlayout}
-
+
@seealso
@ref overview_constraintsoverview "Overview and examples",
wxIndividualLayoutConstraint, wxWindow::SetConstraints
/**
@class wxLayoutAlgorithm
@wxheader{laywin.h}
-
+
wxLayoutAlgorithm implements layout of subwindows in MDI or SDI frames.
It sends a wxCalculateLayoutEvent event
to children of the frame, asking them for information about
frames).
For SDI (normal) frames, a 'main' window is specified as taking up the
remaining space.
-
+
Because the event system is used, this technique can be applied to any windows,
which are not necessarily 'aware' of the layout classes (no virtual functions
in wxWindow refer to wxLayoutAlgorithm or its events). However, you
since this class provides handlers for the required events, and accessors
to specify the desired size of the window. The sash behaviour in the base class
can be used, optionally, to make the windows user-resizable.
-
+
wxLayoutAlgorithm is typically used in IDE (integrated development environment)
applications,
where there are several resizable windows in addition to the MDI client window,
other primary editing window. Resizable windows might include toolbars, a
project
window, and a window for displaying error and warning messages.
-
+
When a window receives an OnCalculateLayout event, it should call SetRect in
the given event object, to be the old supplied rectangle minus whatever space
the
which it sends to itself to determine the orientation, alignment and size of
the window,
which it gets from internal member variables set by the application.
-
+
The algorithm works by starting off with a rectangle equal to the whole frame
client area.
It iterates through the frame children, generating OnCalculateLayout events
output window take up space at the top and bottom, and then the remaining
height in-between is used for
the project window.
-
+
wxLayoutAlgorithm is quite independent of the way in which
OnCalculateLayout chooses to interpret a window's size and alignment. Therefore
you
rather than always assuming stretching. (This could, and probably should, be
added to the existing
implementation).
-
+
@e Note: wxLayoutAlgorithm has nothing to do with wxLayoutConstraints. It is an
alternative
way of specifying layouts for which the normal constraint system is unsuitable.
-
+
@library{wxadv}
@category{winlayout}
-
+
@seealso
wxSashEvent, wxSashLayoutWindow, @ref overview_eventhandlingoverview "Event
handling overview"
/**
@class wxSashLayoutWindow
@wxheader{laywin.h}
-
+
wxSashLayoutWindow responds to OnCalculateLayout events generated
by wxLayoutAlgorithm. It allows the
application to use simple accessors to specify how the window should be
laid out, rather than having to respond to events. The fact that
the class derives from wxSashWindow allows sashes to be used if required,
to allow the windows to be user-resizable.
-
+
The documentation for wxLayoutAlgorithm explains
the purpose of this class in more detail.
-
+
@library{wxadv}
@category{miscwnd}
-
+
@seealso
wxLayoutAlgorithm, wxSashWindow, @ref overview_eventhandlingoverview "Event
handling overview"
Constructs a sash layout window, which can be a child of a frame, dialog or any
other non-control window.
- @param parent
+ @param parent
Pointer to a parent window.
- @param id
+ @param id
Window identifier. If -1, will automatically create an identifier.
- @param pos
+ @param pos
Window position. wxDefaultPosition is (-1, -1) which indicates that
wxSashLayoutWindows
should generate a default position for the window. If using the
wxSashLayoutWindow class directly, supply
an actual position.
- @param size
+ @param size
Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows
should generate a default size for the window.
- @param style
+ @param style
Window style. For window styles, please see wxSashLayoutWindow.
- @param name
+ @param name
Window name.
*/
wxSashLayoutWindow();
- wxSashLayoutWindow(wxSashLayoutWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxCLIP_CHILDREN | wxSW_3D,
- const wxString& name = "layoutWindow");
+ wxSashLayoutWindow(wxSashLayoutWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCLIP_CHILDREN | wxSW_3D,
+ const wxString& name = "layoutWindow");
//@}
/**
Initializes a sash layout window, which can be a child of a frame, dialog or
any other non-control window.
- @param parent
+ @param parent
Pointer to a parent window.
- @param id
+ @param id
Window identifier. If -1, will automatically create an identifier.
- @param pos
+ @param pos
Window position. wxDefaultPosition is (-1, -1) which indicates that
wxSashLayoutWindows
should generate a default position for the window. If using the
wxSashLayoutWindow class directly, supply
an actual position.
- @param size
+ @param size
Window size. wxDefaultSize is (-1, -1) which indicates that wxSashLayoutWindows
should generate a default size for the window.
- @param style
+ @param style
Window style. For window styles, please see wxSashLayoutWindow.
- @param name
+ @param name
Window name.
*/
bool Create(wxSashLayoutWindow* parent, wxWindowID id,
/**
@class wxQueryLayoutInfoEvent
@wxheader{laywin.h}
-
+
This event is sent when wxLayoutAlgorithm wishes to get
the size, orientation and alignment of a window. More precisely, the event is
sent
by the OnCalculateLayout handler which is itself invoked by wxLayoutAlgorithm.
-
+
@library{wxadv}
@category{events}
-
+
@seealso
wxCalculateLayoutEvent, wxSashLayoutWindow, wxLayoutAlgorithm.
*/
/**
@class wxCalculateLayoutEvent
@wxheader{laywin.h}
-
+
This event is sent by wxLayoutAlgorithm to
calculate the amount of the remaining client area that the window should
occupy.
-
+
@library{wxadv}
@category{events}
-
+
@seealso
wxQueryLayoutInfoEvent, wxSashLayoutWindow, wxLayoutAlgorithm.
*/
/////////////////////////////////////////////////////////////////////////////
- // Name: link.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- /**
- This macro can be used in conjunction with the
- wxFORCE_LINK_MODULE macro to force
- the linker to include in its output a specific object file.
-
- In particular, you should use this macro in the source file which you want
- to force for inclusion. The @c moduleName needs to be a name not already
- in use in other @c wxFORCE_LINK_THIS_MODULE macros, but is not required
- to be e.g. the same name of the source file (even if it's a good choice).
+// Name: link.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+This macro can be used in conjunction with the
+wxFORCE_LINK_MODULE macro to force
+the linker to include in its output a specific object file.
+
+In particular, you should use this macro in the source file which you want
+to force for inclusion. The @c moduleName needs to be a name not already
+in use in other @c wxFORCE_LINK_THIS_MODULE macros, but is not required
+to be e.g. the same name of the source file (even if it's a good choice).
*/
#define wxFORCE_LINK_THIS_MODULE() /* implementation is private */
- /**
- This macro can be used in conjunction with the
- wxFORCE_LINK_THIS_MODULE macro to force
- the linker to include in its output a specific object file.
-
- In particular, you should use this macro in a source file which you know
- for sure is linked in the output (e.g. the source file containing the "main()"
- of your app). The @c moduleName is the name of the module you want to
- forcefully link
- (i.e. the name you used in the relative wxFORCE_LINK_THIS_MODULE macro.
+/**
+This macro can be used in conjunction with the
+wxFORCE_LINK_THIS_MODULE macro to force
+the linker to include in its output a specific object file.
+
+In particular, you should use this macro in a source file which you know
+for sure is linked in the output (e.g. the source file containing the "main()"
+of your app). The @c moduleName is the name of the module you want to
+forcefully link
+(i.e. the name you used in the relative wxFORCE_LINK_THIS_MODULE macro.
*/
#define wxFORCE_LINK_MODULE() /* implementation is private */
/**
@class wxListT
@wxheader{list.h}
-
+
The wxListT class provides linked list functionality. It has been rewritten
to be type safe and to provide the full API of the STL std::list container and
should be used like it. The exception is that wxListT actually stores
pointers and therefore its iterators return pointers and not references
- to the actual objets in the list (see example below) and @e value_type
+ to the actual objets in the list (see example below) and @e value_type
is defined as @e T*. wxListT destroys an object after removing it only
if wxList::DeleteContents has been called.
-
- wxListT is not a real template and it requires that you declare and define
+
+ wxListT is not a real template and it requires that you declare and define
each wxListT class in your program. This is done with @e WX_DECLARE_LIST
and @e WX_DEFINE_LIST macros (see example). We hope that we'll be able
to provide a proper template class providing both the STL std::list
and the old wxList API in the future.
-
+
Please refer to the STL std::list documentation for further
information on how to use the class. Below we documented both
- the supported STL and the legacy API that originated from the
+ the supported STL and the legacy API that originated from the
old wxList class and which can still be used alternatively for
the the same class.
-
- Note that if you compile wxWidgets in STL mode (wxUSE_STL defined as 1)
- then wxListT will actually derive from std::list and just add a legacy
+
+ Note that if you compile wxWidgets in STL mode (wxUSE_STL defined as 1)
+ then wxListT will actually derive from std::list and just add a legacy
compatibility layer for the old wxList class.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxArrayT, wxVectorT
*/
-class wxList<T>
+class wxList<T>
{
public:
//@{
Constructors.
*/
wxListT();
- wxListT(size_t count, T * elements[]);
+ wxListT(size_t count, T * elements[]);
//@}
/**
void DeleteContents(bool destroy);
/**
- Deletes the given element refered to by @c iter from the list,
+ Deletes the given element refered to by @c iter from the list,
returning @true if successful.
*/
bool DeleteNode(const compatibility_iterator& iter);
Inserts the object before the object refered to be @e iter.
*/
wxListT::compatibility_iterator Insert(T * object);
- wxListT::compatibility_iterator Insert(size_t position,
- T * object);
- wxListT::compatibility_iterator Insert(compatibility_iterator iter,
- T * object);
+ wxListT::compatibility_iterator Insert(size_t position,
+ T * object);
+ wxListT::compatibility_iterator Insert(compatibility_iterator iter,
+ T * object);
//@}
/**
)
*/
void assign(const_iterator first, const const_iterator& last);
- void assign(size_type n);
+ void assign(size_type n);
//@}
//@{
Returns the last item of the list.
*/
reference back();
- const_reference back();
+ const_reference back();
//@}
//@{
Returns a (const) iterator pointing to the beginning of the list.
*/
iterator begin();
- const_iterator begin();
+ const_iterator begin();
//@}
/**
Returns a (const) iterator pointing at the end of the list.
*/
iterator end();
- const_iterator end();
+ const_iterator end();
//@}
//@{
Erases the items from @e first to @e last.
*/
iterator erase(const iterator& it);
- iterator erase(const iterator& first,
- const iterator& last);
+ iterator erase(const iterator& first,
+ const iterator& last);
//@}
//@{
Returns the first item in the list.
*/
reference front();
- const_reference front();
+ const_reference front();
//@}
//@{
Inserts an item (or several) at the given position.
*/
iterator insert(const iterator& it);
- void insert(const iterator& it, size_type n);
- void insert(const iterator& it, const_iterator first,
- const const_iterator& last);
+ void insert(const iterator& it, size_type n);
+ void insert(const iterator& it, const_iterator first,
+ const const_iterator& last);
//@}
/**
reversed list.
*/
reverse_iterator rbegin();
- const_reverse_iterator rbegin();
+ const_reverse_iterator rbegin();
//@}
/**
reversed list.
*/
reverse_iterator rend();
- const_reverse_iterator rend();
+ const_reverse_iterator rend();
//@}
/**
/**
@class wxNode
@wxheader{list.h}
-
- wxNodeBase is the node structure used in linked lists (see
+
+ wxNodeBase is the node structure used in linked lists (see
wxList) and derived classes. You should never use wxNodeBase
class directly, however, because it works with untyped (@c void *) data and
this is unsafe. Use wxNodeBase-derived classes which are automatically defined
wxList documentation (see example there). Also note that
although there is a class called wxNode, it is defined for backwards
compatibility only and usage of this class is strongly deprecated.
-
+
In the documentation below, the type @c T should be thought of as a
"template'' parameter: this is the type of data stored in the linked list or,
in other words, the first argument of WX_DECLARE_LIST macro. Also, wxNode is
written as wxNodeT even though it isn't really a template class -- but it
helps to think of it as if it were.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxList, wxHashTable
*/
-class wxNode
+class wxNode
{
public:
/**
/**
@class wxListbook
@wxheader{listbook.h}
-
+
wxListbook is a class similar to wxNotebook but which
uses a wxListCtrl to show the labels instead of the
tabs.
-
+
There is no documentation for this class yet but its usage is
identical to wxNotebook (except for the features clearly related to tabs
only), so please refer to that class documentation for now. You can also
use the @ref overview_samplenotebook "notebook sample" to see wxListbook in
action.
-
+
@beginStyleTable
@style{wxLB_DEFAULT}:
Choose the default location for the labels depending on the current
@style{wxLB_BOTTOM}:
Place labels below the page area.
@endStyleTable
-
+
@library{wxcore}
@category{miscwnd}
-
+
@seealso
wxBookCtrl, wxNotebook, @ref overview_samplenotebook "notebook sample"
*/
Constructs a listbook control.
*/
wxListbook();
- wxListbook(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxEmptyStr);
+ wxListbook(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxEmptyStr);
//@}
};
/**
@class wxListBox
@wxheader{listbox.h}
-
+
A listbox is used to select one or more of a list of strings. The
strings are displayed in a scrolling box, with the selected string(s)
marked in reverse video. A listbox can be single selection (if an item
is selected, the previous selection is removed) or multiple selection
(clicking an item toggles the item on or off independently of other
selections).
-
+
List box elements are numbered from zero. Their number may be limited
under some platforms.
-
+
A listbox callback gets an event wxEVT_COMMAND_LISTBOX_SELECTED for single
clicks, and
wxEVT_COMMAND_LISTBOX_DOUBLE_CLICKED for double clicks.
-
+
@beginStyleTable
@style{wxLB_SINGLE}:
Single-selection list.
@style{wxLB_SORT}:
The listbox contents are sorted in alphabetical order.
@endStyleTable
-
+
@beginEventTable
@event{EVT_LISTBOX(id\, func)}:
Process a wxEVT_COMMAND_LISTBOX_SELECTED event, when an item on the
Process a wxEVT_COMMAND_LISTBOX_DOUBLECLICKED event, when the
listbox is double-clicked.
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{listbox.png}
-
+
@seealso
wxChoice, wxComboBox, wxListCtrl, wxCommandEvent
*/
/**
Constructor, creating and showing a list box.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then the window is sized
appropriately.
- @param n
+ @param n
Number of strings with which to initialise the control.
- @param choices
+ @param choices
An array of strings with which to initialise the control.
- @param style
+ @param style
Window style. See wxListBox.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxListBox();
- wxListBox(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- int n = 0,
- const wxString choices[] = @NULL,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "listBox");
- wxListBox(wxWindow* parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "listBox");
+ wxListBox(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ int n = 0,
+ const wxString choices[] = @NULL,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "listBox");
+ wxListBox(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "listBox");
//@}
/**
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "listBox");
- bool Create(wxWindow* parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "listBox");
+ bool Create(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "listBox");
//@}
/**
Deselects an item in the list box.
- @param n
+ @param n
The zero-based item to deselect.
@remarks This applies to multiple selection listboxes only.
/**
Fill an array of ints with the positions of the currently selected items.
- @param selections
+ @param selections
A reference to an wxArrayInt instance that is used to store the result of the
query.
for wxMSW, wxMac and wxGTK2
ports.
- @param point
+ @param point
Point of item (in client coordinates) to obtain
@returns Item located at point, or wxNOT_FOUND if unimplemented or the
/**
Insert the given number of strings before the specified position.
- @param nItems
+ @param nItems
Number of items in the array items
- @param items
+ @param items
Labels of items to be inserted
- @param pos
+ @param pos
Position before which to insert the items: for example, if pos is 0 the items
will be inserted in the beginning of the listbox
*/
void InsertItems(int nItems, const wxString items,
unsigned int pos);
- void InsertItems(const wxArrayString& nItems,
- unsigned int pos);
+ void InsertItems(const wxArrayString& nItems,
+ unsigned int pos);
//@}
/**
Determines whether an item is selected.
- @param n
+ @param n
The zero-based item index.
@returns @true if the given item is selected, @false otherwise.
/**
Clears the list box and adds the given strings to it.
- @param n
+ @param n
The number of strings to set.
- @param choices
+ @param choices
An array of strings to set.
- @param clientData
+ @param clientData
Options array of client data pointers
@remarks You may free the array from the calling program after this
function has been called.
*/
void Set(int n, const wxString* choices, void clientData = @NULL);
- void Set(const wxArrayString& choices,
- void clientData = @NULL);
+ void Set(const wxArrayString& choices,
+ void clientData = @NULL);
//@}
//@{
/**
Set the specified item to be the first visible item.
- @param n
+ @param n
The zero-based item index.
- @param string
+ @param string
The string that should be visible.
*/
void SetFirstItem(int n);
- void SetFirstItem(const wxString& string);
+ void SetFirstItem(const wxString& string);
//@}
};
/**
@class wxListCtrl
@wxheader{listctrl.h}
-
+
A list control presents lists in a number of formats: list view, report view,
icon view and small icon view. In any case, elements are numbered from zero.
For all these modes, the items are stored in the control and must be added to
it using wxListCtrl::InsertItem method.
-
+
A special case of report view quite different from the other modes of the list
control is a virtual control in which the items data (including text, images
and attributes) is managed by the main program and is requested by the control
practically infinite number of items. For example, in a multiple selection
virtual list control, the selections won't be sent when many items are selected
at once because this could mean iterating over all the items.
-
+
Using many of wxListCtrl features is shown in the
@ref overview_samplelistctrl "corresponding sample".
-
+
To intercept events from a list control, use the event table macros described
in wxListEvent.
-
- @b Mac Note: Starting with 2.8, wxListCtrl uses a native implementation for
+
+ @b Mac Note: Starting with 2.8, wxListCtrl uses a native implementation for
report mode, and uses a generic implementation for other modes. You can use the
generic implementation for report mode as well by setting the
mac.listctrl.always_use_generic wxSystemOption to
1.
-
+
@beginStyleTable
@style{wxLC_LIST}:
Multicolumn list view, with optional small icons. Columns are
@style{wxLC_VRULES}:
Draws light vertical rules between columns in report mode.
@endStyleTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{listctrl.png}
-
+
@seealso
@ref overview_wxlistctrloverview "wxListCtrl overview", wxListView, wxListBox,
wxTreeCtrl, wxImageList, wxListEvent, wxListItem
/**
Constructor, creating and showing a list control.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then the window is sized
appropriately.
- @param style
+ @param style
Window style. See wxListCtrl.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxListCtrl();
- wxListCtrl(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxLC_ICON,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxListCtrlNameStr);
+ wxListCtrl(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxLC_ICON,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxListCtrlNameStr);
//@}
/**
*/
long FindItem(long start, const wxString& str,
bool partial = @false);
- long FindItem(long start, long data);
- long FindItem(long start, const wxPoint& pt, int direction);
+ long FindItem(long start, long data);
+ long FindItem(long start, const wxPoint& pt, int direction);
//@}
/**
column @e subItem.
This method is only meaningfull when the wxListCtrl is in the report mode. If
- @e subItem parameter is equal to the special value
+ @e subItem parameter is equal to the special value
@c wxLIST_GETSUBITEMRECT_WHOLEITEM the return value is the same as
for GetItemRect().
- @e code can be one of @c wxLIST_RECT_BOUNDS,
+ @e code can be one of @c wxLIST_RECT_BOUNDS,
@c wxLIST_RECT_ICON or @c wxLIST_RECT_LABEL.
This function is new since wxWidgets version 2.7.0
wxLIST_HITTEST_ONITEMSTATEICON.
If @e ptrSubItem is not @NULL and the wxListCtrl is in the report
- mode the subitem (or column) number will also be provided.
+ mode the subitem (or column) number will also be provided.
This feature is only available in version 2.7.0 or higher and is currently only
implemented under wxMSW and requires at least comctl32.dll of verion 4.70 on
the host system or the value stored in @e ptrSubItem will be always -1. To
For report view mode (only), inserts a column. For more details, see SetItem().
*/
long InsertColumn(long col, wxListItem& info);
- long InsertColumn(long col, const wxString& heading,
- int format = wxLIST_FORMAT_LEFT,
- int width = -1);
+ long InsertColumn(long col, const wxString& heading,
+ int format = wxLIST_FORMAT_LEFT,
+ int width = -1);
//@}
//@{
/**
Insert an image/string item.
- @param info
+ @param info
wxListItem object
- @param index
+ @param index
Index of the new item, supplied by the application
- @param label
+ @param label
String label
- @param imageIndex
+ @param imageIndex
index into the image list associated with this control and view style
*/
long InsertItem(wxListItem& info);
- long InsertItem(long index, const wxString& label);
- long InsertItem(long index, int imageIndex);
- long InsertItem(long index, const wxString& label,
- int imageIndex);
+ long InsertItem(long index, const wxString& label);
+ long InsertItem(long index, int imageIndex);
+ long InsertItem(long index, const wxString& label,
+ int imageIndex);
//@}
/**
for the specified @c item or @NULL to use the default appearance
parameters.
- wxListCtrl will not delete the pointer or keep a reference of it. You can
+ wxListCtrl will not delete the pointer or keep a reference of it. You can
return the same wxListItemAttr pointer for every OnGetItemAttr call.
The base class version always returns @NULL.
Sets a string field at a particular column.
*/
bool SetItem(wxListItem& info);
- long SetItem(long index, int col, const wxStringamp; label,
- int imageId = -1);
- m_mask m_state field is valid.
+ long SetItem(long index, int col, const wxStringamp; label,
+ int imageId = -1);
+ m_mask m_state field is valid.
-wxLIST_MASK_TEXT
+ wxLIST_MASK_TEXT
-The m_text field is valid.
+ The m_text field is valid.
-wxLIST_MASK_IMAGE
+ wxLIST_MASK_IMAGE
-The m_image field is valid.
+ The m_image field is valid.
-wxLIST_MASK_DATA
+ wxLIST_MASK_DATA
-The m_data field is valid.
+ The m_data field is valid.
-wxLIST_MASK_WIDTH
+ wxLIST_MASK_WIDTH
-The m_width field is valid.
+ The m_width field is valid.
-wxLIST_MASK_FORMAT
+ wxLIST_MASK_FORMAT
-The m_format field is valid.
+ The m_format field is valid.
-wxLIST_STATE_DONTCARE
+ wxLIST_STATE_DONTCARE
-Don't care what the state is. Win32 only.
+ Don't care what the state is. Win32 only.
-wxLIST_STATE_DROPHILITED
+ wxLIST_STATE_DROPHILITED
-The item is highlighted to receive a drop event. Win32 only.
+ The item is highlighted to receive a drop event. Win32 only.
-wxLIST_STATE_FOCUSED
+ wxLIST_STATE_FOCUSED
-The item has the focus.
+ The item has the focus.
-wxLIST_STATE_SELECTED
+ wxLIST_STATE_SELECTED
-The item is selected.
+ The item is selected.
-wxLIST_STATE_CUT
+ wxLIST_STATE_CUT
-The item is in the cut state. Win32 only.
+ The item is in the cut state. Win32 only.
-The wxListItem object can also contain item-specific colour and font
-information: for this you need to call one of SetTextColour(),
-SetBackgroundColour() or SetFont() functions on it passing it the colour/font
-to use. If the colour/font is not specified, the default list control
-colour/font is used.
-long SetItem(long index, int col, const wxString& label,
- int imageId = -1);
+ The wxListItem object can also contain item-specific colour and font
+ information: for this you need to call one of SetTextColour(),
+ SetBackgroundColour() or SetFont() functions on it passing it the colour/font
+ to use. If the colour/font is not specified, the default list control
+ colour/font is used.
+ long SetItem(long index, int col, const wxString& label,
+ int imageId = -1);
//@}
/**
- Sets the background colour for this item. This function only works in report
- view.
-
- The colour can be retrieved using
- GetItemBackgroundColour().
+ Sets the background colour for this item. This function only works in report
+ view.
+
+ The colour can be retrieved using
+ GetItemBackgroundColour().
*/
void SetItemBackgroundColour(long item, const wxColour& col);
/**
- Sets the image associated with the item. In report view, you can specify the
- column.
- The image is an index into the image list associated with the list control.
+ Sets the image associated with the item. In report view, you can specify the
+ column.
+ The image is an index into the image list associated with the list control.
*/
bool SetItemColumnImage(long item, long column, int image);
/**
- This method can only be used with virtual list controls. It is used to indicate
- to the control the number of items it contains. After calling it, the main
- program should be ready to handle calls to various item callbacks (such as
- wxListCtrl::OnGetItemText) for all items in the range
- from 0 to @e count.
+ This method can only be used with virtual list controls. It is used to indicate
+ to the control the number of items it contains. After calling it, the main
+ program should be ready to handle calls to various item callbacks (such as
+ wxListCtrl::OnGetItemText) for all items in the range
+ from 0 to @e count.
*/
void SetItemCount(long count);
/**
- Associates application-defined data with this item.
-
- Notice that this function cannot be used to associate pointers with the control
- items, use SetItemPtrData() instead.
+ Associates application-defined data with this item.
+
+ Notice that this function cannot be used to associate pointers with the control
+ items, use SetItemPtrData() instead.
*/
bool SetItemData(long item, long data);
/**
- Sets the item's font.
+ Sets the item's font.
*/
void SetItemFont(long item, const wxFont& font);
used.
*/
bool SetItemImage(long item, int image);
- bool SetItemImage(long item, int image, int selImage);
+ bool SetItemImage(long item, int image, int selImage);
//@}
/**
second one and positive value if the first one is greater than the second one
(the same convention as used by @c qsort(3)).
- @param item1
+ @param item1
client data associated with the first item (NOT the index).
- @param item2
+ @param item2
client data associated with the second item (NOT the index).
- @param data
+ @param data
the value passed to SortItems() itself.
*/
bool SortItems(wxListCtrlCompare fnSortCallBack, long data);
/**
@class wxListEvent
@wxheader{listctrl.h}
-
+
A list event holds information about events associated with wxListCtrl objects.
-
+
@library{wxbase}
@category{events}
-
+
@seealso
wxListCtrl
*/
/**
@class wxListItemAttr
@wxheader{listctrl.h}
-
+
Represents the attributes (color, font, ...) of a
wxListCtrl wxListItem.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxlistctrloverview "wxListCtrl overview", wxListCtrl, wxListItem
*/
-class wxListItemAttr
+class wxListItemAttr
{
public:
//@{
background colors and font.
*/
wxListItemAttr();
- wxListItemAttr(const wxColour colText,
- const wxColour colBack,
- const wxFont font);
+ wxListItemAttr(const wxColour colText,
+ const wxColour colBack,
+ const wxFont font);
//@}
/**
/**
@class wxListView
@wxheader{listctrl.h}
-
- This class currently simply presents a simpler to use interface for the
+
+ This class currently simply presents a simpler to use interface for the
wxListCtrl -- it can be thought of as a @e faade
- for that complicated class. Using it is preferable to using
+ for that complicated class. Using it is preferable to using
wxListCtrl directly whenever possible because in the
future some ports might implement wxListView but not the full set of wxListCtrl
features.
-
+
Other than different interface, this class is identical to wxListCtrl. In
particular, it uses the same events, same window styles and so on.
-
+
@library{wxcore}
@category{ctrl}
@appearance{listview.png}
-
+
@seealso
wxListView::SetColumnImage
*/
/**
Resets the column image -- after calling this function, no image will be shown.
- @param col
+ @param col
the column to clear image for
@sa SetColumnImage()
long GetNextSelected(long item);
/**
- Returns @true if the item with the given @e index is selected,
+ Returns @true if the item with the given @e index is selected,
@false otherwise.
@sa GetFirstSelected(), GetNextSelected()
/**
Selects or unselects the given item.
- @param n
+ @param n
the item to select or unselect
- @param on
+ @param on
if @true (default), selects the item, otherwise unselects it
@sa wxListCtrl::SetItemState
Sets the column image for the specified column. To use the column images, the
control must have a valid image list with at least one image.
- @param col
+ @param col
the column to set image for
- @param image
+ @param image
the index of the column image in the controls image list
*/
void SetColumnImage(int col, int image);
/**
@class wxListItem
@wxheader{listctrl.h}
-
+
This class stores information about a wxListCtrl item or column.
-
+
@library{wxbase}
@category{FIXME}
*/
wxLIST_STATE_DONTCARE
- Don't care what the state is. Win32 only.
+ Don't care what the state is. Win32 only.
wxLIST_STATE_DROPHILITED
- The item is highlighted to receive a drop event. Win32 only.
+ The item is highlighted to receive a drop event. Win32 only.
wxLIST_STATE_FOCUSED
client data is associated with the item and not with subitems.
*/
void SetData(long data);
- void SetData(void* data);
+ void SetData(void* data);
//@}
/**
/**
@class wxLogWindow
@wxheader{log.h}
-
+
This class represents a background log window: to be precise, it collects all
log messages in the log frame which it manages but also passes them on to the
log target which was active at the moment of its creation. This allows, for
example, to show all the log messages in a frame but still continue to process
them normally by showing the standard log dialog.
-
+
@library{wxbase}
@category{logging}
-
+
@seealso
wxLogTextCtrl
*/
/**
Creates the log frame window and starts collecting the messages in it.
- @param parent
+ @param parent
The parent window for the log frame, may be @NULL
- @param title
+ @param title
The title for the log frame
- @param show
+ @param show
@true to show the frame initially (default), otherwise
Show() must be called later.
- @param passToOld
+ @param passToOld
@true to process the log messages normally in addition to
logging them in the log frame (default), @false to only log them in the
log frame.
/**
@class wxLogInterposerTemp
@wxheader{log.h}
-
+
A special version of wxLogChain which uses itself as the
new log target. It forwards log messages to the previously installed one in
addition to
processing them itself. Unlike wxLogInterposer, it doesn't
delete the old target which means it can be used to temporarily redirect log
output.
-
+
As per wxLogInterposer, this class must be derived from to implement
wxLog::DoLog
and/or wxLog::DoLogString methods.
-
+
@library{wxbase}
@category{logging}
*/
/**
@class wxLogChain
@wxheader{log.h}
-
+
This simple class allows to chain log sinks, that is to install a new sink but
keep passing log messages to the old one instead of replacing it completely as
wxLog::SetActiveTarget does.
-
+
It is especially useful when you want to divert the logs somewhere (for
example to a file or a log window) but also keep showing the error messages
using the standard dialogs as wxLogGui does by default.
-
+
Example of usage:
-
+
@code
wxLogChain *logChain = new wxLogChain(new wxLogStderr);
-
+
// all the log messages are sent to stderr and also processed as usually
...
-
+
// don't delete logChain directly as this would leave a dangling
// pointer as active log target, use SetActiveTarget() instead
delete wxLog::SetActiveTarget(...something else or @NULL...);
@endcode
-
+
@library{wxbase}
@category{logging}
*/
/**
@class wxLogGui
@wxheader{log.h}
-
+
This is the default log target for the GUI wxWidgets applications. It is passed
to wxLog::SetActiveTarget at the program
startup and is deleted by wxWidgets during the program shut down.
-
+
@library{wxbase}
@category{logging}
*/
/**
@class wxLogStream
@wxheader{log.h}
-
+
This class can be used to redirect the log messages to a C++ stream.
-
+
Please note that this class is only available if wxWidgets was compiled with
the standard iostream library support (@c wxUSE_STD_IOSTREAM must be on).
-
+
@library{wxbase}
@category{logging}
-
+
@seealso
wxLogStderr, wxStreamToTextRedirector
*/
/**
@class wxLogStderr
@wxheader{log.h}
-
+
This class can be used to redirect the log messages to a C file stream (not to
be confused with C++ streams). It is the default log target for the non-GUI
wxWidgets applications which send all the output to @c stderr.
-
+
@library{wxbase}
@category{logging}
-
+
@seealso
wxLogStream
*/
/**
@class wxLogBuffer
@wxheader{log.h}
-
+
wxLogBuffer is a very simple implementation of log sink which simply collects
all the logged messages in a string (except the debug messages which are output
in the usual way immediately as we're presumably not interested in collecting
them for later). The messages from different log function calls are separated
by the new lines.
-
+
All the messages collected so far can be shown to the user (and the current
- buffer cleared) by calling the overloaded wxLogBuffer::Flush
+ buffer cleared) by calling the overloaded wxLogBuffer::Flush
method.
-
+
@library{wxbase}
@category{FIXME}
*/
/**
@class wxLogInterposer
@wxheader{log.h}
-
+
A special version of wxLogChain which uses itself as the
new log target. It forwards log messages to the previously installed one in
addition to
processing them itself.
-
+
Unlike wxLogChain which is usually used directly as is,
this class must be derived from to implement wxLog::DoLog
and/or wxLog::DoLogString methods.
-
+
wxLogInterposer destroys the previous log target in its destructor. If you
don't want this to happen, use wxLogInterposerTemp instead.
-
+
@library{wxbase}
@category{logging}
*/
/**
@class wxLogTextCtrl
@wxheader{log.h}
-
+
Using these target all the log messages can be redirected to a text control.
The text control must have been created with @c wxTE_MULTILINE style by the
caller previously.
-
+
@library{wxbase}
@category{logging}
-
+
@seealso
wxTextCtrl, wxStreamToTextRedirector
*/
/**
@class wxLog
@wxheader{log.h}
-
+
wxLog class defines the interface for the @e log targets used by wxWidgets
logging functions as explained in the @ref overview_wxlogoverview "wxLog
overview".
logging classes (all of which respect the wxLog settings): for example, set
which trace messages are logged and which are not or change (or even remove
completely) the timestamp on the messages.
-
+
Otherwise, it is completely hidden behind the @e wxLogXXX() functions and
you may not even know about its existence.
-
+
See @ref overview_wxlogoverview "log overview" for the descriptions of wxWidgets
logging facilities.
-
+
@library{wxcore}
@category{logging}
-
+
@seealso
wxLog::RemoveTraceMask, wxLog::GetTraceMasks
*/
-class wxLog
+class wxLog
{
public:
/**
/**
Enables logging mode in which a log message is logged once, and in case exactly
- the same message successively repeats one or more times, only the number of
+ the same message successively repeats one or more times, only the number of
repetitions is logged.
*/
static void SetRepetitionCounting(bool repetCounting = @true);
/**
@class wxLogNull
@wxheader{log.h}
-
+
This class allows to temporarily suspend logging. All calls to the log
functions during the life time of an object of this class are just ignored.
-
+
In particular, it can be used to suppress the log messages given by wxWidgets
itself but it should be noted that it is rarely the best way to cope with this
problem as @b all log messages are suppressed, even if they indicate a
completely different error than the one the programmer wanted to suppress.
-
+
For instance, the example of the overview:
-
+
@code
wxFile file;
-
+
// wxFile.Open() normally complains if file can't be opened, we don't want it
{
wxLogNull logNo;
if ( !file.Open("bar") )
... process error ourselves ...
} // ~wxLogNull called, old log sink restored
-
+
wxLogMessage("..."); // ok
@endcode
-
+
would be better written as:
-
+
@code
wxFile file;
-
+
// don't try to open file if it doesn't exist, we are prepared to deal with
// this ourselves - but all other errors are not expected
if ( wxFile::Exists("bar") )
...
}
@endcode
-
-
+
+
@library{wxbase}
@category{logging}
*/
function shows a message box using a native dialog instead of
wxMessageBox (which might be unsafe to call), elsewhere
it simply prints the message to the standard output using the title as prefix.
-
- @param title
+
+ @param title
The title of the message box shown to the user or the prefix
of the message string
-
- @param text
+
+ @param text
The text to show to the user
-
+
@sa wxLogFatalError
*/
void wxSafeShowMessage(const wxString& title,
/**
@class wxLongLong
@wxheader{longlong.h}
-
+
This class represents a signed 64 bit long number. It is implemented using the
native 64 bit type where available (machines with 64 bit longs or compilers
which have (an analog of) @e long long type) and uses the emulation code in
the other cases which ensures that it is the most efficient solution for
working with 64 bit integers independently of the architecture.
-
+
wxLongLong defines all usual arithmetic operations such as addition,
subtraction, bitwise shifts and logical operations as well as multiplication
and division (not yet for the machines without native @e long long). It
- also has operators for implicit construction from and conversion to the native
+ also has operators for implicit construction from and conversion to the native
@e long long type if it exists and @e long.
-
+
You would usually use this type in exactly the same manner as any other
(built-in) arithmetic type. Note that wxLongLong is a signed type, if you
want unsigned values use wxULongLong which has exactly the same API as
wxLongLong except when explicitly mentioned otherwise.
-
+
If a native (i.e. supported directly by the compiler) 64 bit integer type was
found to exist, @e wxLongLong_t macro will be defined to correspond to it.
- Also, in this case only, two additional macros will be defined:
+ Also, in this case only, two additional macros will be defined:
wxLongLongFmtSpec for printing 64 bit integers
- using the standard @c printf() function (but see also
+ using the standard @c printf() function (but see also
wxLongLong::ToString for a more portable solution) and
wxLL for defining 64 bit integer compile-time constants.
-
+
@library{wxbase}
@category{data}
*/
-class wxLongLong
+class wxLongLong
{
public:
/**
or modifying it in place (the second one). Not in wxULongLong.
*/
wxLongLong Abs();
- wxLongLong Abs();
+ wxLongLong Abs();
//@}
/**
Pre/post increment operator.
*/
wxLongLong operator++();
- wxLongLong operator++(int );
+ wxLongLong operator++(int );
//@}
/**
Pre/post decrement operator.
*/
wxLongLong operator--();
- wxLongLong operator--(int );
+ wxLongLong operator--(int );
//@}
/**
printf("Long long = %" wxLongLongFmtSpec "x\n", ll);
#endif
@endcode
-
+
@sa wxLL
*/
unsigned wxLongLong_t ll = wxULL(0x1234567890abcdef);
#endif
@endcode
-
+
@sa wxLL, wxLongLong
*/
#define wxLongLong_t wxULL(number) /* implementation is private */
wxLongLong_t ll = wxLL(0x1234567890abcdef);
#endif
@endcode
-
+
@sa wxULL, wxLongLong
*/
#define wxLongLong_t wxLL(number) /* implementation is private */
/////////////////////////////////////////////////////////////////////////////
- // Name: math.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- /**
- Returns a non-zero value if @e x is neither infinite nor NaN (not a number),
- returns 0 otherwise.
+// Name: math.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+Returns a non-zero value if @e x is neither infinite nor NaN (not a number),
+returns 0 otherwise.
*/
int wxFinite(double x);
-
\ No newline at end of file
/**
@class wxMDIClientWindow
@wxheader{mdi.h}
-
+
An MDI client window is a child of wxMDIParentFrame, and manages zero or
more wxMDIChildFrame objects.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxMDIChildFrame, wxMDIParentFrame, wxFrame
*/
/**
Constructor, creating the window.
- @param parent
+ @param parent
The window parent.
- @param style
+ @param style
The window style. Currently unused.
@remarks The second style of constructor is called within
@sa wxMDIParentFrame::wxMDIParentFrame, wxMDIParentFrame::OnCreateClient
*/
wxMDIClientWindow();
- wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
+ wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
//@}
/**
/**
@class wxMDIParentFrame
@wxheader{mdi.h}
-
+
An MDI (Multiple Document Interface) parent frame is a window which can contain
MDI child frames in its own 'desktop'. It is a convenient way to avoid window
clutter,
and is used in many popular Windows applications, such as Microsoft Word(TM).
-
+
@beginStyleTable
@style{wxCAPTION}:
Puts a caption on the frame.
@style{wxDEFAULT_FRAME_STYLE}:
- Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME |
+ Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME |
wxSYSTEM_MENU | wxCAPTION.
@style{wxHSCROLL}:
Displays a horizontal scrollbar in the client window, allowing the
Under Windows, removes the Window menu that is normally added
automatically.
@endStyleTable
-
+
@library{wxcore}
@category{managedwnd}
-
+
@seealso
wxMDIChildFrame, wxMDIClientWindow, wxFrame, wxDialog
*/
/**
Constructor, creating the window.
- @param parent
+ @param parent
The window parent. This should be @NULL.
- @param id
+ @param id
The window identifier. It may take a value of -1 to indicate a default value.
- @param title
+ @param title
The caption to be displayed on the frame's title bar.
- @param pos
+ @param pos
The window position. The value wxDefaultPosition indicates a default position, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param size
+ @param size
The window size. The value wxDefaultSize indicates a default size, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param style
+ @param style
The window style. See wxMDIParentFrame.
- @param name
+ @param name
The name of the window. This parameter is used to associate a name with the
item,
allowing the application user to set Motif resource values for
@sa Create(), OnCreateClient()
*/
wxMDIParentFrame();
- wxMDIParentFrame(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");
+ wxMDIParentFrame(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");
//@}
/**
/**
This gets the size of the frame 'client area' in pixels.
- @param width
+ @param width
Receives the client width in pixels.
- @param height
+ @param height
Receives the client height in pixels.
@remarks The client area is the area which may be drawn on by the
MDI parent window. It saves the application having to manage the positioning
of the toolbar MDI client window.
- @param toolbar
+ @param toolbar
Toolbar to manage.
@remarks When the frame is resized, the toolbar is resized to be the
/**
@class wxMDIChildFrame
@wxheader{mdi.h}
-
+
An MDI child frame is a frame that can only exist on a wxMDIClientWindow,
which is itself a child of wxMDIParentFrame.
-
+
@beginStyleTable
@style{wxCAPTION}:
Puts a caption on the frame.
@style{wxDEFAULT_FRAME_STYLE}:
- Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME |
+ Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME |
wxSYSTEM_MENU | wxCAPTION.
@style{wxICONIZE}:
Display the frame iconized (minimized) (Windows only).
@style{wxTHICK_FRAME}:
Displays a thick frame around the window (Windows and Motif only).
@endStyleTable
-
+
@library{wxcore}
@category{managedwnd}
-
+
@seealso
wxMDIClientWindow, wxMDIParentFrame, wxFrame
*/
/**
Constructor, creating the window.
- @param parent
+ @param parent
The window parent. This should not be @NULL.
- @param id
+ @param id
The window identifier. It may take a value of -1 to indicate a default value.
- @param title
+ @param title
The caption to be displayed on the frame's title bar.
- @param pos
+ @param pos
The window position. The value wxDefaultPosition indicates a default position, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param size
+ @param size
The window size. The value wxDefaultSize indicates a default size, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param style
+ @param style
The window style. See wxMDIChildFrame.
- @param name
+ @param name
The name of the window. This parameter is used to associate a name with the
item,
allowing the application user to set Motif resource values for
@sa Create()
*/
wxMDIChildFrame();
- wxMDIChildFrame(wxMDIParentFrame* parent, wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = "frame");
+ wxMDIChildFrame(wxMDIParentFrame* parent, wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = "frame");
//@}
/**
/**
@class wxMediaEvent
@wxheader{mediactrl.h}
-
+
Event wxMediaCtrl uses.
-
+
@library{wxmedia}
@category{FIXME}
*/
class wxMediaEvent : public wxNotifyEvent
{
public:
-
+
};
/**
@class wxMediaCtrl
@wxheader{mediactrl.h}
-
- wxMediaCtrl is a class for displaying types of
+
+ wxMediaCtrl is a class for displaying types of
media, such as videos, audio files, natively through native codecs.
-
+
wxMediaCtrl uses native backends to render media, for example on Windows
- there is a ActiveMovie/DirectShow backend, and on Macintosh there is a
+ there is a ActiveMovie/DirectShow backend, and on Macintosh there is a
QuickTime backend.
-
+
@library{wxmedia}
@category{media}
-
+
@seealso
wxMediaEvent
*/
,
@b const wxPoint&
- @param pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
+ @param pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
const wxString& szBackend = wxT(""),
const wxValidatorvalidator = wxDefaultValidator,
const wxString& name = wxPanelNameStr
Constructor that calls Create. You may prefer to call Create directly to check
to see if wxMediaCtrl is available on the system.
- parent
+ parent
parent of this control. Must not be @NULL.
- @param id
+ @param id
id to use for events
- @param fileName
+ @param fileName
If not empty, the path of a file to open.
- @param pos
+ @param pos
Position to put control at.
- @param size
+ @param size
Size to put the control at and to stretch movie to.
- @param style
+ @param style
Optional styles.
- @param szBackend
+ @param szBackend
Name of backend you want to use, leave blank to make
wxMediaCtrl figure it out.
- @param validator
+ @param validator
validator to use.
- @param name
+ @param name
Window name.
*/
wxMediaCtrl();
- wxMediaCtrl(wxWindow* parent, wxWindowID id);
+ wxMediaCtrl(wxWindow* parent, wxWindowID id);
//@}
/**
Generally, you should almost certainly leave this part up to
wxMediaCtrl - but if you need a certain backend for a particular
- reason, such as QuickTime for playing .mov files, all you need
+ reason, such as QuickTime for playing .mov files, all you need
to do to choose a specific backend is to pass the
- name of the backend class to
+ name of the backend class to
Create().
The following are valid backend identifiers -
@b wxMEDIABACKEND_DIRECTSHOW
-
+
Use ActiveMovie/DirectShow. Uses the native ActiveMovie
(I.E. DirectShow) control. Default backend on Windows and
supported by nearly all Windows versions, even some
Windows CE versions. May display a windows media player
- logo while inactive.
+ logo while inactive.
@b wxMEDIABACKEND_QUICKTIME
,
@b const wxPoint&
- @param pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
+ @param pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
const wxString& szBackend = wxT(""),
const wxValidatorvalidator = wxDefaultValidator,
const wxString& name = wxPanelNameStr
If you specify a file to open via fileName and you don't specify a backend to
use, wxMediaCtrl tries each of its backends until one that can render the path referred to by fileName can be found.
- parent
+ parent
parent of this control. Must not be @NULL.
- @param id
+ @param id
id to use for events
- @param fileName
+ @param fileName
If not empty, the path of a file to open.
- @param pos
+ @param pos
Position to put control at.
- @param size
+ @param size
Size to put the control at and to stretch movie to.
- @param style
+ @param style
Optional styles.
- @param szBackend
+ @param szBackend
Name of backend you want to use, leave blank to make
wxMediaCtrl figure it out.
- @param validator
+ @param validator
validator to use.
- @param name
+ @param name
Window name.
*/
bool Create(wxWindow* parent, wxWindowID id);
Example:
When wxMediaCtrl stops, either by the EVT_MEDIA_STOP not being
- vetoed, or by manually calling
+ vetoed, or by manually calling
Stop(), where it actually
stops is not at the beginning, rather, but at the beginning of
the stream. That is, when it stops and play is called, playback
- is gauranteed to start at the beginning of the media. This is
+ is gauranteed to start at the beginning of the media. This is
because some streams are not seekable, and when stop is called
on them they return to the beginning, thus wxMediaCtrl tries
to keep consistant for all types of media.
/**
Depending upon the backend, wxMediaCtrl can render
- and display pretty much any kind of media that the native system can -
+ and display pretty much any kind of media that the native system can -
such as an image, mpeg video, or mp3 (without license restrictions -
since it relies on native system calls that may not technically
have mp3 decoding available, for example, it falls outside the
realm of licensing restrictions).
- For general operation, all you need to do is call
+ For general operation, all you need to do is call
Load() to load the file
you want to render, catch the EVT_MEDIA_LOADED event,
- and then call Play()
+ and then call Play()
to show the video/audio of the media in that event.
More complex operations are generally more heavily dependant on the
capabilities of the backend. For example, QuickTime cannot set
- the playback rate of certain streaming media - while DirectShow is
+ the playback rate of certain streaming media - while DirectShow is
slightly more flexible in that regard.
*/
/**
@class wxDebugStreamBuf
@wxheader{memory.h}
-
+
This class allows you to treat debugging output in a similar
(stream-based) fashion on different platforms. Under
Windows, an ostream constructed with this buffer outputs
to the debugger, or other program that intercepts debugging
output. On other platforms, the output goes to standard error (cerr).
-
+
This is soon to be obsolete, replaced by wxLog functionality.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
Overview
*/
-class wxDebugStreamBuf
+class wxDebugStreamBuf
{
public:
-
+
};
/**
@class wxDebugContext
@wxheader{memory.h}
-
+
A class for performing various debugging and memory tracing
operations. Full functionality (such as printing out objects
currently allocated) is only present in a debugging build of wxWidgets,
i.e. if the __WXDEBUG__ symbol is defined. wxDebugContext
and related functions and macros can be compiled out by setting
wxUSE_DEBUG_CONTEXT to 0 is setup.h
-
+
@library{wxbase}
@category{debugging}
-
+
@seealso
Overview
*/
-class wxDebugContext
+class wxDebugContext
{
public:
/**
to the current debug stream. The number of object and non-object
allocations is printed, together with the total size.
- @param detailed
+ @param detailed
If @true, the function will also print how many
objects of each class have been allocated, and the space taken by
these class instances.
be performed from this point on. This allows you to ignore allocations
that have been performed up to this point.
- @param all
+ @param all
If @true, the checkpoint is reset to include all
memory allocations since the program started.
*/
This is obsolete, replaced by wxLog functionality.
- @param stream
+ @param stream
Stream to associate with the debug context. Do not set this to @NULL.
- @param streamBuf
+ @param streamBuf
Stream buffer to associate with the debug context.
*/
void SetStream(ostream* stream, streambuf* streamBuf = @NULL);
/**
@b NB: This function is now obsolete, replaced by @ref overview_logfunctions
"Log functions".
-
+
Calls wxTraceLevel with printf-style variable argument syntax. Output
is directed to the current output stream (see wxDebugContext).
The first argument should be the level at which this information is appropriate.
/**
@b NB: This function is now obsolete, replaced by @ref overview_logfunctions
"Log functions".
-
+
Takes printf-style variable argument syntax. Output
is directed to the current output stream (see wxDebugContext).
*/
/**
@b NB: This macro is now obsolete, replaced by @ref overview_logfunctions "Log
functions".
-
+
Calls wxTrace with printf-style variable argument syntax. Output
is directed to the current output stream (see wxDebugContext).
*/
/**
@class wxMenuBar
@wxheader{menu.h}
-
+
A menu bar is a series of menus accessible from the top of a frame.
-
+
@library{wxcore}
@category{menus}
-
+
@seealso
wxMenu, @ref overview_eventhandlingoverview "Event handling overview"
*/
/**
Construct a menu bar from arrays of menus and titles.
- @param n
+ @param n
The number of menus.
- @param menus
+ @param menus
An array of menus. Do not use this array again - it now belongs to the
menu bar.
- @param titles
+ @param titles
An array of title strings. Deallocate this array after creating the menu bar.
- @param style
+ @param style
If wxMB_DOCKABLE the menu bar can be detached (wxGTK only).
*/
wxMenuBar(long style = 0);
- wxMenuBar(size_t n, wxMenu* menus[], const wxString titles[],
- long style = 0);
+ wxMenuBar(size_t n, wxMenu* menus[], const wxString titles[],
+ long style = 0);
//@}
/**
/**
Adds the item to the end of the menu bar.
- @param menu
+ @param menu
The menu to add. Do not deallocate this menu after calling Append.
- @param title
+ @param title
The title of the menu.
@returns @true on success, @false if an error occurred.
/**
Checks or unchecks a menu item.
- @param id
+ @param id
The menu item identifier.
- @param check
+ @param check
If @true, checks the menu item, otherwise the item is unchecked.
@remarks Only use this when the menu bar has been associated with a
/**
Enables or disables (greys out) a menu item.
- @param id
+ @param id
The menu item identifier.
- @param enable
+ @param enable
@true to enable the item, @false to disable it.
@remarks Only use this when the menu bar has been associated with a
/**
Enables or disables a whole menu.
- @param pos
+ @param pos
The position of the menu, starting from zero.
- @param enable
+ @param enable
@true to enable the menu, @false to disable it.
@remarks Only use this when the menu bar has been associated with a frame.
/**
Finds the menu item object associated with the given menu item identifier.
- @param id
+ @param id
Menu item identifier.
- @param menu
+ @param menu
If not @NULL, menu will get set to the associated menu.
@returns The found menu item object, or @NULL if one was not found.
/**
Finds the menu item id for a menu name/menu item string pair.
- @param menuString
+ @param menuString
Menu title to find.
- @param itemString
+ @param itemString
Item to find.
@returns The menu item identifier, or wxNOT_FOUND if none was found.
/**
Gets the help string associated with the menu item identifier.
- @param id
+ @param id
The menu item identifier.
@returns The help string, or the empty string if there was no help string
/**
Gets the label associated with a menu item.
- @param id
+ @param id
The menu item identifier.
@returns The menu item label, or the empty string if the item was not
include the accelerator characters which could have been specified in the menu
title string during its construction.
- @param pos
+ @param pos
Position of the menu on the menu bar, starting from zero.
@returns The menu label, or the empty string if the menu was not found.
includes the accelerator characters that have been specified in the menu
title string during its construction.
- @param pos
+ @param pos
Position of the menu on the menu bar, starting from zero.
@returns The menu label, or the empty string if the menu was not found.
include any accelerator characters that may have been specified in the menu
title string during its construction.
- @param pos
+ @param pos
Position of the menu on the menu bar, starting from zero.
@returns The menu label, or the empty string if the menu was not found.
/**
Inserts the menu at the given position into the menu bar. Inserting menu at
- position 0 will insert it in the very beginning of it, inserting at position
- GetMenuCount() is the same as calling
+ position 0 will insert it in the very beginning of it, inserting at position
+ GetMenuCount() is the same as calling
Append().
- @param pos
+ @param pos
The position of the new menu in the menu bar
- @param menu
+ @param menu
The menu to add. wxMenuBar owns the menu and will free it.
- @param title
+ @param title
The title of the menu.
@returns @true on success, @false if an error occurred.
/**
Determines whether an item is checked.
- @param id
+ @param id
The menu item identifier.
@returns @true if the item was found and is checked, @false otherwise.
/**
Determines whether an item is enabled.
- @param id
+ @param id
The menu item identifier.
@returns @true if the item was found and is enabled, @false otherwise.
/**
Removes the menu from the menu bar and returns the menu object - the caller is
- responsible for deleting it. This function may be used together with
+ responsible for deleting it. This function may be used together with
Insert() to change the menubar
dynamically.
/**
Replaces the menu at the given position with another one.
- @param pos
+ @param pos
The position of the new menu in the menu bar
- @param menu
+ @param menu
The menu to add.
- @param title
+ @param title
The title of the menu.
@returns The menu which was previously at position pos. The caller is
/**
Sets the help string associated with a menu item.
- @param id
+ @param id
Menu item identifier.
- @param helpString
+ @param helpString
Help string to associate with the menu item.
@sa GetHelpString()
/**
Sets the label of a menu item.
- @param id
+ @param id
Menu item identifier.
- @param label
+ @param label
Menu item label.
@remarks Use only after the menubar has been associated with a frame.
/**
Sets the label of a top-level menu.
- @param pos
+ @param pos
The position of a menu on the menu bar, starting from zero.
- @param label
+ @param label
The menu label.
@remarks Use only after the menubar has been associated with a frame.
/**
Sets the label of a top-level menu.
- @param pos
+ @param pos
The position of a menu on the menu bar, starting from zero.
- @param label
+ @param label
The menu label.
@remarks Use only after the menubar has been associated with a frame.
/**
@class wxMenu
@wxheader{menu.h}
-
+
A menu is a popup (or pull down) list of items, one of which may be
selected before the menu goes away (clicking elsewhere dismisses the
menu). Menus may be used to construct either menu bars or popup menus.
-
+
A menu item has an integer ID associated with it which can be used to
identify the selection, or to change the menu item in some way. A menu item
with a special identifier -1 is a separator item and doesn't have an
associated command but just makes a separator line appear in the menu.
-
+
@b NB: Please note that @e wxID_ABOUT and @e wxID_EXIT are
predefined by wxWidgets and have a special meaning since entries
using these IDs will be taken out of the normal menus under MacOS X
and will be inserted into the system menu (following the appropriate
MacOS X interface guideline). On PalmOS @e wxID_EXIT is disabled according
to Palm OS Companion guidelines.
-
+
Menu items may be either normal items, check items or radio items. Normal items
don't have any special properties while the check items have a boolean flag
associated to them and they show a checkmark in the menu when the flag is set.
wxWidgets automatically toggles the flag value when the item is clicked and its
value may be retrieved using either wxMenu::IsChecked method
- of wxMenu or wxMenuBar itself or by using
+ of wxMenu or wxMenuBar itself or by using
wxEvent::IsChecked when you get the menu
notification for the item in question.
-
+
The radio items are similar to the check items except that all the other items
in the same radio group are unchecked when a radio item is checked. The radio
group is formed by a contiguous range of radio items, i.e. it starts at the
of the item positions inserting or removing the items in the menu containing
the radio items risks to not work correctly. Finally note that radio items
are not supported under Motif.
-
+
@library{wxcore}
@category{menus}
-
+
@seealso
wxMenuBar, wxWindow::PopupMenu, @ref overview_eventhandlingoverview "Event
handling overview", @ref overview_wxfilehistory "wxFileHistory (most recently used files menu)"
/**
Constructs a wxMenu object.
- @param style
+ @param style
If set to wxMENU_TEAROFF, the menu will be detachable (wxGTK only).
*/
wxMenu(const wxString& title = "", long style = 0);
- wxMenu(long style);
+ wxMenu(long style);
//@}
/**
because you can also specify various extra properties of a menu item this way,
such as bitmaps and fonts.
- @param id
+ @param id
The menu command identifier.
- @param item
+ @param item
The string to appear on the menu item.
- @param menu
+ @param menu
Pull-right submenu.
- @param kind
- May be wxITEM_SEPARATOR, wxITEM_NORMAL,
+ @param kind
+ May be wxITEM_SEPARATOR, wxITEM_NORMAL,
wxITEM_CHECK or wxITEM_RADIO
- @param helpString
+ @param helpString
An optional help string associated with the item.
By default, the handler for the wxEVT_MENU_HIGHLIGHT event displays
this string in the status line.
- @param menuItem
+ @param menuItem
A menuitem object. It will be owned by the wxMenu object after this function
is called, so do not delete it yourself.
wxMenuItem* Append(int id, const wxString& item = "",
const wxString& helpString = "",
wxItemKind kind = wxITEM_NORMAL);
- wxMenuItem* Append(int id, const wxString& item,
- wxMenu * subMenu,
- const wxString& helpString = "");
- wxMenuItem* Append(wxMenuItem* menuItem);
+ wxMenuItem* Append(int id, const wxString& item,
+ wxMenu * subMenu,
+ const wxString& helpString = "");
+ wxMenuItem* Append(wxMenuItem* menuItem);
//@}
/**
/**
Checks or unchecks the menu item.
- @param id
+ @param id
The menu item identifier.
- @param check
+ @param check
If @true, the item will be checked, otherwise it will be unchecked.
@sa IsChecked()
@b not be deleted. Use Destroy() if you want to
delete a submenu.
- @param id
+ @param id
Id of the menu item to be deleted.
- @param item
+ @param item
Menu item to be deleted.
@sa FindItem(), Destroy(), Remove()
*/
void Delete(int id);
- void Delete(wxMenuItem * item);
+ void Delete(wxMenuItem * item);
//@}
//@{
be deleted. Use Remove() if you want to keep the submenu
(for example, to reuse it later).
- @param id
+ @param id
Id of the menu item to be deleted.
- @param item
+ @param item
Menu item to be deleted.
@sa FindItem(), Deletes(), Remove()
*/
void Destroy(int id);
- void Destroy(wxMenuItem * item);
+ void Destroy(wxMenuItem * item);
//@}
/**
Enables or disables (greys out) a menu item.
- @param id
+ @param id
The menu item identifier.
- @param enable
+ @param enable
@true to enable the menu item, @false to disable it.
@sa IsEnabled()
Finds the menu item object associated with the given menu item identifier and,
optionally, the (sub)menu it belongs to.
- @param itemString
+ @param itemString
Menu item string to find.
- @param id
+ @param id
Menu item identifier.
- @param menu
+ @param menu
If the pointer is not @NULL, it will be filled with the item's
parent menu (if the item was found)
strings before matching.
*/
int FindItem(const wxString& itemString);
- wxMenuItem * FindItem(int id, wxMenu ** menu = @NULL);
+ wxMenuItem * FindItem(int id, wxMenu ** menu = @NULL);
//@}
/**
/**
Returns the help string associated with a menu item.
- @param id
+ @param id
The menu item identifier.
@returns The help string, or the empty string if there is no help string
/**
Returns a menu item label.
- @param id
+ @param id
The menu item identifier.
@returns The item label, or the empty string if the item was not found.
Returns a menu item label, without any of the original mnemonics and
accelerators.
- @param id
+ @param id
The menu item identifier.
@returns The item label, or the empty string if the item was not found.
/**
Returns the title of the menu.
- @remarks This is relevant only to popup menus, use
+ @remarks This is relevant only to popup menus, use
wxMenuBar::GetMenuLabel for the menus in the menubar.
@sa SetTitle()
@sa Append(), Prepend()
*/
wxMenuItem* Insert(size_t pos, wxMenuItem * item);
- wxMenuItem* Insert(size_t pos, int id,
- const wxString& item = "",
- const wxString& helpString = "",
- wxItemKind kind = wxITEM_NORMAL);
+ wxMenuItem* Insert(size_t pos, int id,
+ const wxString& item = "",
+ const wxString& helpString = "",
+ wxItemKind kind = wxITEM_NORMAL);
//@}
/**
/**
Determines whether a menu item is checked.
- @param id
+ @param id
The menu item identifier.
@returns @true if the menu item is checked, @false otherwise.
/**
Determines whether a menu item is enabled.
- @param id
+ @param id
The menu item identifier.
@returns @true if the menu item is enabled, @false otherwise.
@sa Append(), Insert()
*/
wxMenuItem* Prepend(wxMenuItem * item);
- wxMenuItem* Prepend(int id, const wxString& item = "",
- const wxString& helpString = "",
- wxItemKind kind = wxITEM_NORMAL);
+ wxMenuItem* Prepend(int id, const wxString& item = "",
+ const wxString& helpString = "",
+ wxItemKind kind = wxITEM_NORMAL);
//@}
/**
object. This allows to reuse the same item later by adding it back to the menu
(especially useful with submenus).
- @param id
+ @param id
The identifier of the menu item to remove.
- @param item
+ @param item
The menu item to remove.
@returns The item which was detached from the menu.
*/
wxMenuItem * Remove(int id);
- wxMenuItem * Remove(wxMenuItem * item);
+ wxMenuItem * Remove(wxMenuItem * item);
//@}
/**
Sets an item's help string.
- @param id
+ @param id
The menu item identifier.
- @param helpString
+ @param helpString
The help string to set.
@sa GetHelpString()
/**
Sets the label of a menu item.
- @param id
+ @param id
The menu item identifier.
- @param label
+ @param label
The menu item label to set.
@sa Append(), GetLabel()
/**
Sets the title of the menu.
- @param title
+ @param title
The title to set.
- @remarks This is relevant only to popup menus, use
+ @remarks This is relevant only to popup menus, use
wxMenuBar::SetLabelTop for the menus in the menubar.
@sa GetTitle()
/**
@class wxMenuItem
@wxheader{menuitem.h}
-
+
A menu item represents an item in a menu. Note that you usually don't have to
deal with it directly as wxMenu methods usually construct an
object of this class for you.
-
+
Also please note that the methods related to fonts and bitmaps are currently
only implemented for Windows and GTK+.
-
+
@library{wxcore}
@category{menus}
-
+
@seealso
wxMenuBar, wxMenu
*/
recommended as they will have appearance and keyboard interface (including
standard accelerators) familiar to the user.
- For the custom (non-stock) menu items, @e text must be specified and while
+ For the custom (non-stock) menu items, @e text must be specified and while
@e helpString may be left empty, it's recommended to pass the item
description (which is automatically shown by the library in the status bar when
the menu item is selected) in this parameter.
help string:
that is, stock properties are set independently one from the other.
- @param parentMenu
+ @param parentMenu
Menu that the menu item belongs to.
- @param id
+ @param id
Identifier for this menu item, or wxID_SEPARATOR to indicate a separator.
- @param text
+ @param text
Text for the menu item, as shown on the menu. An accelerator
key can be specified using the ampersand '' character. In order to embed an
ampersand character in the menu item text, the ampersand must be doubled.
- @param helpString
+ @param helpString
Optional help string that will be shown on the status bar.
- @param kind
- May be wxITEM_SEPARATOR, wxITEM_NORMAL,
+ @param kind
+ May be wxITEM_SEPARATOR, wxITEM_NORMAL,
wxITEM_CHECK or wxITEM_RADIO
- @param subMenu
+ @param subMenu
If non-@NULL, indicates that the menu item is a submenu.
*/
wxMenuItem(wxMenu* parentMenu = @NULL, int id = wxID_SEPARATOR,
wxString GetItemLabelText();
/**
- Returns the item kind, one of @c wxITEM_SEPARATOR, @c wxITEM_NORMAL,
+ Returns the item kind, one of @c wxITEM_SEPARATOR, @c wxITEM_NORMAL,
@c wxITEM_CHECK or @c wxITEM_RADIO.
*/
wxItemKind GetKind();
/**
Returns the text associated with the menu item.
- @b NB: this function is deprecated, please use
- GetItemLabel() or GetItemLabelText()
+ @b NB: this function is deprecated, please use
+ GetItemLabel() or GetItemLabelText()
instead.
*/
wxString GetName();
/**
@class wxMetafileDC
@wxheader{metafile.h}
-
+
This is a type of device context that allows a metafile object to be
created (Windows only), and has most of the characteristics of a normal
@b wxDC. The wxMetafileDC::Close member must be called after drawing into the
device context, to return a metafile. The only purpose for this at
present is to allow the metafile to be copied to the clipboard (see wxMetafile).
-
+
Adding metafile capability to an application should be easy if you
already write to a wxDC; simply pass the wxMetafileDC to your drawing
function instead. You may wish to conditionally compile this code so it
is not compiled under X (although no harm will result if you leave it
in).
-
+
Note that a metafile saved to disk is in standard Windows metafile format,
and cannot be imported into most applications. To make it importable,
call the function ::wxMakeMetafilePlaceable after
closing your disk-based metafile device context.
-
+
@library{wxcore}
@category{dc}
-
+
@seealso
wxMetafile, wxDC
*/
/**
@class wxMetafile
@wxheader{metafile.h}
-
+
A @b wxMetafile represents the MS Windows metafile object, so metafile
operations have no effect in X. In wxWidgets, only sufficient functionality
has been provided for copying a graphic to the clipboard; this may be extended
in a future version. Presently, the only way of creating a metafile
is to use a wxMetafileDC.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxMetafileDC
*/
bounding box. The bounding box may be obtained from a device context after
drawing
into it, using the functions wxDC::MinX, wxDC::MinY, wxDC::MaxX and wxDC::MaxY.
-
+
In addition to adding the placeable metafile header, this function adds
the equivalent of the following code to the start of the metafile data:
@code
SetWindowOrg(dc, minX, minY);
SetWindowExt(dc, maxX - minX, maxY - minY);
@endcode
-
+
This simulates the wxMM_TEXT mapping mode, which wxWidgets assumes.
-
+
Placeable metafiles may be imported by many Windows applications, and can be
used in RTF (Rich Text Format) files.
-
+
@e scale allows the specification of scale for the metafile.
-
+
This function is only available under Windows.
*/
bool wxMakeMetafilePlaceable(const wxString& filename, int minX,
/**
@class wxMimeTypesManager
@wxheader{mimetype.h}
-
+
This class allows the application to retrieve the information about all known
MIME types from a system-specific location and the filename extensions to the
MIME types and vice versa. After initialization the functions
- wxMimeTypesManager::GetFileTypeFromMimeType
- and wxMimeTypesManager::GetFileTypeFromExtension
+ wxMimeTypesManager::GetFileTypeFromMimeType
+ and wxMimeTypesManager::GetFileTypeFromExtension
may be called: they will return a wxFileType object which
may be further queried for file description, icon and other attributes.
-
+
@b Windows: MIME type information is stored in the registry and no additional
initialization is needed.
-
+
@b Unix: MIME type information is stored in the files mailcap and mime.types
(system-wide) and .mailcap and .mime.types in the current user's home directory:
all of these files are searched for and loaded if found by default. However,
- additional functions
- wxMimeTypesManager::ReadMailcap and
+ additional functions
+ wxMimeTypesManager::ReadMailcap and
wxMimeTypesManager::ReadMimeTypes are
provided to load additional files.
-
- If GNOME or KDE desktop environment is installed, then wxMimeTypesManager
+
+ If GNOME or KDE desktop environment is installed, then wxMimeTypesManager
gathers MIME information from respective files (e.g. .kdelnk files under KDE).
-
+
NB: Currently, wxMimeTypesManager is limited to reading MIME type information
but it will support modifying it as well in future versions.
-
+
@library{wxbase}
@category{misc}
-
+
@seealso
wxFileType
*/
-class wxMimeTypesManager
+class wxMimeTypesManager
{
public:
/**
/**
@class wxFileType
@wxheader{mimetype.h}
-
+
This class holds information about a given @e file type. File type is the same
as
MIME type under Unix, but under Windows it corresponds more to an extension than
contents of given MIME type. Depending on how it was created some fields may be
unknown so the return value of all the accessors @b must be checked: @false
will be returned if the corresponding information couldn't be found.
-
+
The objects of this class are never created by the application code but are
- returned by wxMimeTypesManager::GetFileTypeFromMimeType and
+ returned by wxMimeTypesManager::GetFileTypeFromMimeType and
wxMimeTypesManager::GetFileTypeFromExtension methods.
But it is your responsibility to delete the returned pointer when you're done
with it!
-
+
A brief reminder about what the MIME types are (see the RFC 1341 for more
information): basically, it is just a pair category/type (for example,
"text/plain") where the category is a basic indication of what a file is.
type is a precise definition of the document format: "plain" in the example
above means just ASCII text without any formatting, while "text/html" is the
HTML document source.
-
+
A MIME type may have one or more associated extensions: "text/plain" will
typically correspond to the extension ".txt", but may as well be associated with
".ini" or ".conf".
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxMimeTypesManager
*/
-class wxFileType
+class wxFileType
{
public:
/**
(efficient) way to retrieve associated extensions from the given MIME type on
this platform, so it will only return @true if the wxFileType object was
created
- by wxMimeTypesManager::GetFileTypeFromExtension
+ by wxMimeTypesManager::GetFileTypeFromExtension
function in the first place.
*/
bool GetExtensions(wxArrayString& extensions);
string pointed to by @e command is filled with the command which must be
executed (see wxExecute) in order to open the file of the
given type. In this case, the name of the file as well as any other parameters
- is retrieved from MessageParameters()
+ is retrieved from MessageParameters()
class.
In the second case, only the filename is specified and the command to be used
*/
bool GetOpenCommand(wxString* command,
MessageParameters& params);
- wxString GetOpenCommand(const wxString& filename);
+ wxString GetOpenCommand(const wxString& filename);
//@}
/**
/**
@class wxMiniFrame
@wxheader{minifram.h}
-
+
A miniframe is a frame with a small title bar. It is suitable for floating
toolbars that must not
take up too much screen area.
-
+
An example of mini frame can be seen in the @ref overview_sampledialogs
- "dialogs sample"
+ "dialogs sample"
using the "Mini frame'' command of the "Generic dialogs'' submenu.
-
+
@beginStyleTable
@style{wxICONIZE}:
Display the frame iconized (minimized) (Windows only).
@style{wxRESIZE_BORDER}:
Displays a resizeable border around the window.
@endStyleTable
-
+
@library{wxcore}
@category{managedwnd}
-
+
@seealso
wxMDIParentFrame, wxMDIChildFrame, wxFrame, wxDialog
*/
/**
Constructor, creating the window.
- @param parent
+ @param parent
The window parent. This may be @NULL. If it is non-@NULL, the frame will
always be displayed on top of the parent window on Windows.
- @param id
+ @param id
The window identifier. It may take a value of -1 to indicate a default value.
- @param title
+ @param title
The caption to be displayed on the frame's title bar.
- @param pos
+ @param pos
The window position. The value wxDefaultPosition indicates a default position, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param size
+ @param size
The window size. The value wxDefaultSize indicates a default size, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param style
+ @param style
The window style. See wxMiniFrame.
- @param name
+ @param name
The name of the window. This parameter is used to associate a name with the
item,
allowing the application user to set Motif resource values for
@sa Create()
*/
wxMiniFrame();
- wxMiniFrame(wxWindow* parent, wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxCAPTION | wxRESIZE_BORDER,
- const wxString& name = "frame");
+ wxMiniFrame(wxWindow* parent, wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCAPTION | wxRESIZE_BORDER,
+ const wxString& name = "frame");
//@}
/**
/**
@class wxModule
@wxheader{module.h}
-
+
The module system is a very simple mechanism to allow applications (and parts
of wxWidgets itself) to define initialization and cleanup functions that are
automatically called on wxWidgets startup and exit.
-
+
To define a new kind of module, derive a class from wxModule, override the
- wxModule::OnInit and wxModule::OnExit
+ wxModule::OnInit and wxModule::OnExit
functions, and add the DECLARE_DYNAMIC_CLASS and IMPLEMENT_DYNAMIC_CLASS to
header and implementation files (which can be the same file). On
initialization, wxWidgets will find all classes derived from wxModule, create
an instance of each, and call each OnInit function. On exit, wxWidgets will
call the OnExit function for each module instance.
-
+
Note that your module class does not have to be in a header file.
-
+
For example:
-
+
@code
// A module to allow DDE initialization/cleanup
// without calling these functions from app.cpp or from
wxDDEModule() { }
virtual bool OnInit() { wxDDEInitialize(); return @true; };
virtual void OnExit() { wxDDECleanUp(); };
-
+
private:
DECLARE_DYNAMIC_CLASS(wxDDEModule)
};
-
+
IMPLEMENT_DYNAMIC_CLASS(wxDDEModule, wxModule)
-
+
// Another module which uses DDE in its OnInit()
class MyModule: public wxModule
{
MyModule() { AddDependency(CLASSINFO(wxDDEModule)); }
virtual bool OnInit() { ... code using DDE ... }
virtual void OnExit() { ... }
-
+
private:
DECLARE_DYNAMIC_CLASS(MyModule)
};
-
+
IMPLEMENT_DYNAMIC_CLASS(MyModule, wxModule)
-
+
// Another module which uses DDE in its OnInit()
// but uses a named dependency
class MyModule2: public wxModule
MyModule2() { AddDependency("wxDDEModule"); }
virtual bool OnInit() { ... code using DDE ... }
virtual void OnExit() { ... }
-
+
private:
DECLARE_DYNAMIC_CLASS(MyModule2)
};
-
+
IMPLEMENT_DYNAMIC_CLASS(MyModule2, wxModule)
@endcode
-
+
@library{wxbase}
@category{FIXME}
*/
Note that circular dependencies are detected and result in a fatal error.
- @param dep
+ @param dep
The class information object for the dependent module.
- @param classname
+ @param classname
The class name of the dependent module.
*/
void AddDependency(wxClassInfo * dep);
- void AddDependency(const char * classname);
+ void AddDependency(const char * classname);
//@}
/**
/**
@class wxMessageDialog
@wxheader{msgdlg.h}
-
+
This class represents a dialog that shows a single or multi-line message,
with a choice of OK, Yes, No and Cancel buttons.
-
+
@library{wxcore}
@category{cmndlg}
-
+
@seealso
@ref overview_wxmessagedialogoverview "wxMessageDialog overview"
*/
/**
Constructor. Use ShowModal() to show the dialog.
- @param parent
+ @param parent
Parent window.
- @param message
+ @param message
Message to show on the dialog.
- @param caption
+ @param caption
The dialog caption.
- @param style
+ @param style
A dialog style (bitlist) containing flags chosen from the following:
The message box stays on top of all other window, even those of the other
applications (Windows only).
- @param pos
+ @param pos
Dialog position. Not Windows.
*/
wxMessageDialog(wxWindow* parent, const wxString& message,
/**
Sets the extended message for the dialog: this message is usually an extension
- of the short message specified in the constructor or set with
+ of the short message specified in the constructor or set with
SetMessage(). If it is set, the main message
appears highlighted -- if supported -- and this message appears beneath it in
normal font. On the platforms which don't support extended messages, it is
/**
Overrides the default labels of the OK and Cancel buttons.
- Please see the remarks in
+ Please see the remarks in
SetYesNoLabels() documentation.
*/
bool SetOKCancelLabels(const wxString ok, const wxString cancel);
/**
Overrides the default label of the OK button.
- Please see the remarks in
+ Please see the remarks in
SetYesNoLabels() documentation.
*/
bool SetOKLabel(const wxString ok);
/**
Overrides the default labels of the Yes, No and Cancel buttons.
- Please see the remarks in
+ Please see the remarks in
SetYesNoLabels() documentation.
*/
bool SetYesNoCancelLabels(const wxString yes, const wxString no,
/**
General purpose message dialog. @e style may be a bit list of the
following identifiers:
-
+
wxYES_NO
-
-
+
+
Puts Yes and No buttons on the message box. May be combined with
wxCANCEL.
-
+
wxCANCEL
-
-
+
+
Puts a Cancel button on the message box. May only be combined with
wxYES_NO or wxOK.
-
+
wxOK
-
-
+
+
Puts an Ok button on the message box. May be combined with wxCANCEL.
-
+
wxICON_EXCLAMATION
-
-
+
+
Displays an exclamation mark symbol.
-
+
wxICON_HAND
-
-
+
+
Displays an error symbol.
-
+
wxICON_ERROR
-
-
+
+
Displays an error symbol - the same as wxICON_HAND.
-
+
wxICON_QUESTION
-
-
+
+
Displays a question mark symbol.
-
+
wxICON_INFORMATION
-
-
+
+
Displays an information symbol.
-
+
The return value is one of: wxYES, wxNO, wxCANCEL, wxOK.
-
+
For example:
@code
...
main_frame-Close();
...
@endcode
-
+
@e message may contain newline characters, in which case the
message will be split into separate lines, to cater for large messages.
*/
/**
@class wxMessageQueueT
@wxheader{msgqueue.h}
-
- wxMessageQueue allows passing messages between threads.\r
-
- This class should be typically used to communicate between the main and worker\r
- threads. The main thread calls wxMessageQueue::Post and\r
- the worker thread calls wxMessageQueue::Receive.\r
-
- For this class a message is an object of arbitrary type T. Notice that\r
- often there is a some special message indicating that the thread\r
- should terminate as there is no other way to gracefully shutdown a thread\r
- waiting on the message queue.\r
-
+
+ wxMessageQueue allows passing messages between threads.
+
+ This class should be typically used to communicate between the main and worker
+ threads. The main thread calls wxMessageQueue::Post and
+ the worker thread calls wxMessageQueue::Receive.
+
+ For this class a message is an object of arbitrary type T. Notice that
+ often there is a some special message indicating that the thread
+ should terminate as there is no other way to gracefully shutdown a thread
+ waiting on the message queue.
+
@nolibrary
@category{FIXME}
-
+
@seealso
wxThread
*/
-class wxMessageQueue<T>
+class wxMessageQueue<T>
{
public:
/**
- Returns @true if the object had been initialized successfully, @false \r
+ Returns @true if the object had been initialized successfully, @false
if an error occurred.
*/
#define bool IsOk() /* implementation is private */
/**
- Add a message to this queue and signal the threads waiting for messages\r
- (i.e. the threads which called wxMessageQueue::Receive or\r
- wxMessageQueue::ReceiveTimeout).\r
+ Add a message to this queue and signal the threads waiting for messages
+ (i.e. the threads which called wxMessageQueue::Receive or
+ wxMessageQueue::ReceiveTimeout).
This method is safe to call from multiple threads in parallel.
*/
wxMessageQueueError Post(T const& msg);
/**
- Block until a message becomes available in the queue. Waits indefinitely long\r
- or until an error occurs.\r
+ Block until a message becomes available in the queue. Waits indefinitely long
+ or until an error occurs.
The message is returned in @e msg.
*/
wxMessageQueueError Receive(T& msg);
/**
- Block until a message becomes available in the queue, but no more than\r
- @e timeout milliseconds has elapsed.\r
+ Block until a message becomes available in the queue, but no more than
+ @e timeout milliseconds has elapsed.
- If no message is available after @e timeout milliseconds then returns\r
- @b wxMSGQUEUE_TIMEOUT.\r
+ If no message is available after @e timeout milliseconds then returns
+ @b wxMSGQUEUE_TIMEOUT.
- If @e timeout is 0 then checks for any messages present in the queue\r
- and returns immediately without waiting.\r
+ If @e timeout is 0 then checks for any messages present in the queue
+ and returns immediately without waiting.
The message is returned in @e msg.
*/
wxMessageQueueError ReceiveTimeout(long timeout, T& msg);
/**
- Default and only constructor. Use wxMessageQueue::IsOk to check\r
+ Default and only constructor. Use wxMessageQueue::IsOk to check
if the object was successfully initialized.
*/
- wxMessageQueue();
+ wxMessageQueue();
};
/**
@class wxMemoryOutputStream
@wxheader{mstream.h}
-
-
+
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxStreamBuffer
*/
/**
@class wxMemoryInputStream
@wxheader{mstream.h}
-
-
+
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxStreamBuffer, wxMemoryOutputStream
*/
the @e stream is to be read entirely (i.e. till the EOF is reached).
*/
wxMemoryInputStream(const char * data, size_t len);
- wxMemoryInputStream(const wxMemoryOutputStream& stream);
- wxMemoryInputStream(wxInputStream& stream,
- wxFileOffset len = wxInvalidOffset);
+ wxMemoryInputStream(const wxMemoryOutputStream& stream);
+ wxMemoryInputStream(wxInputStream& stream,
+ wxFileOffset len = wxInvalidOffset);
//@}
/**
/**
@class wxRegKey
@headerfile registry.h wx/msw/registry.h
-
+
wxRegKey is a class representing the Windows registry (it is only available
under Windows). One can create, query and delete registry keys using this
class.
-
+
The Windows registry is easy to understand. There are five registry keys,
namely:
-
+
HKEY_CLASSES_ROOT (HKCR)
HKEY_CURRENT_USER (HKCU)
HKEY_LOCAL_MACHINE (HKLM)
HKEY_CURRENT_CONFIG (HKCC)
HKEY_USERS (HKU)
-
+
After creating a key, it can hold a value. The values can be:
-
+
String Value
Binary Value
DWORD Value
Multi String Value
Expandable String Value
-
-
+
+
@library{wxbase}
@category{FIXME}
*/
-class wxRegKey
+class wxRegKey
{
public:
//@{
parent.
*/
wxRegKey();
- wxRegKey(const wxString& strKey);
- wxRegKey(const wxRegKey& keyParent, const wxString& strKey);
+ wxRegKey(const wxString& strKey);
+ wxRegKey(const wxRegKey& keyParent, const wxString& strKey);
//@}
/**
/**
Gets information about the key.
- @param pnSubKeys
+ @param pnSubKeys
The number of subkeys.
- @param pnMaxKeyLen
+ @param pnMaxKeyLen
The maximum length of the subkey name.
- @param pnValues
+ @param pnValues
The number of values.
- @param pnMaxValueLen
+ @param pnMaxValueLen
The maximum length of a value.
*/
bool GetKeyInfo(size_t * pnSubKeys, size_t * pnValues,
/**
Explicitly opens the key. This method also allows the key to be opened in
- read-only mode by passing @c Read() instead of default
+ read-only mode by passing @c Read() instead of default
@c Write() parameter.
*/
bool Open(AccessMode mode = Write);
Retrieves the numeric value.
*/
bool QueryValue(const wxChar * szValue, wxString& strValue);
- bool QueryValue(const wxChar * szValue, long * plValue);
+ bool QueryValue(const wxChar * szValue, long * plValue);
//@}
/**
on the overload used. If the value doesn't exist, it is created.
*/
bool SetValue(const wxChar * szValue, long lValue);
- bool SetValue(const wxChar * szValue,
- const wxString& strValue);
- bool SetValue(const wxChar * szValue,
- const wxMemoryBuffer& buf);
+ bool SetValue(const wxChar * szValue,
+ const wxString& strValue);
+ bool SetValue(const wxChar * szValue,
+ const wxMemoryBuffer& buf);
//@}
};
/**
@class wxNotebookEvent
@wxheader{notebook.h}
-
+
This class represents the events generated by a notebook control: currently,
there are two of them. The PAGE_CHANGING event is sent before the current
page is changed. It allows the program to examine the current page (which
- can be retrieved with
+ can be retrieved with
wxNotebookEvent::GetOldSelection) and to veto the page
change by calling wxNotifyEvent::Veto if, for example, the
current values in the controls of the old page are invalid.
-
+
The second event - PAGE_CHANGED - is sent after the page has been changed and
the program cannot veto it any more, it just informs it about the page change.
-
+
To summarize, if the program is interested in validating the page values
before allowing the user to change it, it should process the PAGE_CHANGING
event, otherwise PAGE_CHANGED is probably enough. In any case, it is probably
unnecessary to process both events at once.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxNotebook
*/
GetOldSelection() when called from
@c EVT_NOTEBOOK_PAGE_CHANGING handler and not the page which is going to
be selected. Also note that the values of selection and old selection returned
- for an event generated in response to a call to
+ for an event generated in response to a call to
wxNotebook::SetSelection shouldn't be trusted
as they are currently inconsistent under different platforms (but in this case
you presumably don't need them anyhow as you already have the corresponding
/**
@class wxNotebook
@wxheader{notebook.h}
-
+
This class represents a notebook control, which manages multiple windows with
associated tabs.
-
+
To use the class, create a wxNotebook object and call wxNotebook::AddPage or
wxNotebook::InsertPage,
passing a window to be used as the page. Do not explicitly delete the window
for a page that is currently
managed by wxNotebook.
-
+
@b wxNotebookPage is a typedef for wxWindow.
-
+
@beginStyleTable
@style{wxNB_TOP}:
Place tabs on the top side.
@style{wxNB_FLAT}:
(Windows CE only) Show tabs in a flat style.
@endStyleTable
-
+
@library{wxcore}
@category{miscwnd}
-
+
@seealso
wxBookCtrl, wxNotebookEvent, wxImageList, @ref overview_samplenotebook
"notebook sample"
Note that sometimes you can reduce flicker by passing the wxCLIP_CHILDREN
window style.
- @param parent
+ @param parent
The parent window. Must be non-@NULL.
- @param id
+ @param id
The window identifier.
- @param pos
+ @param pos
The window position.
- @param size
+ @param size
The window size.
- @param style
+ @param style
The window style. See wxNotebook.
- @param name
+ @param name
The name of the control (used only under Motif).
*/
wxNotebook();
- wxNotebook(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxNotebookNameStr);
+ wxNotebook(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxNotebookNameStr);
//@}
/**
The call to this function may generate the page changing events.
- @param page
+ @param page
Specifies the new page.
- @param text
+ @param text
Specifies the text for the new page.
- @param select
+ @param select
Specifies whether the page should be selected.
- @param imageId
+ @param imageId
Specifies the optional image index for the new page.
@returns @true if successful, @false otherwise.
if none. If @e flags parameter is non-@NULL, the position of the point
inside the tab is returned as well.
- @param pt
+ @param pt
Specifies the point for the hit test.
- @param flags
+ @param flags
Return value for detailed information. One of the following values:
wxBK_HITTEST_NOWHERE
/**
Inserts a new page at the specified position.
- @param index
+ @param index
Specifies the position for the new page.
- @param page
+ @param page
Specifies the new page.
- @param text
+ @param text
Specifies the text for the new page.
- @param select
+ @param select
Specifies whether the page should be selected.
- @param imageId
+ @param imageId
Specifies the optional image index for the new page.
@returns @true if successful, @false otherwise.
/**
@class wxNotificationMessage
@wxheader{notifmsg.h}
-
+
This class allows to show the user a message non intrusively. Currently it is
implemented natively only for the Maemo platform and uses (non-modal) dialogs
for the display of the notifications under the other platforms but it will be
extended to use the platform-specific notifications in the other ports in the
future.
-
+
Notice that this class is not a window and so doesn't derive from wxWindow.
-
+
@library{wxbase}
@category{FIXME}
*/
Create a notification object with the given attributes.
- See SetTitle(),
- SetMessage(),
+ See SetTitle(),
+ SetMessage(),
SetParent() and
SetFlags() for the description of the
corresponding parameters.
*/
wxNotificationMessage();
- wxNotificationMessage(const wxString& title);
+ wxNotificationMessage(const wxString& title);
//@}
/**
/**
This parameter can be currently used to specify the icon to show in the
- notification. Valid values are @c wxICON_INFORMATION,
- @c wxICON_WARNING and @c wxICON_ERROR (notice that
+ notification. Valid values are @c wxICON_INFORMATION,
+ @c wxICON_WARNING and @c wxICON_ERROR (notice that
@c wxICON_QUESTION is not allowed here).
Some implementations of this class may not support the icons.
void SetParent(wxWindow* parent);
/**
- Set the title, it must be a concise string (not more than 64 characters), use
+ Set the title, it must be a concise string (not more than 64 characters), use
SetMessage() to give the user more
details.
*/
/////////////////////////////////////////////////////////////////////////////
- // Name: numdlg.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- /**
- Shows a dialog asking the user for numeric input. The dialogs title is set to
- @e caption, it contains a (possibly) multiline @e message above the
- single line @e prompt and the zone for entering the number.
-
- The number entered must be in the range @e min..@e max (both of which
- should be positive) and @e value is the initial value of it. If the user
- enters an invalid value or cancels the dialog, the function will return -1.
-
- Dialog is centered on its @e parent unless an explicit position is given in
- @e pos.
+// Name: numdlg.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+Shows a dialog asking the user for numeric input. The dialogs title is set to
+@e caption, it contains a (possibly) multiline @e message above the
+single line @e prompt and the zone for entering the number.
+
+The number entered must be in the range @e min..@e max (both of which
+should be positive) and @e value is the initial value of it. If the user
+enters an invalid value or cancels the dialog, the function will return -1.
+
+Dialog is centered on its @e parent unless an explicit position is given in
+@e pos.
*/
long wxGetNumberFromUser(const wxString& message,
const wxString& prompt,
const wxPoint& pos = wxDefaultPosition);
-
\ No newline at end of file
/**
@class wxObjectRefData
@wxheader{object.h}
-
+
This class is used to store reference-counted data. Derive classes from this to
store your own data. When retrieving information from a @b wxObject's reference
data,
you will need to cast to your own derived class.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxObject, wxObjectDataPtrT, @ref overview_trefcount "Reference counting"
*/
-class wxObjectRefData
+class wxObjectRefData
{
public:
/**
/**
@class wxObject
@wxheader{object.h}
-
+
This is the root class of many of the wxWidgets classes.
It declares a virtual destructor which ensures that
destructors get called for all derived class objects where necessary.
-
+
wxObject is the hub of a dynamic object creation
scheme, enabling a program to create instances of a class only knowing
its string class name, and to query the class hierarchy.
-
+
The class contains optional debugging versions
of @b new and @b delete, which can help trace memory allocation
and deallocation problems.
-
+
wxObject can be used to implement @ref overview_trefcount "reference counted"
objects,
such as wxPen, wxBitmap and others (see @ref overview_refcountlist "this list").
-
+
@library{wxbase}
@category{rtti}
-
+
@seealso
wxClassInfo, @ref overview_debuggingoverview "Debugging overview",
wxObjectRefData
*/
-class wxObject
+class wxObject
{
public:
//@{
Default and copy constructors.
*/
wxObject();
- wxObject(const wxObject& other);
+ wxObject(const wxObject& other);
//@}
/**
This function is only defined in debug build and doesn't exist at all if
@c __WXDEBUG__ is not defined.
- @param stream
+ @param stream
Stream on which to output dump information.
@remarks Currently wxWidgets does not define Dump for derived classes,
Determines whether this class is a subclass of (or the same class as)
the given class.
- @param info
+ @param info
A pointer to a class information object, which may be obtained
by using the CLASSINFO macro.
/**
Makes this object refer to the data in @e clone.
- @param clone
+ @param clone
The object to 'clone'.
@remarks First this function calls UnRef() on itself to decrement
/**
@class wxClassInfo
@wxheader{object.h}
-
+
This class stores meta-information about classes. Instances of this class are
not generally defined directly by an application, but indirectly through use
of macros such as @b DECLARE_DYNAMIC_CLASS and @b IMPLEMENT_DYNAMIC_CLASS.
-
+
@library{wxbase}
@category{rtti}
-
+
@seealso
Overview, wxObject
*/
-class wxClassInfo
+class wxClassInfo
{
public:
/**
/**
@class wxObjectDataPtrT
@wxheader{object.h}
-
- This is helper template class primarily written to avoid memory
+
+ This is helper template class primarily written to avoid memory
leaks because of missing calls to wxObjectRefData::DecRef.
-
+
Despite the name this template can actually be used as a
smart pointer for any class implementing the reference
counting interface which only consists of the two methods
@b T::IncRef() and @b T::DecRef().
-
+
The difference to wxSharedPtr is that
wxObjectDataPtr relies on the reference counting to be in
the class pointed to where as wxSharedPtr implements the
reference counting itself.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxObject, wxObjectRefData, @ref overview_trefcount "Reference counting"
*/
-class wxObjectDataPtr<T>
+class wxObjectDataPtr<T>
{
public:
//@{
class will point to, as well.
*/
wxObjectDataPtrT(T* ptr = @NULL);
- wxObjectDataPtrT(const wxObjectDataPtr<T>& tocopy);
+ wxObjectDataPtrT(const wxObjectDataPtr<T>& tocopy);
//@}
/**
T* get();
/**
- Conversion to a boolean expression (in a variant which is not
+ Conversion to a boolean expression (in a variant which is not
convertable to anything but a boolean expression). If this class
contains a valid pointer it will return @e @true, if it contains
a @NULL pointer it will return @e @false.
*/
- operator unspecified_bool_type();
+ operator unspecified_bool_type();
/**
Returns a reference to the object. If the internal pointer is @NULL
Assignment operators.
*/
wxObjectDataPtrT& operator operator=(const wxObjectDataPtr<T>& tocopy);
- wxObjectDataPtrT& operator operator=(T* ptr);
+ wxObjectDataPtrT& operator operator=(T* ptr);
//@}
};
Used inside a class declaration to declare that the class should be
made known to the class hierarchy, but objects of this class cannot be created
dynamically. The same as DECLARE_CLASS.
-
+
Example:
@code
class wxCommand: public wxObject
{
DECLARE_ABSTRACT_CLASS(wxCommand)
-
+
private:
...
public:
/**
Same as @c reinterpret_castT(x) if the compiler supports reinterpret cast or
@c (T)x for old compilers.
-
+
@sa wx_const_cast, wx_static_cast
*/
T wx_reinterpret_cast();
/**
This macro expands into @c const_castclassname *(ptr) if the compiler
supports @e const_cast or into an old, C-style cast, otherwise.
-
+
@sa wx_const_cast, wxDynamicCast, wxStaticCast
*/
classname * wxConstCast();
/**
Used in a C++ implementation file to complete the declaration of
a class that has run-time type information. The same as IMPLEMENT_CLASS.
-
+
Example:
@code
IMPLEMENT_ABSTRACT_CLASS(wxCommand, wxObject)
-
+
wxCommand::wxCommand(void)
{
...
latter provokes spurious compilation warnings from some compilers (because it
tests whether @c this pointer is non-@NULL which is always @true), so
this macro should be used to avoid them.
-
+
@sa wxDynamicCast
*/
classname * wxDynamicCastThis();
creatable from run-time type information. Notice that this implies that the
class should have a default constructor, if this is not the case consider using
DECLARE_CLASS.
-
+
Example:
@code
class wxFrame: public wxWindow
{
DECLARE_DYNAMIC_CLASS(wxFrame)
-
+
private:
const wxString& frameTitle;
public:
@c (T)x for old compilers. Unlike wxConstCast,
the cast it to the type @e T and not to @c T * and also the order of
arguments is the same as for the standard cast.
-
+
@sa wx_reinterpret_cast, wx_static_cast
*/
T wx_const_cast();
the pointer is of this type (the check is done during the run-time) or
@NULL otherwise. Usage of this macro is preferred over obsoleted
wxObject::IsKindOf() function.
-
+
The @e ptr argument may be @NULL, in which case @NULL will be
returned.
-
+
Example:
@code
wxWindow *win = wxWindow::FindFocus();
// no window has the focus or it is not a text control
}
@endcode
-
+
@sa @ref overview_runtimeclassoverview "RTTI overview", wxDynamicCastThis,
wxConstCast, wxStaticCast
*/
@code
#define WXDEBUG_NEW new(__FILE__,__LINE__)
@endcode
-
+
In non-debug mode, this is defined as the normal new operator.
*/
#define WXDEBUG_NEW() /* implementation is private */
This macro checks that the cast is valid in debug mode (an assert failure will
result if @c wxDynamicCast(ptr, classname) == @NULL) and then returns the
result of executing an equivalent of @c static_castclassname *(ptr).
-
+
@sa wx_static_cast, wxDynamicCast, wxConstCast
*/
classname * wxStaticCast();
there are no checks being done and the meaning of the macro arguments is exactly
the same as for the standard static cast, i.e. @e T is the full type name and
star is not appended to it.
-
+
@sa wx_const_cast, wx_reinterpret_cast, wx_truncate_cast
*/
T wx_static_cast();
Used in a C++ implementation file to complete the declaration of
a class that has run-time type information, and whose instances
can be created dynamically.
-
+
Example:
@code
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
-
+
wxFrame::wxFrame(void)
{
...
/**
@class wxOwnerDrawnComboBox
@wxheader{odcombo.h}
-
+
wxOwnerDrawnComboBox is a combobox with owner-drawn list items.
In essence, it is a wxComboCtrl with
wxVListBox popup and wxControlWithItems
interface.
-
+
Implementing item drawing and measuring is similar to wxVListBox.
Application needs to subclass wxOwnerDrawnComboBox and implement
wxOwnerDrawnComboBox::OnDrawItem, wxOwnerDrawnComboBox::OnMeasureItem
and wxOwnerDrawnComboBox::OnMeasureItemWidth.
-
+
@beginStyleTable
@style{wxODCB_DCLICK_CYCLES}:
Double-clicking cycles item if wxCB_READONLY is also used.
style is not used, writable wxOwnerDrawnComboBox is never custom
painted unless SetCustomPaintWidth is called.
@endStyleTable
-
+
@beginEventTable
@event{EVT_COMBOBOX(id\, func)}:
Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on
the list is selected. Note that calling GetValue returns the new
value of selection.
@endEventTable
-
+
@library{wxadv}
@category{ctrl}
@appearance{ownerdrawncombobox.png}
-
+
@seealso
wxComboCtrl, wxComboBox, wxVListBox, wxCommandEvent
*/
/**
Constructor, creating and showing a owner-drawn combobox.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param value
+ @param value
Initial selection string. An empty string indicates no selection.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then the window is sized
appropriately.
- @param n
+ @param n
Number of strings with which to initialise the control.
- @param choices
+ @param choices
An array of strings with which to initialise the control.
- @param style
+ @param style
Window style. See wxOwnerDrawnComboBox.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxOwnerDrawnComboBox();
- wxOwnerDrawnComboBox(wxWindow* parent, wxWindowID id,
- const wxString& value = "",
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- int n = 0,
- const wxString choices[] = @NULL,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "comboBox");
- wxOwnerDrawnComboBox(wxWindow* parent, wxWindowID id,
- const wxString& value,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "comboBox");
+ wxOwnerDrawnComboBox(wxWindow* parent, wxWindowID id,
+ const wxString& value = "",
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ int n = 0,
+ const wxString choices[] = @NULL,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "comboBox");
+ wxOwnerDrawnComboBox(wxWindow* parent, wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "comboBox");
//@}
/**
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "comboBox");
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& value,
- const wxPoint& pos,
- const wxSize& size,
- const wxArrayString& choices,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "comboBox");
+ bool Create(wxWindow* parent, wxWindowID id,
+ const wxString& value,
+ const wxPoint& pos,
+ const wxSize& size,
+ const wxArrayString& choices,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "comboBox");
//@}
/**
with the given index on the provided DC. If function is not implemented,
the item text is simply drawn, as if the control was a normal combobox.
- @param dc
+ @param dc
The device context to use for drawing
- @param rect
+ @param rect
The bounding rectangle for the item being drawn (DC clipping
region is set to this rectangle before calling this function)
- @param item
+ @param item
The index of the item to be drawn
- @param flags
+ @param flags
Combines any of the following flag values:
*/
void OnDrawItem(wxDC& dc, const wxRect& rect, int item,
/**
@class wxPalette
@wxheader{palette.h}
-
+
A palette is a table that maps pixel values to RGB colours. It allows the
colours of a low-depth bitmap, for example, to be mapped to the available
colours in a display. The notion of palettes is becoming more and more
obsolete nowadays and only the MSW port is still using a native palette.
All other ports use generic code which is basically just an array of
- colours.
-
+ colours.
+
It is likely that in the future the only use for palettes within wxWidgets
will be for representing colour indeces from images (such as GIF or PNG).
The image handlers for these formats have been modified to create a palette
if there is such information in the original image file (usually 256 or less
colour images). See wxImage for more information.
-
+
@library{wxcore}
@category{gdi}
-
+
@stdobjects
Objects:
wxNullPalette
-
+
@seealso
wxDC::SetPalette, wxBitmap
*/
Creates a palette from arrays of size @e n, one for each
red, blue or green component.
- @param palette
+ @param palette
A pointer or reference to the palette to copy.
- @param n
+ @param n
The number of indices in the palette.
- @param red
+ @param red
An array of red values.
- @param green
+ @param green
An array of green values.
- @param blue
+ @param blue
An array of blue values.
@sa Create()
*/
wxPalette();
- wxPalette(const wxPalette& palette);
- wxPalette(int n, const unsigned char* red,
- const unsigned char* green,
- const unsigned char* blue);
+ wxPalette(const wxPalette& palette);
+ wxPalette(int n, const unsigned char* red,
+ const unsigned char* green,
+ const unsigned char* blue);
//@}
/**
Creates a palette from arrays of size @e n, one for each
red, blue or green component.
- @param n
+ @param n
The number of indices in the palette.
- @param red
+ @param red
An array of red values.
- @param green
+ @param green
An array of green values.
- @param blue
+ @param blue
An array of blue values.
@returns @true if the creation was successful, @false otherwise.
/**
Returns a pixel value (index into the palette) for the given RGB values.
- @param red
+ @param red
Red value.
- @param green
+ @param green
Green value.
- @param blue
+ @param blue
Blue value.
@returns The nearest palette index or wxNOT_FOUND for unexpected errors.
/**
Returns RGB values for a given palette index.
- @param pixel
+ @param pixel
The palette index.
- @param red
+ @param red
Receives the red value.
- @param green
+ @param green
Receives the green value.
- @param blue
+ @param blue
Receives the blue value.
@returns @true if the operation was successful.
@sa GetPixel()
*/
#define bool GetRGB(int pixel, const unsigned char* red,
- const unsigned char* green,
- const unsigned char* blue) /* implementation is private */
+ const unsigned char* green,
+ const unsigned char* blue) /* implementation is private */
/**
Returns @true if palette data is present.
/**
@class wxPanel
@wxheader{panel.h}
-
+
A panel is a window on which controls are placed. It is usually placed within
a frame. Its main feature over its parent class wxWindow is code for handling
child windows and TAB traversal. Since wxWidgets 2.9, there is support both
for TAB traversal implemented by wxWidgets itself as well as native TAB
traversal (such as for GTK 2.0).
-
+
@e Note: Tab traversal is implemented through an otherwise undocumented
intermediate wxControlContainer class from which any class can derive
in addition to the normal wxWindow base class. Please see wx/containr.h
and wx/panel.h to find out how this is achieved.
-
+
@e Note: if not all characters are being intercepted by your OnKeyDown or
- OnChar handler, it may be because you are using the wxTAB_TRAVERSAL style,
+ OnChar handler, it may be because you are using the wxTAB_TRAVERSAL style,
which grabs some keypresses for use by child controls.
-
+
@library{wxbase}
@category{miscwnd}
-
+
@seealso
wxDialog
*/
/**
Constructor.
- @param parent
+ @param parent
The parent window.
- @param id
+ @param id
An identifier for the panel. A value of -1 is taken to mean a default.
- @param pos
+ @param pos
The panel position. The value wxDefaultPosition indicates a default position, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param size
+ @param size
The panel size. The value wxDefaultSize indicates a default size, chosen by
either the windowing system or wxWidgets, depending on platform.
- @param style
+ @param style
The window style. See wxPanel.
- @param name
+ @param name
Used to associate a name with the window,
allowing the application user to set Motif resource values for
individual dialog boxes.
@sa Create()
*/
wxPanel();
- wxPanel(wxWindow* parent, wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxTAB_TRAVERSAL,
- const wxString& name = "panel");
+ wxPanel(wxWindow* parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxTAB_TRAVERSAL,
+ const wxString& name = "panel");
//@}
/**
/**
The default handler for wxEVT_SYS_COLOUR_CHANGED.
- @param event
+ @param event
The colour change event.
@remarks Changes the panel's colour to conform to the current settings
/**
@class wxPen
@wxheader{pen.h}
-
+
A pen is a drawing tool for drawing outlines. It is used for drawing
lines and painting the outline of rectangles, ellipses, etc. It has a
colour, a width and a style.
-
+
@library{wxcore}
@category{gdi}
-
+
@stdobjects
Objects:
wxNullPen
Pointers:
wxRED_PEN
-
+
wxCYAN_PEN
-
+
wxGREEN_PEN
-
+
wxBLACK_PEN
-
+
wxWHITE_PEN
-
+
wxTRANSPARENT_PEN
-
+
wxBLACK_DASHED_PEN
-
+
wxGREY_PEN
-
+
wxMEDIUM_GREY_PEN
-
+
wxLIGHT_GREY_PEN
-
+
@seealso
wxPenList, wxDC, wxDC::SetPen
*/
/**
Copy constructor, uses @ref overview_trefcount "reference counting".
- @param colour
+ @param colour
A colour object.
- @param colourName
+ @param colourName
A colour name.
- @param width
+ @param width
Pen width. Under Windows, the pen width cannot be greater than 1 if
the style is wxDOT, wxLONG_DASH, wxSHORT_DASH, wxDOT_DASH, or wxUSER_DASH.
- @param stipple
+ @param stipple
A stipple bitmap.
- @param pen
+ @param pen
A pointer or reference to a pen to copy.
- @param style
+ @param style
The style may be one of the following:
wxSOLID
@sa SetStyle(), SetColour(), SetWidth(), SetStipple()
*/
wxPen();
- wxPen(const wxColour& colour, int width = 1,
- int style = wxSOLID);
- wxPen(const wxString& colourName, int width, int style);
- wxPen(const wxBitmap& stipple, int width);
- wxPen(const wxPen& pen);
+ wxPen(const wxColour& colour, int width = 1,
+ int style = wxSOLID);
+ wxPen(const wxString& colourName, int width, int style);
+ wxPen(const wxBitmap& stipple, int width);
+ wxPen(const wxPen& pen);
//@}
/**
@sa GetColour()
*/
void SetColour(wxColour& colour);
- void SetColour(const wxString& colourName);
- void SetColour(unsigned char red, unsigned char green,
- unsigned char blue);
+ void SetColour(const wxString& colourName);
+ void SetColour(unsigned char red, unsigned char green,
+ unsigned char blue);
//@}
/**
/**
@class wxPickerBase
@wxheader{pickerbase.h}
-
+
Base abstract class for all pickers which support an auxiliary text control.
This class handles all positioning and sizing of the text control like a
an horizontal wxBoxSizer would do, with the text control on
proportion values) of the picker control defaults to 1 when there isn't a text
control
associated (see @c wxPB_USE_TEXTCTRL style) and to 0 otherwise.
-
+
@beginStyleTable
@style{wxPB_USE_TEXTCTRL}:
Creates a text control to the left of the picker which is
completely managed by this wxPickerBase class.
@endStyleTable
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxColourPickerCtrl
*/
/////////////////////////////////////////////////////////////////////////////
- // Name: platform.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- /**
- Same as wxCHECK_VERSION but also checks that
- @c wxSUBRELEASE_NUMBER is at least @e subrel.
+// Name: platform.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+Same as wxCHECK_VERSION but also checks that
+@c wxSUBRELEASE_NUMBER is at least @e subrel.
*/
#define bool wxCHECK_VERSION_FULL(major, minor, release, subrel) /* implementation is private */
- /**
- This is a macro which evaluates to @true if the current wxWidgets version is at
- least major.minor.release.
-
- For example, to test if the program is compiled with wxWidgets 2.2 or higher,
- the following can be done:
- @code
- wxString s;
- #if wxCHECK_VERSION(2, 2, 0)
- if ( s.StartsWith("foo") )
- #else // replacement code for old version
- if ( strncmp(s, "foo", 3) == 0 )
- #endif
- {
- ...
- }
- @endcode
+/**
+This is a macro which evaluates to @true if the current wxWidgets version is at
+least major.minor.release.
+
+For example, to test if the program is compiled with wxWidgets 2.2 or higher,
+the following can be done:
+@code
+wxString s;
+#if wxCHECK_VERSION(2, 2, 0)
+ if ( s.StartsWith("foo") )
+#else // replacement code for old version
+ if ( strncmp(s, "foo", 3) == 0 )
+#endif
+ {
+ ...
+ }
+@endcode
*/
#define bool wxCHECK_VERSION(major, minor, release) /* implementation is private */
/**
@class wxPlatformInfo
@wxheader{platinfo.h}
-
+
This class holds informations about the operating system and the toolkit that
the application
is running under and some basic architecture info of the machine where it's
running.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxGetOSVersion, wxIsPlatformLittleEndian, wxIsPlatform64Bit, wxAppTraits
*/
Initializes the object using given values.
*/
wxPlatformInfo();
- wxPlatformInfo(wxPortId pid = wxPORT_UNKNOWN,
- int tkMajor = -1,
- int tkMinor = -1,
- wxOperatingSystemId id = wxOS_UNKNOWN,
- int osMajor = -1,
- int osMinor = -1,
- wxArchitecture arch = wxARCH_INVALID,
- wxEndianness endian = wxENDIAN_INVALID);
+ wxPlatformInfo(wxPortId pid = wxPORT_UNKNOWN,
+ int tkMajor = -1,
+ int tkMinor = -1,
+ wxOperatingSystemId id = wxOS_UNKNOWN,
+ int osMajor = -1,
+ int osMinor = -1,
+ wxArchitecture arch = wxARCH_INVALID,
+ wxEndianness endian = wxENDIAN_INVALID);
//@}
/**
Returns the name for the architecture of this wxPlatformInfo instance.
*/
static wxString GetArchName(wxArchitecture arch);
- wxString GetArchName();
+ wxString GetArchName();
//@}
/**
Returns the endianness ID of this wxPlatformInfo instance.
*/
static wxEndianness GetEndianness(const wxString& end);
- wxEndianness GetEndianness();
+ wxEndianness GetEndianness();
//@}
//@{
Returns the name for the endianness of this wxPlatformInfo instance.
*/
static wxString GetEndiannessName(wxEndianness end);
- wxString GetEndiannessName();
+ wxString GetEndiannessName();
//@}
/**
wxPlatformInfo instance.
*/
static wxString GetOperatingSystemFamilyName(wxOperatingSystemId os);
- wxString GetOperatingSystemFamilyName();
+ wxString GetOperatingSystemFamilyName();
//@}
//@{
Returns the operating system ID of this wxPlatformInfo instance.
*/
static wxOperatingSystemId GetOperatingSystemId(const wxString& name);
- wxOperatingSystemId GetOperatingSystemId();
+ wxOperatingSystemId GetOperatingSystemId();
//@}
//@{
instance.
*/
static wxString GetOperatingSystemIdName(wxOperatingSystemId os);
- wxString GetOperatingSystemIdName();
+ wxString GetOperatingSystemIdName();
//@}
//@{
Returns the wxWidgets port ID associated with this wxPlatformInfo instance.
*/
static wxPortId GetPortId(const wxString& portname);
- wxPortId GetPortId();
+ wxPortId GetPortId();
//@}
//@{
instance.
*/
static wxString GetPortIdName(wxPortId port, bool usingUniversal);
- wxString GetPortIdName();
+ wxString GetPortIdName();
//@}
//@{
*/
static wxString GetPortIdShortName(wxPortId port,
bool usingUniversal);
- wxString GetPortIdShortName();
+ wxString GetPortIdShortName();
//@}
/**
/**
@class wxPosition
@wxheader{position.h}
-
+
This class represents the position of an item in any kind of grid of rows and
columns such as wxGridBagSizer, or
wxHVScrolledWindow.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxPoint, wxSize
*/
-class wxPosition
+class wxPosition
{
public:
//@{
default value is (0, 0).
*/
wxPosition();
- wxPosition(int row, int col);
+ wxPosition(int row, int col);
//@}
/**
*/
bool operator ==(const wxPosition& p);
- bool operator !=(const wxPosition& p);
- wxPosition operator +=(const wxPosition& p);
- wxPosition operator -=(const wxPosition& p);
- wxPosition operator +=(const wxSize& s);
- wxPosition operator -=(const wxSize& s);
- wxPosition operator +(const wxPosition& p);
- wxPosition operator -(const wxPosition& p);
- wxPosition operator +(const wxSize& s);
- wxPosition operator -(const wxSize& s);
+ bool operator !=(const wxPosition& p);
+ wxPosition operator +=(const wxPosition& p);
+ wxPosition operator -=(const wxPosition& p);
+ wxPosition operator +=(const wxSize& s);
+ wxPosition operator -=(const wxSize& s);
+ wxPosition operator +(const wxPosition& p);
+ wxPosition operator -(const wxPosition& p);
+ wxPosition operator +(const wxSize& s);
+ wxPosition operator -(const wxSize& s);
//@}
/**
/**
@class wxPowerEvent
@wxheader{power.h}
-
+
The power events are generated when the system power state changes, e.g. the
system is suspended, hibernated, plugged into or unplugged from the wall socket
and so on.
-
+
Notice that currently only suspend and resume events are generated and only
under MS Windows platform. To avoid the need to change the code using this
event later when these events are implemented on the other platforms please use
the test @c ifdef wxHAS_POWER_EVENTS instead of directly testing for
the platform in your code: this symbol will be defined for all platforms
supporting the power events.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxGetPowerType, wxGetBatteryState
*/
{
public:
/**
- Call this to prevent suspend from taking place in
+ Call this to prevent suspend from taking place in
@c wxEVT_POWER_SUSPENDING handler (it is ignored for all the others).
*/
void Veto();
/**
@class wxPreviewControlBar
@wxheader{print.h}
-
+
This is the default implementation of the preview control bar, a panel
with buttons and a zoom control. You can derive a new class from this and
override some or all member functions to change the behaviour and appearance;
or you can leave it as it is.
-
+
@library{wxbase}
@category{printing}
-
+
@seealso
wxPreviewFrame, wxPreviewCanvas, wxPrintPreview
*/
Equivalent to a combination of wxPREVIEW_PREVIOUS, wxPREVIEW_NEXT and
wxPREVIEW_ZOOM.
*/
- wxPreviewControlBar(wxPrintPreview* preview, long buttons,
- wxWindow* parent,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = "panel");
+ wxPreviewControlBar(wxPrintPreview* preview, long buttons,
+ wxWindow* parent,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = "panel");
};
/**
@class wxPreviewCanvas
@wxheader{print.h}
-
+
A preview canvas is the default canvas used by the print preview
system to display the preview.
-
+
@library{wxbase}
@category{printing}
-
+
@seealso
wxPreviewFrame, wxPreviewControlBar, wxPrintPreview
*/
/**
@class wxPreviewFrame
@wxheader{print.h}
-
+
This class provides the default method of managing the print preview interface.
Member functions may be overridden to replace functionality, or the
class may be used without derivation.
-
+
@library{wxbase}
@category{printing}
-
+
@seealso
wxPreviewCanvas, wxPreviewControlBar, wxPrintPreview
*/
/**
@class wxPrintPreview
@wxheader{print.h}
-
+
Objects of this class manage the print preview process. The object is passed
a wxPrintout object, and the wxPrintPreview object itself is passed to
a wxPreviewFrame object. Previewing is started by initializing and showing
the preview frame. Unlike wxPrinter::Print, flow of control returns to the
application
immediately after the frame is shown.
-
+
@library{wxbase}
@category{printing}
-
+
@seealso
@ref overview_printingoverview "Printing framework overview", wxPrinterDC,
wxPrintDialog, wxPrintout, wxPrinter, wxPreviewCanvas, wxPreviewControlBar, wxPreviewFrame.
/**
@class wxPrinter
@wxheader{print.h}
-
+
This class represents the Windows or PostScript printer, and is the vehicle
through
which printing may be launched by an application. Printing can also
be achieved through using of lower functions and classes, but
this and associated classes provide a more convenient and general
method of printing.
-
+
@library{wxbase}
@category{printing}
-
+
@seealso
@ref overview_printingoverview "Printing framework overview", wxPrinterDC,
wxPrintDialog, wxPrintout, wxPrintPreview.
/**
Return last error. Valid after calling Print(),
- PrintDialog() or
- wxPrintPreview::Print. These functions
+ PrintDialog() or
+ wxPrintPreview::Print. These functions
set last error to @b wxPRINTER_NO_ERROR if no error happened.
Returned value is one of the following:
/**
@class wxPrintout
@wxheader{print.h}
-
+
This class encapsulates the functionality of printing out an application
document. A new class must be derived and members overridden to respond to calls
such as OnPrintPage and HasPage and to render the print image onto an associated
wxDC. Instances of this class are passed to wxPrinter::Print or
to a wxPrintPreview object to initiate printing or previewing.
-
+
Your derived wxPrintout is responsible for drawing both the preview image and
the printed page. If your windows' drawing routines accept an arbitrary DC as an
argument, you can re-use those routines within your wxPrintout subclass to draw
can easily use a single drawing routine to draw on your application's windows,
to create the print preview image, and to create the printed paper image, and
achieve a common appearance to the preview image and the printed page.
-
+
@library{wxbase}
@category{printing}
-
+
@seealso
@ref overview_printingoverview "Printing framework overview", wxPrinterDC,
wxPrintDialog, wxPageSetupDialog, wxPrinter, wxPrintPreview
origin is at the top left corner of the page rectangle. On MSW and Mac, the page
rectangle is the printable area of the page. On other platforms and PostScript
printing, the page rectangle is the entire paper. Use this if you want your
- printed image as large as possible, but with the caveat that on some platforms,
+ printed image as large as possible, but with the caveat that on some platforms,
portions of the image might be cut off at the edges.
*/
void FitThisSizeToPage(const wxSize& imageSize);
/**
Return the rectangle corresponding to the page in the associated wxDC's
- logical coordinates for the current user scale and device origin.
+ logical coordinates for the current user scale and device origin.
On MSW and Mac, this will be the printable area of the paper. On other platforms
and PostScript printing, this will be the full paper rectangle.
*/
/**
@class wxPrintDialog
@wxheader{printdlg.h}
-
+
This class represents the print and print setup common dialogs.
You may obtain a wxPrinterDC device context from
a successfully dismissed print dialog.
-
+
@library{wxcore}
@category{printing}
-
+
@seealso
@ref overview_printingoverview "Printing framework overview", @ref
overview_wxprintdialogoverview "wxPrintDialog Overview"
/**
@class wxPageSetupDialog
@wxheader{printdlg.h}
-
+
This class represents the page setup common dialog. In MSW, the page setup
dialog is standard from Windows 95 on, replacing the print setup dialog (which
is retained in Windows and wxWidgets for backward compatibility). On Windows 95
and NT 4.0 and above, the page setup dialog is native to the windowing system,
otherwise it is emulated.
-
+
The page setup dialog contains controls for paper size (A4, A5 etc.),
orientation (landscape or portrait), and controls for setting left, top, right
and bottom margin sizes in millimetres.
-
+
On Macintosh, the native page setup dialog is used, which lets you select paper
size and orientation but it does not let you change the page margins.
-
+
On other platforms, a generic dialog is used.
-
+
When the dialog has been closed, you need to query the
wxPageSetupDialogData object associated with
the dialog.
-
+
Note that the OK and Cancel buttons do not destroy the dialog; this must be done
by the application.
-
+
@library{wxcore}
@category{printing}
-
+
@seealso
@ref overview_printingoverview "Printing framework overview", wxPrintDialog,
wxPageSetupDialogData
/**
@class wxProcess
@wxheader{process.h}
-
+
The objects of this class are used in conjunction with the
wxExecute function. When a wxProcess object is passed to
wxExecute(), its wxProcess::OnTerminate virtual method
(asynchronously) notified about the process termination and also retrieve its
exit status which is unavailable from wxExecute() in the case of
asynchronous execution.
-
+
Please note that if the process termination notification is processed by the
parent, it is responsible for deleting the wxProcess object which sent it.
However, if it is not processed, the object will delete itself and so the
library users should only delete those objects whose notifications have been
processed (and call wxProcess::Detach for others).
-
+
wxProcess also supports IO redirection of the child process. For this, you have
to call its wxProcess::Redirect method before passing it to
wxExecute. If the child process was launched successfully,
wxProcess::GetErrorStream can then be used to retrieve
the streams corresponding to the child process standard output, input and
error output respectively.
-
+
@b wxPerl note: In wxPerl this class has an additional @c Destroy method,
for explicit destruction.
-
+
@library{wxbase}
@category{appmanagement}
-
+
@seealso
wxExecute, @ref overview_sampleexec "exec sample"
*/
former value has no particular effect while using the latter one is equivalent
to calling Redirect().
- @param parent
+ @param parent
The event handler parent.
- @param id
+ @param id
id of an event.
- @param flags
+ @param flags
either wxPROCESS_DEFAULT or wxPROCESS_REDIRECT
*/
wxProcess(wxEvtHandler * parent = @NULL, int id = -1);
- wxProcess(int flags);
+ wxProcess(int flags);
//@}
/**
int flags = wxKILL_NOCHILDREN);
/**
- It is called when the process with the pid
+ It is called when the process with the pid
@param pid finishes.
It raises a wxWidgets event when it isn't overridden.
- pid
+ pid
The pid of the process which has just terminated.
- @param status
+ @param status
The exit code of the process.
*/
void OnTerminate(int pid, int status);
does mean that the child process should be told to quit before the main program
exits to avoid memory leaks.
- @param cmd
+ @param cmd
The command to execute, including optional arguments.
- @param flags
+ @param flags
The flags to pass to wxExecute.
NOTE: wxEXEC_SYNC should not be used.
/**
@class wxProcessEvent
@wxheader{process.h}
-
+
A process event is sent when a process is terminated.
-
+
@library{wxbase}
@category{events}
-
+
@seealso
wxProcess, @ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxProgressDialog
@wxheader{progdlg.h}
-
+
This class represents a dialog that shows a short message and a
progress bar. Optionally, it can display ABORT and SKIP buttons,
the elapsed, remaining and estimated time for the end of the progress.
-
+
@beginStyleTable
@style{wxPD_APP_MODAL}:
Make the progress dialog modal. If this flag is not given, it is
@style{wxPD_REMAINING_TIME}:
This flag tells the dialog that it should show remaining time.
@endStyleTable
-
+
@library{wxbase}
@category{cmndlg}
*/
for other windows, or, if wxPD_APP_MODAL flag is not given, for its parent
window only.
- @param title
+ @param title
Dialog title to show in titlebar.
- @param message
+ @param message
Message displayed above the progress bar.
- @param maximum
+ @param maximum
Maximum value for the progress bar.
- @param parent
+ @param parent
Parent window.
- @param style
+ @param style
The dialog style. See wxProgressDialog.
*/
wxProgressDialog(const wxString& title, const wxString& message,
or ask the user for the confirmation and if the abort is not confirmed the
dialog may be resumed with Resume() function.
- @param value
+ @param value
The new value of the progress meter. It should be less than or
equal to the maximum value given to the constructor and the dialog is closed if
it is equal to the maximum.
- @param newmsg
+ @param newmsg
The new messages for the progress dialog text, if it is
empty (which is the default) the message is not changed.
- @param skip
+ @param skip
If "Skip" button was pressed since last
Update call, this is set to @true.
*/
/**
@class wxPropertySheetDialog
@wxheader{propdlg.h}
-
+
This class represents a property sheet dialog: a tabbed dialog
for showing settings. It is optimized to show flat tabs
on PocketPC devices, and can be customized to use different
controllers instead of the default notebook style.
-
+
To use this class, call wxPropertySheetDialog::Create from your own
Create function. Then call wxPropertySheetDialog::CreateButtons, and create
pages, adding them to the book control.
Finally call wxPropertySheetDialog::LayoutDialog.
-
+
For example:
-
+
@code
bool MyPropertySheetDialog::Create(...)
{
if (!wxPropertySheetDialog::Create(...))
return @false;
-
+
CreateButtons(wxOK|wxCANCEL|wxHELP);
-
+
// Add page
wxPanel* panel = new wxPanel(GetBookCtrl(), ...);
GetBookCtrl()-AddPage(panel, wxT("General"));
-
+
LayoutDialog();
return @true;
}
@endcode
-
+
If necessary, override CreateBookCtrl and AddBookCtrl to create and add a
different
kind of book control. You would then need to use two-step construction for the
dialog.
Or, change the style of book control by calling
- wxPropertySheetDialog::SetSheetStyle
+ wxPropertySheetDialog::SetSheetStyle
before calling Create.
-
+
The dialogs sample shows this class being used with notebook and toolbook
controllers (for
Windows-style and Mac-style settings dialogs).
-
+
To make pages of the dialog scroll when the display is too small to fit the
whole dialog, you can switch
layout adaptation on globally with wxDialog::EnableLayoutAdaptation or
per dialog with wxDialog::SetLayoutAdaptationMode. For more
about layout adaptation, see @ref overview_autoscrollingdialogs "Automatic
scrolling dialogs".
-
+
@library{wxadv}
@category{managedwnd}
*/
/**
@class wxFTP
@headerfile ftp.h wx/protocol/ftp.h
-
+
wxFTP can be used to establish a connection to an FTP server and perform all the
usual operations. Please consult the RFC 959 for more details about the FTP
protocol.
-
+
To use a commands which doesn't involve file transfer (i.e. directory oriented
commands) you just need to call a corresponding member function or use the
generic wxFTP::SendCommand method. However to actually
transfer files you just get or give a stream to or from this class and the
actual data are read or written using the usual stream methods.
-
+
Example of using wxFTP for file downloading:
-
+
@code
wxFTP ftp;
-
+
// if you don't use these lines anonymous login will be used
ftp.SetUser("user");
ftp.SetPassword("password");
-
+
if ( !ftp.Connect("ftp.wxwindows.org") )
{
wxLogError("Couldn't connect");
return;
}
-
+
ftp.ChDir("/pub");
wxInputStream *in = ftp.GetInputStream("wxWidgets-4.2.0.tar.gz");
if ( !in )
// file data is in the buffer
...
}
-
+
delete [] data;
delete in;
}
@endcode
-
+
To upload a file you would do (assuming the connection to the server was opened
successfully):
-
+
@code
wxOutputStream *out = ftp.GetOutputStream("filename");
if ( out )
delete out;
}
@endcode
-
+
@library{wxnet}
@category{net}
-
+
@seealso
wxSocketBase
*/
#define ~wxFTP() /* implementation is private */
/**
- Aborts the download currently in process, returns @true if ok, @false
+ Aborts the download currently in process, returns @true if ok, @false
if an error occurred.
*/
bool Abort();
/**
@class wxHTTP
@headerfile http.h wx/protocol/http.h
-
-
+
+
@library{wxnet}
@category{net}
-
+
@seealso
wxSocketBase, wxURL
*/
Creates a new input stream on the specified path. Notice that this stream is
unseekable, i.e. SeekI() and TellI() methods shouldn't be used.
- Note that you can still know the size of the file you are getting using
+ Note that you can still know the size of the file you are getting using
wxStreamBase::GetSize. However there is a
limitation: in HTTP protocol, the size is not always specified so sometimes
@c (size_t)-1 can returned ot indicate that the size is unknown. In such
- case, you may want to use wxInputStream::LastRead
+ case, you may want to use wxInputStream::LastRead
method in a loop to get the total size.
@returns Returns the initialized stream. You must delete it yourself once
/**
@class wxProtocol
@headerfile protocol.h wx/protocol/protocol.h
-
-
+
+
@library{wxnet}
@category{FIXME}
-
+
@seealso
wxSocketBase, wxURL
*/
/**
@class wxScopedPtr
@wxheader{ptr_scpd.h}
-
- This is a simple scoped smart pointer implementation that is similar to
+
+ This is a simple scoped smart pointer implementation that is similar to
the Boost smart pointers but rewritten to
use macros instead.
-
+
Since wxWidgets 2.9.0 there is also a templated version of this class
with the same name. See wxScopedPtrT.
-
+
A smart pointer holds a pointer to an object. The memory used by the object is
deleted when the smart pointer goes out of scope. This class is different from
the @c std::auto_ptr in so far as it doesn't provide copy constructor
nor assignment operator. This limits what you can do with it but is much less
surprizing than the "destructive copy'' behaviour of the standard class.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxScopedArray
*/
-class wxScopedPtr
+class wxScopedPtr
{
public:
/**
const T* operator -();
/**
- Returns the currently hold pointer and resets the smart pointer object to
+ Returns the currently hold pointer and resets the smart pointer object to
@NULL. After a call to this function the caller is responsible for
deleting the pointer.
*/
T * release();
/**
- Deletes the currently held pointer and sets it to @e p or to @NULL if no
+ Deletes the currently held pointer and sets it to @e p or to @NULL if no
arguments are specified. This function does check to make sure that the
pointer you are assigning is not the same pointer that is already stored.
*/
- reset(T p = @NULL);
+ reset(T p = @NULL);
/**
Swap the pointer inside the smart pointer with @e other. The pointer being
swapped must be of the same type (hence the same class name).
*/
- swap(wxScopedPtr amp; other);
+ swap(wxScopedPtr amp; other);
};
/**
@class wxScopedArray
@wxheader{ptr_scpd.h}
-
- This is a simple scoped smart pointer array implementation that is similar to
+
+ This is a simple scoped smart pointer array implementation that is similar to
the Boost smart pointers but rewritten to
use macros instead.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxScopedPtr
*/
-class wxScopedArray
+class wxScopedArray
{
public:
/**
const T operator [](long int i);
/**
- Deletes the currently held pointer and sets it to 'p' or to @NULL if no
+ Deletes the currently held pointer and sets it to 'p' or to @NULL if no
arguments are specified. This function does check to make sure that the
pointer you are assigning is not the same pointer that is already stored.
*/
- reset(T p = @NULL);
+ reset(T p = @NULL);
/**
Swap the pointer inside the smart pointer with 'ot'. The pointer being swapped
must be of the same type (hence the same class name).
*/
- swap(wxScopedPtr amp; ot);
+ swap(wxScopedPtr amp; ot);
};
/**
@class wxScopedTiedPtr
@wxheader{ptr_scpd.h}
-
+
This is a variation on the topic of wxScopedPtr. This
class is also a smart pointer but in addition it "ties'' the pointer value to
another variable. In other words, during the life time of this class the value
it is reset to its old value when the object is destroyed. This class is
especially useful when converting the existing code (which may already store
the pointers value in some variable) to the smart pointers.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxScopedTiedPtr
+class wxScopedTiedPtr
{
public:
/**
- Constructor creates a smart pointer initialized with @e ptr and stores
- @e ptr in the location specified by @e ppTie which must not be
+ Constructor creates a smart pointer initialized with @e ptr and stores
+ @e ptr in the location specified by @e ppTie which must not be
@NULL.
*/
wxScopedTiedPtr(T ** ppTie, T * ptr);
to the old value.
Warning: this location may now contain an uninitialized value if it hadn't been
- initialized previously, in particular don't count on it magically being
+ initialized previously, in particular don't count on it magically being
@NULL!
*/
~wxScopedTiedPtr();
/**
@class wxScopedPtrT
@wxheader{ptr_scpd.h}
-
+
A scoped pointer template class. It is the template version of
the old-style @ref overview_wxscopedptr "scoped pointer macros".
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxSharedPtr, wxWeakRef
*/
-class wxScopedPtr<T>
+class wxScopedPtr<T>
{
public:
/**
T * get();
/**
- Conversion to a boolean expression (in a variant which is not
+ Conversion to a boolean expression (in a variant which is not
convertable to anything but a boolean expression). If this class
contains a valid pointer it will return @e @true, if it contains
a @NULL pointer it will return @e @false.
*/
- operator unspecified_bool_type();
+ operator unspecified_bool_type();
/**
Returns a reference to the object. If the internal pointer is @NULL
T operator*();
/**
- Returns pointer to object. If the pointer is @NULL this method will
+ Returns pointer to object. If the pointer is @NULL this method will
cause an assert in debug mode.
*/
T * operator-();
/**
@class wxSharedPtrT
@wxheader{ptr_shrd.h}
-
+
A smart pointer with non-intrusive reference counting. It is modeled
- after @b boost::shared_ptr and can be used with STL containers
+ after @b boost::shared_ptr and can be used with STL containers
and wxVector - unlike @b std::auto_ptr
and wxScopedPtr.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxScopedPtr, wxWeakRef, wxObjectDataPtr
*/
-class wxSharedPtr<T>
+class wxSharedPtr<T>
{
public:
//@{
Constructors.
*/
wxSharedPtrT(T* ptr = @NULL);
- wxSharedPtrT(const wxSharedPtr<T>& tocopy);
+ wxSharedPtrT(const wxSharedPtr<T>& tocopy);
//@}
/**
T* get();
/**
- Conversion to a boolean expression (in a variant which is not
+ Conversion to a boolean expression (in a variant which is not
convertable to anything but a boolean expression). If this class
contains a valid pointer it will return @e @true, if it contains
a @NULL pointer it will return @e @false.
*/
- operator unspecified_bool_type();
+ operator unspecified_bool_type();
/**
Returns a reference to the object. If the internal pointer is @NULL this
/**
@class wxQuantize
@wxheader{quantize.h}
-
+
Performs quantization, or colour reduction, on a wxImage.
-
+
Functions in this class are static and so a wxQuantize object need not be
created.
-
+
@library{wxcore}
@category{misc}
*/
int desiredNoColours = 236,
unsigned char** eightBitData = 0,
int flags = wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE|wxQUANTIZE_RETURN_8BIT_DATA);
- bool Quantize(const wxImage& src, wxImage& dest,
- int desiredNoColours = 236,
- unsigned char** eightBitData = 0,
- int flags = wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE|wxQUANTIZE_RETURN_8BIT_DATA);
+ bool Quantize(const wxImage& src, wxImage& dest,
+ int desiredNoColours = 236,
+ unsigned char** eightBitData = 0,
+ int flags = wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE|wxQUANTIZE_RETURN_8BIT_DATA);
//@}
};
/**
@class wxRadioBox
@wxheader{radiobox.h}
-
+
A radio box item is used to select one of number of mutually exclusive
choices. It is displayed as a vertical column or horizontal row of
labelled buttons.
-
+
@beginStyleTable
@style{wxRA_SPECIFY_ROWS}:
The major dimension parameter refers to the maximum number of rows.
Use of the checkbox controls instead of radio buttons (currently
supported only on PalmOS)
@endStyleTable
-
+
@beginEventTable
@event{EVT_RADIOBOX(id\, func)}:
Process a wxEVT_COMMAND_RADIOBOX_SELECTED event, when a radiobutton
is clicked.
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{radiobox.png}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview", wxRadioButton,
wxCheckBox
/**
Constructor, creating and showing a radiobox.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param label
+ @param label
Label for the static box surrounding the radio buttons.
- @param pos
+ @param pos
Window position. If wxDefaultPosition is specified then a default position
is chosen.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then a default size is
chosen.
- @param n
+ @param n
Number of choices with which to initialize the radiobox.
- @param choices
+ @param choices
An array of choices with which to initialize the radiobox.
- @param majorDimension
+ @param majorDimension
Specifies the maximum number of rows (if style contains wxRA_SPECIFY_ROWS) or
columns (if style contains wxRA_SPECIFY_COLS) for a two-dimensional
radiobox.
- @param style
+ @param style
Window style. See wxRadioBox.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxRadioBox();
- wxRadioBox(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxPoint& point = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- int n = 0,
- const wxString choices[] = @NULL,
- int majorDimension = 0,
- long style = wxRA_SPECIFY_COLS,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "radioBox");
- wxRadioBox(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxPoint& point,
- const wxSize& size,
- const wxArrayString& choices,
- int majorDimension = 0,
- long style = wxRA_SPECIFY_COLS,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "radioBox");
+ wxRadioBox(wxWindow* parent, wxWindowID id,
+ const wxString& label,
+ const wxPoint& point = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ int n = 0,
+ const wxString choices[] = @NULL,
+ int majorDimension = 0,
+ long style = wxRA_SPECIFY_COLS,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "radioBox");
+ wxRadioBox(wxWindow* parent, wxWindowID id,
+ const wxString& label,
+ const wxPoint& point,
+ const wxSize& size,
+ const wxArrayString& choices,
+ int majorDimension = 0,
+ long style = wxRA_SPECIFY_COLS,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "radioBox");
//@}
/**
long style = wxRA_SPECIFY_COLS,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = "radioBox");
- bool Create(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxPoint& point,
- const wxSize& size,
- const wxArrayString& choices,
- int majorDimension = 0,
- long style = wxRA_SPECIFY_COLS,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "radioBox");
+ bool Create(wxWindow* parent, wxWindowID id,
+ const wxString& label,
+ const wxPoint& point,
+ const wxSize& size,
+ const wxArrayString& choices,
+ int majorDimension = 0,
+ long style = wxRA_SPECIFY_COLS,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "radioBox");
//@}
//@{
/**
Enables or disables an individual button in the radiobox.
- @param enable
+ @param enable
@true to enable, @false to disable.
- @param n
+ @param n
The zero-based button to enable or disable.
@sa wxWindow::Enable
*/
virtual bool Enable(bool enable = @true);
- virtual bool Enable(unsigned int n, bool enable = @true);
+ virtual bool Enable(unsigned int n, bool enable = @true);
//@}
/**
Finds a button matching the given string, returning the position if found, or
-1 if not found.
- @param string
+ @param string
The string to find.
*/
int FindString(const wxString& string);
Returns a radio box item under the point, a zero-based item index, or @c
wxNOT_FOUND if no item is under the point.
- @param pt
+ @param pt
Point in client coordinates.
*/
int GetItemFromPoint(const wxPoint pt);
Returns the helptext associated with the specified @e item if any or @c
wxEmptyString.
- @param item
+ @param item
The zero-based item index.
@sa SetItemHelpText()
/**
Returns the radiobox label.
- @param n
+ @param n
The zero-based button index.
@sa SetLabel()
/**
Returns the label for the button at the given position.
- @param n
+ @param n
The zero-based button position.
*/
wxString GetString(unsigned int n);
@b Platform note: Currently only implemented in wxMSW, wxGTK and wxUniversal
and always returns @true in the other ports.
- @param n
+ @param n
The zero-based button position.
*/
bool IsItemEnabled(unsigned int n);
@b Platform note: Currently only implemented in wxMSW, wxGTK and wxUniversal
and always returns @true in the other ports.
- @param n
+ @param n
The zero-based button position.
*/
bool IsItemShown(unsigned int n);
/**
Sets the helptext for an item. Empty string erases any existing helptext.
- @param item
+ @param item
The zero-based item index.
- @param helptext
+ @param helptext
The help text to set for the item.
@sa GetItemHelpText()
@b Platform note: Currently only implemented in wxMSW and wxGTK2 and does
nothing in the other ports.
- @param item
+ @param item
Index of the item the tooltip will be shown for.
- @param text
+ @param text
Tooltip text for the item, the tooltip is removed if empty.
@sa GetItemToolTip(), wxWindow::SetToolTip
/**
Sets the radiobox label.
- @param label
+ @param label
The label to set.
- @param n
+ @param n
The zero-based button index.
*/
void SetLabel(const wxString& label);
Sets a button by passing the desired string position. This does not cause
a wxEVT_COMMAND_RADIOBOX_SELECTED event to get emitted.
- @param n
+ @param n
The zero-based button position.
*/
void SetSelection(int n);
cause
a wxEVT_COMMAND_RADIOBOX_SELECTED event to get emitted.
- @param string
+ @param string
The label of the button to select.
*/
void SetStringSelection(const wxString& string);
/**
@class wxRadioButton
@wxheader{radiobut.h}
-
+
A radio button item is a button which usually denotes one of several mutually
exclusive options. It has a text label next to a (usually) round button.
-
+
You can create a group of mutually-exclusive radio buttons by specifying @c
wxRB_GROUP for
the first in the group. The group ends when another radio button group is
created, or there are no more radio buttons.
-
+
@beginStyleTable
@style{wxRB_GROUP}:
Marks the beginning of a new group of radio buttons.
Use a checkbox button instead of radio button (currently supported
only on PalmOS).
@endStyleTable
-
+
@beginEventTable
@event{EVT_RADIOBUTTON(id\, func)}:
Process a wxEVT_COMMAND_RADIOBUTTON_SELECTED event, when the
radiobutton is clicked.
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{radiobutton.png}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview", wxRadioBox,
wxCheckBox
/**
Constructor, creating and showing a radio button.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param label
+ @param label
Label for the radio button.
- @param pos
+ @param pos
Window position. If wxDefaultPosition is specified then a default position
is chosen.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then a default size is
chosen.
- @param style
+ @param style
Window style. See wxRadioButton.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxRadioButton();
- wxRadioButton(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "radioButton");
+ wxRadioButton(wxWindow* parent, wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "radioButton");
//@}
/**
Sets the radio button to selected or deselected status. This does not cause a
wxEVT_COMMAND_RADIOBUTTON_SELECTED event to get emitted.
- @param value
+ @param value
@true to select, @false to deselect.
*/
void SetValue(const bool value);
/**
@class wxRecursionGuardFlag
@wxheader{recguard.h}
-
- This is a completely opaque class which exists only to be used with
+
+ This is a completely opaque class which exists only to be used with
wxRecursionGuard, please see the example in that
class documentation.
-
- Please notice that wxRecursionGuardFlag object must be declared
+
+ Please notice that wxRecursionGuardFlag object must be declared
@c static or the recursion would never be detected.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxRecursionGuardFlag
+class wxRecursionGuardFlag
{
public:
-
+
};
/**
@class wxRecursionGuard
@wxheader{recguard.h}
-
+
wxRecursionGuard is a very simple class which can be used to prevent reentrancy
problems in a function. It is not thread-safe and so should be used only in
single-threaded programs or in combination with some thread synchronization
mechanisms.
-
- wxRecursionGuard is always used together with the
+
+ wxRecursionGuard is always used together with the
wxRecursionGuardFlag like in this example:
-
+
@code
void Foo()
{
// don't allow reentrancy
return;
}
-
+
...
}
@endcode
-
+
As you can see, wxRecursionGuard simply tests the flag value and sets it to
- @true if it hadn't been already set.
+ @true if it hadn't been already set.
wxRecursionGuard::IsInside allows testing the old flag
value. The advantage of using this class compared to directly manipulating the
flag is that the flag is always reset in the wxRecursionGuard destructor and so
you don't risk to forget to do it even if the function returns in an unexpected
way (for example because an exception has been thrown).
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxRecursionGuard
+class wxRecursionGuard
{
public:
/**
- A wxRecursionGuard object must always be initialized with a (static)
+ A wxRecursionGuard object must always be initialized with a (static)
wxRecursionGuardFlag. The constructor saves the
- value of the flag to be able to return the correct value from
+ value of the flag to be able to return the correct value from
IsInside().
*/
wxRecursionGuard(wxRecursionGuardFlag& flag);
/**
@class wxRegEx
@wxheader{regex.h}
-
+
wxRegEx represents a regular expression. This class provides support
for regular expressions matching and also replacement.
-
+
It is built on top of either the system library (if it has support
for POSIX regular expressions - which is the case of the most modern
Unices) or uses the built in Henry Spencer's library. Henry Spencer
would appreciate being given credit in the documentation of software
which uses his library, but that is not a requirement.
-
+
Regular expressions, as defined by POSIX, come in two flavours: @e extended
and @e basic. The builtin library also adds a third flavour
of expression advanced, which is not available
when using the system library.
-
+
Unicode is fully supported only when using the builtin library.
When using the system library in Unicode mode, the expressions and data
are translated to the default 8-bit encoding before being passed to
the library.
-
+
On platforms where a system library is available, the default is to use
the builtin library for Unicode builds, and the system library otherwise.
It is possible to use the other if preferred by selecting it when building
the wxWidgets.
-
+
@library{wxbase}
@category{data}
-
+
@seealso
wxRegEx::ReplaceFirst
*/
-class wxRegEx
+class wxRegEx
{
public:
//@{
/**
- Create and compile the regular expression, use
+ Create and compile the regular expression, use
IsValid() to test for compilation errors.
*/
wxRegEx();
- wxRegEx(const wxString& expr, int flags = wxRE_DEFAULT);
+ wxRegEx(const wxString& expr, int flags = wxRE_DEFAULT);
//@}
/**
~wxRegEx();
/**
- Compile the string into regular expression, return @true if ok or @false
+ Compile the string into regular expression, return @true if ok or @false
if string has a syntax error.
*/
bool Compile(const wxString& pattern, int flags = wxRE_DEFAULT);
Returns the part of string corresponding to the match where @e index is
interpreted as above. Empty string is returned if match failed
- May only be called after successful call to Matches()
- and only if @c wxRE_NOSUB was @b not used in
+ May only be called after successful call to Matches()
+ and only if @c wxRE_NOSUB was @b not used in
Compile().
*/
bool GetMatch(size_t* start, size_t* len, size_t index = 0);
- not wxString GetMatch(const wxString& text,
- size_t index = 0);
+ not wxString GetMatch(const wxString& text,
+ size_t index = 0);
//@}
/**
size_t GetMatchCount();
/**
- Return @true if this is a valid compiled regular expression, @false
+ Return @true if this is a valid compiled regular expression, @false
otherwise.
*/
bool IsValid();
May only be called after successful call to Compile().
*/
bool Matches(const wxChar* text, int flags = 0);
- bool Matches(const wxChar* text, int flags, size_t len);
- bool Matches(const wxString& text, int flags = 0);
+ bool Matches(const wxChar* text, int flags, size_t len);
+ bool Matches(const wxString& text, int flags = 0);
//@}
/**
size_t maxMatches = 0);
/**
- Replace all occurrences: this is actually a synonym for
+ Replace all occurrences: this is actually a synonym for
Replace().
@sa ReplaceFirst()
/**
@class wxRegionIterator
@wxheader{region.h}
-
+
This class is used to iterate through the rectangles in a region,
typically when examining the damaged regions of a window within an OnPaint call.
-
+
To use it, construct an iterator object on the stack and loop through the
regions, testing the object and incrementing the iterator at the end of the
loop.
-
+
See wxPaintEvent for an example of use.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxPaintEvent
*/
Creates an iterator object given a region.
*/
wxRegionIterator();
- wxRegionIterator(const wxRegion& region);
+ wxRegionIterator(const wxRegion& region);
//@}
/**
Resets the iterator to the given region.
*/
void Reset();
- void Reset(const wxRegion& region);
+ void Reset(const wxRegion& region);
//@}
/**
You can use this to test the iterator object as if it were of type bool.
*/
- operator bool();
+ operator bool();
};
/**
@class wxRegion
@wxheader{region.h}
-
+
A wxRegion represents a simple or complex region on a device context or window.
-
+
This class uses @ref overview_trefcount "reference counting and copy-on-write"
internally so that assignments between two instances of this class are very
cheap. You can therefore use actual objects instead of pointers without
efficiency problems. If an instance of this class is changed it will create
its own data internally so that other instances, which previously shared the
data using the reference counting, are not affected.
-
+
@library{wxcore}
@category{data}
-
+
@seealso
wxRegionIterator
*/
Union() for more details.
*/
wxRegion();
- wxRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight);
- wxRegion(const wxRect& rect);
- wxRegion(const wxRegion& region);
- wxRegion(size_t n, const wxPoint points,
- int fillStyle = wxWINDING_RULE);
- wxRegion(const wxBitmap& bmp);
- wxRegion(const wxBitmap& bmp, const wxColour& transColour,
- int tolerance = 0);
+ wxRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+ wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight);
+ wxRegion(const wxRect& rect);
+ wxRegion(const wxRegion& region);
+ wxRegion(size_t n, const wxPoint points,
+ int fillStyle = wxWINDING_RULE);
+ wxRegion(const wxBitmap& bmp);
+ wxRegion(const wxBitmap& bmp, const wxColour& transColour,
+ int tolerance = 0);
//@}
/**
wxInRegion.
*/
wxRegionContain Contains(long& x, long& y);
- wxRegionContain Contains(const wxPoint& pt);
- wxRegionContain Contains(long& x, long& y,
- long& width,
- long& height);
- wxRegionContain Contains(const wxRect& rect);
+ wxRegionContain Contains(const wxPoint& pt);
+ wxRegionContain Contains(long& x, long& y,
+ long& width,
+ long& height);
+ wxRegionContain Contains(const wxRect& rect);
//@}
/**
*/
void GetBox(wxCoord& x, wxCoord& y, wxCoord& width,
wxCoord& height);
- wxRect GetBox();
+ wxRect GetBox();
//@}
//@{
*/
bool Intersect(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
- bool Intersect(const wxRect& rect);
- bool Intersect(const wxRegion& region);
+ bool Intersect(const wxRect& rect);
+ bool Intersect(const wxRegion& region);
//@}
/**
then).
*/
bool Offset(wxCoord x, wxCoord y);
- bool Offset(const wxPoint& pt);
+ bool Offset(const wxPoint& pt);
//@}
//@{
this region.
*/
bool Subtract(const wxRect& rect);
- bool Subtract(const wxRegion& region);
+ bool Subtract(const wxRegion& region);
//@}
//@{
region.
*/
bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- bool Union(const wxRect& rect);
- bool Union(const wxRegion& region);
- bool Union(const wxBitmap& bmp);
- bool Union(const wxBitmap& bmp, const wxColour& transColour,
- int tolerance = 0);
+ bool Union(const wxRect& rect);
+ bool Union(const wxRegion& region);
+ bool Union(const wxBitmap& bmp);
+ bool Union(const wxBitmap& bmp, const wxColour& transColour,
+ int tolerance = 0);
//@}
//@{
areas. The result is stored in this region.
*/
bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- bool Xor(const wxRect& rect);
- bool Xor(const wxRegion& region);
+ bool Xor(const wxRect& rect);
+ bool Xor(const wxRegion& region);
//@}
/**
/**
@class wxSplitterRenderParams
@wxheader{renderer.h}
-
- This is just a simple @c struct used as a return value of
+
+ This is just a simple @c struct used as a return value of
wxRendererNative::GetSplitterParams.
-
+
It doesn't have any methods and all of its fields are constant and so can be
only examined but not modified.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxSplitterRenderParams
+class wxSplitterRenderParams
{
public:
/**
/**
@class wxDelegateRendererNative
@wxheader{renderer.h}
-
- wxDelegateRendererNative allows reuse of renderers code by forwarding all the
+
+ wxDelegateRendererNative allows reuse of renderers code by forwarding all the
wxRendererNative methods to the given object and
thus allowing you to only modify some of its methods -- without having to
reimplement all of them.
-
+
Note that the "normal'', inheritance-based approach, doesn't work with the
renderers as it is impossible to derive from a class unknown at compile-time
and the renderer is only chosen at run-time. So suppose that you want to only
class which you want to customize might not even be written yet when you write
your code (it could be written later and loaded from a DLL during run-time), is
by using this class.
-
- Except for the constructor, it has exactly the same methods as
+
+ Except for the constructor, it has exactly the same methods as
wxRendererNative and their implementation is
trivial: they are simply forwarded to the real renderer. Note that the "real''
renderer may, in turn, be a wxDelegateRendererNative as well and that there may
be arbitrarily many levels like this -- but at the end of the chain there must
be a real renderer which does the drawing.
-
+
@library{wxcore}
@category{FIXME}
*/
@e rendererNative.
*/
wxDelegateRendererNative();
- wxDelegateRendererNative(wxRendererNative& rendererNative);
+ wxDelegateRendererNative(wxRendererNative& rendererNative);
//@}
/**
- This class also provides all the virtual methods of
+ This class also provides all the virtual methods of
wxRendererNative, please refer to that class
documentation for the details.
*/
- DrawXXX(...);
+ DrawXXX(...);
};
/**
@class wxRendererNative
@wxheader{renderer.h}
-
+
First, a brief introduction to wxRenderer and why it is needed.
-
+
Usually wxWidgets uses the underlying low level GUI system to draw all the
controls - this is what we mean when we say that it is a "native'' framework.
However not all controls exist under all (or even any) platforms and in this
case wxWidgets provides a default, generic, implementation of them written in
wxWidgets itself.
-
+
These controls don't have the native appearance if only the standard
line drawing and other graphics primitives are used, because the native
appearance is different under different platforms while the lines are always
drawn in the same way.
-
+
This is why we have renderers: wxRenderer is a class which virtualizes the
drawing, i.e. it abstracts the drawing operations and allows you to draw say, a
button, without caring about exactly how this is done. Of course, as we
can draw the button differently in different renderers, this also allows us to
emulate the native look and feel.
-
+
So the renderers work by exposing a large set of high-level drawing functions
which are used by the generic controls. There is always a default global
- renderer but it may be changed or extended by the user, see
+ renderer but it may be changed or extended by the user, see
@ref overview_samplerender "Render sample".
-
+
All drawing functions take some standard parameters:
-
+
@e win is the window being drawn. It is normally not used and when
- it is it should only be used as a generic wxWindow
+ it is it should only be used as a generic wxWindow
(in order to get its low level handle, for example), but you should
not assume that it is of some given type as the same renderer
function may be reused for drawing different kinds of control.
@e rect the bounding rectangle for the element to be drawn.
@e flags the optional flags (none by default) which can be a
combination of the @c wxCONTROL_XXX constants below.
-
+
Note that each drawing function restores the wxDC attributes if
it changes them, so it is safe to assume that the same pen, brush and colours
that were active before the call to this function are still in effect after it.
-
+
@library{wxcore}
@category{gdi}
*/
-class wxRendererNative
+class wxRendererNative
{
public:
/**
/**
Draw a focus rectangle using the specified rectangle.
- wxListCtrl. The only supported flags is
+ wxListCtrl. The only supported flags is
@c wxCONTROL_SELECTED for items which are selected.
*/
void DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect,
wxHeaderButtonParams* params = @NULL);
/**
- Draw a selection rectangle underneath the text as used e.g. in a
+ Draw a selection rectangle underneath the text as used e.g. in a
wxListCtrl. The supported @e flags are
@c wxCONTROL_SELECTED for items which are selected (e.g. often a blue
rectangle) and @c wxCONTROL_CURRENT for the item that has the focus
/**
Return the default (native) implementation for this platform -- this is also
- the one used by default but this may be changed by calling
+ the one used by default but this may be changed by calling
Set() in which case the return value of this
method may be different from the return value of Get().
*/
/**
Returns the height of a header button, either a fixed platform height if
- available, or a
+ available, or a
generic height based on the window's font.
*/
int GetHeaderButtonHeight(const wxWindow* win);
/**
- Get the splitter parameters, see
+ Get the splitter parameters, see
wxSplitterRenderParams.
*/
wxSplitterRenderParams GetSplitterParams(const wxWindow* win);
/**
- This function is used for version checking: Load()
+ This function is used for version checking: Load()
refuses to load any shared libraries implementing an older or incompatible
version.
The implementation of this method is always the same in all renderers (simply
- construct wxRendererVersion using the
+ construct wxRendererVersion using the
@c wxRendererVersion::Current_XXX values), but it has to be in the derived,
not base, class, to detect mismatches between the renderers versions and so you
have to implement it anew in all renderers.
deleted by caller if not @NULL when it is not used any more.
The @e name should be just the base name of the renderer and not the full
- name of the DLL file which is constructed differently (using
- wxDynamicLibrary::CanonicalizePluginName)
+ name of the DLL file which is constructed differently (using
+ wxDynamicLibrary::CanonicalizePluginName)
on different systems.
*/
wxRendererNative* Load(const wxString& name);
/**
@class wxRendererVersion
@wxheader{renderer.h}
-
- This simple struct represents the wxRendererNative
- interface version and is only used as the return value of
+
+ This simple struct represents the wxRendererNative
+ interface version and is only used as the return value of
wxRendererNative::GetVersion.
-
+
The version has two components: the version itself and the age. If the main
program and the renderer have different versions they are never compatible with
each other because the version is only changed when an existing virtual
using a common C++ object model, the calling program is compatible with any
renderer which has the age greater or equal to its age. This verification is
done by IsCompatible method.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxRendererVersion
+class wxRendererVersion
{
public:
/**
- Checks if the main program is compatible with the renderer having the version
+ Checks if the main program is compatible with the renderer having the version
@e ver, returns @true if it is and @false otherwise.
- This method is used by
+ This method is used by
wxRendererNative::Load to determine whether a
renderer can be used.
*/
/**
@class wxRichTextBuffer
@headerfile richtextbuffer.h wx/richtext/richtextbuffer.h
-
+
This class represents the whole buffer associated with a wxRichTextCtrl.
-
+
@library{wxrichtext}
@category{FIXME}
-
+
@seealso
wxTextAttr, wxRichTextCtrl
*/
-class wxRichTextBuffer
+class wxRichTextBuffer
{
public:
//@{
Default constructors.
*/
wxRichTextBuffer(const wxRichTextBuffer& obj);
- wxRichTextBuffer();
+ wxRichTextBuffer();
//@}
/**
to add more if further notification is required. All handlers are notified
of an event originating from the buffer, such as the replacement of a style
sheet
- during loading. The buffer never deletes any of the event handlers, unless
+ during loading. The buffer never deletes any of the event handlers, unless
RemoveEventHandler() is
called with @true as the second argument.
*/
*/
bool ClearListStyle(const wxRichTextRange& range,
int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
- bool ClearListStyle(const wxRichTextRange& range,
- int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
+ bool ClearListStyle(const wxRichTextRange& range,
+ int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
//@}
/**
Dumps the contents of the buffer for debugging purposes.
*/
void Dump();
- void Dump(wxTextOutputStream& stream);
+ void Dump(wxTextOutputStream& stream);
//@}
/**
Finds a handler by name.
*/
wxRichTextFileHandler* FindHandler(int imageType);
- wxRichTextFileHandler* FindHandler(const wxString& extension,
- int imageType);
- wxRichTextFileHandler* FindHandler(const wxString& name);
+ wxRichTextFileHandler* FindHandler(const wxString& extension,
+ int imageType);
+ wxRichTextFileHandler* FindHandler(const wxString& name);
//@}
/**
Finds a handler by filename or, if supplied, type.
*/
wxRichTextFileHandler* FindHandlerFilenameOrType(const wxString& filename,
- int imageType);
+ int imageType);
/**
Gets the basic (overall) style. This is the style of the whole
*/
bool LoadFile(wxInputStream& stream,
int type = wxRICHTEXT_TYPE_ANY);
- bool LoadFile(const wxString& filename,
- int type = wxRICHTEXT_TYPE_ANY);
+ bool LoadFile(const wxString& filename,
+ int type = wxRICHTEXT_TYPE_ANY);
//@}
/**
int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
int startFrom = -1,
int listLevel = -1);
- bool Number(const wxRichTextRange& range,
- const wxString& styleName,
- int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
- int startFrom = -1,
- int listLevel = -1);
+ bool Number(const wxRichTextRange& range,
+ const wxString& styleName,
+ int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
+ int startFrom = -1,
+ int listLevel = -1);
//@}
/**
const wxRichTextListStyleDefinition* style,
int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
int listLevel = -1);
- bool PromoteList(int promoteBy, const wxRichTextRange& range,
- const wxString& styleName,
- int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
- int listLevel = -1);
+ bool PromoteList(int promoteBy, const wxRichTextRange& range,
+ const wxString& styleName,
+ int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
+ int listLevel = -1);
//@}
/**
*/
bool SaveFile(wxOutputStream& stream,
int type = wxRICHTEXT_TYPE_ANY);
- bool SaveFile(const wxString& filename,
- int type = wxRICHTEXT_TYPE_ANY);
+ bool SaveFile(const wxString& filename,
+ int type = wxRICHTEXT_TYPE_ANY);
//@}
/**
int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
int startFrom = -1,
int listLevel = -1);
- bool SetListStyle(const wxRichTextRange& range,
- const wxString& styleName,
- int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
- int startFrom = -1,
- int listLevel = -1);
+ bool SetListStyle(const wxRichTextRange& range,
+ const wxString& styleName,
+ int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
+ int startFrom = -1,
+ int listLevel = -1);
//@}
/**
/**
@class wxRichTextFileHandler
@headerfile richtextbuffer.h wx/richtext/richtextbuffer.h
-
+
This is the base class for file handlers, for loading and/or saving content
associated with a wxRichTextBuffer.
-
+
@library{wxrichtext}
@category{FIXME}
*/
loading.
*/
bool LoadFile(wxRichTextBuffer* buffer, wxInputStream& stream);
- bool LoadFile(wxRichTextBuffer* buffer,
- const wxString& filename);
+ bool LoadFile(wxRichTextBuffer* buffer,
+ const wxString& filename);
//@}
//@{
Saves content to a stream or file. Not all handlers will implement file saving.
*/
bool SaveFile(wxRichTextBuffer* buffer, wxOutputStream& stream);
- bool SaveFile(wxRichTextBuffer* buffer,
- const wxString& filename);
+ bool SaveFile(wxRichTextBuffer* buffer,
+ const wxString& filename);
//@}
/**
/**
@class wxRichTextRange
@headerfile richtextbuffer.h wx/richtext/richtextbuffer.h
-
+
This class stores beginning and end positions for a range of data.
-
+
@library{wxrichtext}
@category{FIXME}
*/
-class wxRichTextRange
+class wxRichTextRange
{
public:
//@{
Constructors.
*/
wxRichTextRange(long start, long end);
- wxRichTextRange(const wxRichTextRange& range);
- wxRichTextRange();
+ wxRichTextRange(const wxRichTextRange& range);
+ wxRichTextRange();
//@}
/**
/**
@class wxRichTextEvent
@headerfile richtextctrl.h wx/richtext/richtextctrl.h
-
+
This is the event class for wxRichTextCtrl notifications.
-
+
@library{wxrichtext}
@category{events}
*/
Constructors.
*/
wxRichTextEvent(const wxRichTextEvent& event);
- wxRichTextEvent(wxEventType commandType = wxEVT_@NULL,
- int winid = 0);
+ wxRichTextEvent(wxEventType commandType = wxEVT_@NULL,
+ int winid = 0);
//@}
/**
/**
@class wxRichTextCtrl
@headerfile richtextctrl.h wx/richtext/richtextctrl.h
-
+
wxRichTextCtrl provides a generic, ground-up implementation of a text control
capable of showing multiple styles and images.
-
+
wxRichTextCtrl sends notification events: see wxRichTextEvent.
It also sends the standard wxTextCtrl events wxEVT_COMMAND_TEXT_ENTER and
wxEVT_COMMAND_TEXT_UPDATED,
and wxTextUrlEvent when URL content is clicked.
-
+
For more information, see the @ref overview_wxrichtextctrloverview
"wxRichTextCtrl overview".
-
+
@library{wxrichtext}
@category{ctrl}
@appearance{richtextctrl.png}
*/
-class wxRichTextCtrl
+class wxRichTextCtrl
{
public:
//@{
Constructors.
*/
wxRichTextCtrl();
- wxRichTextCtrl(wxWindow* parent, wxWindowID id = wxID_ANY,
- const wxString& value = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxRE_MULTILINE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxTextCtrlNameStr);
+ wxRichTextCtrl(wxWindow* parent, wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxRE_MULTILINE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxTextCtrlNameStr);
//@}
/**
*/
bool ClearListStyle(const wxRichTextRange& range,
int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
- bool ClearListStyle(const wxRichTextRange& range,
- int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
+ bool ClearListStyle(const wxRichTextRange& range,
+ int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
//@}
/**
Returns the buffer associated with the control.
*/
const wxRichTextBuffer GetBuffer();
- wxRichTextBuffer GetBuffer();
+ wxRichTextBuffer GetBuffer();
//@}
/**
scrolling).
*/
wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long* pos);
- wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
- wxTextCoord* col,
- wxTextCoord* row);
+ wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
+ wxTextCoord* col,
+ wxTextCoord* row);
//@}
/**
int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
int startFrom = -1,
int listLevel = -1);
- bool Number(const wxRichTextRange& range,
- const wxString& styleName,
- int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
- int startFrom = -1,
- int listLevel = -1);
+ bool Number(const wxRichTextRange& range,
+ const wxString& styleName,
+ int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
+ int startFrom = -1,
+ int listLevel = -1);
//@}
/**
const wxRichTextListStyleDefinition* style,
int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
int listLevel = -1);
- bool PromoteList(int promoteBy, const wxRichTextRange& range,
- const wxString& styleName,
- int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
- int listLevel = -1);
+ bool PromoteList(int promoteBy, const wxRichTextRange& range,
+ const wxString& styleName,
+ int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
+ int listLevel = -1);
//@}
/**
int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
int startFrom = -1,
int listLevel = -1);
- bool SetListStyle(const wxRichTextRange& range,
- const wxString& styleName,
- int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
- int startFrom = -1,
- int listLevel = -1);
+ bool SetListStyle(const wxRichTextRange& range,
+ const wxString& styleName,
+ int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO,
+ int startFrom = -1,
+ int listLevel = -1);
//@}
/**
*/
bool SetStyle(const wxRichTextRange& range,
const wxTextAttr& style);
- bool SetStyle(long start, long end, const wxTextAttr& style);
+ bool SetStyle(long start, long end, const wxTextAttr& style);
//@}
//@{
bool SetStyleEx(const wxRichTextRange& range,
const wxTextAttr& style,
int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
- bool SetStyleEx(long start, long end,
- const wxTextAttr& style,
- int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
+ bool SetStyleEx(long start, long end,
+ const wxTextAttr& style,
+ int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
//@}
/**
for internal and file storage of the raw data.
*/
bool WriteImage(const wxString& filename, int bitmapType);
- bool WriteImage(const wxRichTextImageBlock& imageBlock);
- bool WriteImage(const wxBitmap& bitmap,
- int bitmapType = wxBITMAP_TYPE_PNG);
- bool WriteImage(const wxImage& image,
- int bitmapType = wxBITMAP_TYPE_PNG);
+ bool WriteImage(const wxRichTextImageBlock& imageBlock);
+ bool WriteImage(const wxBitmap& bitmap,
+ int bitmapType = wxBITMAP_TYPE_PNG);
+ bool WriteImage(const wxImage& image,
+ int bitmapType = wxBITMAP_TYPE_PNG);
//@}
/**
/**
@class wxRichTextFormattingDialogFactory
@headerfile richtextformatdlg.h wx/richtext/richtextformatdlg.h
-
+
This class provides pages for wxRichTextFormattingDialog, and allows other
customization of the dialog.
A default instance of this class is provided automatically. If you wish to
class,
override one or more functions, and call the static function
wxRichTextFormattingDialog::SetFormattingDialogFactory.
-
+
@library{wxrichtext}
@category{FIXME}
*/
/**
@class wxRichTextFormattingDialog
@headerfile richtextformatdlg.h wx/richtext/richtextformatdlg.h
-
+
This dialog allows the user to edit a character and/or paragraph style.
-
+
In the constructor, specify the pages that will be created. Use GetStyle
to retrieve the common style for a given range, and then use ApplyStyle
to apply the user-selected formatting to a control. For example:
-
+
@code
wxRichTextRange range;
if (m_richTextCtrl-HasSelection())
range = m_richTextCtrl-GetSelectionRange();
else
range = wxRichTextRange(0, m_richTextCtrl-GetLastPosition()+1);
-
+
int pages =
wxRICHTEXT_FORMAT_FONT|wxRICHTEXT_FORMAT_INDENTS_SPACING|wxRICHTEXT_FORMAT_TABS|wxRICHTEXT_FORMAT_BULLETS;
-
+
wxRichTextFormattingDialog formatDlg(pages, this);
formatDlg.GetStyle(m_richTextCtrl, range);
-
+
if (formatDlg.ShowModal() == wxID_OK)
{
formatDlg.ApplyStyle(m_richTextCtrl, range);
}
@endcode
-
+
@library{wxrichtext}
@category{cmndlg}
*/
/**
Constructors.
- @param flags
+ @param flags
The pages to show.
- @param parent
+ @param parent
The dialog's parent.
- @param id
+ @param id
The dialog's identifier.
- @param title
+ @param title
The dialog's caption.
- @param pos
+ @param pos
The dialog's position.
- @param size
+ @param size
The dialog's size.
- @param style
+ @param style
The dialog's window style.
*/
wxRichTextFormattingDialog(long flags, wxWindow* parent);
- const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE)
- wxRichTextFormattingDialog();
+ const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE)
+ wxRichTextFormattingDialog();
//@}
/**
bool Create(long flags, wxWindow* parent, const wxString& title,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& sz = wxDefaultSize,
- long style = wxDEFAULT_DIALOG_STYLE);
+ const wxSize& sz = wxDefaultSize,
+ long style = wxDEFAULT_DIALOG_STYLE);
//@{
/**
Gets the attributes being edited.
*/
const wxTextAttr GetAttributes();
- wxTextAttr GetAttributes();
+ wxTextAttr GetAttributes();
//@}
/**
/**
@class wxRichTextHTMLHandler
@headerfile richtexthtml.h wx/richtext/richtexthtml.h
-
+
Handles HTML output (only) for wxRichTextCtrl content.
-
+
The most flexible way to use this class is to create a temporary object and call
its functions directly, rather than use wxRichTextBuffer::SaveFile or
wxRichTextCtrl::SaveFile.
-
+
Image handling requires a little extra work from the application, to choose an
appropriate image format for the target HTML viewer and to clean up the
temporary images
later. If you are planning to load the HTML into a standard web browser, you can
specify the handler flag wxRICHTEXT_HANDLER_SAVE_IMAGES_TO_BASE64 (the default)
and no extra work is required: the images will be written with the HTML.
-
+
However, if you want wxHTML compatibility, you will need to use
wxRICHTEXT_HANDLER_SAVE_IMAGES_TO_MEMORY
or wxRICHTEXT_HANDLER_SAVE_IMAGES_TO_FILES. In this case, you must either call
locations and delete them yourself when appropriate. You can call
wxRichTextHTMLHandler::GetTemporaryImageLocations to
get the array of temporary image names.
-
+
@library{wxrichtext}
@category{FIXME}
*/
for example after the user has viewed the HTML file.
*/
bool DeleteTemporaryImages();
- bool DeleteTemporaryImages(int flags,
- const wxArrayString& imageLocations);
+ bool DeleteTemporaryImages(int flags,
+ const wxArrayString& imageLocations);
//@}
/**
/**
@class wxRichTextHeaderFooterData
@headerfile richtextprint.h wx/richtext/richtextprint.h
-
-
+
+
This class represents header and footer data to be passed to the
wxRichTextPrinting and
wxRichTextPrintout classes.
-
+
Headers and footers can be specified independently for odd, even or both page
sides. Different text can be specified
for left, centre and right locations on the page, and the font and text colour
be specified. You can specify the following keywords in header and footer text,
which will
be substituted for the actual values during printing and preview.
-
+
@DATE@: the current date.
@PAGESCNT@: the total number of pages.
@PAGENUM@: the current page number.
@TIME@: the current time.
@TITLE@: the title of the document, as passed to the wxRichTextPrinting or
wxRichTextLayout constructor.
-
+
@library{wxrichtext}
@category{FIXME}
*/
Constructors.
*/
wxRichTextHeaderFooterData();
- wxRichTextHeaderFooterData(const wxRichTextHeaderFooterData& data);
+ wxRichTextHeaderFooterData(const wxRichTextHeaderFooterData& data);
//@}
/**
/**
@class wxRichTextPrintout
@headerfile richtextprint.h wx/richtext/richtextprint.h
-
+
This class implements print layout for wxRichTextBuffer. Instead of using it
directly, you
should normally use the wxRichTextPrinting class.
-
+
@library{wxrichtext}
@category{FIXME}
*/
/**
@class wxRichTextPrinting
@headerfile richtextprint.h wx/richtext/richtextprint.h
-
+
This class provides a simple interface for performing wxRichTextBuffer printing
and previewing. It uses wxRichTextPrintout for layout and rendering.
-
+
@library{wxrichtext}
@category{FIXME}
*/
/**
@class wxRichTextStyleOrganiserDialog
@headerfile richtextstyledlg.h wx/richtext/richtextstyledlg.h
-
+
This class shows a style sheet and allows the user to edit, add and remove
styles.
It can also be used as a style browser, for example if the application is not
using a permanent wxRichTextStyleComboCtrl or wxRichTextStyleListCtrl to
present styles.
-
+
@library{wxrichtext}
@category{FIXME}
*/
wxRichTextCtrl* ctrl,
wxWindow* parent,
wxWindowID id = wxID_ANY);
- const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX)
- wxRichTextStyleOrganiserDialog();
+ const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX)
+ wxRichTextStyleOrganiserDialog();
//@}
/**
/**
@class wxRichTextStyleListCtrl
@headerfile richtextstyles.h wx/richtext/richtextstyles.h
-
+
This class incorporates a wxRichTextStyleListBox and
a choice control that allows the user to select the category of style to view.
It is demonstrated in the wxRichTextCtrl sample in @c samples/richtext.
-
+
To use wxRichTextStyleListCtrl, add the control to your window hierarchy and
call wxRichTextStyleListCtrl::SetStyleType with
one of wxRichTextStyleListBox::wxRICHTEXT_STYLE_ALL,
Associate the control with a style sheet and rich text control with
SetStyleSheet and SetRichTextCtrl,
so that when a style is double-clicked, it is applied to the selection.
-
+
@beginStyleTable
@style{wxRICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR}:
This style hides the category selection control.
@endStyleTable
-
+
@library{wxrichtext}
@category{FIXME}
*/
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0);
- wxRichTextStyleListCtrl();
+ wxRichTextStyleListCtrl();
//@}
/**
/**
@class wxRichTextStyleDefinition
@headerfile richtextstyles.h wx/richtext/richtextstyles.h
-
+
This is a base class for paragraph and character styles.
-
+
@library{wxrichtext}
@category{FIXME}
*/
Returns the attributes associated with this style.
*/
wxTextAttr GetStyle();
- const wxTextAttr GetStyle();
+ const wxTextAttr GetStyle();
//@}
/**
/**
@class wxRichTextParagraphStyleDefinition
@headerfile richtextstyles.h wx/richtext/richtextstyles.h
-
+
This class represents a paragraph style definition, usually added to a
wxRichTextStyleSheet.
-
+
@library{wxrichtext}
@category{FIXME}
*/
/**
@class wxRichTextStyleListBox
@headerfile richtextstyles.h wx/richtext/richtextstyles.h
-
+
This is a listbox that can display the styles in a wxRichTextStyleSheet,
and apply the selection to an associated wxRichTextCtrl.
-
+
See @c samples/richtext for an example of how to use it.
-
+
@library{wxrichtext}
@category{FIXME}
-
+
@seealso
wxRichTextStyleComboCtrl, @ref overview_wxrichtextctrloverview "wxRichTextCtrl
overview"
/**
@class wxRichTextStyleComboCtrl
@headerfile richtextstyles.h wx/richtext/richtextstyles.h
-
+
This is a combo control that can display the styles in a wxRichTextStyleSheet,
and apply the selection to an associated wxRichTextCtrl.
-
+
See @c samples/richtext for an example of how to use it.
-
+
@library{wxrichtext}
@category{FIXME}
-
+
@seealso
wxRichTextStyleListBox, @ref overview_wxrichtextctrloverview "wxRichTextCtrl
overview"
/**
@class wxRichTextCharacterStyleDefinition
@headerfile richtextstyles.h wx/richtext/richtextstyles.h
-
+
This class represents a character style definition, usually added to a
wxRichTextStyleSheet.
-
+
@library{wxrichtext}
@category{FIXME}
*/
/**
@class wxRichTextListStyleDefinition
@headerfile richtextstyles.h wx/richtext/richtextstyles.h
-
+
This class represents a list style definition, usually added to a
wxRichTextStyleSheet.
-
+
The class inherits paragraph attributes from
wxRichTextStyleParagraphDefinition, and adds 10 further attribute objects, one for each level of a list.
When applying a list style to a paragraph, the list style's base and
appropriate level attributes are merged with the
paragraph's existing attributes.
-
+
You can apply a list style to one or more paragraphs using
wxRichTextCtrl::SetListStyle. You
can also use the functions wxRichTextCtrl::NumberList,
- wxRichTextCtrl::PromoteList and
+ wxRichTextCtrl::PromoteList and
wxRichTextCtrl::ClearListStyle. As usual, there are wxRichTextBuffer versions
of these functions
so that you can apply them directly to a buffer without requiring a control.
-
+
@library{wxrichtext}
@category{FIXME}
*/
form is for convenient setting of the most commonly-used attributes.
*/
void SetLevelAttributes(int level, const wxTextAttr& attr);
- void SetLevelAttributes(int level, int leftIndent,
- int leftSubIndent,
- int bulletStyle,
- const wxString& bulletSymbol = wxEmptyString);
+ void SetLevelAttributes(int level, int leftIndent,
+ int leftSubIndent,
+ int bulletStyle,
+ const wxString& bulletSymbol = wxEmptyString);
//@}
};
/**
@class wxRichTextStyleSheet
@headerfile richtextstyles.h wx/richtext/richtextstyles.h
-
+
A style sheet contains named paragraph and character styles that make it
easy for a user to apply combinations of attributes to a wxRichTextCtrl.
-
+
You can use a wxRichTextStyleListBox in your
user interface to show available styles to the user, and allow application
of styles to the control.
-
+
@library{wxrichtext}
@category{FIXME}
*/
/**
@class wxSymbolPickerDialog
@headerfile richtextsymboldlg.h wx/richtext/richtextsymboldlg.h
-
+
wxSymbolPickerDialog presents the user with a choice of fonts and a grid
of available characters. This modal dialog provides the application with
a selected symbol and optional font selection.
-
+
Although this dialog is contained in the rich text library, the dialog
is generic and can be used in other contexts.
-
+
To use the dialog, pass a default symbol specified as a string, an initial font
name,
and a current font name. The difference between the initial font and
to display the characters in, even when no initial font is selected.
This allows the user (and application) to distinguish between inserting a
symbol in the current font, and inserting it with a specified font.
-
+
When the dialog is dismissed, the application can get the selected symbol
with GetSymbol and test whether a font was specified with UseNormalFont,
fetching the specified font with GetFontName.
-
+
Here's a realistic example, inserting the supplied symbol into a
rich text control in either the current font or specified font.
-
+
@code
wxRichTextCtrl* ctrl = (wxRichTextCtrl*) FindWindow(ID_RICHTEXT_CTRL);
-
+
wxTextAttr attr;
attr.SetFlags(wxTEXT_ATTR_FONT);
ctrl-GetStyle(ctrl-GetInsertionPoint(), attr);
-
+
wxString currentFontName;
if (attr.HasFont() && attr.GetFont().Ok())
currentFontName = attr.GetFont().GetFaceName();
-
+
// Don't set the initial font in the dialog (so the user is choosing
// 'normal text', i.e. the current font) but do tell the dialog
// what 'normal text' is.
-
+
wxSymbolPickerDialog dlg(wxT("*"), wxEmptyString, currentFontName, this);
-
+
if (dlg.ShowModal() == wxID_OK)
{
if (dlg.HasSelection())
{
long insertionPoint = ctrl-GetInsertionPoint();
-
+
ctrl-WriteText(dlg.GetSymbol());
-
+
if (!dlg.UseNormalFont())
{
wxFont font(attr.GetFont());
}
}
@endcode
-
+
@library{wxrichtext}
@category{cmndlg}
*/
/**
Constructors.
- @param symbol
+ @param symbol
The initial symbol to show. Specify a single character in a string, or an empty
string.
- @param initialFont
+ @param initialFont
The initial font to be displayed in the font list. If empty, the item normal
text will be selected.
- @param normalTextFont
+ @param normalTextFont
The font the dialog will use to display the symbols if the initial font is
empty.
- @param parent
+ @param parent
The dialog's parent.
- @param id
+ @param id
The dialog's identifier.
- @param title
+ @param title
The dialog's caption.
- @param pos
+ @param pos
The dialog's position.
- @param size
+ @param size
The dialog's size.
- @param style
+ @param style
The dialog's window style.
*/
wxSymbolPickerDialog(const wxString& symbol,
const wxString& normalTextFont,
wxWindow* parent,
wxWindowID id = wxID_ANY);
- const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxCLOSE_BOX)
- wxSymbolPickerDialog();
+ const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxCLOSE_BOX)
+ wxSymbolPickerDialog();
//@}
/**
/**
@class wxRichTextXMLHandler
@headerfile richtextxml.h wx/richtext/richtextxml.h
-
+
A handler for loading and saving content in an XML format specific
to wxRichTextBuffer. You can either add the handler to the buffer
and load and save through the buffer or control API, or you can
create an instance of the handler on the stack and call its
functions directly.
-
+
@library{wxrichtext}
@category{FIXME}
*/
/**
@class wxSashWindow
@wxheader{sashwin.h}
-
+
wxSashWindow allows any of its edges to have a sash which can be dragged
to resize the window. The actual content window will be created by the
application
as a child of wxSashWindow. The window (or an ancestor) will be notified of a
drag
via a wxSashEvent notification.
-
+
@beginStyleTable
@style{wxSW_3D}:
Draws a 3D effect sash and border.
@style{wxSW_BORDER}:
Draws a thin black border.
@endStyleTable
-
+
@beginEventTable
@event{EVT_SASH_DRAGGED(id\, func)}:
Process a wxEVT_SASH_DRAGGED event, when the user has finished
finished dragging a sash. The event handler is called when windows
with ids in the given range have their sashes dragged.
@endEventTable
-
+
@library{wxadv}
@category{miscwnd}
-
+
@seealso
wxSashEvent, wxSashLayoutWindow, @ref overview_eventhandlingoverview "Event
handling overview"
Constructs a sash window, which can be a child of a frame, dialog or any other
non-control window.
- @param parent
+ @param parent
Pointer to a parent window.
- @param id
+ @param id
Window identifier. If -1, will automatically create an identifier.
- @param pos
+ @param pos
Window position. wxDefaultPosition is (-1, -1) which indicates that
wxSashWindows
should generate a default position for the window. If using the wxSashWindow
class directly, supply
an actual position.
- @param size
+ @param size
Window size. wxDefaultSize is (-1, -1) which indicates that wxSashWindows
should generate a default size for the window.
- @param style
+ @param style
Window style. For window styles, please see wxSashWindow.
- @param name
+ @param name
Window name.
*/
wxSashWindow();
- wxSashWindow(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxCLIP_CHILDREN | wxSW_3D,
- const wxString& name = "sashWindow");
+ wxSashWindow(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxCLIP_CHILDREN | wxSW_3D,
+ const wxString& name = "sashWindow");
//@}
/**
/**
Returns @true if a sash is visible on the given edge, @false otherwise.
- @param edge
+ @param edge
Edge. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.
@sa SetSashVisible()
Returns @true if the sash has a border, @false otherwise.
This function is obsolete since the sash border property is unused.
- @param edge
+ @param edge
Edge. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.
@sa SetSashBorder()
Call this function to give the sash a border, or remove the border.
This function is obsolete since the sash border property is unused.
- @param edge
+ @param edge
Edge to change. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.
- @param hasBorder
+ @param hasBorder
@true to give the sash a border visible, @false to remove it.
*/
void SetSashBorder(wxSashEdgePosition edge, bool hasBorder);
/**
Call this function to make a sash visible or invisible on a particular edge.
- @param edge
+ @param edge
Edge to change. One of wxSASH_TOP, wxSASH_RIGHT, wxSASH_BOTTOM, wxSASH_LEFT.
- @param visible
+ @param visible
@true to make the sash visible, @false to make it invisible.
@sa GetSashVisible()
/**
@class wxSashEvent
@wxheader{sashwin.h}
-
+
A sash event is sent when the sash of a wxSashWindow has been
dragged by the user.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
wxSashWindow, @ref overview_eventhandlingoverview "Event handling overview"
*/
/**
@class wxTCPServer
@wxheader{sckipc.h}
-
+
A wxTCPServer object represents the server part of a client-server conversation.
It emulates a DDE-style protocol, but uses TCP/IP which is available on most
platforms.
-
+
A DDE-based implementation for Windows is available using wxDDEServer.
-
+
@library{wxnet}
@category{FIXME}
-
+
@seealso
wxTCPClient, wxTCPConnection, @ref overview_ipcoverview "IPC overview"
*/
/**
@class wxTCPClient
@wxheader{sckipc.h}
-
+
A wxTCPClient object represents the client part of a client-server conversation.
It emulates a DDE-style protocol, but uses TCP/IP which is available on most
platforms.
-
+
A DDE-based implementation for Windows is available using wxDDEClient.
-
+
To create a client which can communicate with a suitable server,
you need to derive a class from wxTCPConnection and another from wxTCPClient.
The custom wxTCPConnection class will intercept communications in
a 'conversation' with a server, and the custom wxTCPServer is required
so that a user-overridden wxTCPClient::OnMakeConnection member can return
a wxTCPConnection of the required class, when a connection is made.
-
+
@library{wxnet}
@category{FIXME}
-
+
@seealso
wxTCPServer, wxTCPConnection, @ref overview_ipcoverview "Interprocess
communications overview"
/**
@class wxTCPConnection
@wxheader{sckipc.h}
-
+
A wxTCPClient object represents the connection between a client and a server.
It emulates a DDE-style protocol, but uses TCP/IP which is available on most
platforms.
-
+
A DDE-based implementation for Windows is available using wxDDEConnection.
-
+
A wxTCPConnection object can be created by making a connection using a
wxTCPClient object, or by the acceptance of a connection by a
wxTCPServer object. The bulk of a conversation is controlled by
calling members in a @b wxTCPConnection object or by overriding its
members.
-
+
An application should normally derive a new connection class from
wxTCPConnection, in order to override the communication event handlers
to do something interesting.
-
+
@library{wxnet}
@category{FIXME}
-
+
@seealso
wxTCPClient, wxTCPServer, @ref overview_ipcoverview "Interprocess
communications overview"
transactions.
*/
wxTCPConnection();
- wxTCPConnection(void* buffer, size_t size);
+ wxTCPConnection(void* buffer, size_t size);
//@}
//@{
/**
Called by the server application to advise the client of a change in
the data associated with the given item. Causes the client
- connection's OnAdvise()
+ connection's OnAdvise()
member to be called. Returns @true if successful.
*/
bool Advise(const wxString& item, const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
- bool Advise(const wxString& item, const char* data);
- bool Advise(const wxString& item, const wchar_t* data);
- bool Advise(const wxString& item, const wxString data);
+ bool Advise(const wxString& item, const char* data);
+ bool Advise(const wxString& item, const wchar_t* data);
+ bool Advise(const wxString& item, const wxString data);
//@}
/**
*/
bool Execute(const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
- bool Execute(const char* data);
- bool Execute(const wchar_t* data);
- bool Execute(const wxString data);
+ bool Execute(const char* data);
+ bool Execute(const wchar_t* data);
+ bool Execute(const wxString data);
//@}
/**
*/
bool Poke(const wxString& item, const void* data, size_t size,
wxIPCFormat format = wxIPC_PRIVATE);
- bool Poke(const wxString& item, const char* data);
- bool Poke(const wxString& item, const wchar_t* data);
- bool Poke(const wxString& item, const wxString data);
+ bool Poke(const wxString& item, const char* data);
+ bool Poke(const wxString& item, const wchar_t* data);
+ bool Poke(const wxString& item, const wxString data);
//@}
/**
/**
@class wxSocketOutputStream
@wxheader{sckstrm.h}
-
+
This class implements an output stream which writes data from
a connected socket. Note that this stream is purely sequential
and it does not support seeking.
-
+
@library{wxnet}
@category{streams}
-
+
@seealso
wxSocketBase
*/
/**
@class wxSocketInputStream
@wxheader{sckstrm.h}
-
+
This class implements an input stream which reads data from
a connected socket. Note that this stream is purely sequential
and it does not support seeking.
-
+
@library{wxnet}
@category{streams}
-
+
@seealso
wxSocketBase
*/
/////////////////////////////////////////////////////////////////////////////
- // Name: scopeguard.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- //@{
+// Name: scopeguard.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+//@{
/**
This family of macros is similar to wxON_BLOCK_EXIT
but calls a method of the given object instead of a free function.
*/
- wxON_BLOCK_EXIT_OBJ0(obj, method);
- wxON_BLOCK_EXIT_OBJ1(obj, method, p1);
- wxON_BLOCK_EXIT_OBJ2(obj, method, p1, p2);
+wxON_BLOCK_EXIT_OBJ0(obj, method);
+wxON_BLOCK_EXIT_OBJ1(obj, method, p1);
+wxON_BLOCK_EXIT_OBJ2(obj, method, p1, p2);
//@}
- //@{
+//@{
/**
This family of macros allows to ensure that the global function @e func
with 0, 1, 2 or more parameters (up to some implementaton-defined limit) is
executed on scope exit, whether due to a normal function return or because an
exception has been thrown. A typical example of its usage:
-
+
@code
void *buf = malloc(size);
wxON_BLOCK_EXIT1(free, buf);
@endcode
-
+
Please see the original article by Andrei Alexandrescu and Petru Marginean
published in December 2000 issue of C/C++ Users Journal for more
details.
-
+
@sa wxON_BLOCK_EXIT_OBJ
*/
- wxON_BLOCK_EXIT0(func);
- wxON_BLOCK_EXIT1(func, p1);
- wxON_BLOCK_EXIT2(func, p1, p2);
+wxON_BLOCK_EXIT0(func);
+wxON_BLOCK_EXIT1(func, p1);
+wxON_BLOCK_EXIT2(func, p1, p2);
//@}
/**
@class wxScrollBar
@wxheader{scrolbar.h}
-
+
A wxScrollBar is a control that represents a horizontal or
vertical scrollbar. It is distinct from the two scrollbars that some windows
provide automatically, but the two types of scrollbar share the way
events are received.
-
+
@beginStyleTable
@style{wxSB_HORIZONTAL}:
Specifies a horizontal scrollbar.
@style{wxSB_VERTICAL}:
Specifies a vertical scrollbar.
@endStyleTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{scrollbar.png}
-
+
@seealso
@ref overview_scrollingoverview "Scrolling overview", @ref
overview_eventhandlingoverview "Event handling overview", wxScrolledWindow
/**
Constructor, creating and showing a scrollbar.
- @param parent
+ @param parent
Parent window. Must be non-@NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param pos
+ @param pos
Window position. If wxDefaultPosition is specified then a default position
is chosen.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then a default size is
chosen.
- @param style
+ @param style
Window style. See wxScrollBar.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxScrollBar();
- wxScrollBar(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxSB_HORIZONTAL,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "scrollBar");
+ wxScrollBar(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSB_HORIZONTAL,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "scrollBar");
//@}
/**
/**
Sets the scrollbar properties.
- @param position
+ @param position
The position of the scrollbar in scroll units.
- @param thumbSize
+ @param thumbSize
The size of the thumb, or visible portion of the scrollbar, in scroll units.
- @param range
+ @param range
The maximum position of the scrollbar.
- @param pageSize
+ @param pageSize
The size of the page size in scroll units. This is the number of units
the scrollbar will scroll when it is paged up or down. Often it is the same as
the thumb size.
- @param refresh
+ @param refresh
@true to redraw the scrollbar, @false otherwise.
@remarks Let's say you wish to display 50 lines of text, using the same
/**
Sets the position of the scrollbar.
- @param viewStart
+ @param viewStart
The position of the scrollbar thumb.
@sa GetThumbPosition()
/**
@class wxScrolledWindow
@wxheader{scrolwin.h}
-
+
The wxScrolledWindow class manages scrolling for its client area, transforming
the coordinates according to the scrollbar positions, and setting the
scroll positions, thumb sizes and ranges according to the area in view.
-
+
Starting from version 2.4 of wxWidgets, there are several ways to use a
wxScrolledWindow. In particular, there are now three ways to set the
size of the scrolling area:
-
+
One way is to set the scrollbars directly using a call to
wxScrolledWindow::SetScrollbars.
This is the way it used to be in any previous version of wxWidgets
and it will be kept for backwards compatibility.
-
+
An additional method of manual control, which requires a little less
computation of your own, is to set the total size of the scrolling area by
calling either wxWindow::SetVirtualSize,
or wxWindow::FitInside, and setting the
- scrolling increments for it by calling
+ scrolling increments for it by calling
wxScrolledWindow::SetScrollRate.
Scrolling in some orientation is enabled by setting a non-zero increment
for it.
-
+
The most automatic and newest way is to simply let sizers determine the
scrolling area. This is now the default when you set an interior sizer
into a wxScrolledWindow with wxWindow::SetSizer.
The scrolling area will be set to the size requested by the sizer and
the scrollbars will be assigned for each orientation according to the need
- for them and the scrolling increment set by
+ for them and the scrolling increment set by
wxScrolledWindow::SetScrollRate.
As above, scrolling is only enabled in orientations with a non-zero
increment. You can influence the minimum size of the scrolled area
(calling wxScrolledWindow::SetScrollbars
has analogous effects in wxWidgets 2.4 -- in later versions it may not continue
to override the sizer)
-
+
Note: if Maximum size hints are still supported by SetVirtualSizeHints, use
them at your own dire risk. They may or may not have been removed for 2.4,
but it really only makes sense to set minimum size hints here. We should
probably replace SetVirtualSizeHints with SetMinVirtualSize or similar
and remove it entirely in future.
-
+
As with all windows, an application can draw onto a wxScrolledWindow using
a @ref overview_dcoverview "device context".
-
+
You have the option of handling the OnPaint handler
or overriding the wxScrolledWindow::OnDraw function, which is
- passed a pre-scrolled device context (prepared by
+ passed a pre-scrolled device context (prepared by
wxScrolledWindow::DoPrepareDC).
-
+
If you don't wish to calculate your own scrolling, you must call DoPrepareDC
when not drawing from
within OnDraw, to set the device origin for the device context according to the
current
scroll position.
-
+
A wxScrolledWindow will normally scroll itself and therefore its child windows
as well. It
might however be desired to scroll a different window than itself: e.g. when
purpose, you can
call wxScrolledWindow::SetTargetWindow which means that pressing
the scrollbars will scroll a different window.
-
+
Note that the underlying system knows nothing about scrolling coordinates, so
that all system
functions (mouse events, expose events, refresh calls etc) as well as the
position (10,10) and scrolls the window down 100 pixels (moving the child
window out of the visible
area), the child window will report a position of (10,-90).
-
+
@beginStyleTable
@style{wxRETAINED}:
Uses a backing pixmap to speed refreshes. Motif only.
@endStyleTable
-
+
@library{wxcore}
@category{miscwnd}
-
+
@seealso
wxScrollBar, wxClientDC, wxPaintDC, wxVScrolledWindow
*/
/**
Constructor.
- @param parent
+ @param parent
Parent window.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param pos
+ @param pos
Window position. If a position of (-1, -1) is specified then a default position
is chosen.
- @param size
+ @param size
Window size. If a size of (-1, -1) is specified then the window is sized
appropriately.
- @param style
+ @param style
Window style. See wxScrolledWindow.
- @param name
+ @param name
Window name.
@remarks The window is initially created without visible scrollbars. Call
the virtual window size should be.
*/
wxScrolledWindow();
- wxScrolledWindow(wxWindow* parent, wxWindowID id = -1,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxHSCROLL | wxVSCROLL,
- const wxString& name = "scrolledWindow");
+ wxScrolledWindow(wxWindow* parent, wxWindowID id = -1,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxHSCROLL | wxVSCROLL,
+ const wxString& name = "scrolledWindow");
//@}
/**
will have to reposition child windows yourself, if physical scrolling
is disabled.
- @param xScrolling
+ @param xScrolling
If @true, enables physical scrolling in the x direction.
- @param yScrolling
+ @param yScrolling
If @true, enables physical scrolling in the y direction.
@remarks Physical scrolling may not be available on all platforms. Where
by SetScrollbars(). A value of zero indicates no
scrolling in that direction.
- @param xUnit
+ @param xUnit
Receives the number of pixels per horizontal unit.
- @param yUnit
+ @param yUnit
Receives the number of pixels per vertical unit.
@sa SetScrollbars(), GetVirtualSize()
/**
Get the position at which the visible portion of the window starts.
- @param x
+ @param x
Receives the first visible x position in scroll units.
- @param y
+ @param y
Receives the first visible y position in scroll units.
@remarks If either of the scrollbars is not at the home position, x
opposed to the client size, which is the area of the window currently
visible).
- @param x
+ @param x
Receives the length of the scrollable window, in pixels.
- @param y
+ @param y
Receives the height of the scrollable window, in pixels.
@remarks Use wxDC::DeviceToLogicalX and wxDC::DeviceToLogicalY to
/**
Called by the default paint event handler to allow the application to define
- painting behaviour without having to worry about calling
+ painting behaviour without having to worry about calling
DoPrepareDC().
Instead of overriding this function you may also just process the paint event
virtual void OnDraw(wxDC& dc);
/**
- This function is for backwards compatibility only and simply calls
- DoPrepareDC() now. Notice that it is
+ This function is for backwards compatibility only and simply calls
+ DoPrepareDC() now. Notice that it is
not called by the default paint event handle (DoPrepareDC() is), so
overriding this method in your derived class is useless.
*/
/**
Scrolls a window so the view start is at the given point.
- @param x
+ @param x
The x position to scroll to, in scroll units.
- @param y
+ @param y
The y position to scroll to, in scroll units.
@remarks The positions are in scroll units, not pixels, so to convert to
/**
Sets up vertical and/or horizontal scrollbars.
- @param pixelsPerUnitX
+ @param pixelsPerUnitX
Pixels per scroll unit in the horizontal direction.
- @param pixelsPerUnitY
+ @param pixelsPerUnitY
Pixels per scroll unit in the vertical direction.
- @param noUnitsX
+ @param noUnitsX
Number of units in the horizontal direction.
- @param noUnitsY
+ @param noUnitsY
Number of units in the vertical direction.
- @param xPos
+ @param xPos
Position to initialize the scrollbars in the horizontal direction, in scroll
units.
- @param yPos
+ @param yPos
Position to initialize the scrollbars in the vertical direction, in scroll
units.
- @param noRefresh
+ @param noRefresh
Will not refresh window if @true.
@remarks The first pair of parameters give the number of pixels per
/**
@class wxSystemSettings
@wxheader{settings.h}
-
+
wxSystemSettings allows the application to ask for details about
the system. This can include settings such as standard colours, fonts,
and user interface element sizes.
-
+
@library{wxcore}
@category{misc}
-
+
@seealso
wxFont, wxColour
*/
@b wxSYS_EDGE_X
- Width of a 3D border, in pixels.
+ Width of a 3D border, in pixels.
@b wxSYS_EDGE_Y
- Height of a 3D border, in pixels.
+ Height of a 3D border, in pixels.
@b wxSYS_HSCROLL_ARROW_X
/**
@class wxStdDialogButtonSizer
@wxheader{sizer.h}
-
+
This class creates button layouts which conform to the standard button spacing
and ordering defined by the platform
or toolkit's user interface guidelines (if such things exist). By using this
standard dialogs look correct on all major platforms. Currently it conforms to
the Windows, GTK+ and Mac OS X
human interface guidelines.
-
+
When there aren't interface guidelines defined for a particular platform or
toolkit, wxStdDialogButtonSizer reverts
- to the Windows implementation.
-
+ to the Windows implementation.
+
To use this class, first add buttons to the sizer by calling AddButton (or
SetAffirmativeButton, SetNegativeButton,
or SetCancelButton) and then call Realize in order to create the actual button
layout used. Other than these special
- operations, this sizer works like any other sizer.
-
+ operations, this sizer works like any other sizer.
+
If you add a button with wxID_SAVE, on Mac OS X the button will be renamed to
"Save" and
the wxID_NO button will be renamed to "Don't Save" in accordance with the Mac
OS X Human Interface Guidelines.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxSizer, @ref overview_sizeroverview "Sizer overview",
wxDialog::CreateButtonSizer
/**
@class wxSizerItem
@wxheader{sizer.h}
-
+
The wxSizerItem class is used to track the position, size and other
attributes of each item managed by a wxSizer. It is not
usually necessary to use this class because the sizer elements can also be
identified by their positions or window or sizer pointers but sometimes it may
be more convenient to use it directly.
-
+
@library{wxcore}
@category{FIXME}
*/
*/
wxSizerItem(int width, int height, int proportion, int flag,
int border, wxObject* userData);
- wxSizerItem(wxWindow* window, const wxSizerFlags& flags);
- wxSizerItem(wxWindow* window, int proportion, int flag,
- int border,
- wxObject* userData);
- wxSizerItem(wxSizer* window, const wxSizerFlags& flags);
- wxSizerItem(wxSizer* sizer, int proportion, int flag,
- int border,
- wxObject* userData);
+ wxSizerItem(wxWindow* window, const wxSizerFlags& flags);
+ wxSizerItem(wxWindow* window, int proportion, int flag,
+ int border,
+ wxObject* userData);
+ wxSizerItem(wxSizer* window, const wxSizerFlags& flags);
+ wxSizerItem(wxSizer* sizer, int proportion, int flag,
+ int border,
+ wxObject* userData);
//@}
/**
Set the ratio item attribute.
*/
void SetRatio(int width, int height);
- void SetRatio(wxSize size);
- void SetRatio(float ratio);
+ void SetRatio(wxSize size);
+ void SetRatio(float ratio);
//@}
/**
/**
@class wxSizerFlags
@wxheader{sizer.h}
-
- Normally, when you add an item to a sizer via
+
+ Normally, when you add an item to a sizer via
wxSizer::Add, you have to specify a lot of flags and
parameters which can be unwieldy. This is where wxSizerFlags comes in: it
allows you to specify all parameters using the named methods instead. For
example, instead of
-
+
@code
sizer-Add(ctrl, 0, wxEXPAND | wxALL, 10);
@endcode
-
+
you can now write
-
+
@code
sizer-Add(ctrl, wxSizerFlags().Expand().Border(10));
@endcode
-
+
This is more readable and also allows you to create wxSizerFlags objects which
can be reused for several sizer items.
-
+
@code
wxSizerFlags flagsExpand(1);
flagsExpand.Expand().Border(10);
-
+
sizer-Add(ctrl1, flagsExpand);
sizer-Add(ctrl2, flagsExpand);
@endcode
-
+
Note that by specification, all methods of wxSizerFlags return the wxSizerFlags
object itself to allowing chaining multiple methods calls like in the examples
above.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxSizer
*/
-class wxSizerFlags
+class wxSizerFlags
{
public:
/**
is used.
*/
wxSizerFlags Border(int direction, int borderinpixels);
- wxSizerFlags Border(int direction = wxALL);
+ wxSizerFlags Border(int direction = wxALL);
//@}
/**
/**
@class wxNotebookSizer
@wxheader{sizer.h}
-
+
@b This class is deprecated and should not be used in new code! It is no
longer needed, wxNotebook control can be inserted
into any sizer class and its minimal size will be determined correctly.
See @ref overview_sizeroverview "wxSizer overview" for more information.
-
+
wxNotebookSizer is a specialized sizer to make sizers work in connection
- with using notebooks. This sizer is different from any other sizer as
+ with using notebooks. This sizer is different from any other sizer as
you must not add any children to it - instead, it queries the notebook class
itself.
The only thing this sizer does is to determine the size of the biggest
page of the notebook and report an adjusted minimal size to a more toplevel
sizer.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxSizer, wxNotebook, @ref overview_sizeroverview "Sizer overview"
*/
/**
@class wxFlexGridSizer
@wxheader{sizer.h}
-
+
A flex grid sizer is a sizer which lays out its children in a two-dimensional
table with all table fields in one row having the same
height and all fields in one column having the same width, but all
rows or all columns are not necessarily the same height or width as in
the wxGridSizer.
-
+
Since wxWidgets 2.5.0, wxFlexGridSizer can also size items equally in one
direction but unequally ("flexibly") in the other. If the sizer is only
flexible in one direction (this can be changed using
direction in order to fill the available space. The
wxFlexGridSizer::SetNonFlexibleGrowMode method
serves this purpose.
-
+
@library{wxcore}
@category{winlayout}
-
+
@seealso
wxSizer, @ref overview_sizeroverview "Sizer overview"
*/
all children.
*/
wxFlexGridSizer(int rows, int cols, int vgap, int hgap);
- wxFlexGridSizer(int cols, int vgap = 0, int hgap = 0);
+ wxFlexGridSizer(int cols, int vgap = 0, int hgap = 0);
//@}
/**
/**
@class wxSizer
@wxheader{sizer.h}
-
+
wxSizer is the abstract base class used for laying out subwindows in a window.
You
cannot use wxSizer directly; instead, you will have to use one of the sizer
- classes derived from it. Currently there are wxBoxSizer,
+ classes derived from it. Currently there are wxBoxSizer,
wxStaticBoxSizer,
wxGridSizer,
wxFlexGridSizer,
wxWrapSizer
and wxGridBagSizer.
-
+
The layout algorithm used by sizers in wxWidgets is closely related to layout
in other GUI toolkits, such as Java's AWT, the GTK toolkit or the Qt toolkit.
It is
and thus does not interfere with tab ordering and requires very little
resources compared
to a real window on screen.
-
+
What makes sizers so well fitted for use in wxWidgets is the fact that every
control
reports its own minimal size and the algorithm can handle differences in font
space than
on Windows, the initial dialog size will automatically be bigger on Motif than
on Windows.
-
+
Sizers may also be used to control the layout of custom drawn items on the
window. The
Add, Insert, and Prepend functions return a pointer to the newly added
add empty space of the desired size and attributes, and then use the
wxSizerItem::GetRect
method to determine where the drawing operations should take place.
-
+
Please notice that sizers, like child windows, are owned by the library and
will be deleted by it which implies that they must be allocated on the heap.
However if you create a sizer and do not add it to another sizer or window, the
library wouldn't be able to delete such an orphan sizer and in this, and only
this, case it should be deleted explicitly.
-
+
@b wxPython note: If you wish to create a sizer class in wxPython you should
derive the class from @c wxPySizer in order to get Python-aware
capabilities for the various virtual methods.
-
+
@library{wxcore}
@category{winlayout}
-
+
@seealso
@ref overview_sizeroverview "Sizer overview"
*/
are described
here:
- @param window
+ @param window
The window to be added to the sizer. Its initial size (either set explicitly by
the
user or calculated internally when using wxDefaultSize) is interpreted as the
minimal and in many
cases also the initial size.
- @param sizer
+ @param sizer
The (child-)sizer to be added to the sizer. This allows placing a child sizer
in a
sizer and thus to create hierarchies of sizers (typically a vertical box as the
top sizer and several
horizontal boxes on the level beneath).
- @param width and height
+ @param width and height
The dimension of a spacer to be added to the sizer. Adding spacers to sizers
gives more flexibility in the design of dialogs; imagine for example a
horizontal box with two buttons at the
between will shrink and grow with
the dialog.
- @param proportion
+ @param proportion
Although the meaning of this parameter is undefined in wxSizer, it is used in
wxBoxSizer
to indicate if a child of a sizer can change its size in the main orientation
value of 1 each to make them grow and shrink equally with the sizer's
horizontal dimension.
- @param flag
+ @param flag
This parameter can be used to set a number of flags
which can be combined using the binary OR operator |. Two main
behaviours are defined using these flags. One is the border around a
These flags are used to specify which side(s) of
- the sizer item the border width will apply to.
+ the sizer item the border width will apply to.
wxEXPAND
wxFIXED_MINSIZE
- Normally wxSizers will use
+ Normally wxSizers will use
GetAdjustedBestSize to
determine what the minimal size of window items should be, and will
use that size to calculate the layout. This allows layouts to
specify the alignment of the item within the space allotted to it by
the sizer, adjusted for the border if any.
- @param border
+ @param border
Determines the border width, if the flag
parameter is set to include any border flag.
- @param userData
+ @param userData
Allows an extra object to be attached to the sizer
item, for use in derived classes when sizing information is more
complex than the proportion and flag will allow for.
- @param flags
- A wxSizerFlags object that
+ @param flags
+ A wxSizerFlags object that
enables you to specify most of the above parameters more conveniently.
*/
wxSizerItem* Add(wxWindow* window, const wxSizerFlags& flags);
- wxSizerItem* Add(wxWindow* window, int proportion = 0,
- int flag = 0,
- int border = 0,
- wxObject* userData = @NULL);
- wxSizerItem* Add(wxSizer* sizer, const wxSizerFlags& flags);
- wxSizerItem* Add(wxSizer* sizer, int proportion = 0,
- int flag = 0,
- int border = 0,
- wxObject* userData = @NULL);
- wxSizerItem* Add(int width, int height, int proportion = 0,
- int flag = 0,
- int border = 0,
- wxObject* userData = @NULL);
+ wxSizerItem* Add(wxWindow* window, int proportion = 0,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = @NULL);
+ wxSizerItem* Add(wxSizer* sizer, const wxSizerFlags& flags);
+ wxSizerItem* Add(wxSizer* sizer, int proportion = 0,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = @NULL);
+ wxSizerItem* Add(int width, int height, int proportion = 0,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = @NULL);
//@}
/**
void Clear(bool delete_windows = @false);
/**
- Computes client area size for @e window so that it matches the
+ Computes client area size for @e window so that it matches the
sizer's minimal size. Unlike GetMinSize(), this
method accounts for other constraints imposed on @e window, namely display's
size (returned size will never be too large for the display) and maximum
@sa Remove()
*/
bool Detach(wxWindow* window);
- bool Detach(wxSizer* sizer);
- bool Detach(size_t index);
+ bool Detach(wxSizer* sizer);
+ bool Detach(size_t index);
//@}
/**
- Tell the sizer to resize the @e window so that its client area matches the
+ Tell the sizer to resize the @e window so that its client area matches the
sizer's minimal size
(ComputeFittingClientSize() is called
to determine it).
//@{
/**
- Returns the list of the items in this sizer. The elements of type-safe
- wxList @c wxSizerItemList are objects of type
+ Returns the list of the items in this sizer. The elements of type-safe
+ wxList @c wxSizerItemList are objects of type
@ref overview_wxsizeritem "wxSizerItem *".
*/
const wxSizerItemList GetChildren();
- wxSizerItemList GetChildren();
+ wxSizerItemList GetChildren();
//@}
/**
Returns pointer to item or @NULL.
*/
wxSizerItem * GetItem(wxWindow* window, bool recursive = @false);
- wxSizerItem * GetItem(wxSizer* sizer, bool recursive = @false);
- wxSizerItem * GetItem(size_t index);
+ wxSizerItem * GetItem(wxSizer* sizer, bool recursive = @false);
+ wxSizerItem * GetItem(size_t index);
//@}
/**
Finds item of the sizer which has the given @e id. This @e id is not the
window id but the id of the wxSizerItem itself. This is mainly useful for
- retrieving the sizers created from XRC resources.
+ retrieving the sizers created from XRC resources.
Use parameter @e recursive to search in subsizers too.
/**
Returns the minimal size of the sizer. This is either the combined minimal
- size of all the children and their borders or the minimal size set by
+ size of all the children and their borders or the minimal size set by
SetMinSize(), depending on which is bigger.
Note that the returned value is client size, not window size.
@sa IsShown(), Show()
*/
bool Hide(wxWindow* window, bool recursive = @false);
- bool Hide(wxSizer* sizer, bool recursive = @false);
- bool Hide(size_t index);
+ bool Hide(wxSizer* sizer, bool recursive = @false);
+ bool Hide(size_t index);
//@}
//@{
/**
- Insert a child into the sizer before any existing item at
+ Insert a child into the sizer before any existing item at
See Add() for the meaning of the other parameters.
@param index.
- index
+ index
The position this child should assume in the sizer.
*/
wxSizerItem* Insert(size_t index, wxWindow* window,
const wxSizerFlags& flags);
- wxSizerItem* Insert(size_t index, wxWindow* window,
- int proportion = 0,
- int flag = 0,
- int border = 0,
- wxObject* userData = @NULL);
- wxSizerItem* Insert(size_t index, wxSizer* sizer,
- const wxSizerFlags& flags);
- wxSizerItem* Insert(size_t index, wxSizer* sizer,
- int proportion = 0,
- int flag = 0,
- int border = 0,
- wxObject* userData = @NULL);
- wxSizerItem* Insert(size_t index, int width, int height,
- int proportion = 0,
- int flag = 0,
- int border = 0,
- wxObject* userData = @NULL);
+ wxSizerItem* Insert(size_t index, wxWindow* window,
+ int proportion = 0,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = @NULL);
+ wxSizerItem* Insert(size_t index, wxSizer* sizer,
+ const wxSizerFlags& flags);
+ wxSizerItem* Insert(size_t index, wxSizer* sizer,
+ int proportion = 0,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = @NULL);
+ wxSizerItem* Insert(size_t index, int width, int height,
+ int proportion = 0,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = @NULL);
//@}
/**
@sa Hide(), Show()
*/
bool IsShown(wxWindow* window);
- bool IsShown(wxSizer* sizer);
- bool IsShown(size_t index);
+ bool IsShown(wxSizer* sizer);
+ bool IsShown(size_t index);
//@}
/**
list of items (windows, subsizers or spaces) owned by this sizer.
*/
wxSizerItem* Prepend(wxWindow* window, const wxSizerFlags& flags);
- wxSizerItem* Prepend(wxWindow* window, int proportion = 0,
- int flag = 0,
- int border = 0,
- wxObject* userData = @NULL);
- wxSizerItem* Prepend(wxSizer* sizer,
- const wxSizerFlags& flags);
- wxSizerItem* Prepend(wxSizer* sizer, int proportion = 0,
- int flag = 0,
- int border = 0,
- wxObject* userData = @NULL);
- wxSizerItem* Prepend(int width, int height,
- int proportion = 0,
- int flag = 0,
- int border= 0,
- wxObject* userData = @NULL);
+ wxSizerItem* Prepend(wxWindow* window, int proportion = 0,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = @NULL);
+ wxSizerItem* Prepend(wxSizer* sizer,
+ const wxSizerFlags& flags);
+ wxSizerItem* Prepend(wxSizer* sizer, int proportion = 0,
+ int flag = 0,
+ int border = 0,
+ wxObject* userData = @NULL);
+ wxSizerItem* Prepend(int width, int height,
+ int proportion = 0,
+ int flag = 0,
+ int border= 0,
+ wxObject* userData = @NULL);
//@}
/**
child from the sizer.
@b NB: The method taking a wxWindow* parameter is deprecated as it does not
- destroy the window as would usually be expected from Remove. You should use
+ destroy the window as would usually be expected from Remove. You should use
Detach() in new code instead. There is
currently no wxSizer method that will both detach and destroy a wxWindow item.
Returns @true if the child item was found and removed, @false otherwise.
*/
bool Remove(wxWindow* window);
- bool Remove(wxSizer* sizer);
- bool Remove(size_t index);
+ bool Remove(wxSizer* sizer);
+ bool Remove(size_t index);
//@}
//@{
/**
- Detaches the given @e oldwin, @e oldsz child from the sizer and
+ Detaches the given @e oldwin, @e oldsz child from the sizer and
replaces it with the given window, sizer, or wxSizerItem.
The detached child is removed @b only if it is a sizer or a spacer
*/
bool Replace(wxWindow* oldwin, wxWindow* newwin,
bool recursive = @false);
- bool Replace(wxSizer* oldsz, wxSizer* newsz,
- bool recursive = @false);
- bool Remove(size_t oldindex, wxSizerItem* newitem);
+ bool Replace(wxSizer* oldsz, wxSizer* newsz,
+ bool recursive = @false);
+ bool Remove(size_t oldindex, wxSizerItem* newitem);
//@}
/**
Call this to force the sizer to take the given dimension and thus force the
items owned
by the sizer to resize themselves according to the rules defined by the
- parameter in the
+ parameter in the
Add() and Prepend() methods.
*/
void SetDimension(int x, int y, int width, int height);
after initial creation.
*/
void SetItemMinSize(wxWindow* window, int width, int height);
- void SetItemMinSize(wxSizer* sizer, int width, int height);
- void SetItemMinSize(size_t index, int width, int height);
+ void SetItemMinSize(wxSizer* sizer, int width, int height);
+ void SetItemMinSize(size_t index, int width, int height);
//@}
//@{
bigger.
*/
void SetMinSize(int width, int height);
- void SetMinSize(const wxSize& size);
+ void SetMinSize(const wxSize& size);
//@}
/**
- This method first calls Fit() and then
+ This method first calls Fit() and then
wxTopLevelWindow::SetSizeHints on the @e window
passed to it. This only makes sense when @e window is actually a
wxTopLevelWindow such as a wxFrame or a
- wxDialog, since SetSizeHints only has any effect in these classes.
+ wxDialog, since SetSizeHints only has any effect in these classes.
It does nothing in normal windows or controls.
- This method is implicitly used by wxWindow::SetSizerAndFit
+ This method is implicitly used by wxWindow::SetSizerAndFit
which is commonly invoked in the constructor of a toplevel window itself (see
the sample in the description of wxBoxSizer) if the
toplevel window is resizable.
*/
bool Show(wxWindow* window, bool show = @true,
bool recursive = @false);
- bool Show(wxSizer* sizer, bool show = @true,
- bool recursive = @false);
- bool Show(size_t index, bool show = @true);
+ bool Show(wxSizer* sizer, bool show = @true,
+ bool recursive = @false);
+ bool Show(size_t index, bool show = @true);
//@}
};
/**
@class wxGridSizer
@wxheader{sizer.h}
-
+
A grid sizer is a sizer which lays out its children in a two-dimensional
table with all table fields having the same size,
i.e. the width of each field is the width of the widest child,
the height of each field is the height of the tallest child.
-
+
@library{wxcore}
@category{winlayout}
-
+
@seealso
wxSizer, @ref overview_sizeroverview "Sizer overview"
*/
all children.
*/
wxGridSizer(int rows, int cols, int vgap, int hgap);
- wxGridSizer(int cols, int vgap = 0, int hgap = 0);
+ wxGridSizer(int cols, int vgap = 0, int hgap = 0);
//@}
/**
/**
@class wxStaticBoxSizer
@wxheader{sizer.h}
-
+
wxStaticBoxSizer is a sizer derived from wxBoxSizer but adds a static
box around the sizer. This static box may be either created independently or
the sizer may create it itself as a convenience. In any case, the sizer owns
the wxStaticBox control and will delete it if it is
deleted.
-
+
@library{wxcore}
@category{winlayout}
-
+
@seealso
wxSizer, wxStaticBox, wxBoxSizer, @ref overview_sizeroverview "Sizer overview"
*/
The second one creates a new static box with the given label and parent window.
*/
wxStaticBoxSizer(wxStaticBox* box, int orient);
- wxStaticBoxSizer(int orient, wxWindow parent,
- const wxString& label = wxEmptyString);
+ wxStaticBoxSizer(int orient, wxWindow parent,
+ const wxString& label = wxEmptyString);
//@}
/**
/**
@class wxBoxSizer
@wxheader{sizer.h}
-
+
The basic idea behind a box sizer is that windows will most often be laid out
in rather
simple basic geometry, typically in a row or a column or several hierarchies of
either.
-
+
For more information, please see @ref overview_boxsizerprogramming "Programming
with wxBoxSizer".
-
+
@library{wxcore}
@category{winlayout}
-
+
@seealso
wxSizer, @ref overview_sizeroverview "Sizer overview"
*/
/**
Implements the calculation of a box sizer's dimensions and then sets
- the size of its children (calling wxWindow::SetSize
+ the size of its children (calling wxWindow::SetSize
if the child is a window). It is used internally only and must not be called
by the user (call Layout() if you want to resize). Documented for information.
*/
/**
@class wxSlider
@wxheader{slider.h}
-
+
A slider is a control with a handle which can be pulled
back and forth to change the value.
-
+
On Windows, the track bar control is used.
-
+
Slider events are handled in the same way as a scrollbar.
-
+
@beginStyleTable
@style{wxSL_HORIZONTAL}:
Displays the slider horizontally (this is the default).
Inverses the mininum and maximum endpoints on the slider. Not
compatible with wxSL_SELRANGE.
@endStyleTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{slider.png}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview", wxScrollBar
*/
/**
Constructor, creating and showing a slider.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param value
+ @param value
Initial position for the slider.
- @param minValue
+ @param minValue
Minimum slider position.
- @param maxValue
+ @param maxValue
Maximum slider position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then a default size is
chosen.
- @param style
+ @param style
Window style. See wxSlider.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxSlider();
- wxSlider(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");
+ wxSlider(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");
//@}
/**
/**
Sets the line size for the slider.
- @param lineSize
+ @param lineSize
The number of steps the slider moves when the user moves it up or down a line.
@sa GetLineSize()
/**
Sets the page size for the slider.
- @param pageSize
+ @param pageSize
The number of steps the slider moves when the user pages up or down.
@sa GetPageSize()
/**
Sets the selection.
- @param startPos
+ @param startPos
The selection start position.
- @param endPos
+ @param endPos
The selection end position.
@remarks Windows 95 only.
/**
Sets the slider thumb length.
- @param len
+ @param len
The thumb length.
@remarks Windows 95 only.
/**
Sets a tick position.
- @param tickPos
+ @param tickPos
The tick position.
@remarks Windows 95 only.
/**
Sets the tick mark frequency and position.
- @param n
+ @param n
Frequency. For example, if the frequency is set to two, a tick mark is
displayed for
every other increment in the slider's range.
- @param pos
+ @param pos
Position. Must be greater than zero. TODO: what is this for?
@remarks Windows 95 only.
/**
Sets the slider position.
- @param value
+ @param value
The slider position.
*/
void SetValue(int value);
/**
@class wxSingleInstanceChecker
@wxheader{snglinst.h}
-
+
wxSingleInstanceChecker class allows to check that only a single instance of a
program is running. To do it, you should create an object of this class. As
- long as this object is alive, calls to
+ long as this object is alive, calls to
wxSingleInstanceChecker::IsAnotherRunning from
other processes will return @true.
-
+
As the object should have the life span as big as possible, it makes sense to
create it either as a global or in wxApp::OnInit. For
example:
-
+
@code
bool MyApp::OnInit()
{
if ( m_checker-IsAnotherRunning() )
{
wxLogError(_("Another program instance is already running, aborting."));
-
+
delete m_checker; // OnExit() won't be called if we return @false
m_checker = @NULL;
-
+
return @false;
}
-
+
... more initializations ...
-
+
return @true;
}
-
+
int MyApp::OnExit()
{
delete m_checker;
-
+
return 0;
}
@endcode
-
+
Note using wxGetUserId to construct the name: this
allows different user to run the application concurrently which is usually the
intended goal. If you don't use the user name in the wxSingleInstanceChecker
name, only one user would be able to run the application at a time.
-
+
This class is implemented for Win32 and Unix platforms (supporting @c fcntl()
system call, but almost all of modern Unix systems do) only.
-
+
@library{wxbase}
@category{misc}
*/
-class wxSingleInstanceChecker
+class wxSingleInstanceChecker
{
public:
/**
/**
Initialize the object if it had been created using the default constructor.
- Note that you can't call Create() more than once, so calling it if the
- @ref wxsingleinstancechecker() "non default ctor"
+ Note that you can't call Create() more than once, so calling it if the
+ @ref wxsingleinstancechecker() "non default ctor"
had been used is an error.
- @param name
+ @param name
must be given and be as unique as possible. It is used as the
- mutex name under Win32 and the lock file name under Unix.
- GetAppName() and wxGetUserId()
+ mutex name under Win32 and the lock file name under Unix.
+ GetAppName() and wxGetUserId()
are commonly used to construct this parameter.
- @param path
+ @param path
is optional and is ignored under Win32 and used as the directory to
- create the lock file in under Unix (default is
+ create the lock file in under Unix (default is
wxGetHomeDir())
@returns Returns @false if initialization failed, it doesn't mean that
/**
@class wxIPV4address
@wxheader{socket.h}
-
-
+
+
@library{wxbase}
@category{net}
*/
Returns the hostname which matches the IP address.
*/
bool Hostname(const wxString& hostname);
- Return value wxString Hostname();
+ Return value wxString Hostname();
//@}
/**
wxString IPAddress();
/**
- Set address to localhost (127.0.0.1). Whenever possible, use the
+ Set address to localhost (127.0.0.1). Whenever possible, use the
AnyAddress(),
function instead of this one, as this will correctly handle multi-homed
hosts and avoid other small problems.
Returns the current service.
*/
bool Service(const wxString& service);
- Return value bool Service(unsigned short service);
- Return value unsigned short Service();
+ Return value bool Service(unsigned short service);
+ Return value unsigned short Service();
//@}
};
/**
@class wxSocketServer
@wxheader{socket.h}
-
-
+
+
@library{wxnet}
@category{net}
-
+
@seealso
wxSocketServer::WaitForAccept, wxSocketBase::SetNotify, wxSocketBase::Notify,
wxSocketServer::AcceptWith
public:
/**
Constructs a new server and tries to bind to the specified @e address.
- Before trying to accept new connections, test whether it succeeded with
+ Before trying to accept new connections, test whether it succeeded with
@ref wxSocketBase::isok wxSocketBase:IsOk.
- @param address
+ @param address
Specifies the local address for the server (e.g. port number).
- @param flags
+ @param flags
Socket flags (See wxSocketBase::SetFlags)
*/
wxSocketServer(const wxSockAddress& address,
~wxSocketServer();
/**
- Accepts an incoming connection request, and creates a new
+ Accepts an incoming connection request, and creates a new
wxSocketBase object which represents
the server-side of the connection.
If @e wait is @false, it will try to accept a pending connection
if there is one, but it will always return immediately without blocking
the GUI. If you want to use Accept in this way, you can either check for
- incoming connections with WaitForAccept()
+ incoming connections with WaitForAccept()
or catch @b wxSOCKET_CONNECTION events, then call Accept once you know
that there is an incoming connection waiting to be accepted.
/**
Accept an incoming connection using the specified socket object.
- @param socket
+ @param socket
Socket to be initialized
@returns Returns @true on success, or @false if an error occurred or if the
bool AcceptWith(wxSocketBase& socket, bool wait = @true);
/**
- This function waits for an incoming connection. Use it if you want to call
- Accept() or AcceptWith()
+ This function waits for an incoming connection. Use it if you want to call
+ Accept() or AcceptWith()
with @e wait set to @false, to detect when an incoming connection is waiting
to be accepted.
- @param seconds
+ @param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
- @param millisecond
+ @param millisecond
Number of milliseconds to wait.
@returns Returns @true if an incoming connection arrived, @false if the
/**
@class wxIPaddress
@wxheader{socket.h}
-
- wxIPaddress is an abstract base class for all internet protocol address
- objects. Currently, only wxIPV4address
+
+ wxIPaddress is an abstract base class for all internet protocol address
+ objects. Currently, only wxIPV4address
is implemented. An experimental implementation for IPV6, wxIPV6address,
is being developed.
-
+
@library{wxbase}
@category{net}
*/
Returns the hostname which matches the IP address.
*/
virtual bool Hostname(const wxString& hostname);
- Return value virtual wxString Hostname();
+ Return value virtual wxString Hostname();
//@}
/**
virtual bool IsLocalHost();
/**
- Set address to localhost.
+ Set address to localhost.
On IPV4 implementations, 127.0.0.1
Returns the current service.
*/
virtual bool Service(const wxString& service);
- Return value virtual bool Service(unsigned short service);
- Return value virtual unsigned short Service();
+ Return value virtual bool Service(unsigned short service);
+ Return value virtual unsigned short Service();
//@}
};
/**
@class wxSocketClient
@wxheader{socket.h}
-
-
+
+
@library{wxnet}
@category{net}
-
+
@seealso
wxSocketClient::WaitOnConnect, wxSocketBase::SetNotify, wxSocketBase::Notify
*/
/**
Constructor.
- @param flags
+ @param flags
Socket flags (See wxSocketBase::SetFlags)
*/
wxSocketClient(wxSocketFlags flags = wxSOCKET_NONE);
or catch @b wxSOCKET_CONNECTION events (for successful establishment)
and @b wxSOCKET_LOST events (for connection failure).
- @param address
+ @param address
Address of the server.
- @param local
+ @param local
Bind to the specified local address and port before connecting.
The local address and port can also be set using SetLocal,
and then using the 2-parameter Connect method.
- @param wait
+ @param wait
If @true, waits for the connection to complete.
@returns Returns @true if the connection is established and no error
wxSocketBase::Notify
*/
bool Connect(wxSockAddress& address, bool wait = @true);
- bool Connect(wxSockAddress& address, wxSockAddress& local,
- bool wait = @true);
+ bool Connect(wxSockAddress& address, wxSockAddress& local,
+ bool wait = @true);
//@}
/**
elapses. Use this function after issuing a call
to Connect() with @e wait set to @false.
- @param seconds
+ @param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
- @param millisecond
+ @param millisecond
Number of milliseconds to wait.
@returns WaitOnConnect returns @true if the connection request completes.
This does not necessarily mean that the connection
was successfully established; it might also happen
- that the connection was refused by the peer. Use
+ that the connection was refused by the peer. Use
IsConnected to distinguish between these two
situations.
*/
/**
@class wxSockAddress
@wxheader{socket.h}
-
+
You are unlikely to need to use this class: only wxSocketBase uses it.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxSocketBase, wxIPaddress, wxIPV4address
*/
/**
@class wxSocketEvent
@wxheader{socket.h}
-
+
This event class contains information about socket events.
-
+
@library{wxnet}
@category{net}
-
+
@seealso
wxSocketBase, wxSocketClient, wxSocketServer
*/
/**
@class wxSocketBase
@wxheader{socket.h}
-
+
wxSocketBase is the base class for all socket-related objects, and it
defines all basic IO functionality.
-
+
Note: (Workaround for implementation limitation for wxWidgets up to 2.5.x)
If you want to use sockets or derived classes such as wxFTP in a secondary
thread,
call wxSocketBase::Initialize() (undocumented) from the main thread before
- creating
- any sockets - in wxApp::OnInit for example.
+ creating
+ any sockets - in wxApp::OnInit for example.
See http://wiki.wxwidgets.org/wiki.pl?WxSocket or
http://www.litwindow.com/knowhow/knowhow.html for more details.
-
+
@library{wxnet}
@category{net}
-
+
@seealso
wxSocketEvent, wxSocketClient, wxSocketServer, @ref overview_samplesockets
"Sockets sample"
{
public:
/**
- Default constructor. Don't use it directly; instead, use
- wxSocketClient to construct a socket client, or
+ Default constructor. Don't use it directly; instead, use
+ wxSocketClient to construct a socket client, or
wxSocketServer to construct a socket server.
*/
wxSocketBase();
bool Error();
/**
- Returns a pointer of the client data for this socket, as set with
+ Returns a pointer of the client data for this socket, as set with
SetClientData()
*/
void * GetClientData();
bool GetLocal(wxSockAddress& addr);
/**
- This function returns the peer address field of the socket. The peer
+ This function returns the peer address field of the socket. The peer
address field contains the complete peer host address of the socket
(address, port, ...).
when you Close() a socket (and thus also upon
socket destruction), so you don't need to use it in these cases.
- Wait(),
- wxSocketServer::WaitForAccept,
- WaitForLost(),
- WaitForRead(),
- WaitForWrite(),
+ Wait(),
+ wxSocketServer::WaitForAccept,
+ WaitForLost(),
+ WaitForRead(),
+ WaitForWrite(),
wxSocketClient::WaitOnConnect
*/
void InterruptWait();
Use Error() to determine if the operation succeeded.
- @param buffer
+ @param buffer
Buffer where to put peeked data.
- @param nbytes
+ @param nbytes
Number of bytes.
@returns Returns a reference to the current object.
Use Error() to determine if the operation succeeded.
- @param buffer
+ @param buffer
Buffer where to put read data.
- @param nbytes
+ @param nbytes
Number of bytes.
@returns Returns a reference to the current object.
wxSocketBase Read(void * buffer, wxUint32 nbytes);
/**
- This function reads a buffer sent by WriteMsg()
+ This function reads a buffer sent by WriteMsg()
on a socket. If the buffer passed to the function isn't big enough, the
remaining bytes will be discarded. This function always waits for the
buffer to be entirely filled, unless an error occurs.
Use Error() to determine if the operation succeeded.
- @param buffer
+ @param buffer
Buffer where to put read data.
- @param nbytes
+ @param nbytes
Size of the buffer.
@returns Returns a reference to the current object.
/**
This function saves the current state of the socket in a stack. Socket
state includes flags, as set with SetFlags(),
- event mask, as set with SetNotify() and
- Notify(), user data, as set with
+ event mask, as set with SetNotify() and
+ Notify(), user data, as set with
SetClientData().
Calls to SaveState and RestoreState can be nested.
/**
Sets an event handler to be called when a socket event occurs. The
handler will be called for those events for which notification is
- enabled with SetNotify() and
+ enabled with SetNotify() and
Notify().
- @param handler
+ @param handler
Specifies the event handler you want to use.
- @param id
+ @param id
The id of socket event.
@sa SetNotify(), Notify(), wxSocketEvent, wxEvtHandler
setsockopt() flag. This flag allows the socket to bind to a port that is
already in use.
This is mostly used on UNIX-based systems to allow rapid starting and stopping
- of a server -
+ of a server -
otherwise you may have to wait several minutes for the port to become available.
wxSOCKET_REUSEADDR can also be used with socket clients to (re)bind to a
particular local port
If you use Error(), it will always return @false.
- @param buffer
+ @param buffer
Buffer to be unread.
- @param nbytes
+ @param nbytes
Number of bytes.
@returns Returns a reference to the current object.
/**
This function waits until any of the following conditions is @true:
-
+
The socket becomes readable.
The socket becomes writable.
Note that it is recommended to use the individual Wait functions
to wait for the required condition, instead of this one.
- @param seconds
+ @param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
- @param millisecond
+ @param millisecond
Number of milliseconds to wait.
@returns Returns @true when any of the above conditions is satisfied,
This function waits until the connection is lost. This may happen if
the peer gracefully closes the connection or if the connection breaks.
- @param seconds
+ @param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
- @param millisecond
+ @param millisecond
Number of milliseconds to wait.
@returns Returns @true if the connection was lost, @false if the timeout
immediately without blocking (unless the @b wxSOCKET_WAITALL flag
is set, in which case the operation might still block).
- @param seconds
+ @param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
- @param millisecond
+ @param millisecond
Number of milliseconds to wait.
@returns Returns @true if the socket becomes readable, @false on timeout.
complete immediately (unless the @b wxSOCKET_WAITALL flag is set,
in which case the operation might still block).
- @param seconds
+ @param seconds
Number of seconds to wait.
If -1, it will wait for the default timeout,
as set with SetTimeout.
- @param millisecond
+ @param millisecond
Number of milliseconds to wait.
@returns Returns @true if the socket becomes writable, @false on timeout.
Use Error() to determine if the operation succeeded.
- @param buffer
+ @param buffer
Buffer with the data to be sent.
- @param nbytes
+ @param nbytes
Number of bytes.
@returns Returns a reference to the current object.
/**
This function writes a buffer of @e nbytes bytes from the socket, but it
- writes a short header before so that ReadMsg()
- knows how much data should it actually read. So, a buffer sent with WriteMsg
+ writes a short header before so that ReadMsg()
+ knows how much data should it actually read. So, a buffer sent with WriteMsg
@b must be read with ReadMsg. This function always waits for the entire
buffer to be sent, unless an error occurs.
Use Error() to determine if the operation succeeded.
- @param buffer
+ @param buffer
Buffer with the data to be sent.
- @param nbytes
+ @param nbytes
Number of bytes to send.
@returns Returns a reference to the current object.
/**
@class wxDatagramSocket
@wxheader{socket.h}
-
-
+
+
@library{wxnet}
@category{FIXME}
-
+
@seealso
wxSocketBase::Error, wxSocketBase::LastError, wxSocketBase::LastCount,
wxSocketBase::SetFlags,
/**
Constructor.
- @param flags
+ @param flags
Socket flags (See wxSocketBase::SetFlags)
*/
wxDatagramSocket(wxSocketFlags flags = wxSOCKET_NONE);
Use wxSocketBase::Error to determine if the operation succeeded.
- @param address
+ @param address
Any address - will be overwritten with the address of the peer that sent that
data.
- @param buffer
+ @param buffer
Buffer where to put read data.
- @param nbytes
+ @param nbytes
Number of bytes.
@returns Returns a reference to the current object, and the address of
Use wxSocketBase::Error to determine if the operation succeeded.
- @param address
+ @param address
The address of the destination peer for this data.
- @param buffer
+ @param buffer
Buffer where read data is.
- @param nbytes
+ @param nbytes
Number of bytes.
@returns Returns a reference to the current object.
/**
@class wxSound
@wxheader{sound.h}
-
+
This class represents a short sound (loaded from Windows WAV file), that
can be stored in memory and played. Currently this class is implemented
- on Windows and Unix (and uses either
- Open Sound System or
+ on Windows and Unix (and uses either
+ Open Sound System or
Simple DirectMedia Layer).
-
+
@library{wxadv}
@category{FIXME}
*/
resource. Call IsOk() to determine whether this
succeeded.
- @param fileName
+ @param fileName
The filename or Windows resource.
- @param isResource
+ @param isResource
@true if fileName is a resource, @false if it is a filename.
*/
wxSound();
- wxSound(const wxString& fileName, bool isResource = @false);
+ wxSound(const wxString& fileName, bool isResource = @false);
//@}
/**
/**
Constructs a wave object from a file or resource.
- @param fileName
+ @param fileName
The filename or Windows resource.
- @param isResource
+ @param isResource
@true if fileName is a resource, @false if it is a filename.
@returns @true if the call was successful, @false otherwise.
wxSOUND_ASYNC
- Sound is played asynchronously,
+ Sound is played asynchronously,
@c Play returns immediately
wxSOUND_ASYNC | wxSOUND_LOOP
Sound is played asynchronously
- and loops until another sound is played,
+ and loops until another sound is played,
Stop() is called or the program terminates.
The static form is shorthand for this code:
*/
bool Play(unsigned flags = wxSOUND_ASYNC);
- static bool Play(const wxString& filename,
- unsigned flags = wxSOUND_ASYNC);
+ static bool Play(const wxString& filename,
+ unsigned flags = wxSOUND_ASYNC);
//@}
/**
/**
@class wxSpinEvent
@wxheader{spinbutt.h}
-
- This event class is used for the events generated by
+
+ This event class is used for the events generated by
wxSpinButton and wxSpinCtrl.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxSpinButton and wxSpinCtrl
*/
/**
@class wxSpinButton
@wxheader{spinbutt.h}
-
+
A wxSpinButton has two small up and down (or left and right) arrow buttons. It
is often used next to a text control for increment and decrementing a value.
Portable programs should try to use wxSpinCtrl instead
as wxSpinButton is not implemented for all platforms but wxSpinCtrl is as it
degenerates to a simple wxTextCtrl on such platforms.
-
+
@b NB: the range supported by this control (and wxSpinCtrl) depends on the
platform but is at least @c -0x8000 to @c 0x7fff. Under GTK and
Win32 with sufficiently new version of @c comctrl32.dll (at least 4.71 is
required, 5.80 is recommended) the full 32 bit range is supported.
-
+
@beginStyleTable
@style{wxSP_HORIZONTAL}:
Specifies a horizontal spin button (note that this style is not
@style{wxSP_WRAP}:
The value wraps at the minimum and maximum.
@endStyleTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{spinbutton.png}
-
+
@seealso
wxSpinCtrl
*/
/**
Constructor, creating and showing a spin button.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param pos
+ @param pos
Window position. If wxDefaultPosition is specified then a default position
is chosen.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then a default size is
chosen.
- @param style
+ @param style
Window style. See wxSpinButton.
- @param name
+ @param name
Window name.
@sa Create()
*/
wxSpinButton();
- wxSpinButton(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxSP_HORIZONTAL,
- const wxString& name = "spinButton");
+ wxSpinButton(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSP_HORIZONTAL,
+ const wxString& name = "spinButton");
//@}
/**
/**
Sets the range of the spin button.
- @param min
+ @param min
The minimum value for the spin button.
- @param max
+ @param max
The maximum value for the spin button.
@sa GetMin(), GetMax()
/**
Sets the value of the spin button.
- @param value
+ @param value
The value for the spin button.
*/
void SetValue(int value);
/**
@class wxSpinCtrl
@wxheader{spinctrl.h}
-
- wxSpinCtrl combines wxTextCtrl and
+
+ wxSpinCtrl combines wxTextCtrl and
wxSpinButton in one control.
-
+
@beginStyleTable
@style{wxSP_ARROW_KEYS}:
The user can use arrow keys to change the value.
@style{wxSP_WRAP}:
The value wraps at the minimum and maximum.
@endStyleTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{spinctrl.png}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview", wxSpinButton,
wxControl
Constructor, creating and showing a spin control.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param value
+ @param value
Default value.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param pos
+ @param pos
Window position. If wxDefaultPosition is specified then a default position
is chosen.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then a default size is
chosen.
- @param style
+ @param style
Window style. See wxSpinButton.
- @param min
+ @param min
Minimal value.
- @param max
+ @param max
Maximal value.
- @param initial
+ @param initial
Initial value.
- @param name
+ @param name
Window name.
@sa Create()
*/
wxSpinCtrl();
- wxSpinCtrl(wxWindow* parent, wxWindowID id = -1,
- 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);
+ wxSpinCtrl(wxWindow* parent, wxWindowID id = -1,
+ 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);
//@}
/**
void SetRange(int minVal, int maxVal);
/**
- Select the text in the text part of the control between positions
- @e from (inclusive) and @e to (exclusive). This is similar to
+ Select the text in the text part of the control between positions
+ @e from (inclusive) and @e to (exclusive). This is similar to
wxTextCtrl::SetSelection.
@b NB: this is currently only implemented for Windows and generic versions
Sets the value of the spin control.
*/
void SetValue(const wxString& text);
- void SetValue(int value);
+ void SetValue(int value);
//@}
};
/**
@class wxSplashScreen
@wxheader{splash.h}
-
+
wxSplashScreen shows a window with a thin border, displaying a bitmap
describing your
application. Show it in application initialisation, and then either explicitly
destroy
it or let it time-out.
-
+
Example usage:
-
+
@code
wxBitmap bitmap;
if (bitmap.LoadFile("splash16.png", wxBITMAP_TYPE_PNG))
}
wxYield();
@endcode
-
+
@library{wxadv}
@category{managedwnd}
*/
/**
@class wxSplitterWindow
@wxheader{splitter.h}
-
+
@ref overview_wxsplitterwindowoverview "wxSplitterWindow overview"
-
+
This class manages up to two subwindows. The current view can be
split into two programmatically (perhaps from a menu command), and unsplit
either programmatically or via the wxSplitterWindow user interface.
-
+
@beginStyleTable
@style{wxSP_3D}:
Draws a 3D effect border and sash.
@style{wxSP_LIVE_UPDATE}:
Don't draw XOR line but resize the child windows immediately.
@endStyleTable
-
+
@library{wxcore}
@category{miscwnd}
-
+
@seealso
wxSplitterEvent
*/
/**
Constructor for creating the window.
- @param parent
+ @param parent
The parent of the splitter window.
- @param id
+ @param id
The window identifier.
- @param pos
+ @param pos
The window position.
- @param size
+ @param size
The window size.
- @param style
+ @param style
The window style. See wxSplitterWindow.
- @param name
+ @param name
The window name.
@remarks After using this constructor, you must create either one or two
SplitHorizontally(), Create()
*/
wxSplitterWindow();
- wxSplitterWindow(wxWindow* parent, wxWindowID id,
- const wxPoint& point = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style=wxSP_3D,
- const wxString& name = "splitterWindow");
+ wxSplitterWindow(wxWindow* parent, wxWindowID id,
+ const wxPoint& point = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style=wxSP_3D,
+ const wxString& name = "splitterWindow");
//@}
/**
Initializes the splitter window to have one pane. The child window is
shown if it is currently hidden.
- @param window
+ @param window
The pane for the unsplit window.
@remarks This should be called if you wish to initially view only a
Application-overridable function called when the sash is double-clicked with
the left mouse button.
- @param x
+ @param x
The x position of the mouse cursor.
- @param y
+ @param y
The y position of the mouse cursor.
@remarks The default implementation of this function calls Unsplit if the
virtual void OnDoubleClickSash(int x, int y);
/**
- Application-overridable function called when the sash position is changed by
+ Application-overridable function called when the sash position is changed by
user. It may return @false to prevent the change or @true to allow it.
- @param newSashPosition
+ @param newSashPosition
The new sash position (always positive or zero)
@remarks The default implementation of this function verifies that the
Application-overridable function called when the window is unsplit, either
programmatically or using the wxSplitterWindow user interface.
- @param removed
+ @param removed
The window being removed.
@remarks The default implementation of this function simply hides
/**
Sets the minimum pane size.
- @param paneSize
+ @param paneSize
Minimum pane size in pixels.
@remarks The default minimum pane size is zero, which means that either
void SetMinimumPaneSize(int paneSize);
/**
- Sets the sash gravity.
+ Sets the sash gravity.
- @param gravity
+ @param gravity
The sash gravity. Value between 0.0 and 1.0.
@sa GetSashGravity()
/**
Sets the sash position.
- @param position
+ @param position
The sash position in pixels.
- @param redraw
+ @param redraw
If @true, resizes the panes and redraws the sash and border.
@remarks Does not currently check for an out-of-range value.
/**
Sets the split mode.
- @param mode
+ @param mode
Can be wxSPLIT_VERTICAL or wxSPLIT_HORIZONTAL.
@remarks Only sets the internal variable; does not update the display.
Initializes the top and bottom panes of the splitter window. The
child windows are shown if they are currently hidden.
- @param window1
+ @param window1
The top pane.
- @param window2
+ @param window2
The bottom pane.
- @param sashPosition
+ @param sashPosition
The initial position of the sash. If this value is
positive, it specifies the size of the upper pane. If it is negative, its
absolute value gives the size of the lower pane. Finally, specify 0 (default)
Initializes the left and right panes of the splitter window. The
child windows are shown if they are currently hidden.
- @param window1
+ @param window1
The left pane.
- @param window2
+ @param window2
The right pane.
- @param sashPosition
+ @param sashPosition
The initial position of the sash. If this value is
positive, it specifies the size of the left pane. If it is negative, it is
absolute value gives the size of the right pane. Finally, specify 0 (default)
/**
Unsplits the window.
- @param toRemove
+ @param toRemove
The pane to remove, or @NULL to remove the right or bottom pane.
@returns @true if successful, @false otherwise (the window was not split).
/**
@class wxSplitterEvent
@wxheader{splitter.h}
-
+
This class represents the events generated by a splitter control. Also there is
only one event class, the data associated to the different events is not the
same and so not all accessor functions may be called for each event. The
documentation mentions the kind of event(s) for which the given accessor
function makes sense: calling it for other types of events will result
in assert failure (in debug mode) and will return meaningless results.
-
+
@library{wxcore}
@category{events}
-
+
@seealso
wxSplitterWindow, @ref overview_eventhandlingoverview "Event handling overview"
*/
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING and
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED events.
- @param pos
+ @param pos
New sash position.
*/
void SetSashPosition(int pos);
/**
@class wxSearchCtrl
@wxheader{srchctrl.h}
-
- A search control is a composite control with a search button, a text
+
+ A search control is a composite control with a search button, a text
control, and a cancel button.
-
+
@beginStyleTable
@style{wxTE_PROCESS_ENTER}:
The control will generate the event wxEVT_COMMAND_TEXT_ENTER
On PocketPC and Smartphone, causes the first letter to be
capitalized.
@endStyleTable
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxTextCtrl::Create, wxValidator
*/
/**
Constructor, creating and showing a text control.
- @param parent
+ @param parent
Parent window. Should not be @NULL.
- @param id
+ @param id
Control identifier. A value of -1 denotes a default value.
- @param value
+ @param value
Default text value.
- @param pos
+ @param pos
Text control position.
- @param size
+ @param size
Text control size.
- @param style
+ @param style
Window style. See wxSearchCtrl.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa wxTextCtrl::Create, wxValidator
*/
wxSearchCtrl();
- wxSearchCtrl(wxWindow* parent, wxWindowID id,
- const wxString& value = "",
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxSearchCtrlNameStr);
+ wxSearchCtrl(wxWindow* parent, wxWindowID id,
+ const wxString& value = "",
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxSearchCtrlNameStr);
//@}
/**
~wxSearchCtrl();
/**
- Returns a pointer to the search control's menu object or @NULL if there is no
+ Returns a pointer to the search control's menu object or @NULL if there is no
menu attached.
*/
virtual wxMenu* GetMenu();
/**
- Returns the search button visibility value.
+ Returns the search button visibility value.
If there is a menu attached, the search button will be visible regardless of
the search
- button visibility value.
+ button visibility value.
This always returns @false in Mac OS X v10.3
*/
with
the search control it is deleted.
- @param menu
+ @param menu
Menu to attach to the search control.
*/
virtual void SetMenu(wxMenu* menu);
virtual void ShowCancelButton(bool show);
/**
- Sets the search button visibility value on the search control.
+ Sets the search button visibility value on the search control.
If there is a menu attached, the search button will be visible regardless of
the search
- button visibility value.
+ button visibility value.
This has no effect in Mac OS X v10.3
*/
/**
@class wxStringInputStream
@wxheader{sstream.h}
-
+
This class implements an input stream which reads data from a string. It
supports seeking.
-
+
@library{wxbase}
@category{streams}
*/
/**
@class wxStringOutputStream
@wxheader{sstream.h}
-
+
This class implements an output stream which writes data either to a
user-provided or internally allocated string. Note that currently this stream
does not support seeking but can tell its current position.
-
+
@library{wxbase}
@category{streams}
*/
public:
/**
If the provided pointer is non-@NULL, data will be written to it.
- Otherwise, an internal string is used for the data written to this stream, use
+ Otherwise, an internal string is used for the data written to this stream, use
GetString() to get access to it.
If @e str is used, data written to the stream is appended to the current
/**
@class wxStackWalker
@wxheader{stackwalk.h}
-
+
wxStackWalker allows an application to enumerate, or walk, the stack frames
(the function callstack).
It is mostly useful in only two situations:
programmatically get the location of the crash and, in debug builds, in
wxApp::OnAssertFailure to report the caller of the failed
assert.
-
+
wxStackWalker works by repeatedly calling
the wxStackWalker::OnStackFrame method for each frame in the
stack, so to use it you must derive your own class from it and override this
method.
-
+
This class will not return anything except raw stack frame addresses if the
debug information is not available. Under Win32 this means that the PDB file
matching the program being executed should be present. Note that if you use
even without it. Of course, all this is only @true if you build using a recent
enough version of GNU libc which provides the @c backtrace() function
needed to walk the stack.
-
+
@ref overview_debuggingoverview "debugging overview" for how to make it
available.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxStackFrame
*/
-class wxStackWalker
+class wxStackWalker
{
public:
/**
/**
@class wxStackFrame
@wxheader{stackwalk.h}
-
+
wxStackFrame represents a single stack frame, or a single function in the call
- stack, and is used exclusively together with
+ stack, and is used exclusively together with
wxStackWalker, see there for a more detailed
discussion.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxStackWalker
*/
-class wxStackFrame
+class wxStackFrame
{
public:
/**
/**
@class wxStaticBitmap
@wxheader{statbmp.h}
-
+
A static bitmap control displays a bitmap. It is meant for display of the
small icons in the dialog boxes and is not meant to be a general purpose image
display control. In particular, under Windows 9x the size of bitmap is limited
to 64*64 pixels and thus you should use your own control if you want to
display larger images portably.
-
+
@library{wxcore}
@category{ctrl}
@appearance{staticbitmap.png}
-
+
@seealso
wxStaticBitmap, wxStaticBox
*/
/**
Constructor, creating and showing a static bitmap control.
- @param parent
+ @param parent
Parent window. Should not be @NULL.
- @param id
+ @param id
Control identifier. A value of -1 denotes a default value.
- @param label
+ @param label
Bitmap label.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size.
- @param style
+ @param style
Window style. See wxStaticBitmap.
- @param name
+ @param name
Window name.
@sa Create()
*/
wxStaticBitmap();
- wxStaticBitmap(wxWindow* parent, wxWindowID id,
- const wxBitmap& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = "staticBitmap");
+ wxStaticBitmap(wxWindow* parent, wxWindowID id,
+ const wxBitmap& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = "staticBitmap");
//@}
/**
/**
Returns the icon currently used in the control. Notice that this method can
only be called if SetIcon() had been used: an icon
- can't be retrieved from the control if a bitmap had been set (using
+ can't be retrieved from the control if a bitmap had been set (using
wxStaticBitmap::SetBitmap).
@sa SetIcon()
/**
Sets the bitmap label.
- @param label
+ @param label
The new bitmap.
@sa GetBitmap()
/**
Sets the label to the given icon.
- @param label
+ @param label
The new icon.
*/
virtual void SetIcon(const wxIcon& label);
/**
@class wxStaticBox
@wxheader{statbox.h}
-
+
A static box is a rectangle drawn around other panel items to denote
a logical grouping of items.
-
+
Please note that a static box should @b not be used as the parent for the
controls it contains, instead they should be siblings of each other. Although
using a static box as a parent might work in some versions of wxWidgets, it
- results in a crash under, for example, wxGTK.
-
- Also, please note that because of this, the order in which you create new
- controls is important. Create your wxStaticBox control @b before any
- siblings that are to appear inside the wxStaticBox in order to preserve the
+ results in a crash under, for example, wxGTK.
+
+ Also, please note that because of this, the order in which you create new
+ controls is important. Create your wxStaticBox control @b before any
+ siblings that are to appear inside the wxStaticBox in order to preserve the
correct Z-Order of controls.
-
+
@library{wxcore}
@category{ctrl}
@appearance{staticbox.png}
-
+
@seealso
wxStaticText
*/
/**
Constructor, creating and showing a static box.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param label
+ @param label
Text to be displayed in the static box, the empty string for no label.
- @param pos
+ @param pos
Window position. If wxDefaultPosition is specified then a default position
is chosen.
- @param size
+ @param size
Checkbox size. If the size (-1, -1) is specified then a default size is chosen.
- @param style
+ @param style
Window style. See wxStaticBox.
- @param name
+ @param name
Window name.
@sa Create()
*/
wxStaticBox();
- wxStaticBox(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = "staticBox");
+ wxStaticBox(wxWindow* parent, wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = "staticBox");
//@}
/**
/**
@class wxStaticLine
@wxheader{statline.h}
-
+
A static line is just a line which may be used in a dialog to separate the
groups of controls. The line may be only vertical or horizontal.
-
+
@beginStyleTable
@style{wxLI_HORIZONTAL}:
Creates a horizontal line.
@style{wxLI_VERTICAL}:
Creates a vertical line.
@endStyleTable
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxStaticBox
*/
/**
Constructor, creating and showing a static line.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param pos
+ @param pos
Window position. If wxDefaultPosition is specified then a default position
is chosen.
- @param size
+ @param size
Size. Note that either the height or the width (depending on
whether the line if horizontal or vertical) is ignored.
- @param style
+ @param style
Window style (either wxLI_HORIZONTAL or wxLI_VERTICAL).
- @param name
+ @param name
Window name.
@sa Create()
*/
wxStaticLine();
- wxStaticLine(wxWindow* parent, wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxLI_HORIZONTAL,
- const wxString& name = "staticLine");
+ wxStaticLine(wxWindow* parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxLI_HORIZONTAL,
+ const wxString& name = "staticLine");
//@}
/**
/**
@class wxStaticText
@wxheader{stattext.h}
-
+
A static text control displays one or more lines of read-only text.
-
+
@beginStyleTable
@style{wxALIGN_LEFT}:
Align the text to the left
@style{wxST_MARKUP}:
Support markup in the label; see SetLabel for more information
@endStyleTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{statictext.png}
-
+
@seealso
wxStaticBitmap, wxStaticBox
*/
/**
Constructor, creating and showing a text control.
- @param parent
+ @param parent
Parent window. Should not be @NULL.
- @param id
+ @param id
Control identifier. A value of -1 denotes a default value.
- @param label
+ @param label
Text label.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size.
- @param style
+ @param style
Window style. See wxStaticText.
- @param name
+ @param name
Window name.
@sa Create()
*/
wxStaticText();
- wxStaticText(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = "staticText");
+ wxStaticText(wxWindow* parent, wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = "staticText");
//@}
/**
//@{
/**
The first form returns the control's label without the mnemonics characters (if
- any)
+ any)
and without the markup (if the control has @c wxST_MARKUP style).
The second (static) version returns the given @e label string without the
- mnemonics
+ mnemonics
characters (if any) and without the markup.
*/
wxString GetLabelText();
- static wxString GetLabelText(const wxString& label);
+ static wxString GetLabelText(const wxString& label);
//@}
/**
@b Escape as
- @c
+ @c
- @c amp; or as @c
+ @c amp; or as @c
@c '
@c quot;
- @c
+ @c
@c lt;
- @c
+ @c
@c gt;
mnemonics; see wxControl::SetLabel.
Example:
- @param label
+ @param label
The new label to set. It may contain newline characters and the markup tags
described above.
*/
/**
@class wxStatusBar
@wxheader{statusbr.h}
-
+
A status bar is a narrow window that can be placed along the bottom of a frame
to give
small amounts of status information. It can contain one or more fields, one or
more of which can
be variable length according to the size of the window.
-
+
wxWindow
-
+
wxEvtHandler
-
+
wxObject
-
+
@beginStyleTable
@style{wxST_SIZEGRIP}:
On Windows 95, displays a gripper at right-hand side of the status
bar.
@endStyleTable
-
+
@library{wxcore}
@category{miscwnd}
-
+
@seealso
wxFrame, @ref overview_samplestatbar "Status bar sample"
*/
/**
Constructor, creating the window.
- @param parent
+ @param parent
The window parent, usually a frame.
- @param id
+ @param id
The window identifier. It may take a value of -1 to indicate a default value.
- @param style
+ @param style
The window style. See wxStatusBar.
- @param name
+ @param name
The name of the window. This parameter is used to associate a name with the
item,
allowing the application user to set Motif resource values for
@sa Create()
*/
wxStatusBar();
- wxStatusBar(wxWindow* parent, wxWindowID id = wxID_ANY,
- long style = wxST_SIZEGRIP,
- const wxString& name = "statusBar");
+ wxStatusBar(wxWindow* parent, wxWindowID id = wxID_ANY,
+ long style = wxST_SIZEGRIP,
+ const wxString& name = "statusBar");
//@}
/**
/**
Returns the size and position of a field's internal bounding rectangle.
- @param i
+ @param i
The field in question.
- @param rect
+ @param rect
The rectangle values are placed in this variable.
@returns @true if the field index is valid, @false otherwise.
/**
Returns the string associated with a status bar field.
- @param i
+ @param i
The number of the status field to retrieve, starting from zero.
@returns The status field string if the field is valid, otherwise the
/**
Sets the number of fields, and optionally the field widths.
- @param number
+ @param number
The number of fields.
- @param widths
+ @param widths
An array of n integers interpreted in the same way as
in SetStatusWidths
*/
flat
or raised instead of the standard sunken 3D border.
- @param n
+ @param n
The number of fields in the status bar. Must be equal to the
number passed to SetFieldsCount the last
time it was called.
- @param styles
- Contains an array of n integers with the styles for each field. There
+ @param styles
+ Contains an array of n integers with the styles for each field. There
are three possible styles:
/**
Sets the text for one field.
- @param text
+ @param text
The text to be set. Use an empty string ("") to clear the field.
- @param i
+ @param i
The field to set, starting from zero.
@sa GetStatusText(), wxFrame::SetStatusText
the status bar and two more fields which get 66% and 33% of the remaining
space correspondingly, you should use an array containing -2, -1 and 100.
- @param n
+ @param n
The number of fields in the status bar. Must be equal to the
number passed to SetFieldsCount the last
time it was called.
- @param widths
+ @param widths
Contains an array of n integers, each of which is
either an absolute status field width in pixels if positive or indicates a
variable width field if negative.
/**
@class wxStyledTextEvent
@headerfile stc.h wx/stc/stc.h
-
+
The type of events sent from wxStyledTextCtrl.
-
+
TODO
-
+
@library{wxbase}
@category{FIXME}
*/
*/
wxStyledTextEvent(wxEventType commandType = 0, int id = 0);
- wxStyledTextEvent(const wxStyledTextEvent& event);
+ wxStyledTextEvent(const wxStyledTextEvent& event);
//@}
/**
/**
@class wxStyledTextCtrl
@headerfile stc.h wx/stc/stc.h
-
+
A wxWidgets implementation of the Scintilla source code editing component.
-
+
As well as features found in standard text editing components, Scintilla
- includes
+ includes
features especially useful when editing and debugging source code. These
- include
+ include
support for syntax styling, error indicators, code completion and call tips.
- The
- selection margin can contain markers like those used in debuggers to indicate
- breakpoints and the current line. Styling choices are more open than with many
- editors, allowing the use of proportional fonts, bold and italics, multiple
+ The
+ selection margin can contain markers like those used in debuggers to indicate
+ breakpoints and the current line. Styling choices are more open than with many
+ editors, allowing the use of proportional fonts, bold and italics, multiple
foreground and background colours and multiple fonts.
-
+
wxStyledTextCtrl is a 1 to 1 mapping of "raw" scintilla interface, whose
documentation
can be found in the Scintilla website.
-
+
@library{wxbase}
@category{stc}
-
+
@seealso
wxStyledTextEvent
*/
int ReplaceTarget(const wxString& text);
/**
- Replace the target text with the argument text after
+ Replace the target text with the argument text after
d processing.
Text is counted so it can contain NULs.
- Looks for
+ Looks for
d where d is between 1 and 9 and replaces these with the strings
- matched in the last search operation which were surrounded by
- ( and
+ matched in the last search operation which were surrounded by
+ ( and
).
Returns the length of the replacement text including any change
- caused by processing the
+ caused by processing the
d patterns.
*/
int ReplaceTargetRE(const wxString& text);
/**
@class wxStandardPaths
@wxheader{stdpaths.h}
-
+
wxStandardPaths returns the standard locations in the file system and should be
used by applications to find their data files in a portable way.
-
+
In the description of the methods below, the example return values are given
for the Unix, Windows and Mac OS X systems, however please note that these are
just the examples and the actual values may differ. For example, under Windows:
the system administrator may change the standard directories locations, i.e.
the Windows directory may be named @c W:\Win2003 instead of
the default @c C:\Windows.
-
+
The strings @c @e appname and @c @e username should be
replaced with the value returned by wxApp::GetAppName
and the name of the currently logged in user, respectively. The string
@c @e prefix is only used under Unix and is @c /usr/local by
default but may be changed using wxStandardPaths::SetInstallPrefix.
-
+
The directories returned by the methods of this class may or may not exist. If
they don't exist, it's up to the caller to create them, wxStandardPaths doesn't
do it.
-
+
Finally note that these functions only work with standardly packaged
applications. I.e. under Unix you should follow the standard installation
conventions and under Mac you should create your application bundle according
to the Apple guidelines. Again, this class doesn't help you to do it.
-
+
This class is MT-safe: its methods may be called concurrently from different
threads without additional locking.
-
+
@library{wxbase}
@category{file}
-
+
@seealso
wxFileConfig
*/
-class wxStandardPaths
+class wxStandardPaths
{
public:
/**
/////////////////////////////////////////////////////////////////////////////
- // Name: stockitem.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- /**
- Returns label that should be used for given @e id element.
-
- @param id
- given id of the wxMenuItem, wxButton, wxToolBar tool, etc.
-
- @param withCodes
- if @false then strip accelerator code from the label;
- useful for getting labels without accelerator char code like for toolbar
- tooltip or
- on platforms without traditional keyboard like smartphones
-
- @param accelerator
- optional accelerator string automatically added to label; useful
- for building labels for wxMenuItem
+// Name: stockitem.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+Returns label that should be used for given @e id element.
+
+@param id
+given id of the wxMenuItem, wxButton, wxToolBar tool, etc.
+
+@param withCodes
+if @false then strip accelerator code from the label;
+useful for getting labels without accelerator char code like for toolbar
+tooltip or
+on platforms without traditional keyboard like smartphones
+
+@param accelerator
+optional accelerator string automatically added to label; useful
+for building labels for wxMenuItem
*/
wxString wxGetStockLabel(wxWindowID id, bool withCodes = @true,
const wxString& accelerator = wxEmptyString);
-
\ No newline at end of file
/**
@class wxStopWatch
@wxheader{stopwatch.h}
-
+
The wxStopWatch class allow you to measure time intervals. For example, you may
use it to measure the time elapsed by some function:
-
+
@code
wxStopWatch sw;
CallLongRunningFunction();
CallLongRunningFunction();
wxLogMessage("And calling it twice took $ldms in all", sw.Time());
@endcode
-
+
@library{wxbase}
@category{misc}
-
+
@seealso
wxTimer
*/
-class wxStopWatch
+class wxStopWatch
{
public:
/**
wxStopWatch();
/**
- Pauses the stop watch. Call Resume() to resume
+ Pauses the stop watch. Call Resume() to resume
time measuring again.
If this method is called several times, @c Resume() must be called the same
- number of times to really resume the stop watch. You may, however, call
+ number of times to really resume the stop watch. You may, however, call
Start() to resume it unconditionally.
*/
void Pause();
/**
- Resumes the stop watch which had been paused with
+ Resumes the stop watch which had been paused with
Pause().
*/
void Resume();
/**
Returns the time in milliseconds since the start (or restart) or the last call
- of
+ of
Pause().
*/
long Time();
/**
Returns the number of seconds since local time 00:00:00 Jan 1st 1970.
-
+
@sa wxDateTime::Now
*/
long wxGetLocalTime();
/**
Returns the number of seconds since GMT 00:00:00 Jan 1st 1970.
-
+
@sa wxDateTime::Now
*/
long wxGetUTCTime();
/**
Returns the number of milliseconds since local time 00:00:00 Jan 1st 1970.
-
+
@sa wxDateTime::Now, wxLongLong
*/
wxLongLong wxGetLocalTimeMillis();
/**
@class wxMBConvUTF7
@wxheader{strconv.h}
-
+
This class converts between the UTF-7 encoding and Unicode.
It has one predefined instance, @b wxConvUTF7.
-
+
@b WARNING: this class is not implemented yet.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxMBConvUTF8, @ref overview_mbconvclasses "wxMBConv classes overview"
*/
/**
@class wxMBConvUTF8
@wxheader{strconv.h}
-
+
This class converts between the UTF-8 encoding and Unicode.
It has one predefined instance, @b wxConvUTF8.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxMBConvUTF7, @ref overview_mbconvclasses "wxMBConv classes overview"
*/
/**
@class wxMBConvUTF16
@wxheader{strconv.h}
-
+
This class is used to convert between multibyte encodings and UTF-16 Unicode
encoding (also known as UCS-2). Unlike UTF-8 encoding,
UTF-16 uses words and not bytes and hence depends on the byte ordering:
wxMBConvUTF16LE and wxMBConvUTF16BE and wxMBConvUTF16 itself is just a typedef
for one of them (native for the given platform, e.g. LE under Windows and BE
under Mac).
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxMBConvUTF8, wxMBConvUTF32, @ref overview_mbconvclasses "wxMBConv classes
overview"
/**
@class wxCSConv
@wxheader{strconv.h}
-
+
This class converts between any character sets and Unicode.
It has one predefined instance, @b wxConvLocal, for the
default user character set.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxMBConv, wxEncodingConverter, @ref overview_mbconvclasses "wxMBConv classes
overview"
encoding) is not recognized, ISO 8859-1 is used as fall back.
*/
wxCSConv(const wxChar* charset);
- wxCSConv(wxFontEncoding encoding);
+ wxCSConv(wxFontEncoding encoding);
//@}
/**
/**
@class wxMBConvFile
@wxheader{strconv.h}
-
- This class used to define the class instance
+
+ This class used to define the class instance
@b wxConvFileName, but nowadays @b wxConvFileName is
either of type wxConvLibc (on most platforms) or wxConvUTF8
- (on MacOS X). @b wxConvFileName converts filenames between
- filesystem multibyte encoding and Unicode. @b wxConvFileName
- can also be set to a something else at run-time which is used
- e.g. by wxGTK to use a class which checks the environment
- variable @b G_FILESYSTEM_ENCODING indicating that filenames
- should not be interpreted as UTF8 and also for converting
+ (on MacOS X). @b wxConvFileName converts filenames between
+ filesystem multibyte encoding and Unicode. @b wxConvFileName
+ can also be set to a something else at run-time which is used
+ e.g. by wxGTK to use a class which checks the environment
+ variable @b G_FILESYSTEM_ENCODING indicating that filenames
+ should not be interpreted as UTF8 and also for converting
invalid UTF8 characters (e.g. if there is a filename in iso8859_1)
- to strings with octal values.
-
+ to strings with octal values.
+
Since some platforms (such as Win32) use Unicode in the filenames,
and others (such as Unix) use multibyte encodings, this class should only
be used directly if wxMBFILES is defined to 1. A convenience macro,
wxFNCONV, is defined to wxConvFileName-cWX2MB in this case. You could
use it like this:
-
+
@code
wxChar *name = wxT("rawfile.doc");
FILE *fil = fopen(wxFNCONV(name), "r");
@endcode
-
+
(although it would be better to use wxFopen(name, wxT("r")) in this case.)
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_mbconvclasses "wxMBConv classes overview"
*/
/**
@class wxMBConvUTF32
@wxheader{strconv.h}
-
+
This class is used to convert between multibyte encodings and UTF-32 Unicode
encoding (also known as UCS-4). Unlike UTF-8 encoding,
UTF-32 uses (double) words and not bytes and hence depends on the byte ordering:
wxMBConvUTF32LE and wxMBConvUTF32BE and wxMBConvUTF32 itself is just a typedef
for one of them (native for the given platform, e.g. LE under Windows and BE
under Mac).
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxMBConvUTF8, wxMBConvUTF16, @ref overview_mbconvclasses "wxMBConv classes
overview"
/**
@class wxMBConv
@wxheader{strconv.h}
-
+
This class is the base class of a hierarchy of classes capable of converting
text strings between multibyte (SBCS or DBCS) encodings and Unicode.
-
- In the documentation for this and related classes please notice that
+
+ In the documentation for this and related classes please notice that
length of the string refers to the number of characters in the string
not counting the terminating @c NUL, if any. While the size of the string
is the total number of bytes in the string, including any trailing @c NUL.
Thus, length of wide character string @c L"foo" is 3 while its size can
be either 8 or 16 depending on whether @c wchar_t is 2 bytes (as
under Windows) or 4 (Unix).
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxCSConv, wxEncodingConverter, @ref overview_mbconvclasses "wxMBConv classes
overview"
*/
-class wxMBConv
+class wxMBConv
{
public:
/**
virtual wxMBConv * Clone();
/**
- This function has the same semantics as ToWChar()
+ This function has the same semantics as ToWChar()
except that it converts a wide string to multibyte one.
*/
virtual size_t FromWChar(char * dst, size_t dstLen,
This function returns 1 for most of the multibyte encodings in which the
string is terminated by a single @c NUL, 2 for UTF-16 and 4 for UTF-32 for
which the string is terminated with 2 and 4 @c NUL characters respectively.
- The other cases are not currently supported and @c wxCONV_FAILED
+ The other cases are not currently supported and @c wxCONV_FAILED
(defined as -1) is returned for them.
*/
size_t GetMBNulLen();
/**
- Returns the maximal value which can be returned by
+ Returns the maximal value which can be returned by
GetMBNulLen() for any conversion object. Currently
this value is 4.
/**
This function is deprecated, please use ToWChar() instead
- Converts from a string @e in in multibyte encoding to Unicode putting up to
+ Converts from a string @e in in multibyte encoding to Unicode putting up to
@e outLen characters into the buffer @e out.
If @e out is @NULL, only the length of the string which would result from
the conversion is calculated and returned. Note that this is the length and not
size, i.e. the returned value does not include the trailing @c NUL. But
- when the function is called with a non-@NULL @e out buffer, the @e outLen
+ when the function is called with a non-@NULL @e out buffer, the @e outLen
parameter should be one more to allow to properly @c NUL-terminate the string.
- @param out
+ @param out
The output buffer, may be @NULL if the caller is only
interested in the length of the resulting string
- @param in
+ @param in
The NUL-terminated input string, cannot be @NULL
- @param outLen
- The length of the output buffer but including
+ @param outLen
+ The length of the output buffer but including
NUL, ignored if out is @NULL
@returns The length of the converted string excluding the trailing NUL.
*/
#define virtual size_t MB2WC(wchar_t * out, const char * in,
- size_t outLen) /* implementation is private */
+ size_t outLen) /* implementation is private */
/**
The most general function for converting a multibyte string to a wide string.
- The main case is when @e dst is not @NULL and @e srcLen is not
+ The main case is when @e dst is not @NULL and @e srcLen is not
@c wxNO_LEN (which is defined as @c (size_t)-1): then
the function converts exactly @e srcLen bytes starting at @e src into
wide string which it output to @e dst. If the length of the resulting wide
- string is greater than @e dstLen, an error is returned. Note that if
+ string is greater than @e dstLen, an error is returned. Note that if
@e srcLen bytes don't include @c NUL characters, the resulting wide string is
not @c NUL-terminated neither.
If @e srcLen is @c wxNO_LEN, the function supposes that the string is
- properly (i.e. as necessary for the encoding handled by this conversion)
- @c NUL-terminated and converts the entire string, including any trailing @c NUL
+ properly (i.e. as necessary for the encoding handled by this conversion)
+ @c NUL-terminated and converts the entire string, including any trailing @c NUL
bytes. In this case the wide string is also @c NUL-terminated.
Finally, if @e dst is @NULL, the function returns the length of the needed
This function is deprecated, please use FromWChar() instead
Converts from Unicode to multibyte encoding. The semantics of this function
- (including the return value meaning) is the same as for
+ (including the return value meaning) is the same as for
wxMBConv::MB2WC.
- Notice that when the function is called with a non-@NULL buffer, the
+ Notice that when the function is called with a non-@NULL buffer, the
@e n parameter should be the size of the buffer and so it should take
into account the trailing @c NUL, which might take two or four bytes for some
encodings (UTF-16 and UTF-32) and not one.
//@{
/**
- Converts from multibyte encoding to Unicode by calling
+ Converts from multibyte encoding to Unicode by calling
wxMBConv::MB2WC, allocating a temporary wxWCharBuffer to hold
the result.
a
string of exactly the specified length and the string may include or not the
trailing @c NUL character(s). If the string is not @c NUL-terminated, a
- temporary
- @c NUL-terminated copy of it suitable for passing to wxMBConv::MB2WC
+ temporary
+ @c NUL-terminated copy of it suitable for passing to wxMBConv::MB2WC
is made, so it is more efficient to ensure that the string is does have the
appropriate number of @c NUL bytes (which is usually 1 but may be 2 or 4
for UTF-16 or UTF-32, see wxMBConv::GetMBNulLen),
string.
*/
const wxWCharBuffer cMB2WC(const char * in);
- const wxWCharBuffer cMB2WC(const char * in, size_t inLen,
- size_t outLen);
+ const wxWCharBuffer cMB2WC(const char * in, size_t inLen,
+ size_t outLen);
//@}
//@{
return type (without const).
*/
const char* cMB2WX(const char* psz);
- const wxWCharBuffer cMB2WX(const char* psz);
+ const wxWCharBuffer cMB2WX(const char* psz);
//@}
//@{
string.
*/
const wxCharBuffer cWC2MB(const wchar_t* in);
- const wxCharBuffer cWC2MB(const wchar_t* in, size_t inLen,
- size_t outLen);
+ const wxCharBuffer cWC2MB(const wchar_t* in, size_t inLen,
+ size_t outLen);
//@}
//@{
return type (without const).
*/
const wchar_t* cWC2WX(const wchar_t* psz);
- const wxCharBuffer cWC2WX(const wchar_t* psz);
+ const wxCharBuffer cWC2WX(const wchar_t* psz);
//@}
//@{
return type (without const).
*/
const char* cWX2MB(const wxChar* psz);
- const wxCharBuffer cWX2MB(const wxChar* psz);
+ const wxCharBuffer cWX2MB(const wxChar* psz);
//@}
//@{
return type (without const).
*/
const wchar_t* cWX2WC(const wxChar* psz);
- const wxWCharBuffer cWX2WC(const wxChar* psz);
+ const wxWCharBuffer cWX2WC(const wxChar* psz);
//@}
};
/**
@class wxCountingOutputStream
@wxheader{stream.h}
-
+
wxCountingOutputStream is a specialized output stream which does not write any
data anywhere,
instead it counts how many bytes would get written if this were a normal
known is if the data has to be written to a piece of memory and the memory has
to be
allocated before writing to it (which is probably always the case when writing
- to a
+ to a
memory stream).
-
+
@library{wxbase}
@category{streams}
*/
/**
@class wxBufferedInputStream
@wxheader{stream.h}
-
+
This stream acts as a cache. It caches the bytes read from the specified
input stream (See wxFilterInputStream).
It uses wxStreamBuffer and sets the default in-buffer size to 1024 bytes.
This class may not be used without some other stream to read the data
from (such as a file stream or a memory stream).
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxStreamBuffer, wxInputStream, wxBufferedOutputStream
*/
class wxBufferedInputStream : public wxFilterInputStream
{
public:
-
+
};
/**
@class wxStreamBuffer
@wxheader{stream.h}
-
-
+
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxStreamBase
*/
-class wxStreamBuffer
+class wxStreamBuffer
{
public:
//@{
@sa @ref setbufferio() wxStreamBuffer:SetBufferIO
*/
wxStreamBuffer(wxStreamBase& stream, BufMode mode);
- wxStreamBuffer(BufMode mode);
- wxStreamBuffer(const wxStreamBuffer& buffer);
+ wxStreamBuffer(BufMode mode);
+ wxStreamBuffer(const wxStreamBuffer& buffer);
//@}
/**
bool FillBuffer();
/**
- Toggles the fixed flag. Usually this flag is toggled at the same time as
+ Toggles the fixed flag. Usually this flag is toggled at the same time as
@e flushable. This flag allows (when it has the @false value) or forbids
(when it has the @true value) the stream buffer to resize dynamically the IO
buffer.
@sa Write()
*/
size_t Read(void * buffer, size_t size);
- Return value size_t Read(wxStreamBuffer * buffer);
+ Return value size_t Read(wxStreamBuffer * buffer);
//@}
/**
@sa Fixed(), Flushable()
*/
void SetBufferIO(char* buffer_start, char* buffer_end);
- Remarks See also
-wxStreamBuffer constructor
+ Remarks See also
+ wxStreamBuffer constructor
-wxStreamBuffer::Fixed
+ wxStreamBuffer::Fixed
-wxStreamBuffer::Flushable
-void SetBufferIO(size_t bufsize);
+ wxStreamBuffer::Flushable
+ void SetBufferIO(size_t bufsize);
//@}
/**
See Read().
*/
size_t Write(const void * buffer, size_t size);
- size_t Write(wxStreamBuffer * buffer);
+ size_t Write(wxStreamBuffer * buffer);
//@}
};
/**
@class wxOutputStream
@wxheader{stream.h}
-
+
wxOutputStream is an abstract base class which may not be used directly.
-
+
@library{wxbase}
@category{streams}
*/
bool Close();
/**
- Returns the number of bytes written during the last
+ Returns the number of bytes written during the last
Write(). It may return 0 even if there is no
error on the stream if it is only temporarily impossible to write to it.
*/
/**
Changes the stream current position.
- @param pos
+ @param pos
Offset to seek to.
- @param mode
+ @param mode
One of wxFromStart, wxFromEnd, wxFromCurrent.
@returns The new stream position or wxInvalidOffset on error.
//@{
/**
- Reads data from the specified input stream and stores them
+ Reads data from the specified input stream and stores them
in the current stream. The data is read until an error is raised
by one of the two streams.
*/
wxOutputStream Write(const void * buffer, size_t size);
- wxOutputStream Write(wxInputStream& stream_in);
+ wxOutputStream Write(wxInputStream& stream_in);
//@}
};
/**
@class wxFilterClassFactory
@wxheader{stream.h}
-
+
Allows the creation of filter streams to handle compression formats such
as gzip and bzip2.
-
+
For example, given a filename you can search for a factory that will
handle it and create a stream to decompress it:
-
+
@code
factory = wxFilterClassFactory::Find(filename, wxSTREAM_FILEEXT);
if (factory)
stream = factory-NewStream(new wxFFileInputStream(filename));
@endcode
-
+
wxFilterClassFactory::Find can also search
for a factory by MIME type, HTTP encoding or by wxFileSystem protocol.
The available factories can be enumerated
using @ref wxFilterClassFactory::getfirst "GetFirst() and GetNext".
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxFilterInputStream, wxFilterOutputStream, wxArchiveClassFactory, @ref
overview_wxarc "Archive formats such as zip"
are available. They do not give away ownership of the factory.
*/
static const wxFilterClassFactory* GetFirst();
- const wxFilterClassFactory* GetNext();
+ const wxFilterClassFactory* GetNext();
//@}
/**
takes ownership of it. If it is passed by reference then it does not.
*/
wxFilterInputStream* NewStream(wxInputStream& stream);
- wxFilterOutputStream* NewStream(wxOutputStream& stream);
- wxFilterInputStream* NewStream(wxInputStream* stream);
- wxFilterOutputStream* NewStream(wxOutputStream* stream);
+ wxFilterOutputStream* NewStream(wxOutputStream& stream);
+ wxFilterInputStream* NewStream(wxInputStream* stream);
+ wxFilterOutputStream* NewStream(wxOutputStream* stream);
//@}
/**
by @ref getfirst() GetFirst()/GetNext.
It is not necessary to do this to use the filter streams. It is usually
- used when implementing streams, typically the implementation will
+ used when implementing streams, typically the implementation will
add a static instance of its factory class.
It can also be used to change the order of a factory already in the list,
/**
@class wxFilterOutputStream
@wxheader{stream.h}
-
+
A filter stream has the capability of a normal
stream but it can be placed on top of another stream. So, for example, it
can compress, encrypt the data which are passed to it and write them to another
stream.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxFilterClassFactory, wxFilterInputStream
*/
takes ownership of it. If it is passed by reference then it does not.
*/
wxFilterOutputStream(wxOutputStream& stream);
- wxFilterOutputStream(wxOutputStream* stream);
+ wxFilterOutputStream(wxOutputStream* stream);
//@}
};
/**
@class wxFilterInputStream
@wxheader{stream.h}
-
+
A filter stream has the capability of a normal stream but it can be placed on
top
of another stream. So, for example, it can uncompress or decrypt the data which
are read
from another stream and pass it to the requester.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxFilterClassFactory, wxFilterOutputStream
*/
takes ownership of it. If it is passed by reference then it does not.
*/
wxFilterInputStream(wxInputStream& stream);
- wxFilterInputStream(wxInputStream* stream);
+ wxFilterInputStream(wxInputStream* stream);
//@}
};
/**
@class wxBufferedOutputStream
@wxheader{stream.h}
-
+
This stream acts as a cache. It caches the bytes to be written to the specified
output stream (See wxFilterOutputStream). The
data is only written when the cache is full, when the buffered stream is
destroyed or when calling SeekO().
-
+
This class may not be used without some other stream to write the data
to (such as a file stream or a memory stream).
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxStreamBuffer, wxOutputStream
*/
/**
@class wxInputStream
@wxheader{stream.h}
-
+
wxInputStream is an abstract base class which may not be used directly.
-
+
@library{wxbase}
@category{streams}
*/
#define bool Eof() /* implementation is private */
/**
- Returns the first character in the input queue and removes it,
+ Returns the first character in the input queue and removes it,
blocking until it appears if necessary.
*/
#define char GetC() /* implementation is private */
user can test any states of the stream right away.
*/
wxInputStream Read(void * buffer, size_t size);
- Warning Return value
-This function returns a reference on the current object, so the user can test
-any states of the stream right away.
-wxInputStream& Read(wxOutputStream& stream_out);
+ Warning Return value
+ This function returns a reference on the current object, so the user can test
+ any states of the stream right away.
+ wxInputStream& Read(wxOutputStream& stream_out);
//@}
/**
Changes the stream current position.
- @param pos
+ @param pos
Offset to seek to.
- @param mode
+ @param mode
One of wxFromStart, wxFromEnd, wxFromCurrent.
@returns The new stream position or wxInvalidOffset on error.
character: it is sometimes shorter to use than the generic function.
*/
size_t Ungetch(const char* buffer, size_t size);
- Return value bool Ungetch(char c);
+ Return value bool Ungetch(char c);
//@}
};
/**
@class wxStreamBase
@wxheader{stream.h}
-
+
This class is the base class of most stream related classes in wxWidgets. It
must
not be used directly.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxStreamBuffer
*/
-class wxStreamBase
+class wxStreamBase
{
public:
/**
/**
Returns the length of the stream in bytes. If the length cannot be determined
- (this is always the case for socket streams for example), returns
+ (this is always the case for socket streams for example), returns
@c wxInvalidOffset.
This function is new since wxWidgets version 2.5.4
/**
@class wxStringBuffer
@wxheader{string.h}
-
- This tiny class allows to conveniently access the wxString
+
+ This tiny class allows to conveniently access the wxString
internal buffer as a writable pointer without any risk of forgetting to restore
the string to the usable state later.
-
- For example, assuming you have a low-level OS function called
+
+ For example, assuming you have a low-level OS function called
@c GetMeaningOfLifeAsString(char *) returning the value in the provided
buffer (which must be writable, of course) you might call it like this:
-
+
@code
wxString theAnswer;
GetMeaningOfLifeAsString(wxStringBuffer(theAnswer, 1024));
wxLogError("Something is very wrong!");
}
@endcode
-
+
Note that the exact usage of this depends on whether on not wxUSE_STL is
enabled. If
wxUSE_STL is enabled, wxStringBuffer creates a separate empty character buffer,
if wxUSE_STL is disabled, it uses GetWriteBuf() from wxString, keeping the same
buffer
wxString uses intact. In other words, relying on wxStringBuffer containing the
- old
+ old
wxString data is probably not a good idea if you want to build your program in
both
with and without wxUSE_STL.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxStringBuffer
+class wxStringBuffer
{
public:
/**
wxStringBuffer(const wxString& str, size_t len);
/**
- Restores the string passed to the constructor to the usable state by calling
+ Restores the string passed to the constructor to the usable state by calling
wxString::UngetWriteBuf on it.
*/
~wxStringBuffer();
/**
@class wxString
@wxheader{string.h}
-
- wxString is a class representing a character string. Please see the
+
+ wxString is a class representing a character string. Please see the
@ref overview_wxstringoverview "wxString overview" for more information about
it.
-
+
As explained there, wxString implements most of the methods of the std::string
class.
These standard functions are not documented in this manual, please see the
STL documentation).
The behaviour of all these functions is identical to the behaviour described
there.
-
+
You may notice that wxString sometimes has many functions which do the same
- thing like, for example, wxString::Length,
+ thing like, for example, wxString::Length,
wxString::Len and @c length() which all return the string
length. In all cases of such duplication the @c std::string-compatible
method (@c length() in this case, always the lowercase version) should be
used as it will ensure smoother transition to @c std::string when wxWidgets
starts using it instead of wxString.
-
+
@library{wxbase}
@category{data}
-
+
@stdobjects
Objects:
wxEmptyString
-
+
@seealso
@ref overview_wxstringoverview "wxString overview", @ref overview_unicode
"Unicode overview"
*/
-class wxString
+class wxString
{
public:
//@{
/**
Initializes the string from first @e nLength characters of C string.
The default value of @c wxSTRING_MAXLEN means take all the string.
- In Unicode build, @e conv's
+ In Unicode build, @e conv's
wxMBConv::MB2WC method is called to
convert @e psz to wide string (the default converter uses current locale's
charset). It is ignored in ANSI build.
mb_str, @ref wcstr() wc_str
*/
wxString();
- wxString(const wxString& x);
- wxString(wxChar ch, size_t n = 1);
- wxString(const wxChar* psz, size_t nLength = wxSTRING_MAXLEN);
- wxString(const unsigned char* psz,
- size_t nLength = wxSTRING_MAXLEN);
- wxString(const wchar_t* psz, const wxMBConv& conv,
- size_t nLength = wxSTRING_MAXLEN);
- wxString(const char* psz, const wxMBConv& conv = wxConvLibc,
- size_t nLength = wxSTRING_MAXLEN);
+ wxString(const wxString& x);
+ wxString(wxChar ch, size_t n = 1);
+ wxString(const wxChar* psz, size_t nLength = wxSTRING_MAXLEN);
+ wxString(const unsigned char* psz,
+ size_t nLength = wxSTRING_MAXLEN);
+ wxString(const wchar_t* psz, const wxMBConv& conv,
+ size_t nLength = wxSTRING_MAXLEN);
+ wxString(const char* psz, const wxMBConv& conv = wxConvLibc,
+ size_t nLength = wxSTRING_MAXLEN);
//@}
/**
because it will avoid the need to reallocate string memory many times (in case
of long strings). Note that it does not set the maximal length of a string - it
will still expand if more than @e nLen characters are stored in it. Also, it
- does not truncate the existing string (use
+ does not truncate the existing string (use
Truncate() for this) even if its current length is
greater than @e nLen
*/
to it.
*/
wxString Append(const wxChar* psz);
- wxString Append(wxChar ch, int count = 1);
+ wxString Append(wxChar ch, int count = 1);
//@}
/**
See also CmpNoCase(), IsSameAs().
*/
int Cmp(const wxString& s);
- int Cmp(const wxChar* psz);
+ int Cmp(const wxChar* psz);
//@}
//@{
See also Cmp(), IsSameAs().
*/
int CmpNoCase(const wxString& s);
- int CmpNoCase(const wxChar* psz);
+ int CmpNoCase(const wxChar* psz);
//@}
/**
*/
bool operator ==(const wxString& x, const wxString& y);
- bool operator ==(const wxString& x, const wxChar* t);
- bool operator !=(const wxString& x, const wxString& y);
- bool operator !=(const wxString& x, const wxChar* t);
- bool operator(const wxString& x, const wxString& y);
- bool operator(const wxString& x, const wxChar* t);
- bool operator =(const wxString& x, const wxString& y);
- bool operator =(const wxString& x, const wxChar* t);
- bool operator(const wxString& x, const wxString& y);
- bool operator(const wxString& x, const wxChar* t);
- bool operator =(const wxString& x, const wxString& y);
- bool operator =(const wxString& x, const wxChar* t);
+ bool operator ==(const wxString& x, const wxChar* t);
+ bool operator !=(const wxString& x, const wxString& y);
+ bool operator !=(const wxString& x, const wxChar* t);
+ bool operator(const wxString& x, const wxString& y);
+ bool operator(const wxString& x, const wxChar* t);
+ bool operator =(const wxString& x, const wxString& y);
+ bool operator =(const wxString& x, const wxChar* t);
+ bool operator(const wxString& x, const wxString& y);
+ bool operator(const wxString& x, const wxChar* t);
+ bool operator =(const wxString& x, const wxString& y);
+ bool operator =(const wxString& x, const wxChar* t);
//@}
/**
void Empty();
/**
- This function can be used to test if the string ends with the specified
+ This function can be used to test if the string ends with the specified
@e suffix. If it does, the function will return @true and put the
- beginning of the string before the suffix into @e rest string if it is not
+ beginning of the string before the suffix into @e rest string if it is not
@NULL. Otherwise, the function returns @false and doesn't
modify the @e rest.
*/
not found.
*/
int Find(wxUniChar ch, bool fromEnd = @false);
- int Find(const wxString& sub);
+ int Find(const wxString& sub);
//@}
//@{
code.
*/
int First(wxChar c);
- int First(const wxChar* psz);
- int First(const wxString& str);
+ int First(const wxChar* psz);
+ int First(const wxString& str);
//@}
/**
- This static function returns the string containing the result of calling
+ This static function returns the string containing the result of calling
Printf() with the passed parameters on it.
@sa FormatV(), Printf()
static wxString Format(const wxChar format, ...);
/**
- This static function returns the string containing the result of calling
+ This static function returns the string containing the result of calling
PrintfV() with the passed parameters on it.
@sa Format(), PrintfV()
@sa wxString::To8BitData
*/
static wxString From8BitData(const char* buf, size_t len);
- static wxString From8BitData(const char* buf);
+ static wxString From8BitData(const char* buf);
//@}
//@{
need to convert from another charset.
*/
static wxString FromAscii(const char* s);
- static wxString FromAscii(const unsigned char* s);
- static wxString FromAscii(const char* s, size_t len);
- static wxString FromAscii(const unsigned char* s, size_t len);
- static wxString FromAscii(char c);
+ static wxString FromAscii(const unsigned char* s);
+ static wxString FromAscii(const char* s, size_t len);
+ static wxString FromAscii(const unsigned char* s, size_t len);
+ static wxString FromAscii(char c);
//@}
//@{
debug builds.
*/
static wxString FromUTF8(const char* s);
- static wxString FromUTF8(const char* s, size_t len);
+ static wxString FromUTF8(const char* s, size_t len);
//@}
/**
code.
*/
size_t Index(wxChar ch);
- size_t Index(const wxChar* sz);
+ size_t Index(const wxChar* sz);
//@}
/**
See also Cmp(), CmpNoCase()
*/
bool IsSameAs(const wxChar* psz, bool caseSensitive = @true);
- bool IsSameAs(wxChar c, bool caseSensitive = @true);
+ bool IsSameAs(wxChar c, bool caseSensitive = @true);
//@}
/**
code.
*/
wxChar Last();
- wxChar Last();
+ wxChar Last();
//@}
/**
bool Matches(const wxString& mask);
/**
- These are "advanced" functions and they will be needed quite rarely.
+ These are "advanced" functions and they will be needed quite rarely.
Alloc() and Shrink() are only
- interesting for optimization purposes.
+ interesting for optimization purposes.
wxStringBuffer
and wxStringBufferLength classes may be very
useful when working with some external API which requires the caller to provide
Removes spaces from the left or from the right (default).
*/
#define wxString Pad(size_t count, wxChar pad = ' ',
- bool fromRight = @true) /* implementation is private */
+ bool fromRight = @true) /* implementation is private */
/**
Prepends @e str to this string, returning a reference to this string.
Note that if @c wxUSE_PRINTF_POS_PARAMS is set to 1, then this function supports
Unix98-style positional parameters:
- @b NB: This function will use a safe version of @e vsprintf() (usually called
+ @b NB: This function will use a safe version of @e vsprintf() (usually called
@e vsnprintf()) whenever available to always allocate the buffer of correct
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.
code.
*/
wxString Remove(size_t pos);
- wxString Remove(size_t pos, size_t len);
+ wxString Remove(size_t pos, size_t len);
//@}
/**
wxString Right(size_t count);
/**
- These functions replace the standard @e strchr() and @e strstr()
+ These functions replace the standard @e strchr() and @e strstr()
functions.
Find()
void SetChar(size_t n, wxChar ch);
/**
- Minimizes the string's memory. This can be useful after a call to
+ Minimizes the string's memory. This can be useful after a call to
Alloc() if too much memory were preallocated.
*/
void Shrink();
/**
- This function can be used to test if the string starts with the specified
+ This function can be used to test if the string starts with the specified
@e prefix. If it does, the function will return @true and put the rest
- of the string (i.e. after the prefix) into @e rest string if it is not
+ of the string (i.e. after the prefix) into @e rest string if it is not
@NULL. Otherwise, the function returns @false and doesn't modify the
@e rest.
*/
@sa wxString::From8BitData
*/
const char* To8BitData();
- const wxCharBuffer To8BitData();
+ const wxCharBuffer To8BitData();
//@}
//@{
powerful means of converting wxString to C string.
*/
const char* ToAscii();
- const wxCharBuffer ToAscii();
+ const wxCharBuffer ToAscii();
//@}
/**
Same as @ref wxString::utf8str utf8_str.
*/
const char* ToUTF8();
- const wxCharBuffer ToUF8();
+ const wxCharBuffer ToUF8();
//@}
/**
new string length itself assuming that the string is terminated by the first
@c NUL character in it while the second one will use the specified length
and thus is the only version which should be used with the strings with
- embedded @c NULs (it is also slightly more efficient as @c strlen()
+ embedded @c NULs (it is also slightly more efficient as @c strlen()
doesn't have to be called).
This method is deprecated, please use
wxStringBufferLength instead.
*/
void UngetWriteBuf();
- void UngetWriteBuf(size_t len);
+ void UngetWriteBuf(size_t len);
//@}
/**
/**
Both formatted versions (wxString::Printf) and stream-like
- insertion operators exist (for basic types only). Additionally, the
+ insertion operators exist (for basic types only). Additionally, the
Format() function allows to use simply append
formatted value to a string:
Format()
@sa wxMBConv, @ref wcstr() wc_str, @ref wcstr() mb_str
*/
const wchar_t* fn_str();
- const char* fn_str();
- const wxCharBuffer fn_str();
+ const char* fn_str();
+ const wxCharBuffer fn_str();
//@}
//@{
fnstr() fn_str, @ref charstr() char_str
*/
const char* mb_str(const wxMBConv& conv = wxConvLibc);
- const wxCharBuffer mb_str(const wxMBConv& conv = wxConvLibc);
+ const wxCharBuffer mb_str(const wxMBConv& conv = wxConvLibc);
//@}
/**
/**
These functions work as C++ stream insertion operators: they insert the given
value into the string. Precision or format cannot be set using them, you can
- use
+ use
Printf() for this.
*/
wxString operator(const wxString& str);
- wxString operator(const wxChar* psz);
- wxString operator(wxChar ch);
- wxString operator(int i);
- wxString operator(float f);
- wxString operator(double d);
+ wxString operator(const wxChar* psz);
+ wxString operator(wxChar ch);
+ wxString operator(int i);
+ wxString operator(float f);
+ wxString operator(double d);
//@}
/**
concatenation of the operands.
*/
wxString operator +(const wxString& x, const wxString& y);
- wxString operator +(const wxString& x, const wxChar* y);
- wxString operator +(const wxString& x, wxChar y);
- wxString operator +(const wxChar* x, const wxString& y);
+ wxString operator +(const wxString& x, const wxChar* y);
+ wxString operator +(const wxString& x, wxChar y);
+ wxString operator +(const wxChar* x, const wxString& y);
//@}
//@{
Concatenation in place: the argument is appended to the string.
*/
void operator +=(const wxString& str);
- void operator +=(const wxChar* psz);
- void operator +=(wxChar c);
+ void operator +=(const wxChar* psz);
+ void operator +=(wxChar c);
//@}
//@{
constructor (see @ref construct() "wxString constructors").
*/
wxString operator =(const wxString& str);
- wxString operator =(const wxChar* psz);
- wxString operator =(wxChar c);
+ wxString operator =(const wxChar* psz);
+ wxString operator =(wxChar c);
//@}
//@{
Element extraction.
*/
wxChar operator [](size_t i);
- wxChar operator [](size_t i);
- wxChar operator [](int i);
- wxChar operator [](int i);
+ wxChar operator [](size_t i);
+ wxChar operator [](int i);
+ wxChar operator [](int i);
//@}
/**
Implicit conversion to a C string.
*/
- operator const wxChar*();
+ operator const wxChar*();
/**
Empty string is @false, so !string will only return @true if the string is
UTF-8 build.
*/
const char* utf8_str();
- const wxCharBuffer utf8_str();
+ const wxCharBuffer utf8_str();
//@}
//@{
fnstr() fn_str, @ref wcharstr() wchar_str
*/
const wchar_t* wc_str(const wxMBConv& conv);
- const wxWCharBuffer wc_str(const wxMBConv& conv);
+ const wxWCharBuffer wc_str(const wxMBConv& conv);
//@}
/**
/**
@class wxStringBufferLength
@wxheader{string.h}
-
- This tiny class allows to conveniently access the wxString
+
+ This tiny class allows to conveniently access the wxString
internal buffer as a writable pointer without any risk of forgetting to restore
the string to the usable state later, and allows the user to set the internal
length of the string.
-
- For example, assuming you have a low-level OS function called
+
+ For example, assuming you have a low-level OS function called
@c int GetMeaningOfLifeAsString(char *) copying the value in the provided
buffer (which must be writable, of course), and returning the actual length
of the string, you might call it like this:
-
+
@code
wxString theAnswer;
wxStringBuffer theAnswerBuffer(theAnswer, 1024);
wxLogError("Something is very wrong!");
}
@endcode
-
+
Note that the exact usage of this depends on whether on not wxUSE_STL is
enabled. If
wxUSE_STL is enabled, wxStringBuffer creates a separate empty character buffer,
if wxUSE_STL is disabled, it uses GetWriteBuf() from wxString, keeping the same
buffer
wxString uses intact. In other words, relying on wxStringBuffer containing the
- old
+ old
wxString data is probably not a good idea if you want to build your program in
both
with and without wxUSE_STL.
-
+
Note that SetLength @c must be called before wxStringBufferLength destructs.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxStringBufferLength
+class wxStringBufferLength
{
public:
/**
wxStringBufferLength(const wxString& str, size_t len);
/**
- Restores the string passed to the constructor to the usable state by calling
+ Restores the string passed to the constructor to the usable state by calling
wxString::UngetWriteBuf on it.
*/
~wxStringBufferLength();
/**
- Sets the internal length of the string referred to by wxStringBufferLength to
+ Sets the internal length of the string referred to by wxStringBufferLength to
@e nLength characters.
Must be called before wxStringBufferLength destructs.
See also: wxFromString.
*/
wxString wxToString(const wxColour& col);
- wxString wxToString(const wxFont& col);
+wxString wxToString(const wxFont& col);
//@}
//@{
See also: wxToString.
*/
bool wxFromString(const wxString& str, wxColour* col);
- bool wxFromString(const wxString& str, wxFont* col);
+bool wxFromString(const wxString& str, wxFont* col);
//@}
/**
@class wxSystemOptions
@wxheader{sysopt.h}
-
+
wxSystemOptions stores option/value pairs that wxWidgets itself or
applications can use to alter behaviour at run-time. It can be
used to optimize behaviour that doesn't deserve a distinct API,
but is still important to be able to configure.
-
+
These options are currently recognised by wxWidgets.
-
+
@library{wxbase}
@category{misc}
-
+
@seealso
wxSystemOptions::SetOption, wxSystemOptions::GetOptionInt,
wxSystemOptions::HasOption
Sets an option. The function is case-insensitive to @e name.
*/
void SetOption(const wxString& name, const wxString& value);
- void SetOption(const wxString& name, int value);
+ void SetOption(const wxString& name, int value);
//@}
};
/**
@class wxTarInputStream
@wxheader{tarstrm.h}
-
+
Input stream for reading tar files.
-
+
wxTarInputStream::GetNextEntry returns an
wxTarEntry object containing the meta-data
for the next entry in the tar (and gives away ownership). Reading from
the wxTarInputStream then returns the entry's data. Eof() becomes @true
after an attempt has been made to read past the end of the entry's data.
When there are no more entries, GetNextEntry() returns @NULL and sets Eof().
-
+
Tar entries are seekable if the parent stream is seekable. In practice this
usually means they are only seekable if the tar is stored as a local file and
is not compressed.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
@ref overview_wxarcbyname "Looking up an archive entry by name"
*/
*/
wxTarInputStream(wxInputStream& stream,
wxMBConv& conv = wxConvLocal);
- wxTarInputStream(wxInputStream* stream,
- wxMBConv& conv = wxConvLocal);
+ wxTarInputStream(wxInputStream* stream,
+ wxMBConv& conv = wxConvLocal);
//@}
/**
/**
@class wxTarClassFactory
@wxheader{tarstrm.h}
-
+
Class factory for the tar archive format. See the base class
for details.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", @ref overview_wxarcgeneric
"Generic archive programming", wxTarEntry, wxTarInputStream, wxTarOutputStream
class wxTarClassFactory : public wxArchiveClassFactory
{
public:
-
+
};
/**
@class wxTarOutputStream
@wxheader{tarstrm.h}
-
+
Output stream for writing tar files.
-
+
wxTarOutputStream::PutNextEntry is used to create
a new entry in the output tar, then the entry's data is written to the
wxTarOutputStream. Another call to PutNextEntry() closes the current
entry and begins the next.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", wxTarEntry, wxTarInputStream
*/
wxTarOutputStream(wxOutputStream& stream,
wxTarFormat format = wxTAR_PAX,
wxMBConv& conv = wxConvLocal);
- wxTarOutputStream(wxOutputStream* stream,
- wxTarFormat format = wxTAR_PAX,
- wxMBConv& conv = wxConvLocal);
+ wxTarOutputStream(wxOutputStream* stream,
+ wxTarFormat format = wxTAR_PAX,
+ wxMBConv& conv = wxConvLocal);
//@}
/**
specified in the POSIX standards.
*/
int GetBlockingFactor();
- void SetBlockingFactor(int factor);
+ void SetBlockingFactor(int factor);
//@}
/**
Create a new entry with the given name, timestamp and size.
*/
bool PutNextEntry(wxTarEntry* entry);
- bool PutNextEntry(const wxString& name);
+ bool PutNextEntry(const wxString& name);
//@}
};
/**
@class wxTarEntry
@wxheader{tarstrm.h}
-
+
Holds the meta-data for an entry in a tar.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", wxTarInputStream,
wxTarOutputStream
Copy constructor.
*/
wxTarEntry(const wxString& name = wxEmptyString);
- wxTarEntry(const wxTarEntry& entry);
+ wxTarEntry(const wxTarEntry& entry);
//@}
//@{
wxArchiveEntry::Get/SetDateTime.
*/
wxDateTime GetAccessTime();
- void SetAccessTime(const wxDateTime& dt);
+ void SetAccessTime(const wxDateTime& dt);
//@}
//@{
wxArchiveEntry::Get/SetDateTime.
*/
wxDateTime GetCreateTime();
- void SetCreateTime(const wxDateTime& dt);
+ void SetCreateTime(const wxDateTime& dt);
//@}
//@{
or @e wxTAR_BLKTYPE.
*/
int GetDevMajor();
- int GetDevMinor();
- void SetDevMajor(int dev);
- void SetDevMinor(int dev);
+ int GetDevMinor();
+ void SetDevMajor(int dev);
+ void SetDevMinor(int dev);
//@}
//@{
Get/SetUserName" can be used instead.
*/
int GetGroupId();
- int GetUserId();
- void SetGroupId(int id);
- void SetUserId(int id);
+ int GetUserId();
+ void SetGroupId(int id);
+ void SetUserId(int id);
//@}
//@{
over this entry. These are not present in very old tars.
*/
wxString GetGroupName();
- wxString GetUserName();
- void SetGroupName(const wxString& group);
- void SetUserName(const wxString& user);
+ wxString GetUserName();
+ void SetGroupName(const wxString& group);
+ void SetUserName(const wxString& user);
//@}
//@{
to @e wxTAR_LNKTYPE or @e wxTAR_SYMTYPE.
*/
wxString GetLinkName();
- void SetLinkName(const wxString& link);
+ void SetLinkName(const wxString& link);
//@}
//@{
Symbols are defined for them in wx/file.h.
*/
int GetMode();
- void SetMode(int mode);
+ void SetMode(int mode);
//@}
//@{
still more efficient if the size is given beforehand.
*/
void SetSize(wxFileOffset size);
- wxFileOffset GetSize();
+ wxFileOffset GetSize();
//@}
//@{
any other values should be treated as @e wxTAR_REGTYPE.
*/
int GetTypeFlag();
- void SetTypeFlag(int type);
+ void SetTypeFlag(int type);
//@}
//@{
(i.e. has a trailing path separator).
*/
wxString GetInternalName();
- wxString GetInternalName(const wxString& name,
- wxPathFormat format = wxPATH_NATIVE,
- bool* pIsDir = @NULL);
+ wxString GetInternalName(const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE,
+ bool* pIsDir = @NULL);
//@}
/**
/**
@class wxTaskBarIcon
@wxheader{taskbar.h}
-
+
This class represents a taskbar icon. A taskbar icon is an icon that appears in
the 'system tray' and responds to mouse clicks, optionally with a tooltip above it to help provide information.
-
+
@library{wxadv}
@category{FIXME}
*/
/**
@class wxTextAttr
@wxheader{textctrl.h}
-
+
wxTextAttr represents the character and paragraph attributes, or style,
for a range of text in a wxTextCtrl or wxRichTextCtrl.
-
+
When setting up a wxTextAttr object, pass a bitlist mask to
wxTextAttr::SetFlags to
indicate which style elements should be changed. As a convenience, when you
call a setter such
as SetFont, the relevant bit will be set.
-
+
@library{wxcore}
@category{richtext}
-
+
@seealso
wxTextCtrl, wxRichTextCtrl
*/
-class wxTextAttr
+class wxTextAttr
{
public:
//@{
Constructors.
*/
wxTextAttr();
- wxTextAttr(const wxColour& colText,
- const wxColour& colBack = wxNullColour,
- const wxFont& font = wxNullFont,
- wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT);
- wxTextAttr(const wxTextAttr& attr);
+ wxTextAttr(const wxColour& colText,
+ const wxColour& colBack = wxNullColour,
+ const wxFont& font = wxNullFont,
+ wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT);
+ wxTextAttr(const wxTextAttr& attr);
//@}
/**
//@{
/**
- Creates a new @c wxTextAttr which is a merge of @e base and
+ Creates a new @c wxTextAttr which is a merge of @e base and
@e overlay. Properties defined in @e overlay take precedence over those
in @e base. Properties undefined/invalid in both are undefined in the
result.
*/
void Merge(const wxTextAttr& overlay);
- static wxTextAttr Merge(const wxTextAttr& base,
- const wxTextAttr& overlay);
+ static wxTextAttr Merge(const wxTextAttr& base,
+ const wxTextAttr& overlay);
//@}
/**
/**
@class wxTextCtrl
@wxheader{textctrl.h}
-
+
A text control allows text to be displayed and edited. It may be
single line or multi-line.
-
+
@beginStyleTable
@style{wxTE_PROCESS_ENTER}:
The control will generate the event wxEVT_COMMAND_TEXT_ENTER
On PocketPC and Smartphone, causes the first letter to be
capitalized.
@endStyleTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{textctrl.png}
-
+
@seealso
wxTextCtrl::Create, wxValidator
*/
/**
Constructor, creating and showing a text control.
- @param parent
+ @param parent
Parent window. Should not be @NULL.
- @param id
+ @param id
Control identifier. A value of -1 denotes a default value.
- @param value
+ @param value
Default text value.
- @param pos
+ @param pos
Text control position.
- @param size
+ @param size
Text control size.
- @param style
+ @param style
Window style. See wxTextCtrl.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@remarks The horizontal scrollbar (wxHSCROLL style flag) will only be
@sa Create(), wxValidator
*/
wxTextCtrl();
- wxTextCtrl(wxWindow* parent, wxWindowID id,
- const wxString& value = "",
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxTextCtrlNameStr);
+ wxTextCtrl(wxWindow* parent, wxWindowID id,
+ const wxString& value = "",
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxTextCtrlNameStr);
//@}
/**
/**
Appends the text to the end of the text control.
- @param text
+ @param text
Text to write to the text control.
@remarks After the text is appended, the insertion point will be at the
IsModified() would return @false immediately
after the call to SetValue).
- Note that this function will not generate the @c wxEVT_COMMAND_TEXT_UPDATED
+ Note that this function will not generate the @c wxEVT_COMMAND_TEXT_UPDATED
event.
This is the only difference with SetValue().
See @ref overview_progevent "this topic" for more information.
This function is new since wxWidgets version 2.7.1
- @param value
+ @param value
The new value to set. It may contain newline characters if the text control is
multi-line.
*/
Gets the length of the specified line, not including any trailing newline
character(s).
- @param lineNo
+ @param lineNo
Line number (starting from zero).
@returns The length of the line, or -1 if lineNo was invalid.
Returns the contents of a given line in the text control, not including
any trailing newline character(s).
- @param lineNo
+ @param lineNo
The line number, starting from zero.
@returns The contents of the line.
GetStringSelection() to get the selected
text.
- @param from
+ @param from
The returned first position.
- @param to
+ @param to
The returned last position.
*/
virtual void GetSelection(long* from, long* to);
bool IsEditable();
/**
- Returns @true if the control is currently empty. This is the same as
+ Returns @true if the control is currently empty. This is the same as
@c GetValue().empty() but can be much more efficient for the multiline
controls containing big amounts of text.
/**
Loads and displays the named file, if it exists.
- @param filename
+ @param filename
The filename of the file to load.
- @param fileType
+ @param fileType
The type of file to load. This is currently ignored in wxTextCtrl.
@returns @true if successful, @false otherwise.
This event handler function implements default drag and drop behaviour, which
is to load the first dropped file into the control.
- @param event
+ @param event
The drop files event.
@remarks This is not implemented on non-Windows platforms.
/**
Converts given position to a zero-based column, line number pair.
- @param pos
+ @param pos
Position.
- @param x
+ @param x
Receives zero based column number.
- @param y
+ @param y
Receives zero based line number.
@returns @true on success, @false on failure (most likely due to a too
Removes the text starting at the first given position up to (but not including)
the character at the last position.
- @param from
+ @param from
The first position.
- @param to
+ @param to
The last position.
*/
virtual void Remove(long from, long to);
Replaces the text starting at the first position up to (but not including)
the character at the last position with the given text.
- @param from
+ @param from
The first position.
- @param to
+ @param to
The last position.
- @param value
+ @param value
The value to replace the existing text with.
*/
virtual void Replace(long from, long to, const wxString& value);
/**
Saves the contents of the control in a text file.
- @param filename
+ @param filename
The name of the file in which to save the text.
- @param fileType
+ @param fileType
The type of file to save. This is currently ignored in wxTextCtrl.
@returns @true if the operation was successful, @false otherwise.
default style is just reset (instead of being combined with the new style which
wouldn't change it at all).
- @param style
+ @param style
The style for the new text.
@returns @true on success, @false if an error occurred - may also mean that
/**
Makes the text item editable or read-only, overriding the @b wxTE_READONLY flag.
- @param editable
+ @param editable
If @true, the control is editable. If @false, the control is read-only.
@sa IsEditable()
/**
Sets the insertion point at the given position.
- @param pos
+ @param pos
Position to set.
*/
virtual void SetInsertionPoint(long pos);
character at the last position. If both parameters are equal to -1 all text
in the control is selected.
- @param from
+ @param from
The first position.
- @param to
+ @param to
The last position.
*/
virtual void SetSelection(long from, long to);
Changes the style of the given range. If any attribute within @e style is
not set, the corresponding attribute from GetDefaultStyle() is used.
- @param start
+ @param start
The start of the range to change.
- @param end
+ @param end
The end of the range to change.
- @param style
+ @param style
The new style for the range.
@returns @true on success, @false if an error occurred - it may also mean
This function is deprecated and should not be used in new code. Please use the
ChangeValue() function instead.
- @param value
+ @param value
The new value to set. It may contain newline characters if the text control is
multi-line.
*/
/**
Makes the line containing the given position visible.
- @param pos
+ @param pos
The position that should be visible.
*/
void ShowPosition(long pos);
/**
Writes the text into the text control at the current insertion position.
- @param text
+ @param text
Text to write to the text control.
@remarks Newlines in the text string are the only control characters
/**
Converts the given zero based column and line number to a position.
- @param x
+ @param x
The column number.
- @param y
+ @param y
The line number.
@returns The position value, or -1 if x or y was invalid.
Operator definitions for appending to a text control, for example:
*/
wxTextCtrl operator(const wxString& s);
- wxTextCtrl operator(int i);
- wxTextCtrl operator(long i);
- wxTextCtrl operator(float f);
- wxTextCtrl operator(double d);
- wxTextCtrl operator(char c);
+ wxTextCtrl operator(int i);
+ wxTextCtrl operator(long i);
+ wxTextCtrl operator(float f);
+ wxTextCtrl operator(double d);
+ wxTextCtrl operator(char c);
//@}
};
/**
@class wxStreamToTextRedirector
@wxheader{textctrl.h}
-
+
This class can be used to (temporarily) redirect all output sent to a C++
ostream object to a wxTextCtrl instead.
-
+
@b NB: Some compilers and/or build configurations don't support multiply
inheriting wxTextCtrl from @c std::streambuf in which
- case this class is not compiled in. You also must have @c wxUSE_STD_IOSTREAM
+ case this class is not compiled in. You also must have @c wxUSE_STD_IOSTREAM
option on (i.e. set to 1) in your setup.h to be able to use it. Under Unix,
specify @c --enable-std_iostreams switch when running configure for this.
-
+
Example of usage:
-
+
@code
using namespace std;
-
+
wxTextCtrl *text = new wxTextCtrl(...);
-
+
{
wxStreamToTextRedirector redirect(text);
-
+
// this goes to the text control
cout "Hello, text!" endl;
}
-
+
// this goes somewhere else, presumably to stdout
cout "Hello, console!" endl;
@endcode
-
-
+
+
@library{wxcore}
@category{logging}
-
+
@seealso
wxTextCtrl
*/
-class wxStreamToTextRedirector
+class wxStreamToTextRedirector
{
public:
/**
The constructor starts redirecting output sent to @e ostr or @e cout for
the default parameter value to the text control @e text.
- @param text
+ @param text
The text control to append output too, must be non-@NULL
- @param ostr
+ @param ostr
The C++ stream to redirect, cout is used if it is @NULL
*/
wxStreamToTextRedirector(wxTextCtrl text, ostream * ostr = @NULL);
/**
@class wxPasswordEntryDialog
@wxheader{textdlg.h}
-
+
This class represents a dialog that requests a one-line password string from
the user.
It is implemented as a generic wxWidgets dialog.
-
+
@library{wxbase}
@category{cmndlg}
-
+
@seealso
@ref overview_wxpasswordentrydialogoverview "wxPassowrdEntryDialog overview"
*/
class wxPasswordEntryDialog : public wxTextEntryDialog
{
public:
-
+
};
/**
@class wxTextEntryDialog
@wxheader{textdlg.h}
-
+
This class represents a dialog that requests a one-line text string from the
user.
It is implemented as a generic wxWidgets dialog.
-
+
@library{wxbase}
@category{cmndlg}
-
+
@seealso
@ref overview_wxtextentrydialogoverview "wxTextEntryDialog overview"
*/
/**
Constructor. Use ShowModal() to show the dialog.
- @param parent
+ @param parent
Parent window.
- @param message
+ @param message
Message to show on the dialog.
- @param defaultValue
+ @param defaultValue
The default value, which may be the empty string.
- @param style
+ @param style
A dialog style, specifying the buttons (wxOK, wxCANCEL)
and an optional wxCENTRE style. Additionally, wxTextCtrl styles (such as
wxTE_PASSWORD) may be specified here.
- @param pos
+ @param pos
Dialog position.
*/
wxTextEntryDialog(wxWindow* parent, const wxString& message,
Pop up a dialog box with title set to @e caption, @e message, and a
@e default_value. The user may type in text and press OK to return this text,
or press Cancel to return the empty string.
-
+
If @e centre is @true, the message text (which may include new line characters)
is centred; if @false, the message is left-justified.
*/
/**
@class wxTextFile
@wxheader{textfile.h}
-
+
The wxTextFile is a simple class which allows to work with text files on line by
line basis. It also understands the differences in line termination characters
under different platforms and will not do anything bad to files with "non
native" line termination sequences - in fact, it can be also used to modify the
text files and change the line termination characters from one type (say DOS) to
another (say Unix).
-
+
One word of warning: the class is not at all optimized for big files and thus
it will load the file entirely into memory when opened. Of course, you should
not
surely too big for this class). On the other hand, it is not a serious
limitation for small files like configuration files or program sources
which are well handled by wxTextFile.
-
+
The typical things you may do with wxTextFile in order are:
-
- Create and open it: this is done with either
- wxTextFile::Create or wxTextFile::Open
+
+ Create and open it: this is done with either
+ wxTextFile::Create or wxTextFile::Open
function which opens the file (name may be specified either as the argument to
these functions or in the constructor), reads its contents in memory (in the
case of @c Open()) and closes it.
Work with the lines in the file: this may be done either with "direct
- access" functions like wxTextFile::GetLineCount and
+ access" functions like wxTextFile::GetLineCount and
wxTextFile::GetLine (@e operator[] does exactly the same
but looks more like array addressing) or with "sequential access" functions
which include wxTextFile::GetFirstLine/
- wxTextFile::GetNextLine and also
+ wxTextFile::GetNextLine and also
wxTextFile::GetLastLine/wxTextFile::GetPrevLine.
For the sequential access functions the current line number is maintained: it is
returned by wxTextFile::GetCurrentLine and may be
changed with wxTextFile::GoToLine.
- Add/remove lines to the file: wxTextFile::AddLine and
- wxTextFile::InsertLine add new lines while
+ Add/remove lines to the file: wxTextFile::AddLine and
+ wxTextFile::InsertLine add new lines while
wxTextFile::RemoveLine deletes the existing ones.
wxTextFile::Clear resets the file to empty.
Save your changes: notice that the changes you make to the file will @b not be
saved automatically; calling wxTextFile::Close or doing
- nothing discards them! To save the changes you must explicitly call
+ nothing discards them! To save the changes you must explicitly call
wxTextFile::Write - here, you may also change the line
termination type if you wish.
-
-
+
+
@library{wxbase}
@category{file}
-
+
@seealso
wxFile
*/
-class wxTextFile
+class wxTextFile
{
public:
/**
void Clear();
/**
- Closes the file and frees memory, @b losing all changes. Use Write()
+ Closes the file and frees memory, @b losing all changes. Use Write()
if you want to save them.
*/
bool Close();
be used in this case.
*/
bool Create();
- bool Create(const wxString& strFile);
+ bool Create(const wxString& strFile);
//@}
/**
#define static const char* GetEOL(wxTextFileType type = typeDefault) /* implementation is private */
/**
- This method together with GetNextLine()
+ This method together with GetNextLine()
allows more "iterator-like" traversal of the list of lines, i.e. you may
write something like:
*/
wxString GetFirstLine();
/**
- Gets the last line of the file. Together with
+ Gets the last line of the file. Together with
GetPrevLine() it allows to enumerate the lines
in the file from the end to the beginning like this:
*/
const char* GetName();
/**
- Gets the next line (see GetFirstLine() for
+ Gets the next line (see GetFirstLine() for
the example).
*/
wxString GetNextLine();
wxString GetPrevLine();
/**
- Changes the value returned by GetCurrentLine()
+ Changes the value returned by GetCurrentLine()
and used by wxTextFile::GetFirstLine/GetNextLine().
*/
void GoToLine(size_t n);
//@{
/**
- )
+ )
Open() opens the file with the given name or the name which was given in the
@ref ctor() constructor and also loads file in memory on
- success. It will fail if the file does not exist,
+ success. It will fail if the file does not exist,
Create() should be used in this case.
The @e conv argument is only meaningful in Unicode build of wxWidgets when
it is used to convert the file to wide character representation.
*/
bool Open();
- bool Open(const wxString& strFile);
+ bool Open(const wxString& strFile);
//@}
/**
void RemoveLine(size_t n);
/**
- )
+ )
Change the file on disk. The @e typeNew parameter allows you to change the
file format (default argument means "don't change type") and may be used to
/**
@class wxBitmapToggleButton
@wxheader{tglbtn.h}
-
+
wxBitmapToggleButton is a wxToggleButton
that contains a bitmap instead of text.
-
+
This control emits an update UI event.
-
+
@beginEventTable
@event{EVT_TOGGLEBUTTON(id\, func)}:
Handles a toggle button click event.
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{bitmaptogglebutton.png}
Internally calls Create().
*/
wxBitmapToggleButton();
- wxBitmapToggleButton(wxWindow* parent, wxWindowID id,
- const wxBitmap& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& val,
- const wxString& name = "checkBox");
+ wxBitmapToggleButton(wxWindow* parent, wxWindowID id,
+ const wxBitmap& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& val,
+ const wxString& name = "checkBox");
//@}
/**
Sets the toggle button to the given state. This does not cause a
@c EVT_TOGGLEBUTTON event to be emitted.
- @param state
+ @param state
If @true, the button is pressed.
*/
void SetValue(bool state);
/**
@class wxToggleButton
@wxheader{tglbtn.h}
-
+
wxToggleButton is a button that stays pressed when clicked by the user. In
other words, it is similar to wxCheckBox in
functionality but looks like a wxButton.
-
+
Since wxWidgets version 2.9.0 this control emits an update UI event.
-
+
You can see wxToggleButton in action in the sixth page of the
controls sample.
-
+
@beginEventTable
@event{EVT_TOGGLEBUTTON(id\, func)}:
Handles a toggle button click event.
@endEventTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{togglebutton.png}
-
+
@seealso
wxCheckBox, wxButton, wxBitmapToggleButton
*/
/**
Constructor, creating and showing a toggle button.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Toggle button identifier. The value wxID_ANY indicates a default value.
- @param label
+ @param label
Text to be displayed next to the toggle button.
- @param pos
+ @param pos
Toggle button position. If wxDefaultPosition is specified then a default
position is chosen.
- @param size
+ @param size
Toggle button size. If wxDefaultSize is specified then a default
size is chosen.
- @param style
+ @param style
Window style. See wxToggleButton.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxToggleButton();
- wxToggleButton(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& val,
- const wxString& name = "checkBox");
+ wxToggleButton(wxWindow* parent, wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& val,
+ const wxString& name = "checkBox");
//@}
/**
Sets the toggle button to the given state. This does not cause a
@c EVT_TOGGLEBUTTON event to be emitted.
- @param state
+ @param state
If @true, the button is pressed.
*/
void SetValue(bool state);
/**
@class wxCondition
@wxheader{thread.h}
-
+
wxCondition variables correspond to pthread conditions or to Win32 event
objects. They may be used in a multithreaded application to wait until the
given condition becomes @true which happens when the condition becomes signaled.
-
+
For example, if a worker thread is doing some long task and another thread has
to wait until it is finished, the latter thread will wait on the condition
object and the worker thread will signal it on exit (this example is not
- perfect because in this particular case it would be much better to just
+ perfect because in this particular case it would be much better to just
wxThread::Wait for the worker thread, but if there are several
worker threads it already makes much more sense).
-
+
Note that a call to wxCondition::Signal may happen before the
other thread calls wxCondition::Wait and, just as with the
pthread conditions, the signal is then lost and so if you want to be sure that
you don't miss it you must keep the mutex associated with the condition
- initially locked and lock it again before calling
+ initially locked and lock it again before calling
wxCondition::Signal. Of course, this means that this call is
going to block until wxCondition::Wait is called by another
thread.
-
+
@library{wxbase}
@category{thread}
-
+
@seealso
wxThread, wxMutex
*/
-class wxCondition
+class wxCondition
{
public:
/**
void Broadcast();
/**
- Returns @true if the object had been initialized successfully, @false
+ Returns @true if the object had been initialized successfully, @false
if an error occurred.
*/
#define bool IsOk() /* implementation is private */
This method atomically releases the lock on the mutex associated with this
condition (this is why it must be locked prior to calling Wait) and puts the
- thread to sleep until Signal() or
+ thread to sleep until Signal() or
Broadcast() is called. It then locks the mutex
again and returns.
returns, with the return code of @c wxCOND_TIMEOUT as soon as the given
timeout expires.
- @param milliseconds
+ @param milliseconds
Timeout in milliseconds
*/
wxCondError WaitTimeout(unsigned long milliseconds);
/**
@class wxCriticalSectionLocker
@wxheader{thread.h}
-
- This is a small helper class to be used with wxCriticalSection
+
+ This is a small helper class to be used with wxCriticalSection
objects. A wxCriticalSectionLocker enters the critical section in the
constructor and leaves it in the destructor making it much more difficult to
forget to leave a critical section (which, in general, will lead to serious
and difficult to debug problems).
-
+
Example of using it:
-
+
@code
void Set Foo()
{
// gs_critSect is some (global) critical section guarding access to the
// object "foo"
wxCriticalSectionLocker locker(gs_critSect);
-
+
if ( ... )
{
// do something
...
-
+
return;
}
-
+
// do something else
...
-
+
return;
}
@endcode
-
+
Without wxCriticalSectionLocker, you would need to remember to manually leave
the critical section before each @c return.
-
+
@library{wxbase}
@category{thread}
-
+
@seealso
wxCriticalSection, wxMutexLocker
*/
-class wxCriticalSectionLocker
+class wxCriticalSectionLocker
{
public:
/**
/**
@class wxThreadHelper
@wxheader{thread.h}
-
+
The wxThreadHelper class is a mix-in class that manages a single background
thread. By deriving from wxThreadHelper, a class can implement the thread
code in its own wxThreadHelper::Entry method
and the worker thread. Doing this prevents the awkward passing of pointers
that is needed when the original object in the main thread needs to
synchronize with its worker thread in its own wxThread derived object.
-
+
For example, wxFrame may need to make some calculations
in a background thread and then display the results of those calculations in
the main window.
-
+
Ordinarily, a wxThread derived object would be created
with the calculation code implemented in
wxThread::Entry. To access the inputs to the
thread object. Shared data and synchronization objects could be stored in
either object though the object without the data would have to access the
data through a pointer.
-
+
However, with wxThreadHelper, the frame object and the thread object are
treated as the same object. Shared data and synchronization variables are
stored in the single object, eliminating a layer of indirection and the
associated pointers.
-
+
@library{wxbase}
@category{thread}
-
+
@seealso
wxThread
*/
-class wxThreadHelper
+class wxThreadHelper
{
public:
/**
/**
@class wxCriticalSection
@wxheader{thread.h}
-
- A critical section object is used for exactly the same purpose as
+
+ A critical section object is used for exactly the same purpose as
mutexes. The only difference is that under Windows platform
critical sections are only visible inside one process, while mutexes may be
shared between processes, so using critical sections is slightly more
efficient. The terminology is also slightly different: mutex may be locked (or
acquired) and unlocked (or released) while critical section is entered and left
by the program.
-
- Finally, you should try to use
+
+ Finally, you should try to use
wxCriticalSectionLocker class whenever
- possible instead of directly using wxCriticalSection for the same reasons
- wxMutexLocker is preferrable to
+ possible instead of directly using wxCriticalSection for the same reasons
+ wxMutexLocker is preferrable to
wxMutex - please see wxMutex for an example.
-
+
@library{wxbase}
@category{thread}
-
+
@seealso
wxThread, wxCondition, wxCriticalSectionLocker
*/
-class wxCriticalSection
+class wxCriticalSection
{
public:
/**
/**
@class wxThread
@wxheader{thread.h}
-
+
A thread is basically a path of execution through a program. Threads are
sometimes called @e light-weight processes, but the fundamental difference
between threads and processes is that memory spaces of different processes are
- separated while all threads share the same address space.
-
+ separated while all threads share the same address space.
+
While it makes it much easier to share common data between several threads, it
- also
+ also
makes it much easier to shoot oneself in the foot, so careful use of
- synchronization
+ synchronization
objects such as mutexes or @ref overview_wxcriticalsection "critical sections"
- is recommended. In addition, don't create global thread
- objects because they allocate memory in their constructor, which will cause
+ is recommended. In addition, don't create global thread
+ objects because they allocate memory in their constructor, which will cause
problems for the memory checking system.
-
+
@library{wxbase}
@category{thread}
-
+
@seealso
wxMutex, wxCondition, wxCriticalSection
*/
-class wxThread
+class wxThread
{
public:
/**
wxThreadError Create(unsigned int stackSize = 0);
/**
- Calling Delete() gracefully terminates a
+ Calling Delete() gracefully terminates a
detached thread, either when the thread calls TestDestroy() or finished
processing.
(Note that while this could work on a joinable thread you simply should not
- call this routine on one as afterwards you may not be able to call
+ call this routine on one as afterwards you may not be able to call
Wait() to free the memory of that thread).
See @ref overview_deletionwxthread "wxThread deletion" for a broader
/**
A common problem users experience with wxThread is that in their main thread
they will check the thread every now and then to see if it has ended through
- IsRunning(), only to find that their
+ IsRunning(), only to find that their
application has run into problems because the thread is using the default
behavior and has already deleted itself. Naturally, they instead attempt to
use joinable threads in place of the previous behavior.
However, polling a wxThread for when it has ended is in general a bad idea -
- in fact calling a routine on any running wxThread should be avoided if
+ in fact calling a routine on any running wxThread should be avoided if
possible. Instead, find a way to notify yourself when the thread has ended.
Usually you only need to notify the main thread, in which case you can post
an event to it via wxPostEvent or
- wxEvtHandler::AddPendingEvent. In
+ wxEvtHandler::AddPendingEvent. In
the case of secondary threads you can call a routine of another class
when the thread is about to complete processing and/or set the value
- of a variable, possibly using mutexes and/or other
+ of a variable, possibly using mutexes and/or other
synchronization means if necessary.
*/
/**
Returns @true if the thread is running.
- This method may only be safely used for joinable threads, see the remark in
+ This method may only be safely used for joinable threads, see the remark in
IsAlive().
*/
bool IsRunning();
should
be used with extreme care (and not used at all whenever possible)! The resources
allocated to the thread will not be freed and the state of the C runtime library
- may become inconsistent. Use Delete() for detached
+ may become inconsistent. Use Delete() for detached
threads or Wait() for joinable threads instead.
For detached threads Kill() will also delete the associated C++ object.
to Pause() and Delete() will
work. If it returns @true, the thread should exit as soon as possible.
- Notice that under some platforms (POSIX), implementation of
+ Notice that under some platforms (POSIX), implementation of
Pause() also relies on this function being called, so
not calling it would prevent both stopping and suspending thread from working.
*/
/**
There are two types of threads in wxWidgets: @e detached and @e joinable,
modeled after the the POSIX thread API. This is different from the Win32 API
- where all threads are joinable.
+ where all threads are joinable.
By default wxThreads in wxWidgets use the detached behavior. Detached threads
delete themselves once they have completed, either by themselves when they
- complete
- processing or through a call to Delete(), and thus
+ complete
+ processing or through a call to Delete(), and thus
must be created on the heap (through the new operator, for example).
- Conversely,
+ Conversely,
joinable threads do not delete themselves when they are done processing and as
such
are safe to create on the stack. Joinable threads also provide the ability
has a disadvantage as well: you @b must Wait() for a joinable thread or the
system resources used by it will never be freed, and you also must delete the
corresponding wxThread object yourself if you did not create it on the stack.
- In
+ In
contrast, detached threads are of the "fire-and-forget" kind: you only have to
- start
+ start
a detached thread and it will terminate and destroy itself.
*/
void Yield();
/**
- Regardless of whether it has terminated or not, you should call
+ Regardless of whether it has terminated or not, you should call
Wait() on a joinable thread to release its
memory, as outlined in @ref overview_typeswxthread "Types of wxThreads". If you
created
- a joinable thread on the heap, remember to delete it manually with the delete
- operator or similar means as only detached threads handle this type of memory
+ a joinable thread on the heap, remember to delete it manually with the delete
+ operator or similar means as only detached threads handle this type of memory
management.
Since detached threads delete themselves when they are finished processing,
- you should take care when calling a routine on one. If you are certain the
- thread is still running and would like to end it, you may call
+ you should take care when calling a routine on one. If you are certain the
+ thread is still running and would like to end it, you may call
Delete() to gracefully end it (which implies
that the thread will be deleted after that call to Delete()). It should be
- implied that you should never attempt to delete a detached thread with the
- delete operator or similar means.
+ implied that you should never attempt to delete a detached thread with the
+ delete operator or similar means.
- As mentioned, Wait() or
+ As mentioned, Wait() or
Delete() attempts to gracefully terminate
a joinable and detached thread, respectively. It does this by waiting until
the thread in question calls TestDestroy()
thread will come to halt. This is why it is important to call TestDestroy() in
the Entry() routine of your threads as often as possible.
- As a last resort you can end the thread immediately through
+ As a last resort you can end the thread immediately through
Kill(). It is strongly recommended that you
do not do this, however, as it does not free the resources associated with
the object (although the wxThread object of detached threads will still be
/**
All threads other then the "main application thread" (the one
- wxApp::OnInit or your main function runs in, for
- example) are considered "secondary threads". These include all threads created
+ wxApp::OnInit or your main function runs in, for
+ example) are considered "secondary threads". These include all threads created
by Create() or the corresponding constructors.
- GUI calls, such as those to a wxWindow or
- wxBitmap are explicitly not safe at all in secondary threads
+ GUI calls, such as those to a wxWindow or
+ wxBitmap are explicitly not safe at all in secondary threads
and could end your application prematurely. This is due to several reasons,
- including the underlying native API and the fact that wxThread does not run a
- GUI event loop similar to other APIs as MFC.
+ including the underlying native API and the fact that wxThread does not run a
+ GUI event loop similar to other APIs as MFC.
- A workaround that works on some wxWidgets ports is calling wxMutexGUIEnter
+ A workaround that works on some wxWidgets ports is calling wxMutexGUIEnter
before any GUI calls and then calling wxMutexGUILeave afterwords. However,
- the recommended way is to simply process the GUI calls in the main thread
+ the recommended way is to simply process the GUI calls in the main thread
through an event that is posted by either wxPostEvent or
- wxEvtHandler::AddPendingEvent. This does
- not imply that calls to these classes are thread-safe, however, as most
+ wxEvtHandler::AddPendingEvent. This does
+ not imply that calls to these classes are thread-safe, however, as most
wxWidgets classes are not thread-safe, including wxString.
*/
};
/**
@class wxSemaphore
@wxheader{thread.h}
-
+
wxSemaphore is a counter limiting the number of threads concurrently accessing
a shared resource. This counter is always between 0 and the maximum value
specified during the semaphore creation. When the counter is strictly greater
than 0, a call to wxSemaphore::Wait returns immediately and
decrements the counter. As soon as it reaches 0, any subsequent calls to
wxSemaphore::Wait block and only return when the semaphore
- counter becomes strictly positive again as the result of calling
+ counter becomes strictly positive again as the result of calling
wxSemaphore::Post which increments the counter.
-
+
In general, semaphores are useful to restrict access to a shared resource
which can only be accessed by some fixed number of clients at the same time. For
example, when modeling a hotel reservation system a semaphore with the counter
equal to the total number of available rooms could be created. Each time a room
- is reserved, the semaphore should be acquired by calling
+ is reserved, the semaphore should be acquired by calling
wxSemaphore::Wait and each time a room is freed it should be
released by calling wxSemaphore::Post.
-
+
@library{wxbase}
@category{thread}
*/
-class wxSemaphore
+class wxSemaphore
{
public:
/**
/**
@class wxMutexLocker
@wxheader{thread.h}
-
- This is a small helper class to be used with wxMutex
+
+ This is a small helper class to be used with wxMutex
objects. A wxMutexLocker acquires a mutex lock in the constructor and releases
(or unlocks) the mutex in the destructor making it much more difficult to
forget to release a mutex (which, in general, will promptly lead to serious
problems). See wxMutex for an example of wxMutexLocker
usage.
-
+
@library{wxbase}
@category{thread}
-
+
@seealso
wxMutex, wxCriticalSectionLocker
*/
-class wxMutexLocker
+class wxMutexLocker
{
public:
/**
/**
@class wxMutex
@wxheader{thread.h}
-
+
A mutex object is a synchronization object whose state is set to signaled when
it is not owned by any thread, and nonsignaled when it is owned. Its name comes
from its usefulness in coordinating mutually-exclusive access to a shared
resource as only one thread at a time can own a mutex object.
-
+
Mutexes may be recursive in the sense that a thread can lock a mutex which it
had already locked before (instead of dead locking the entire process in this
situation by starting to wait on a mutex which will never be released while the
- thread is waiting) but using them is not recommended under Unix and they are
+ thread is waiting) but using them is not recommended under Unix and they are
@b not recursive there by default. The reason for this is that recursive
mutexes are not supported by all Unix flavours and, worse, they cannot be used
with wxCondition. On the other hand, Win32 mutexes are
always recursive.
-
+
For example, when several threads use the data stored in the linked list,
modifications to the list should only be allowed to one thread at a time
because during a new node addition the list integrity is temporarily broken
(this is also called @e program invariant).
-
+
@library{wxbase}
@category{thread}
-
+
@seealso
wxThread, wxCondition, wxMutexLocker, wxCriticalSection
*/
-class wxMutex
+class wxMutex
{
public:
/**
~wxMutex();
/**
- Locks the mutex object. This is equivalent to
+ Locks the mutex object. This is equivalent to
LockTimeout() with infinite timeout.
@returns One of:
int IncCount()
{
static int s_counter = 0;
-
+
wxCRITICAL_SECTION(counter);
-
+
return ++s_counter;
}
@endcode
-
+
(note that we suppose that the function is called the first time from the main
thread so that the critical section object is initialized correctly by the time
other threads start calling it, if this is not the case this approach can
of the calling thread until the main thread (or any other thread holding the
main GUI lock) leaves the GUI library and no other thread will enter the GUI
library until the calling thread calls ::wxMutexGuiLeave.
-
+
Typically, these functions are used like this:
@code
void MyThread::Foo(void)
{
// before doing any GUI calls we must ensure that this thread is the only
// one doing it!
-
+
wxMutexGuiEnter();
-
+
// Call GUI here:
my_window-DrawSomething();
-
+
wxMutexGuiLeave();
}
@endcode
-
+
Note that under GTK, no creation of top-level windows is allowed in any
thread but the main one.
-
+
This function is only defined on platforms which support preemptive
threads.
*/
/**
@class wxTimer
@wxheader{timer.h}
-
+
The wxTimer class allows you to execute code at specified intervals. Its
precision is platform-dependent, but in general will not be better than 1ms nor
worse than 1s.
-
+
There are three different ways to use this class:
-
- You may derive a new class from wxTimer and override the
+
+ You may derive a new class from wxTimer and override the
wxTimer::Notify member to perform the required action.
- Or you may redirect the notifications to any
+ Or you may redirect the notifications to any
wxEvtHandler derived object by using the non-default
- constructor or wxTimer::SetOwner. Then use the @c EVT_TIMER
- macro to connect it to the event handler which will receive
+ constructor or wxTimer::SetOwner. Then use the @c EVT_TIMER
+ macro to connect it to the event handler which will receive
wxTimerEvent notifications.
- Or you may use a derived class and the @c EVT_TIMER
+ Or you may use a derived class and the @c EVT_TIMER
macro to connect it to an event handler defined in the derived class.
If the default constructor is used, the timer object will be its
own owner object, since it is derived from wxEvtHandler.
-
- In any case, you must start the timer with wxTimer::Start
+
+ In any case, you must start the timer with wxTimer::Start
after constructing it before it actually starts sending notifications. It can
be stopped later with wxTimer::Stop.
-
+
@b Note: A timer can only be used from the main thread.
-
+
@library{wxbase}
@category{misc}
-
+
@seealso
wxStopWatch
*/
public:
//@{
/**
- Creates a timer and associates it with @e owner. Please see
+ Creates a timer and associates it with @e owner. Please see
SetOwner() for the description of parameters.
*/
wxTimer();
- wxTimer(wxEvtHandler * owner, int id = -1);
+ wxTimer(wxEvtHandler * owner, int id = -1);
//@}
/**
/**
Returns the current @e owner of the timer.
- If non-@NULL this is the event handler which will receive the
+ If non-@NULL this is the event handler which will receive the
@ref overview_wxtimerevent "timer events" when the timer is running.
*/
wxEvtHandler GetOwner();
the previous value is used. Returns @false if the timer could not be started,
@true otherwise (in MS Windows timers are a limited resource).
- If @e oneShot is @false (the default), the Notify()
+ If @e oneShot is @false (the default), the Notify()
function will be called repeatedly until the timer is stopped. If @true,
it will be called only once and the timer will stop automatically. To make your
code more readable you may also use the following symbolic constants:
/**
@class wxTimerEvent
@wxheader{timer.h}
-
+
wxTimerEvent object is passed to the event handler of timer events.
-
+
For example:
-
+
@code
class MyFrame : public wxFrame
{
public:
...
void OnTimer(wxTimerEvent& event);
-
+
private:
wxTimer m_timer;
};
-
+
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_TIMER(TIMER_ID, MyFrame::OnTimer)
END_EVENT_TABLE()
-
+
MyFrame::MyFrame()
: m_timer(this, TIMER_ID)
{
m_timer.Start(1000); // 1 second interval
}
-
+
void MyFrame::OnTimer(wxTimerEvent& event)
{
// do whatever you want to do every second here
}
@endcode
-
+
@library{wxbase}
@category{events}
-
+
@seealso
wxTimer
*/
/**
@class wxTipProvider
@wxheader{tipdlg.h}
-
+
This is the class used together with wxShowTip function.
It must implement wxTipProvider::GetTip function and return the
current tip from it (different tip each time it is called).
-
+
You will never use this class yourself, but you need it to show startup tips
with wxShowTip. Also, if you want to get the tips text from elsewhere than a
simple text file, you will want to derive a new class from wxTipProvider and
use it instead of the one returned by wxCreateFileTipProvider.
-
+
@library{wxadv}
@category{FIXME}
-
+
@seealso
@ref overview_tipsoverview "Startup tips overview", ::wxShowTip
*/
-class wxTipProvider
+class wxTipProvider
{
public:
/**
Constructor.
- @param currentTip
+ @param currentTip
The starting tip index.
*/
wxTipProvider(size_t currentTip);
/**
- Returns the index of the current tip (i.e. the one which would be returned by
+ Returns the index of the current tip (i.e. the one which would be returned by
GetTip).
- The program usually remembers the value returned by this function after calling
+ The program usually remembers the value returned by this function after calling
wxShowTip. Note that it is not the same as the value which
was passed to wxShowTip + 1 because the user might have pressed the "Next"
button in the tip dialog.
/**
Returns a modified tip. This function will be called immediately after read,
- and before being check whether it is a comment, an empty string or a string
+ and before being check whether it is a comment, an empty string or a string
to translate. You can optionally override this in your custom user-derived
- class
- to optionally to modify the tip as soon as it is read. You can return any
- modification to the string. If you return wxEmptyString, then this tip is
+ class
+ to optionally to modify the tip as soon as it is read. You can return any
+ modification to the string. If you return wxEmptyString, then this tip is
skipped, and the next one is read.
*/
virtual wxString PreProcessTip(const wxString& tip);
/**
This function creates a wxTipProvider which may be
used with wxShowTip.
-
- @param filename
+
+ @param filename
The name of the file containing the tips, one per line
-
- @param currentTip
+
+ @param currentTip
The index of the first tip to show - normally this index
is remembered between the 2 program runs.
-
+
@sa @ref overview_tipsoverview "Tips overview"
*/
wxTipProvider * wxCreateFileTipProvider(const wxString& filename,
/**
@class wxTipWindow
@wxheader{tipwin.h}
-
- Shows simple text in a popup tip window on creation. This is used by
+
+ Shows simple text in a popup tip window on creation. This is used by
wxSimpleHelpProvider to show popup help. The
window automatically destroys itself when the user clicks on it or it loses the
focus.
-
+
You may also use this class to emulate the tooltips when you need finer
control over them than what the standard tooltips provide.
-
+
@library{wxcore}
@category{managedwnd}
*/
/**
Constructor. The tip is shown immediately after the window is constructed.
- @param parent
+ @param parent
The parent window, must be non-@NULL
- @param text
+ @param text
The text to show, may contain the new line characters
- @param maxLength
+ @param maxLength
The length of each line, in pixels. Set to a very large
value to avoid wrapping lines
- @param windowPtr
- Simply passed to
+ @param windowPtr
+ Simply passed to
SetTipWindowPtr below, please see its
documentation for the description of this parameter
- @param rectBounds
- If non-@NULL, passed to
+ @param rectBounds
+ If non-@NULL, passed to
SetBoundingRect below, please see its
documentation for the description of this parameter
*/
also automatically close if the mouse leaves this area. This is useful to
dismiss the tip mouse when the mouse leaves the object it is associated with.
- @param rectBound
+ @param rectBound
The bounding rectangle for the mouse in the screen coordinates
*/
void SetBoundingRect(const wxRect& rectBound);
/**
When the tip window closes itself (which may happen at any moment and
- unexpectedly to the caller) it may @NULL out the pointer pointed to by
+ unexpectedly to the caller) it may @NULL out the pointer pointed to by
@e it windowPtr. This is helpful to avoid dereferencing the tip window which
had been already closed and deleted.
*/
/**
@class wxStringTokenizer
@wxheader{tokenzr.h}
-
+
wxStringTokenizer helps you to break a string up into a number of tokens. It
replaces the standard C function @c strtok() and also extends it in a
number of ways.
-
+
To use this class, you should create a wxStringTokenizer object, give it the
string to tokenize and also the delimiters which separate tokens in the string
(by default, white space characters will be used).
-
+
Then wxStringTokenizer::GetNextToken may be called
- repeatedly until it wxStringTokenizer::HasMoreTokens
+ repeatedly until it wxStringTokenizer::HasMoreTokens
returns @false.
-
+
For example:
-
+
@code
wxStringTokenizer tkz(wxT("first:second:third:fourth"), wxT(":"));
while ( tkz.HasMoreTokens() )
{
wxString token = tkz.GetNextToken();
-
+
// process token here
}
@endcode
-
+
By default, wxStringTokenizer will behave in the same way as @c strtok() if
the delimiters string only contains white space characters but, unlike the
standard function, it will return empty tokens if this is not the case. This
is helpful for parsing strictly formatted data where the number of fields is
fixed but some of them may be empty (i.e. @c TAB or comma delimited text
files).
-
- The behaviour is governed by the last
+
+ The behaviour is governed by the last
@ref wxStringTokenizer::wxstringtokenizer
- constructor/wxStringTokenizer::SetString
+ constructor/wxStringTokenizer::SetString
parameter @c mode which may be one of the following:
-
-
-
+
+
+
@c wxTOKEN_DEFAULT
-
-
+
+
Default behaviour (as described above):
same as @c wxTOKEN_STRTOK if the delimiter string contains only
whitespaces, same as @c wxTOKEN_RET_EMPTY otherwise
-
-
+
+
@c wxTOKEN_RET_EMPTY
-
-
+
+
In this mode, the empty tokens in the
middle of the string will be returned, i.e. @c "a::b:" will be tokenized in
three tokens 'a', '' and 'b'. Notice that all trailing delimiters are ignored
in this mode, not just the last one, i.e. a string @c "a::b::" would
still result in the same set of tokens.
-
-
+
+
@c wxTOKEN_RET_EMPTY_ALL
-
-
+
+
In this mode, empty trailing tokens
(including the one after the last delimiter character) will be returned as
well. The string @c "a::b:" will be tokenized in four tokens: the already
- mentioned ones and another empty one as the last one and a string
+ mentioned ones and another empty one as the last one and a string
@c "a::b::" will have five tokens.
-
-
+
+
@c wxTOKEN_RET_DELIMS
-
-
+
+
In this mode, the delimiter character
after the end of the current token (there may be none if this is the last
- token) is returned appended to the token. Otherwise, it is the same mode as
+ token) is returned appended to the token. Otherwise, it is the same mode as
@c wxTOKEN_RET_EMPTY. Notice that there is no mode like this one but
- behaving like @c wxTOKEN_RET_EMPTY_ALL instead of
- @c wxTOKEN_RET_EMPTY, use @c wxTOKEN_RET_EMPTY_ALL and
+ behaving like @c wxTOKEN_RET_EMPTY_ALL instead of
+ @c wxTOKEN_RET_EMPTY, use @c wxTOKEN_RET_EMPTY_ALL and
wxStringTokenizer::GetLastDelimiter to emulate it.
-
-
+
+
@c wxTOKEN_STRTOK
-
-
+
+
In this mode the class behaves exactly like
the standard @c strtok() function: the empty tokens are never returned.
-
-
-
+
+
+
@library{wxbase}
@category{data}
-
+
@seealso
wxStringTokenize
*/
and the mode specifying how the string should be tokenized.
*/
wxStringTokenizer();
- wxStringTokenizer(const wxString& str,
- const wxString& delims = " \t\r\n",
- wxStringTokenizerMode mode = wxTOKEN_DEFAULT);
+ wxStringTokenizer(const wxString& str,
+ const wxString& delims = " \t\r\n",
+ wxStringTokenizerMode mode = wxTOKEN_DEFAULT);
//@}
/**
Returns the number of tokens remaining in the input string. The number of
- tokens returned by this function is decremented each time
+ tokens returned by this function is decremented each time
GetNextToken() is called and when it
reaches 0 HasMoreTokens() returns
@false.
int CountTokens();
/**
- Returns the delimiter which ended scan for the last token returned by
+ Returns the delimiter which ended scan for the last token returned by
GetNextToken() or @c NUL if
there had been no calls to this function yet or if it returned the trailing
empty token in @c wxTOKEN_RET_EMPTY_ALL mode.
/**
@class wxToolBar
@wxheader{toolbar.h}
-
+
The name wxToolBar is defined to be a synonym for one of the following classes:
-
+
@b wxToolBar95 The native Windows 95 toolbar. Used on Windows 95, NT 4 and
above.
@b wxToolBarMSW A Windows implementation. Used on 16-bit Windows.
@b wxToolBarGTK The GTK toolbar.
-
-
+
+
@beginStyleTable
@style{wxTB_FLAT}:
Gives the toolbar a flat look (Windows and GTK only).
@style{wxTB_RIGHT}:
Align the toolbar at the right side of parent window.
@endStyleTable
-
+
@library{wxbase}
@category{miscwnd}
-
+
@seealso
@ref overview_wxtoolbaroverview "Toolbar overview", wxScrolledWindow
*/
/**
Constructs a toolbar.
- @param parent
+ @param parent
Pointer to a parent window.
- @param id
+ @param id
Window identifier. If -1, will automatically create an identifier.
- @param pos
+ @param pos
Window position. wxDefaultPosition is (-1, -1) which indicates that wxWidgets
should generate a default position for the window. If using the wxWindow class
directly, supply
an actual position.
- @param size
+ @param size
Window size. wxDefaultSize is (-1, -1) which indicates that wxWidgets
should generate a default size for the window.
- @param style
+ @param style
Window style. See wxToolBar for details.
- @param name
+ @param name
Window name.
@remarks After a toolbar is created, you use AddTool() and
toolbar tools.
*/
wxToolBar();
- wxToolBar(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxTB_HORIZONTAL | wxBORDER_NONE,
- const wxString& name = wxPanelNameStr);
+ wxToolBar(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxTB_HORIZONTAL | wxBORDER_NONE,
+ const wxString& name = wxPanelNameStr);
//@}
/**
/**
Adds any control to the toolbar, typically e.g. a combobox.
- @param control
+ @param control
The control to be added.
- @param label
+ @param label
Text to be displayed near the control.
@remarks wxMSW: the label is only displayed if there is enough space
specify some of the more rarely used button features. The last version allows
you to add an existing tool.
- @param toolId
+ @param toolId
An integer by which
the tool may be identified in subsequent operations.
- @param kind
+ @param kind
May be wxITEM_NORMAL for a normal button (default),
wxITEM_CHECK for a checkable tool (such tool stays pressed after it had been
toggled) or wxITEM_RADIO for a checkable tool which makes part of a radio
group of tools each of which is automatically unchecked whenever another button
in the group is checked
- @param bitmap1
+ @param bitmap1
The primary tool bitmap.
- @param bitmap2
+ @param bitmap2
The bitmap used when the tool is disabled. If it is equal to
wxNullBitmap, the disabled bitmap is automatically generated by greing the
normal one.
- @param shortHelpString
+ @param shortHelpString
This string is used for the tools tooltip
- @param longHelpString
+ @param longHelpString
This string is shown in the statusbar (if any) of the
parent frame when the mouse pointer is inside the tool
- @param clientData
+ @param clientData
An optional pointer to client data which can be
retrieved later using GetToolClientData().
- @param tool
+ @param tool
The tool to be added.
@remarks After you have added tools to a toolbar, you must call
const wxBitmap& bitmap1,
const wxString& shortHelpString = "",
wxItemKind kind = wxITEM_NORMAL);
- wxToolBarToolBase* AddTool(int toolId, const wxString& label,
- const wxBitmap& bitmap1,
- const wxBitmap& bitmap2 = wxNullBitmap,
- wxItemKind kind = wxITEM_NORMAL,
- const wxString& shortHelpString = "",
- const wxString& longHelpString = "",
- wxObject* clientData = @NULL);
- wxToolBarToolBase* AddTool(wxToolBarToolBase* tool);
+ wxToolBarToolBase* AddTool(int toolId, const wxString& label,
+ const wxBitmap& bitmap1,
+ const wxBitmap& bitmap2 = wxNullBitmap,
+ wxItemKind kind = wxITEM_NORMAL,
+ const wxString& shortHelpString = "",
+ const wxString& longHelpString = "",
+ wxObject* clientData = @NULL);
+ wxToolBarToolBase* AddTool(wxToolBarToolBase* tool);
//@}
/**
/**
Enables or disables the tool.
- @param toolId
+ @param toolId
Tool to enable or disable.
- @param enable
+ @param enable
If @true, enables the tool, otherwise disables it.
@remarks Some implementations will change the visible state of the tool
wxToolBarToolBase* FindById(int id);
/**
- Returns a pointer to the control identified by @e id or
+ Returns a pointer to the control identified by @e id or
@NULL if no corresponding control is found.
*/
wxControl* FindControl(int id);
/**
Finds a tool for the given mouse position.
- @param x
+ @param x
X position.
- @param y
+ @param y
Y position.
@returns A pointer to a tool if a tool is found, or @NULL otherwise.
/**
Get any client data associated with the tool.
- @param toolId
+ @param toolId
Id of the tool, as passed to AddTool().
@returns Client data, or @NULL if there is none.
/**
Called to determine whether a tool is enabled (responds to user input).
- @param toolId
+ @param toolId
Id of the tool in question.
@returns @true if the tool is enabled, @false otherwise.
/**
Returns the long help for the given tool.
- @param toolId
+ @param toolId
The tool in question.
@sa SetToolLongHelp(), SetToolShortHelp()
/**
Returns the short help for the given tool.
- @param toolId
+ @param toolId
The tool in question.
@sa GetToolLongHelp(), SetToolShortHelp()
/**
Gets the on/off state of a toggle tool.
- @param toolId
+ @param toolId
The tool in question.
@returns @true if the tool is toggled on, @false otherwise.
wxObject* clientData = @NULL,
const wxString& shortHelpString = "",
const wxString& longHelpString = "");
- wxToolBarToolBase * InsertTool(size_t pos,
- wxToolBarToolBase* tool);
+ wxToolBarToolBase * InsertTool(size_t pos,
+ wxToolBarToolBase* tool);
//@}
/**
This is the old way of detecting tool clicks; although it will still work,
you should use the EVT_MENU or EVT_TOOL macro instead.
- @param toolId
+ @param toolId
The identifier passed to AddTool().
- @param toggleDown
+ @param toggleDown
@true if the tool is a toggle and the toggle is down, otherwise is @false.
@returns If the tool is a toggle and this function returns @false, the
work,
you should use the EVT_TOOL_ENTER macro instead.
- @param toolId
+ @param toolId
Greater than -1 if the mouse cursor has moved into the tool,
or -1 if the mouse cursor has moved. The
programmer can override this to provide extra information about the tool,
This is the old way of detecting tool right clicks; although it will still work,
you should use the EVT_TOOL_RCLICKED macro instead.
- @param toolId
+ @param toolId
The identifier passed to AddTool().
- @param x
+ @param x
The x position of the mouse cursor.
- @param y
+ @param y
The y position of the mouse cursor.
@remarks A typical use of this member might be to pop up a menu.
Sets the dropdown menu for the tool given by its @e id. The tool itself will
delete the menu when it's no longer needed.
- If you define a EVT_TOOL_DROPDOWN handler in your program, you must call
+ If you define a EVT_TOOL_DROPDOWN handler in your program, you must call
wxEvent::Skip from it or the menu won't be displayed.
*/
bool SetDropdownMenu(int id, wxMenu* menu);
/**
Set the values to be used as margins for the toolbar.
- @param size
+ @param size
Margin size.
- @param x
+ @param x
Left margin, right margin and inter-tool separation value.
- @param y
+ @param y
Top margin, bottom margin and inter-tool separation value.
@remarks This must be called before the tools are added if absolute
@sa GetMargins(), wxSize
*/
void SetMargins(const wxSize& size);
- void SetMargins(int x, int y);
+ void SetMargins(int x, int y);
//@}
/**
Sets the default size of each tool bitmap. The default bitmap size is 16 by 15
pixels.
- @param size
+ @param size
The size of the bitmaps in the toolbar.
@remarks This should be called to tell the toolbar what the tool bitmap
/**
Sets the long help for the given tool.
- @param toolId
+ @param toolId
The tool in question.
- @param helpString
+ @param helpString
A string for the long help.
@remarks You might use the long help for displaying the tool purpose on
/**
Sets the value used for spacing tools. The default value is 1.
- @param packing
+ @param packing
The value for packing.
@remarks The packing is used for spacing in the vertical direction if the
/**
Sets the default separator size. The default value is 5.
- @param separation
+ @param separation
The separator size.
@sa AddSeparator()
/**
Sets the short help for the given tool.
- @param toolId
+ @param toolId
The tool in question.
- @param helpString
+ @param helpString
The string for the short help.
@remarks An application might use short help for identifying the tool
/**
Toggles a tool on or off. This does not cause any event to get emitted.
- @param toolId
+ @param toolId
Tool in question.
- @param toggle
+ @param toggle
If @true, toggles the tool on, otherwise toggles it off.
@remarks Only applies to a tool that has been specified as a toggle tool.
/**
@class wxToolbook
@wxheader{toolbook.h}
-
+
wxToolbook is a class similar to wxNotebook but which
uses a wxToolBar to show the labels instead of the
tabs.
-
+
There is no documentation for this class yet but its usage is
identical to wxNotebook (except for the features clearly related to tabs
only), so please refer to that class documentation for now. You can also
use the @ref overview_samplenotebook "notebook sample" to see wxToolbook in
action.
-
+
@beginStyleTable
@style{wxTBK_BUTTONBAR}:
Use wxButtonToolBar-based implementation under Mac OS (ignored
(only implement under Windows and GTK 2 platforms as it relies on
wxTB_HORZ_LAYOUT flag support).
@endStyleTable
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxBookCtrl, wxNotebook, @ref overview_samplenotebook "notebook sample"
*/
class wxToolbook : public wxBookCtrl overview
{
public:
-
+
};
/**
@class wxToolTip
@wxheader{tooltip.h}
-
+
This class holds information about a tooltip associated with a window
(see wxWindow::SetToolTip).
-
+
The four static methods, wxToolTip::Enable,
- wxToolTip::SetDelay
- wxToolTip::SetAutoPop and
+ wxToolTip::SetDelay
+ wxToolTip::SetAutoPop and
wxToolTip::SetReshow can be used to globally
alter tooltips behaviour.
-
+
@library{wxcore}
@category{help}
*/
/**
@class wxTopLevelWindow
@wxheader{toplevel.h}
-
+
wxTopLevelWindow is a common base class for wxDialog and
wxFrame. It is an abstract base class meaning that you never
work with objects of this class directly, but all of its methods are also
applicable for the two classes above.
-
+
@library{wxcore}
@category{managedwnd}
-
+
@seealso
wxTopLevelWindow::SetTransparent
*/
/**
Centres the window on screen.
- @param direction
+ @param direction
Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL
or wxBOTH.
/**
Iconizes or restores the window.
- @param iconize
+ @param iconize
If @true, iconizes the window; if @false, shows and restores it.
@sa IsIconized(), Maximize().
/**
Maximizes or restores the window.
- @param maximize
+ @param maximize
If @true, maximizes the window, otherwise it restores it.
@sa Iconize()
/**
Sets the icon for this window.
- @param icon
+ @param icon
The icon to associate with this window.
@remarks The window takes a 'copy' of icon, but since it uses reference
window title bar) instead of scaling, with possibly bad looking results, the
only icon set by SetIcon().
- @param icons
+ @param icons
The icons to associate with this window.
@sa wxIconBundle.
phones.
Unavailable on full keyboard machines.
- @param id
+ @param id
Identifier for this button.
- @param label
+ @param label
Text to be displayed on the screen area dedicated to this hardware button.
- @param subMenu
+ @param subMenu
The menu to be opened after pressing this hardware button.
@sa SetRightMenu().
phones.
Unavailable on full keyboard machines.
- @param id
+ @param id
Identifier for this button.
- @param label
+ @param label
Text to be displayed on the screen area dedicated to this hardware button.
- @param subMenu
+ @param subMenu
The menu to be opened after pressing this hardware button.
@sa SetLeftMenu().
increments.
If a pair of values is not set (or set to -1), no constraints will be used.
- @param incW
+ @param incW
Specifies the increment for sizing the width (GTK/Motif/Xt only).
- @param incH
+ @param incH
Specifies the increment for sizing the height (GTK/Motif/Xt only).
- @param incSize
+ @param incSize
Increment size (only taken into account under X11-based
ports such as wxGTK/wxMotif/wxX11).
int maxH=-1,
int incW=-1,
int incH=-1);
- void SetSizeHints(const wxSize& minSize,
- const wxSize& maxSize=wxDefaultSize,
- const wxSize& incSize=wxDefaultSize);
+ void SetSizeHints(const wxSize& minSize,
+ const wxSize& maxSize=wxDefaultSize,
+ const wxSize& incSize=wxDefaultSize);
//@}
/**
Sets the window title.
- @param title
+ @param title
The window title.
@sa GetTitle()
/**
If the platform supports it will set the window to be translucent
- @param alpha
+ @param alpha
Determines how opaque or transparent the window will
be, if the platform supports the opreration. A value of 0 sets the
window to be fully transparent, and a value of 255 sets the window
/**
@class wxTrackable
@wxheader{tracker.h}
-
+
Add-on base class for a trackable object. This class maintains
an internal linked list of classes of type wxTrackerNode and
calls OnObjectDestroy() on them if this object is destroyed.
class template which automates this. This class has no public
API. Its only use is by deriving another class from it to
make it trackable.
-
+
@code
class MyClass: public Foo, public wxTrackable
{
// whatever
}
-
+
typedef wxWeakRefMyClass MyClassRef;
@endcode
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxTrackable
+class wxTrackable
{
public:
-
+
};
/**
@class wxTreeItemId
@wxheader{treebase.h}
-
+
An opaque reference to a tree item.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxTreeCtrl, wxTreeItemData, @ref overview_wxtreectrloverview "wxTreeCtrl
overview"
*/
-class wxTreeItemId
+class wxTreeItemId
{
public:
/**
Operators for comparison between wxTreeItemId objects.
*/
void operator !();
- bool operator ==(const wxTreeItemId& item);
- bool operator !=(const wxTreeItemId& item);
+ bool operator ==(const wxTreeItemId& item);
+ bool operator !=(const wxTreeItemId& item);
//@}
};
/**
@class wxTreebookEvent
@wxheader{treebook.h}
-
+
This class represents the events generated by a treebook control: currently,
there are four of them. The PAGE_CHANGING and PAGE_CHANGED - have exactly the
same
behaviour as wxNotebookEvent.
-
+
The other two NODE_COLLAPSED and NODE_EXPANDED are triggered when page node in
the tree control
is collapsed/expanded. The page index could be retreived by calling
wxTreebookEvent::GetSelection.
-
-
+
+
@library{wxcore}
@category{events}
-
+
@seealso
wxNotebookEvent, wxTreebook
*/
/**
@class wxTreebook
@wxheader{treebook.h}
-
+
This class is an extension of the Notebook class that allows a tree structured
set of pages to be shown in a control.
A classic example is a netscape preferences dialog that shows a tree
of preference sections on the left and select section page on the right.
-
+
To use the class simply create it and populate with pages using
wxTreebook::InsertPage,
wxTreebook::InsertSubPage,
wxTreebook::AddPage,
wxTreebook::AddSubPage.
-
+
If your tree is no more than 1 level in depth then you could
- simply use wxTreebook::AddPage and
+ simply use wxTreebook::AddPage and
wxTreebook::AddSubPage to sequentially populate your tree
by adding at every step a page or a subpage to the end of the tree.
-
+
@library{wxcore}
@category{miscwnd}
-
+
@seealso
wxNotebook, wxTreebookEvent, wxImageList, @ref overview_samplenotebook
"notebook sample"
/**
Creates an empty TreeBook control.
- @param parent
+ @param parent
The parent window. Must be non-@NULL.
- @param id
+ @param id
The window identifier.
- @param pos
+ @param pos
The window position.
- @param size
+ @param size
The window size.
- @param style
+ @param style
The window style. See wxNotebook.
- @param name
+ @param name
The name of the control (used only under Motif).
*/
wxTreebook();
- wxTreebook(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxTBK_DEFAULT,
- const wxString& name = wxEmptyString);
+ wxTreebook(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxTBK_DEFAULT,
+ const wxString& name = wxEmptyString);
//@}
/**
/**
@class wxTreeItemData
@wxheader{treectrl.h}
-
+
wxTreeItemData is some (arbitrary) user class associated with some item. The
main advantage of having this class is that wxTreeItemData objects are
destroyed automatically by the tree and, as this class has virtual destructor,
as the base class for wxTreeItemData because the size of this class is
critical: in many applications, each tree leaf will have wxTreeItemData
associated with it and the number of leaves may be quite big.
-
+
Also please note that because the objects of this class are deleted by the tree
using the operator @c delete, they must always be allocated on the heap
using @c new.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxTreeCtrl
*/
/**
@class wxTreeCtrl
@wxheader{treectrl.h}
-
+
A tree control presents information as a hierarchy, with items that may be
expanded
to show further items. Items in a tree control are referenced by wxTreeItemId
handles,
which may be tested for validity by calling wxTreeItemId::IsOk.
-
+
To intercept events from a tree control, use the event table macros described
in wxTreeEvent.
-
+
@beginStyleTable
@style{wxTR_EDIT_LABELS}:
Use this style if you wish the user to be able to edit labels in
The set of flags that are closest to the defaults for the native
control for a particular toolkit.
@endStyleTable
-
+
@library{wxcore}
@category{ctrl}
@appearance{treectrl.png}
-
+
@seealso
wxTreeItemData, @ref overview_wxtreectrloverview "wxTreeCtrl overview",
wxListBox, wxListCtrl, wxImageList, wxTreeEvent
/**
Constructor, creating and showing a tree control.
- @param parent
+ @param parent
Parent window. Must not be @NULL.
- @param id
+ @param id
Window identifier. The value wxID_ANY indicates a default value.
- @param pos
+ @param pos
Window position.
- @param size
+ @param size
Window size. If wxDefaultSize is specified then the window is sized
appropriately.
- @param style
+ @param style
Window style. See wxTreeCtrl.
- @param validator
+ @param validator
Window validator.
- @param name
+ @param name
Window name.
@sa Create(), wxValidator
*/
wxTreeCtrl();
- wxTreeCtrl(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxTR_HAS_BUTTONS,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "treeCtrl");
+ wxTreeCtrl(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxTR_HAS_BUTTONS,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = "treeCtrl");
//@}
/**
Returns the font of the item label.
*/
wxTreeItemData* GetItemData(const wxTreeItemId& item);
- See also wxPython note: wxPython provides the following shortcut method:
+See also wxPython note:
+wxPython provides the following shortcut method:
-GetPyData(item)
+ GetPyData(item)
-Returns the Python Object
-associated with the wxTreeItemData for the given item Id.
+ Returns the Python Object
+ associated with the wxTreeItemData for the given item Id.
-wxFont GetItemFont(const wxTreeItemId& item);
+ wxFont GetItemFont(const wxTreeItemId& item);
//@}
/**
wxTreeItemId GetItemParent(const wxTreeItemId& item);
/**
- Gets the selected item image (this function is obsolete, use
+ Gets the selected item image (this function is obsolete, use
@c GetItemImage(item, wxTreeItemIcon_Selected) instead).
*/
int GetItemSelectedImage(const wxTreeItemId& item);
int image = -1,
int selImage = -1,
wxTreeItemData* data = @NULL);
- wxTreeItemId InsertItem(const wxTreeItemId& parent,
- size_t before,
- const wxString& text,
- int image = -1,
- int selImage = -1,
- wxTreeItemData* data = @NULL);
+ wxTreeItemId InsertItem(const wxTreeItemId& parent,
+ size_t before,
+ const wxString& text,
+ int image = -1,
+ int selImage = -1,
+ wxTreeItemData* data = @NULL);
//@}
/**
positive value if the first item is less than, equal to or greater than the
second one.
- Please note that you @b must use wxRTTI macros
- DECLARE_DYNAMIC_CLASS and
+ Please note that you @b must use wxRTTI macros
+ DECLARE_DYNAMIC_CLASS and
IMPLEMENT_DYNAMIC_CLASS if you override this
function because otherwise the base class considers that it is not overridden
and uses the default comparison, i.e. sorts the items alphabetically, which
is implemented internally).
*/
void SetItemData(const wxTreeItemId& item, wxTreeItemData* data);
- wxPython note: SetPyData(item, obj)
+wxPython note:
+ SetPyData(item, obj)
-Associate the given Python
-Object with the wxTreeItemData for the given item Id.
+ Associate the given Python
+ Object with the wxTreeItemData for the given item Id.
-void SetItemDropHighlight(const wxTreeItemId& item,
- bool highlight = @true);
+ void SetItemDropHighlight(const wxTreeItemId& item,
+ bool highlight = @true);
//@}
/**
wxTreeItemIcon which = wxTreeItemIcon_Normal);
/**
- Sets the selected item image (this function is obsolete, use
+ Sets the selected item image (this function is obsolete, use
@c SetItemImage(item, wxTreeItemIcon_Selected) instead).
*/
void SetItemSelectedImage(const wxTreeItemId& item, int selImage);
/**
@class wxTreeEvent
@wxheader{treectrl.h}
-
+
A tree event holds information about events associated with wxTreeCtrl objects.
-
+
@library{wxbase}
@category{events}
-
+
@seealso
wxTreeCtrl
*/
wxTreeItemId GetItem();
/**
- Returns the key code if the event is a key event. Use
+ Returns the key code if the event is a key event. Use
GetKeyEvent() to get the values of the
modifier keys for this event (i.e. Shift or Ctrl).
*/
/**
@class wxTextInputStream
@wxheader{txtstrm.h}
-
+
This class provides functions that read text datas using an input stream.
So, you can read @e text floats, integers.
-
+
The wxTextInputStream correctly reads text files (or streams) in DOS, Macintosh
and Unix formats and reports a single newline char as a line ending.
-
+
Operator is overloaded and you can use this class like a standard C++ iostream.
Note, however, that the arguments are the fixed size types wxUint32, wxInt32 etc
and on a typical 32-bit computer, none of these match to the "long" type
(wxInt32
is defined as int on 32-bit architectures) so that you cannot use long. To avoid
problems (here and elsewhere), make use of wxInt32, wxUint32 and similar types.
-
+
If you're scanning through a file using wxTextInputStream, you should check for
EOF @b before
reading the next item (word / number), because otherwise the last item may get
- lost.
+ lost.
You should however be prepared to receive an empty item (empty string / zero
number) at the
end of file, especially on Windows systems. This is unavoidable because most
(but not all) files end
with whitespace (i.e. usually a newline).
-
+
For example:
-
+
@code
wxFileInputStream input( "mytext.txt" );
wxTextInputStream text( input );
wxUint8 i1;
float f2;
wxString line;
-
+
text i1; // read a 8 bit integer.
text i1 f2; // read a 8 bit integer followed by float.
text line; // read a text line
@endcode
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxTextInputStream::SetStringSeparators
*/
-class wxTextInputStream
+class wxTextInputStream
{
public:
/**
Constructs a text stream associated to the given input stream.
- @param stream
+ @param stream
The underlying input stream.
- @param sep
+ @param sep
The initial string separator characters.
- @param conv
+ @param conv
In Unicode build only: The encoding converter used to convert the bytes in the
underlying input stream to characters.
*/
wxString ReadLine();
/**
- @b NB: This method is deprecated, use ReadLine()
+ @b NB: This method is deprecated, use ReadLine()
or ReadWord() instead.
Same as ReadLine().
wxString ReadWord();
/**
- Sets the characters which are used to define the word boundaries in
+ Sets the characters which are used to define the word boundaries in
ReadWord().
The default separators are the space and @c TAB characters.
/**
@class wxTextOutputStream
@wxheader{txtstrm.h}
-
+
This class provides functions that write text datas using an output stream.
So, you can write @e text floats, integers.
-
+
You can also simulate the C++ cout class:
-
+
@code
wxFFileOutputStream output( stderr );
wxTextOutputStream cout( output );
-
+
cout "This is a text line" endl;
cout 1234;
cout 1.23456;
@endcode
-
+
The wxTextOutputStream writes text files (or streams) on DOS, Macintosh
and Unix in their native formats (concerning the line ending).
-
+
@library{wxbase}
@category{streams}
*/
-class wxTextOutputStream
+class wxTextOutputStream
{
public:
/**
Constructs a text stream object associated to the given output stream.
- @param stream
+ @param stream
The output stream.
- @param mode
+ @param mode
The end-of-line mode. One of wxEOL_NATIVE, wxEOL_DOS, wxEOL_MAC and wxEOL_UNIX.
- @param conv
+ @param conv
In Unicode build only: The object used to convert
Unicode text into ASCII characters written to the output stream.
*/
/**
@class wxURI
@wxheader{uri.h}
-
+
wxURI is used to extract information from
a URI (Uniform Resource Identifier).
-
- For information about URIs, see
+
+ For information about URIs, see
RFC 3986.
-
+
In short, a URL is a URI. In other
- words, URL is a subset of a URI - all
+ words, URL is a subset of a URI - all
acceptable URLs are also acceptable URIs.
-
+
wxURI automatically escapes invalid characters in a string,
so there is no chance of wxURI "failing" on construction/creation.
-
+
wxURI supports copy construction and standard assignment
operators. wxURI can also be inherited from to provide
furthur functionality.
-
+
@library{wxbase}
@category{data}
-
+
@seealso
wxURL
*/
/**
Copies this URI from another URI.
- @param uri
+ @param uri
URI (Uniform Resource Identifier) to initialize with
*/
wxURI();
- wxURI(const wxChar* uri);
- wxURI(const wxURI& uri);
+ wxURI(const wxChar* uri);
+ wxURI(const wxURI& uri);
//@}
/**
Builds the URI from its individual components and adds proper separators.
- If the URI is not a reference or is not resolved,
- the URI that is returned from Get is the same one
+ If the URI is not a reference or is not resolved,
+ the URI that is returned from Get is the same one
passed to Create.
*/
wxString BuildURI();
wxString BuildUnescapedURI();
/**
- Creates this URI from the string
+ Creates this URI from the string
@param uri.
- Returns the position at which parsing stopped (there
+ Returns the position at which parsing stopped (there
is no such thing as an "invalid" wxURI).
- uri
+ uri
string to initialize from
*/
const wxChar* Create(const wxString uri);
/**
Note that on URIs with a "file" scheme wxURI does not
- parse the userinfo, server, or port portion. This is to keep
+ parse the userinfo, server, or port portion. This is to keep
compatability with wxFileSystem, the old wxURL, and older url specifications.
*/
Obtains the fragment of this URI.
The fragment of a URI is the last value of the URI,
- and is the value after a '' character after the path
+ and is the value after a '' character after the path
of the URI.
@c http://mysite.com/mypath#fragment
/**
Returns a string representation of the URI's port.
- The Port of a URI is a value after the server, and
+ The Port of a URI is a value after the server, and
must come after a colon (:).
@c http://mysite.com:port
/**
Returns the Query component of the URI.
- The query component is what is commonly passed to a
+ The query component is what is commonly passed to a
cgi application, and must come after the path component,
and after a '?' character.
/**
Returns the Server component of the URI.
- The server of the uri can be a server name or
+ The server of the uri can be a server name or
a type of ip address. See
GetHostType() for the
- possible values for the host type of the
+ possible values for the host type of the
server component.
@c http://server/mypath
bool IsReference();
/**
- To obtain individual components you can use
+ To obtain individual components you can use
one of the following methods
GetScheme()
calling a get method, which determines whether or not the component referred
to by the method is defined according to RFC 2396.
- Consider an undefined component equivalent to a
+ Consider an undefined component equivalent to a
@NULL C string.
-
+
HasScheme()
HasUserInfo()
path is not an absolute path (prefixed by a '/'), then this URI's
path is merged with the base's path.
- For instance, resolving "../mydir" from "http://mysite.com/john/doe"
- results in the scheme (http) and server (mysite.com) being copied into
+ For instance, resolving "../mydir" from "http://mysite.com/john/doe"
+ results in the scheme (http) and server (mysite.com) being copied into
this URI, since they do not exist. In addition, since the path
of this URI is not absolute (does not begin with '/'), the path
of the base's is merged with this URI's path, resulting in the URI
"http://mysite.com/john/mydir".
- @param base
+ @param base
Base URI to inherit from. Must be a full URI and not a reference
- @param flags
+ @param flags
Currently either wxURI_STRICT or 0, in non-strict
mode some compatibility layers are enabled to allow loopholes from RFCs prior
to 2396
If you want to unescape an entire wxURI, use BuildUnescapedURI() instead,
as it performs some optimizations over this method.
- @param uri
+ @param uri
string with escaped characters to convert
*/
wxString Unescape(const wxString& uri);
/**
- Compares this URI to another URI, and returns @true if
- this URI equals
+ Compares this URI to another URI, and returns @true if
+ this URI equals
@param uricomp, otherwise it returns @false.
- uricomp
+ uricomp
URI to compare to
*/
void operator ==(const wxURI& uricomp);
/**
@class wxURL
@wxheader{url.h}
-
+
wxURL is a specialization of wxURI for parsing URLs.
Please look at wxURI documentation for more info about the functions
you can use to retrieve the various parts of the URL (scheme, server, port,
etc).
-
+
Supports standard assignment operators, copy constructors,
and comparison operators.
-
+
@library{wxnet}
@category{net}
-
+
@seealso
wxSocketBase, wxProtocol
*/
@c file://hostname/path/to/file otherwise GetError()
will return a value different from @c wxURL_NOERR.
- It is valid to leave out the hostname but slashes must remain in place -
- i.e. a file URL without a hostname must contain three consecutive slashes
+ It is valid to leave out the hostname but slashes must remain in place -
+ i.e. a file URL without a hostname must contain three consecutive slashes
(e.g. @c file:///somepath/myfile).
- @param url
+ @param url
Url string to parse.
*/
#define wxURL(const wxString& url = wxEmptyString) /* implementation is private */
wxProtocol GetProtocol();
/**
- Returns @true if this object is correctly initialized, i.e. if
+ Returns @true if this object is correctly initialized, i.e. if
GetError() returns @c wxURL_NOERR.
*/
#define bool IsOk() /* implementation is private */
Sets the default proxy server to use to get the URL. The string specifies
the proxy like this: hostname:port number.
- @param url_proxy
+ @param url_proxy
Specifies the proxy to use
@sa SetProxy()
/**
@class wxWindowDisabler
@wxheader{utils.h}
-
+
This class disables all windows of the application (may be with the exception
of one of them) in its constructor and enables them back in its destructor.
This comes in handy when you want to indicate to the user that the application
is currently busy and cannot respond to user input.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxBusyCursor
*/
-class wxWindowDisabler
+class wxWindowDisabler
{
public:
/**
- Disables all top level windows of the applications with the exception of
+ Disables all top level windows of the applications with the exception of
@e winToSkip if it is not @NULL.
*/
wxWindowDisabler(wxWindow * winToSkip = @NULL);
/**
@class wxBusyCursor
@wxheader{utils.h}
-
+
This class makes it easy to tell your user that the program is temporarily busy.
Just create a wxBusyCursor object on the stack, and within the current scope,
the hourglass will be shown.
-
+
For example:
-
+
@code
wxBusyCursor wait;
-
+
for (int i = 0; i 100000; i++)
DoACalculation();
@endcode
-
+
It works by calling wxBeginBusyCursor in the constructor,
and wxEndBusyCursor in the destructor.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxBeginBusyCursor, wxEndBusyCursor, wxWindowDisabler
*/
-class wxBusyCursor
+class wxBusyCursor
{
public:
/**
This function returns the "user id" also known as "login name" under Unix i.e.
something like "jsmith". It uniquely identifies the current user (on this
system).
-
+
Under Windows or NT, this function first looks in the environment
variables USER and LOGNAME; if neither of these is found, the entry @b UserId
in the @b wxWidgets section of the WIN.INI file is tried.
-
+
The first variant of this function returns the login name if successful or an
empty string otherwise. The second (deprecated) function returns @true
if successful, @false otherwise.
-
+
@sa wxGetUserName
*/
wxString wxGetUserId();
- bool wxGetUserId(char * buf, int sz);
+bool wxGetUserId(char * buf, int sz);
//@}
/**
@b NB: This function is now obsolete, please use
wxLogFatalError instead.
-
+
Displays @e msg and exits. This writes to standard error under Unix,
and pops up a message box under Windows. Used for fatal internal
wxWidgets errors. See also wxError.
/**
@b NB: This function is obsolete, please use
wxWindow::FindWindowByName instead.
-
+
Find a window by its name (as given in a window constructor or @b Create
function call).
If @e parent is @NULL, the search will start from all top-level
frames and dialog boxes; if non-@NULL, the search will be limited to the given
window hierarchy.
The search is recursive in both cases.
-
+
If no such named window is found, @b wxFindWindowByLabel is called.
*/
wxWindow * wxFindWindowByName(const wxString& name,
Changes the cursor back to the original cursor, for all windows in the
application.
Use with wxBeginBusyCursor.
-
+
See also wxIsBusy, wxBusyCursor.
*/
void wxEndBusyCursor();
/**
@b NB: This function is now obsolete, replaced by Log
functions and wxLogDebug in particular.
-
+
Display a debugging message; under Windows, this will appear on the
debugger command window, and under Unix, it will be written to standard
error.
-
+
The syntax is identical to @b printf: pass a format string and a
variable list of arguments.
-
+
@b Tip: under Windows, if your application crashes before the
message appears in the debugging window, put a wxYield call after
each wxDebugMsg call. wxDebugMsg seems to be broken under WIN32s
/**
For normal keys, returns @true if the specified key is currently down.
-
+
For togglable keys (Caps Lock, Num Lock and Scroll Lock), returns
@true if the key is toggled such that its LED indicator is lit. There is
currently no way to test whether togglable keys are up or down.
-
+
Even though there are virtual key codes defined for mouse buttons, they
cannot be used with this function currently.
*/
Returns the string containing the description of the current platform in a
user-readable form. For example, this function may return strings like
@c Windows NT Version 4.0 or @c Linux 2.2.2 i386.
-
+
@sa ::wxGetOsVersion
*/
wxString wxGetOsDescription();
/**
Return the (current) user's home directory.
-
+
@sa wxGetUserHome, wxStandardPaths
*/
wxString wxGetHomeDir();
underlying GUI toolkit. This is mainly used for diagnostic purposes and can be
invoked by Ctrl-Alt-middle clicking on any wxWindow which doesn't otherwise
handle this event.
-
+
This function is new since wxWidgets version 2.9.0
*/
void wxInfoMessageBox(wxWindow ( parent = @NULL);
-/**
- Find a menu item identifier associated with the given frame's menu bar.
-*/
-int wxFindMenuItemId(wxFrame * frame, const wxString& menuString,
- const wxString& itemString);
-
-/**
- This function enables or disables all top level windows. It is used by
- ::wxSafeYield.
-*/
-void wxEnableTopLevelWindows(bool enable = @true);
-
-/**
- Strips any menu codes from @e str and returns the result.
-
- By default, the functions strips both the mnemonics character (@c '')
- which is used to indicate a keyboard shortkey, and the accelerators, which are
- used only in the menu items and are separated from the main text by the
- @c \t (TAB) character. By using @e flags of
- @c wxStrip_Mnemonics or @c wxStrip_Accel to strip only the former
- or the latter part, respectively.
-
- Notice that in most cases
- wxMenuItem::GetLabelFromText or
- wxControl::GetLabelText can be used instead.
-*/
-wxString wxStripMenuCodes(const wxString& str,
- int flags = wxStrip_All);
-
-/**
- @b NB: This function is now obsolete, please use wxLogError
- instead.
-
- Displays @e msg and continues. This writes to standard error under
- Unix, and pops up a message box under Windows. Used for internal
- wxWidgets errors. See also wxFatalError.
-*/
-void wxError(const wxString& msg,
- const wxString& title = "wxWidgets Internal Error");
-
-/**
- Open the @e url in user's default browser. If @e flags parameter contains
- @c wxBROWSER_NEW_WINDOW flag, a new window is opened for the URL
- (currently this is only supported under Windows). The @e url may also be a
- local file path (with or without @c file:// prefix), if it doesn't
- correspond to an existing file and the URL has no scheme @c http:// is
- prepended to it by default.
-
- Returns @true if the application was successfully launched.
-
- Note that for some configurations of the running user, the application which
- is launched to open the given URL may be URL-dependent (e.g. a browser may be
- used for
- local URLs while another one may be used for remote URLs).
-*/
-bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
-
-/**
- Executes a command in an interactive shell window. If no command is
- specified, then just the shell is spawned.
-
- See also wxExecute, @ref overview_sampleexec "Exec sample".
-*/
-bool wxShell(const wxString& command = @NULL);
-
-/**
- Gets the version and the operating system ID for currently running OS.
- See wxPlatformInfo for more details about wxOperatingSystemId.
-
- @sa ::wxGetOsDescription, wxPlatformInfo
-*/
-wxOperatingSystemId wxGetOsVersion(int * major = @NULL,
- int * minor = @NULL);
-
-/**
- Returns the FQDN (fully qualified domain host name) or an empty string on
- error.
-
- @sa wxGetHostName
-*/
-wxString wxGetFullHostName();
-
-/**
- Changes the cursor to the given cursor for all windows in the application.
- Use wxEndBusyCursor to revert the cursor back
- to its previous state. These two calls can be nested, and a counter
- ensures that only the outer calls take effect.
-
- See also wxIsBusy, wxBusyCursor.
-*/
-void wxBeginBusyCursor(wxCursor * cursor = wxHOURGLASS_CURSOR);
-
-/**
- Tells the system to delete the specified object when
- all other events have been processed. In some environments, it is
- necessary to use this instead of deleting a frame directly with the
- delete operator, because some GUIs will still send events to a deleted window.
-
- Now obsolete: use wxWindow::Close instead.
-*/
-void wxPostDelete(wxObject * object);
-
-/**
- @b NB: This function is obsolete, please use
- wxWindow::FindWindowByLabel instead.
-
- Find a window by its label. Depending on the type of window, the label may be a
- window title
- or panel item label. If @e parent is @NULL, the search will start from all
- top-level
- frames and dialog boxes; if non-@NULL, the search will be limited to the given
- window hierarchy.
- The search is recursive in both cases.
-*/
-wxWindow * wxFindWindowByLabel(const wxString& label,
- wxWindow * parent=@NULL);
-
-/**
- This function is similar to wxYield, except that it disables the user input to
- all program windows before calling wxYield and re-enables it again
- afterwards. If @e win is not @NULL, this window will remain enabled,
- allowing the implementation of some limited user interaction.
-
- Returns the result of the call to ::wxYield.
-*/
-bool wxSafeYield(wxWindow* win = @NULL, bool onlyIfNeeded = @false);
-
-/**
- Returns the mouse position in screen coordinates.
-*/
-wxPoint wxGetMousePosition();
-
-/**
- Loads a user-defined Windows resource as a string. If the resource is found,
- the function creates
- a new character array and copies the data into it. A pointer to this data is
- returned. If unsuccessful, @NULL is returned.
-
- The resource must be defined in the @c .rc file using the following syntax:
- @code
- myResource TEXT file.ext
- @endcode
-
- where @c file.ext is a file that the resource compiler can find.
-
- This function is available under Windows only.
-*/
-wxString wxLoadUserResource(const wxString& resourceName,
- const wxString& resourceType="TEXT");
-
-/**
- Returns the amount of free memory in bytes under environments which
- support it, and -1 if not supported or failed to perform measurement.
-*/
-wxMemorySize wxGetFreeMemory();
-
-/**
- This is a macro defined as @c getenv() or its wide char version in Unicode
- mode.
-
- Note that under Win32 it may not return correct value for the variables set
- with wxSetEnv, use wxGetEnv function
- instead.
-*/
-wxChar * wxGetEnv(const wxString& var);
+ /**
+ Find a menu item identifier associated with the given frame's menu bar.
+ */
+ int wxFindMenuItemId(wxFrame * frame, const wxString& menuString,
+ const wxString& itemString);
+
+ /**
+ This function enables or disables all top level windows. It is used by
+ ::wxSafeYield.
+ */
+ void wxEnableTopLevelWindows(bool enable = @true);
+
+ /**
+ Strips any menu codes from @e str and returns the result.
+
+ By default, the functions strips both the mnemonics character (@c '')
+ which is used to indicate a keyboard shortkey, and the accelerators, which are
+ used only in the menu items and are separated from the main text by the
+ @c \t (TAB) character. By using @e flags of
+ @c wxStrip_Mnemonics or @c wxStrip_Accel to strip only the former
+ or the latter part, respectively.
+
+ Notice that in most cases
+ wxMenuItem::GetLabelFromText or
+ wxControl::GetLabelText can be used instead.
+ */
+ wxString wxStripMenuCodes(const wxString& str,
+ int flags = wxStrip_All);
+
+ /**
+ @b NB: This function is now obsolete, please use wxLogError
+ instead.
+
+ Displays @e msg and continues. This writes to standard error under
+ Unix, and pops up a message box under Windows. Used for internal
+ wxWidgets errors. See also wxFatalError.
+ */
+ void wxError(const wxString& msg,
+ const wxString& title = "wxWidgets Internal Error");
+
+ /**
+ Open the @e url in user's default browser. If @e flags parameter contains
+ @c wxBROWSER_NEW_WINDOW flag, a new window is opened for the URL
+ (currently this is only supported under Windows). The @e url may also be a
+ local file path (with or without @c file:// prefix), if it doesn't
+ correspond to an existing file and the URL has no scheme @c http:// is
+ prepended to it by default.
+
+ Returns @true if the application was successfully launched.
+
+ Note that for some configurations of the running user, the application which
+ is launched to open the given URL may be URL-dependent (e.g. a browser may be
+ used for
+ local URLs while another one may be used for remote URLs).
+ */
+ bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
+
+ /**
+ Executes a command in an interactive shell window. If no command is
+ specified, then just the shell is spawned.
+
+ See also wxExecute, @ref overview_sampleexec "Exec sample".
+ */
+ bool wxShell(const wxString& command = @NULL);
+
+ /**
+ Gets the version and the operating system ID for currently running OS.
+ See wxPlatformInfo for more details about wxOperatingSystemId.
+
+ @sa ::wxGetOsDescription, wxPlatformInfo
+ */
+ wxOperatingSystemId wxGetOsVersion(int * major = @NULL,
+ int * minor = @NULL);
+
+ /**
+ Returns the FQDN (fully qualified domain host name) or an empty string on
+ error.
+
+ @sa wxGetHostName
+ */
+ wxString wxGetFullHostName();
+
+ /**
+ Changes the cursor to the given cursor for all windows in the application.
+ Use wxEndBusyCursor to revert the cursor back
+ to its previous state. These two calls can be nested, and a counter
+ ensures that only the outer calls take effect.
+
+ See also wxIsBusy, wxBusyCursor.
+ */
+ void wxBeginBusyCursor(wxCursor * cursor = wxHOURGLASS_CURSOR);
+
+ /**
+ Tells the system to delete the specified object when
+ all other events have been processed. In some environments, it is
+ necessary to use this instead of deleting a frame directly with the
+ delete operator, because some GUIs will still send events to a deleted window.
+
+ Now obsolete: use wxWindow::Close instead.
+ */
+ void wxPostDelete(wxObject * object);
+
+ /**
+ @b NB: This function is obsolete, please use
+ wxWindow::FindWindowByLabel instead.
+
+ Find a window by its label. Depending on the type of window, the label may be a
+ window title
+ or panel item label. If @e parent is @NULL, the search will start from all
+ top-level
+ frames and dialog boxes; if non-@NULL, the search will be limited to the given
+ window hierarchy.
+ The search is recursive in both cases.
+ */
+ wxWindow * wxFindWindowByLabel(const wxString& label,
+ wxWindow * parent=@NULL);
+
+ /**
+ This function is similar to wxYield, except that it disables the user input to
+ all program windows before calling wxYield and re-enables it again
+ afterwards. If @e win is not @NULL, this window will remain enabled,
+ allowing the implementation of some limited user interaction.
+
+ Returns the result of the call to ::wxYield.
+ */
+ bool wxSafeYield(wxWindow* win = @NULL, bool onlyIfNeeded = @false);
+
+ /**
+ Returns the mouse position in screen coordinates.
+ */
+ wxPoint wxGetMousePosition();
+
+ /**
+ Loads a user-defined Windows resource as a string. If the resource is found,
+ the function creates
+ a new character array and copies the data into it. A pointer to this data is
+ returned. If unsuccessful, @NULL is returned.
+
+ The resource must be defined in the @c .rc file using the following syntax:
+ @code
+ myResource TEXT file.ext
+ @endcode
+
+ where @c file.ext is a file that the resource compiler can find.
+
+ This function is available under Windows only.
+ */
+ wxString wxLoadUserResource(const wxString& resourceName,
+ const wxString& resourceType="TEXT");
+
+ /**
+ Returns the amount of free memory in bytes under environments which
+ support it, and -1 if not supported or failed to perform measurement.
+ */
+ wxMemorySize wxGetFreeMemory();
+
+ /**
+ This is a macro defined as @c getenv() or its wide char version in Unicode
+ mode.
+
+ Note that under Win32 it may not return correct value for the variables set
+ with wxSetEnv, use wxGetEnv function
+ instead.
+ */
+ wxChar * wxGetEnv(const wxString& var);
//@{
-/**
- Copies the current host machine's name into the supplied buffer. Please note
- that the returned name is @e not fully qualified, i.e. it does not include
- the domain name.
-
- Under Windows or NT, this function first looks in the environment
- variable SYSTEM_NAME; if this is not found, the entry @b HostName
- in the @b wxWidgets section of the WIN.INI file is tried.
-
- The first variant of this function returns the hostname if successful or an
- empty string otherwise. The second (deprecated) function returns @true
- if successful, @false otherwise.
-
- @sa wxGetFullHostName
-*/
-wxString wxGetHostName();
- bool wxGetHostName(char * buf, int sz);
+ /**
+ Copies the current host machine's name into the supplied buffer. Please note
+ that the returned name is @e not fully qualified, i.e. it does not include
+ the domain name.
+
+ Under Windows or NT, this function first looks in the environment
+ variable SYSTEM_NAME; if this is not found, the entry @b HostName
+ in the @b wxWidgets section of the WIN.INI file is tried.
+
+ The first variant of this function returns the hostname if successful or an
+ empty string otherwise. The second (deprecated) function returns @true
+ if successful, @false otherwise.
+
+ @sa wxGetFullHostName
+ */
+ wxString wxGetHostName();
+ bool wxGetHostName(char * buf, int sz);
//@}
-/**
- Returns the current value of the environment variable @e var in @e value.
- @e value may be @NULL if you just want to know if the variable exists
- and are not interested in its value.
-
- Returns @true if the variable exists, @false otherwise.
-*/
-bool wxGetEnv(const wxString& var, wxString * value);
-
-/**
- Under X only, returns the current display name. See also wxSetDisplayName.
-*/
-wxString wxGetDisplayName();
-
-/**
- Ring the system bell.
-
- Note that this function is categorized as a GUI one and so is not thread-safe.
-*/
-void wxBell();
-
-/**
- Returns the home directory for the given user. If the @e user is empty
- (default value), this function behaves like
- wxGetHomeDir i.e. returns the current user home
- directory.
-
- If the home directory couldn't be determined, an empty string is returned.
-*/
-wxString wxGetUserHome(const wxString& user = "");
-
-//@{
-/**
- @b wxPerl note: In wxPerl this function is called @c Wx::ExecuteStdoutStderr
- and it only takes the @c command argument,
- and returns a 3-element list @c ( status, output, errors ), where
- @c output and @c errors are array references.
-
- Executes another program in Unix or Windows.
-
- The first form takes a command string, such as @c "emacs file.txt".
-
- The second form takes an array of values: a command, any number of
- arguments, terminated by @NULL.
-
- The semantics of the third and fourth versions is different from the first two
- and is described in more details below.
-
- If @e flags parameter contains @c wxEXEC_ASYNC flag (the default), flow
- of control immediately returns. If it contains @c wxEXEC_SYNC, the current
- application waits until the other program has terminated.
-
- In the case of synchronous execution, the return value is the exit code of
- the process (which terminates by the moment the function returns) and will be
- -1 if the process couldn't be started and typically 0 if the process
- terminated successfully. Also, while waiting for the process to
- terminate, wxExecute will call wxYield. Because of this, by
- default this function disables all application windows to avoid unexpected
- reentrancies which could result from the users interaction with the program
- while the child process is running. If you are sure that it is safe to not
- disable the program windows, you may pass @c wxEXEC_NODISABLE flag to
- prevent this automatic disabling from happening.
-
- For asynchronous execution, however, the return value is the process id and
- zero value indicates that the command could not be executed. As an added
- complication, the return value of -1 in this case indicates that we didn't
- launch a new process, but connected to the running one (this can only happen in
- case of using DDE under Windows for command execution). In particular, in this,
- and only this, case the calling code will not get the notification about
- process termination.
-
- If callback isn't @NULL and if execution is asynchronous,
- wxProcess::OnTerminate will be called when
- the process finishes. Specifying this parameter also allows you to redirect the
- standard input and/or output of the process being launched by calling
- wxProcess::Redirect. If the child process IO is redirected,
- under Windows the process window is not shown by default (this avoids having to
- flush an unnecessary console for the processes which don't create any windows
- anyhow) but a @c wxEXEC_NOHIDE flag can be used to prevent this from
- happening, i.e. with this flag the child process window will be shown normally.
-
- Under Unix the flag @c wxEXEC_MAKE_GROUP_LEADER may be used to ensure
- that the new process is a group leader (this will create a new session if
- needed). Calling wxKill passing wxKILL_CHILDREN will
- kill this process as well as all of its children (except those which have
- started their own session).
-
- The @c wxEXEC_NOEVENTS flag prevents processing of any events from taking
- place while the child process is running. It should be only used for very
- short-lived processes as otherwise the application windows risk becoming
- unresponsive from the users point of view. As this flag only makes sense with
- @c wxEXEC_SYNC, @c wxEXEC_BLOCK equal to the sum of both of these flags
- is provided as a convenience.
-
- Finally, you may use the third overloaded version of this function to execute
- a process (always synchronously, the contents of @e flags is or'd with
- @c wxEXEC_SYNC) and capture its output in the array @e output. The
- fourth version adds the possibility to additionally capture the messages from
- standard error output in the @e errors array.
-
- @b NB: Currently wxExecute() can only be used from the main thread, calling
- this function from another thread will result in an assert failure in debug
- build and won't work.
-
- @param command
- The command to execute and any parameters to pass to it as a
- single string.
-
- @param argv
- The command to execute should be the first element of this
- array, any additional ones are the command parameters and the array must be
- terminated with a @NULL pointer.
-
- @param flags
- Combination of bit masks wxEXEC_ASYNC,
- wxEXEC_SYNC and wxEXEC_NOHIDE
-
- @param callback
- An optional pointer to wxProcess
-
- @sa wxShell, wxProcess, @ref overview_sampleexec "Exec sample".
-*/
-long wxExecute(const wxString& command, int sync = wxEXEC_ASYNC,
- wxProcess * callback = @NULL);
- wxPerl note: long wxExecute(char ** argv,
- int flags = wxEXEC_ASYNC,
- wxProcess * callback = @NULL);
- wxPerl note: long wxExecute(const wxString& command,
- wxArrayString& output,
- int flags = 0);
- wxPerl note: long wxExecute(const wxString& command,
- wxArrayString& output,
- wxArrayString& errors,
- int flags = 0);
-//@}
+ /**
+ Returns the current value of the environment variable @e var in @e value.
+ @e value may be @NULL if you just want to know if the variable exists
+ and are not interested in its value.
-/**
- Returns a string representing the current date and time.
-*/
-wxString wxNow();
+ Returns @true if the variable exists, @false otherwise.
+ */
+ bool wxGetEnv(const wxString& var, wxString * value);
-/**
- Returns @true if the operating system the program is running under is 64 bit.
- The check is performed at run-time and may differ from the value available at
- compile-time (at compile-time you can just check if @c sizeof(void*)==8)
- since the program could be running in emulation mode or in a mixed 32/64 bit
- system
- (bi-architecture operating system).
-
- Very important: this function is not 100% reliable on some systems given the
- fact
- that there isn't always a standard way to do a reliable check on the OS
- architecture.
-*/
-bool wxIsPlatform64Bit();
+ /**
+ Under X only, returns the current display name. See also wxSetDisplayName.
+ */
+ wxString wxGetDisplayName();
-/**
- Returns the number uniquely identifying the current process in the system.
-
- If an error occurs, 0 is returned.
-*/
-unsigned long wxGetProcessId();
+ /**
+ Ring the system bell.
-/**
- Equivalent to the Unix kill function: send the given signal @e sig to the
- process with PID @e pid. The valid signal values are
- @code
- enum wxSignal
- {
- wxSIGNONE = 0, // verify if the process exists under Unix
- wxSIGHUP,
- wxSIGINT,
- wxSIGQUIT,
- wxSIGILL,
- wxSIGTRAP,
- wxSIGABRT,
- wxSIGEMT,
- wxSIGFPE,
- wxSIGKILL, // forcefully kill, dangerous!
- wxSIGBUS,
- wxSIGSEGV,
- wxSIGSYS,
- wxSIGPIPE,
- wxSIGALRM,
- wxSIGTERM // terminate the process gently
- };
- @endcode
-
- @c wxSIGNONE, @c wxSIGKILL and @c wxSIGTERM have the same meaning
- under both Unix and Windows but all the other signals are equivalent to
- @c wxSIGTERM under Windows.
-
- Returns 0 on success, -1 on failure. If @e rc parameter is not @NULL, it will
- be filled with an element of @c wxKillError enum:
- @code
- enum wxKillError
- {
- wxKILL_OK, // no error
- wxKILL_BAD_SIGNAL, // no such signal
- wxKILL_ACCESS_DENIED, // permission denied
- wxKILL_NO_PROCESS, // no such process
- wxKILL_ERROR // another, unspecified error
- };
- @endcode
-
- The @e flags parameter can be wxKILL_NOCHILDREN (the default),
- or wxKILL_CHILDREN, in which case the child processes of this
- process will be killed too. Note that under Unix, for wxKILL_CHILDREN
- to work you should have created the process by passing wxEXEC_MAKE_GROUP_LEADER
- to wxExecute.
-
- @sa wxProcess::Kill, wxProcess::Exists, @ref overview_sampleexec "Exec sample"
-*/
-int wxKill(long pid, int sig = wxSIGTERM, wxKillError rc = @NULL,
- int flags = 0);
+ Note that this function is categorized as a GUI one and so is not thread-safe.
+ */
+ void wxBell();
-/**
- Returns the current state of the mouse. Returns a wxMouseState
- instance that contains the current position of the mouse pointer in
- screen coordinates, as well as boolean values indicating the up/down
- status of the mouse buttons and the modifier keys.
-*/
-wxMouseState wxGetMouseState();
+ /**
+ Returns the home directory for the given user. If the @e user is empty
+ (default value), this function behaves like
+ wxGetHomeDir i.e. returns the current user home
+ directory.
-/**
- Returns @true if between two wxBeginBusyCursor and
- wxEndBusyCursor calls.
-
- See also wxBusyCursor.
-*/
-bool wxIsBusy();
+ If the home directory couldn't be determined, an empty string is returned.
+ */
+ wxString wxGetUserHome(const wxString& user = "");
//@{
-/**
- Copies the user's email address into the supplied buffer, by
- concatenating the values returned by wxGetFullHostName
- and wxGetUserId.
-
- Returns @true if successful, @false otherwise.
-*/
-wxString wxGetEmailAddress();
- bool wxGetEmailAddress(char * buf, int sz);
+ /**
+ @b wxPerl note: In wxPerl this function is called @c Wx::ExecuteStdoutStderr
+ and it only takes the @c command argument,
+ and returns a 3-element list @c ( status, output, errors ), where
+ @c output and @c errors are array references.
+
+ Executes another program in Unix or Windows.
+
+ The first form takes a command string, such as @c "emacs file.txt".
+
+ The second form takes an array of values: a command, any number of
+ arguments, terminated by @NULL.
+
+ The semantics of the third and fourth versions is different from the first two
+ and is described in more details below.
+
+ If @e flags parameter contains @c wxEXEC_ASYNC flag (the default), flow
+ of control immediately returns. If it contains @c wxEXEC_SYNC, the current
+ application waits until the other program has terminated.
+
+ In the case of synchronous execution, the return value is the exit code of
+ the process (which terminates by the moment the function returns) and will be
+ -1 if the process couldn't be started and typically 0 if the process
+ terminated successfully. Also, while waiting for the process to
+ terminate, wxExecute will call wxYield. Because of this, by
+ default this function disables all application windows to avoid unexpected
+ reentrancies which could result from the users interaction with the program
+ while the child process is running. If you are sure that it is safe to not
+ disable the program windows, you may pass @c wxEXEC_NODISABLE flag to
+ prevent this automatic disabling from happening.
+
+ For asynchronous execution, however, the return value is the process id and
+ zero value indicates that the command could not be executed. As an added
+ complication, the return value of -1 in this case indicates that we didn't
+ launch a new process, but connected to the running one (this can only happen in
+ case of using DDE under Windows for command execution). In particular, in this,
+ and only this, case the calling code will not get the notification about
+ process termination.
+
+ If callback isn't @NULL and if execution is asynchronous,
+ wxProcess::OnTerminate will be called when
+ the process finishes. Specifying this parameter also allows you to redirect the
+ standard input and/or output of the process being launched by calling
+ wxProcess::Redirect. If the child process IO is redirected,
+ under Windows the process window is not shown by default (this avoids having to
+ flush an unnecessary console for the processes which don't create any windows
+ anyhow) but a @c wxEXEC_NOHIDE flag can be used to prevent this from
+ happening, i.e. with this flag the child process window will be shown normally.
+
+ Under Unix the flag @c wxEXEC_MAKE_GROUP_LEADER may be used to ensure
+ that the new process is a group leader (this will create a new session if
+ needed). Calling wxKill passing wxKILL_CHILDREN will
+ kill this process as well as all of its children (except those which have
+ started their own session).
+
+ The @c wxEXEC_NOEVENTS flag prevents processing of any events from taking
+ place while the child process is running. It should be only used for very
+ short-lived processes as otherwise the application windows risk becoming
+ unresponsive from the users point of view. As this flag only makes sense with
+ @c wxEXEC_SYNC, @c wxEXEC_BLOCK equal to the sum of both of these flags
+ is provided as a convenience.
+
+ Finally, you may use the third overloaded version of this function to execute
+ a process (always synchronously, the contents of @e flags is or'd with
+ @c wxEXEC_SYNC) and capture its output in the array @e output. The
+ fourth version adds the possibility to additionally capture the messages from
+ standard error output in the @e errors array.
+
+ @b NB: Currently wxExecute() can only be used from the main thread, calling
+ this function from another thread will result in an assert failure in debug
+ build and won't work.
+
+ @param command
+ The command to execute and any parameters to pass to it as a
+ single string.
+
+ @param argv
+ The command to execute should be the first element of this
+ array, any additional ones are the command parameters and the array must be
+ terminated with a @NULL pointer.
+
+ @param flags
+ Combination of bit masks wxEXEC_ASYNC,
+ wxEXEC_SYNC and wxEXEC_NOHIDE
+
+ @param callback
+ An optional pointer to wxProcess
+
+ @sa wxShell, wxProcess, @ref overview_sampleexec "Exec sample".
+ */
+ long wxExecute(const wxString& command, int sync = wxEXEC_ASYNC,
+ wxProcess * callback = @NULL);
+ wxPerl note: long wxExecute(char ** argv,
+ int flags = wxEXEC_ASYNC,
+ wxProcess * callback = @NULL);
+ wxPerl note: long wxExecute(const wxString& command,
+ wxArrayString& output,
+ int flags = 0);
+ wxPerl note: long wxExecute(const wxString& command,
+ wxArrayString& output,
+ wxArrayString& errors,
+ int flags = 0);
//@}
-/**
- Sleeps for the specified number of seconds.
-*/
-void wxSleep(int secs);
-
-/**
- Sets the value of the environment variable @e var (adding it if necessary)
- to @e value.
-
- Returns @true on success.
-
- @sa wxUnsetEnv
-*/
-bool wxSetEnv(const wxString& var, const wxString& value);
+ /**
+ Returns a string representing the current date and time.
+ */
+ wxString wxNow();
+
+ /**
+ Returns @true if the operating system the program is running under is 64 bit.
+ The check is performed at run-time and may differ from the value available at
+ compile-time (at compile-time you can just check if @c sizeof(void*)==8)
+ since the program could be running in emulation mode or in a mixed 32/64 bit
+ system
+ (bi-architecture operating system).
+
+ Very important: this function is not 100% reliable on some systems given the
+ fact
+ that there isn't always a standard way to do a reliable check on the OS
+ architecture.
+ */
+ bool wxIsPlatform64Bit();
+
+ /**
+ Returns the number uniquely identifying the current process in the system.
+
+ If an error occurs, 0 is returned.
+ */
+ unsigned long wxGetProcessId();
+
+ /**
+ Equivalent to the Unix kill function: send the given signal @e sig to the
+ process with PID @e pid. The valid signal values are
+ @code
+ enum wxSignal
+ {
+ wxSIGNONE = 0, // verify if the process exists under Unix
+ wxSIGHUP,
+ wxSIGINT,
+ wxSIGQUIT,
+ wxSIGILL,
+ wxSIGTRAP,
+ wxSIGABRT,
+ wxSIGEMT,
+ wxSIGFPE,
+ wxSIGKILL, // forcefully kill, dangerous!
+ wxSIGBUS,
+ wxSIGSEGV,
+ wxSIGSYS,
+ wxSIGPIPE,
+ wxSIGALRM,
+ wxSIGTERM // terminate the process gently
+ };
+ @endcode
+
+ @c wxSIGNONE, @c wxSIGKILL and @c wxSIGTERM have the same meaning
+ under both Unix and Windows but all the other signals are equivalent to
+ @c wxSIGTERM under Windows.
+
+ Returns 0 on success, -1 on failure. If @e rc parameter is not @NULL, it will
+ be filled with an element of @c wxKillError enum:
+ @code
+ enum wxKillError
+ {
+ wxKILL_OK, // no error
+ wxKILL_BAD_SIGNAL, // no such signal
+ wxKILL_ACCESS_DENIED, // permission denied
+ wxKILL_NO_PROCESS, // no such process
+ wxKILL_ERROR // another, unspecified error
+ };
+ @endcode
+
+ The @e flags parameter can be wxKILL_NOCHILDREN (the default),
+ or wxKILL_CHILDREN, in which case the child processes of this
+ process will be killed too. Note that under Unix, for wxKILL_CHILDREN
+ to work you should have created the process by passing wxEXEC_MAKE_GROUP_LEADER
+ to wxExecute.
+
+ @sa wxProcess::Kill, wxProcess::Exists, @ref overview_sampleexec "Exec sample"
+ */
+ int wxKill(long pid, int sig = wxSIGTERM, wxKillError rc = @NULL,
+ int flags = 0);
+
+ /**
+ Returns the current state of the mouse. Returns a wxMouseState
+ instance that contains the current position of the mouse pointer in
+ screen coordinates, as well as boolean values indicating the up/down
+ status of the mouse buttons and the modifier keys.
+ */
+ wxMouseState wxGetMouseState();
+
+ /**
+ Returns @true if between two wxBeginBusyCursor and
+ wxEndBusyCursor calls.
+
+ See also wxBusyCursor.
+ */
+ bool wxIsBusy();
-/**
- Returns @true if the current platform is little endian (instead of big
- endian).
- The check is performed at run-time.
-
- @sa @ref overview_byteordermacros "Byte order macros"
-*/
-bool wxIsPlatformLittleEndian();
+//@{
+ /**
+ Copies the user's email address into the supplied buffer, by
+ concatenating the values returned by wxGetFullHostName
+ and wxGetUserId.
+
+ Returns @true if successful, @false otherwise.
+ */
+ wxString wxGetEmailAddress();
+ bool wxGetEmailAddress(char * buf, int sz);
+//@}
-/**
- Under X only, sets the current display name. This is the X host and display
- name such
- as "colonsay:0.0", and the function indicates which display should be used for
- creating
- windows from this point on. Setting the display within an application allows
- multiple
- displays to be used.
-
- See also wxGetDisplayName.
-*/
-void wxSetDisplayName(const wxString& displayName);
+ /**
+ Sleeps for the specified number of seconds.
+ */
+ void wxSleep(int secs);
+
+ /**
+ Sets the value of the environment variable @e var (adding it if necessary)
+ to @e value.
+
+ Returns @true on success.
+
+ @sa wxUnsetEnv
+ */
+ bool wxSetEnv(const wxString& var, const wxString& value);
+
+ /**
+ Returns @true if the current platform is little endian (instead of big
+ endian).
+ The check is performed at run-time.
+
+ @sa @ref overview_byteordermacros "Byte order macros"
+ */
+ bool wxIsPlatformLittleEndian();
+
+ /**
+ Under X only, sets the current display name. This is the X host and display
+ name such
+ as "colonsay:0.0", and the function indicates which display should be used for
+ creating
+ windows from this point on. Setting the display within an application allows
+ multiple
+ displays to be used.
+
+ See also wxGetDisplayName.
+ */
+ void wxSetDisplayName(const wxString& displayName);
/**
@class wxGenericValidator
@wxheader{valgen.h}
-
+
wxGenericValidator performs data transfer (but not validation or filtering) for
the following
basic controls: wxButton, wxCheckBox, wxListBox, wxStaticText, wxRadioButton,
wxRadioBox,
wxChoice, wxComboBox, wxGauge, wxSlider, wxScrollBar, wxSpinButton, wxTextCtrl,
wxCheckListBox.
-
+
It checks the type of the window and uses an appropriate type for that window.
For example,
wxButton and wxTextCtrl transfer data to and from a wxString variable;
wxListBox uses a
wxArrayInt; wxCheckBox uses a bool.
-
+
For more information, please see @ref overview_validatoroverview "Validator
overview".
-
+
@library{wxcore}
@category{validator}
-
+
@seealso
@ref overview_validatoroverview "Validator overview", wxValidator,
wxTextValidator
Constructor taking a wxDateTime pointer. This will be
used for wxDatePickerCtrl.
- @param validator
+ @param validator
Validator to copy.
- @param valPtr
+ @param valPtr
A pointer to a variable that contains the value. This variable
should have a lifetime equal to or longer than the validator lifetime (which is
usually
determined by the lifetime of the window).
*/
wxGenericValidator(const wxGenericValidator& validator);
- wxGenericValidator(bool* valPtr);
- wxGenericValidator(wxString* valPtr);
- wxGenericValidator(int* valPtr);
- wxGenericValidator(wxArrayInt* valPtr);
- wxGenericValidator(wxDateTime* valPtr);
+ wxGenericValidator(bool* valPtr);
+ wxGenericValidator(wxString* valPtr);
+ wxGenericValidator(int* valPtr);
+ wxGenericValidator(wxArrayInt* valPtr);
+ wxGenericValidator(wxDateTime* valPtr);
//@}
/**
/**
@class wxValidator
@wxheader{validate.h}
-
+
wxValidator is the base class for a family of validator classes that mediate
between a class of control, and application data.
-
+
A validator has three major roles:
-
+
to transfer data from a C++ variable or own storage to and from a control;
to validate data in a control, and show an appropriate error message;
to filter events (such as keystrokes), thereby changing the behaviour of the
associated control.
-
+
Validators can be plugged into controls dynamically.
-
+
To specify a default, 'null' validator, use the symbol @b wxDefaultValidator.
-
+
For more information, please see @ref overview_validatoroverview "Validator
overview".
-
+
@b wxPython note: If you wish to create a validator class in wxPython you should
derive the class from @c wxPyValidator in order to get Python-aware
capabilities for the various virtual methods.
-
+
@library{wxcore}
@category{validator}
-
+
@seealso
@ref overview_validatoroverview "Validator overview", wxTextValidator,
wxGenericValidator,
/**
@class wxTextValidator
@wxheader{valtext.h}
-
+
wxTextValidator validates text controls, providing a variety of filtering
behaviours.
-
+
For more information, please see @ref overview_validatoroverview "Validator
overview".
-
+
@library{wxcore}
@category{validator}
-
+
@seealso
@ref overview_validatoroverview "Validator overview", wxValidator,
wxGenericValidator
/**
Constructor, taking a style and optional pointer to a wxString variable.
- @param style
+ @param style
A bitlist of flags, which can be:
Use an include list. The validator
- checks if the user input is on the list, complaining if not. See
+ checks if the user input is on the list, complaining if not. See
SetIncludes().
wxFILTER_EXCLUDE_LIST
Use an exclude list. The validator
- checks if the user input is on the list, complaining if it is. See
+ checks if the user input is on the list, complaining if it is. See
SetExcludes().
wxFILTER_INCLUDE_CHAR_LIST
complaining if it is.
See SetExcludes().
- @param valPtr
+ @param valPtr
A pointer to a wxString variable that contains the value. This variable
should have a lifetime equal to or longer than the validator lifetime (which is
usually
determined by the lifetime of the window).
*/
wxTextValidator(const wxTextValidator& validator);
- wxTextValidator(long style = wxFILTER_NONE,
- wxString* valPtr = @NULL);
+ wxTextValidator(long style = wxFILTER_NONE,
+ wxString* valPtr = @NULL);
//@}
/**
/**
@class wxVariant
@wxheader{variant.h}
-
+
The @b wxVariant class represents a container for any type.
A variant's value can be changed at run time, possibly to a different type of
value.
-
+
As standard, wxVariant can store values of type bool, wxChar, double, long,
string,
- string list, time, date, void pointer, list of strings, and list of variants.
+ string list, time, date, void pointer, list of strings, and list of variants.
However, an application can extend wxVariant's capabilities by deriving from the
class wxVariantData and using the wxVariantData form of
the wxVariant constructor or assignment operator to assign this data to a
wxVariantData
object, unlike the case for basic data types where convenience functions such as
wxVariant::GetLong can be used.
-
+
Pointers to any wxObject derived class can also easily be stored
in a wxVariant. wxVariant will then use wxWidgets' built-in RTTI system to set
the
- type name (returned by wxVariant::GetType) and to perform
+ type name (returned by wxVariant::GetType) and to perform
type-safety checks at runtime.
-
+
This class is useful for reducing the programming for certain tasks, such as an
editor
for different data types, or a remote procedure call protocol.
-
+
An optional name member is associated with a wxVariant. This might be used, for
example,
in CORBA or OLE automation classes, where named parameters are required.
-
+
Note that as of wxWidgets 2.7.1, wxVariant is @ref overview_trefcount
- "reference counted".
- Additionally, the convenience macros @b DECLARE_VARIANT_OBJECT and
- @b IMPLEMENT_VARIANT_OBJECT were added so that adding (limited) support
+ "reference counted".
+ Additionally, the convenience macros @b DECLARE_VARIANT_OBJECT and
+ @b IMPLEMENT_VARIANT_OBJECT were added so that adding (limited) support
for conversion to and from wxVariant can be very easily implemented without
- modifying
+ modifying
either wxVariant or the class to be stored by wxVariant. Since assignment
- operators
+ operators
cannot be declared outside the class, the shift left operators are used like
this:
-
+
@code
// in the header file
DECLARE_VARIANT_OBJECT(MyClass)
-
+
// in the implementation file
IMPLEMENT_VARIANT_OBJECT(MyClass)
-
+
// in the user code
wxVariant variant;
MyClass value;
variant value;
-
+
// or
value variant;
@endcode
-
+
For this to work, MyClass must derive from wxObject, implement
the @ref overview_runtimeclassoverview "wxWidgets RTTI system"
and support the assignment operator and equality operator for itself. Ideally,
can be most easily implemented using the reference counting support offered by
wxObject itself. By default, wxWidgets already implements
the shift operator conversion for a few of its drawing related classes:
-
+
@code
IMPLEMENT_VARIANT_OBJECT(wxColour)
IMPLEMENT_VARIANT_OBJECT(wxImage)
IMPLEMENT_VARIANT_OBJECT(wxIcon)
IMPLEMENT_VARIANT_OBJECT(wxBitmap)
@endcode
-
+
Note that as of wxWidgets 2.9.0, wxVariantData no longer inherits from wxObject
and wxVariant no longer uses the type-unsafe wxList class for list
operations but the type-safe wxVariantList class. Also, wxVariantData now
supports the Clone function for implementing the wxVariant::Unshare function.
Clone is implemented automatically by IMPLEMENT_VARIANT_OBJECT.
-
+
Since wxVariantData no longer derives from wxObject, any code that tests the
type
of the data using wxDynamicCast will require adjustment. You can use the macro
wxDynamicCastVariantData with the same arguments as wxDynamicCast, to use C++
RTTI
type information instead of wxWidgets RTTI.
-
+
@library{wxbase}
@category{data}
-
+
@seealso
wxVariantData
*/
wxDateTime value.
*/
wxVariant();
- wxVariant(const wxVariant& variant);
- wxVariant(const wxChar* value, const wxString& name = "");
- wxVariant(const wxString& value, const wxString& name = "");
- wxVariant(wxChar value, const wxString& name = "");
- wxVariant(long value, const wxString& name = "");
- wxVariant(bool value, const wxString& name = "");
- wxVariant(double value, const wxString& name = "");
- wxVariant(const wxVariantList& value,
- const wxString& name = "");
- wxVariant(void* value, const wxString& name = "");
- wxVariant(wxObject* value, const wxString& name = "");
- wxVariant(wxVariantData* data, const wxString& name = "");
- wxVariant(wxDateTime& val, const wxString& name = "");
- wxVariant(wxArrayString& val, const wxString& name = "");
- wxVariant(DATE_STRUCT* val, const wxString& name = "");
- wxVariant(TIME_STRUCT* val, const wxString& name = "");
- wxVariant(TIMESTAMP_STRUCT* val, const wxString& name = "");
+ wxVariant(const wxVariant& variant);
+ wxVariant(const wxChar* value, const wxString& name = "");
+ wxVariant(const wxString& value, const wxString& name = "");
+ wxVariant(wxChar value, const wxString& name = "");
+ wxVariant(long value, const wxString& name = "");
+ wxVariant(bool value, const wxString& name = "");
+ wxVariant(double value, const wxString& name = "");
+ wxVariant(const wxVariantList& value,
+ const wxString& name = "");
+ wxVariant(void* value, const wxString& name = "");
+ wxVariant(wxObject* value, const wxString& name = "");
+ wxVariant(wxVariantData* data, const wxString& name = "");
+ wxVariant(wxDateTime& val, const wxString& name = "");
+ wxVariant(wxArrayString& val, const wxString& name = "");
+ wxVariant(DATE_STRUCT* val, const wxString& name = "");
+ wxVariant(TIME_STRUCT* val, const wxString& name = "");
+ wxVariant(TIMESTAMP_STRUCT* val, const wxString& name = "");
//@}
/**
Retrieves and converts the value of this variant to the type that @e value is.
*/
bool Convert(long* value);
- bool Convert(bool* value);
- bool Convert(double* value);
- bool Convert(wxString* value);
- bool Convert(wxChar* value);
- bool Convert(wxDateTime* value);
+ bool Convert(bool* value);
+ bool Convert(double* value);
+ bool Convert(wxString* value);
+ bool Convert(wxChar* value);
+ bool Convert(wxDateTime* value);
//@}
/**
Inequality test operators.
*/
bool operator !=(const wxVariant& value);
- bool operator !=(const wxString& value);
- bool operator !=(const wxChar* value);
- bool operator !=(wxChar value);
- bool operator !=(const long value);
- bool operator !=(const bool value);
- bool operator !=(const double value);
- bool operator !=(void* value);
- bool operator !=(wxObject* value);
- bool operator !=(const wxVariantList& value);
- bool operator !=(const wxArrayString& value);
- bool operator !=(const wxDateTime& value);
+ bool operator !=(const wxString& value);
+ bool operator !=(const wxChar* value);
+ bool operator !=(wxChar value);
+ bool operator !=(const long value);
+ bool operator !=(const bool value);
+ bool operator !=(const double value);
+ bool operator !=(void* value);
+ bool operator !=(wxObject* value);
+ bool operator !=(const wxVariantList& value);
+ bool operator !=(const wxArrayString& value);
+ bool operator !=(const wxDateTime& value);
//@}
//@{
possible.
*/
void operator =(const wxVariant& value);
- void operator =(wxVariantData* value);
- void operator =(const wxString& value);
- void operator =(const wxChar* value);
- void operator =(wxChar value);
- void operator =(const long value);
- void operator =(const bool value);
- void operator =(const double value);
- void operator =(void* value);
- void operator =(wxObject* value);
- void operator =(const wxVariantList& value);
- void operator =(const wxDateTime& value);
- void operator =(const wxArrayString& value);
- void operator =(const DATE_STRUCT* value);
- void operator =(const TIME_STRUCT* value);
- void operator =(const TIMESTAMP_STRUCT* value);
+ void operator =(wxVariantData* value);
+ void operator =(const wxString& value);
+ void operator =(const wxChar* value);
+ void operator =(wxChar value);
+ void operator =(const long value);
+ void operator =(const bool value);
+ void operator =(const double value);
+ void operator =(void* value);
+ void operator =(wxObject* value);
+ void operator =(const wxVariantList& value);
+ void operator =(const wxDateTime& value);
+ void operator =(const wxArrayString& value);
+ void operator =(const DATE_STRUCT* value);
+ void operator =(const TIME_STRUCT* value);
+ void operator =(const TIMESTAMP_STRUCT* value);
//@}
//@{
Equality test operators.
*/
bool operator ==(const wxVariant& value);
- bool operator ==(const wxString& value);
- bool operator ==(const wxChar* value);
- bool operator ==(wxChar value);
- bool operator ==(const long value);
- bool operator ==(const bool value);
- bool operator ==(const double value);
- bool operator ==(void* value);
- bool operator ==(wxObject* value);
- bool operator ==(const wxVariantList& value);
- bool operator ==(const wxArrayString& value);
- bool operator ==(const wxDateTime& value);
+ bool operator ==(const wxString& value);
+ bool operator ==(const wxChar* value);
+ bool operator ==(wxChar value);
+ bool operator ==(const long value);
+ bool operator ==(const bool value);
+ bool operator ==(const double value);
+ bool operator ==(void* value);
+ bool operator ==(wxObject* value);
+ bool operator ==(const wxVariantList& value);
+ bool operator ==(const wxArrayString& value);
+ bool operator ==(const wxDateTime& value);
//@}
//@{
to change the value at this index.
*/
wxVariant operator [](size_t idx);
- wxVariant operator [](size_t idx);
+ wxVariant operator [](size_t idx);
//@}
//@{
Operator for implicit conversion to a long, using GetLong().
*/
double operator double();
- long operator long();
+ long operator long();
//@}
/**
/**
@class wxVariantData
@wxheader{variant.h}
-
- The @b wxVariantData class is used to implement a new type for wxVariant.
+
+ The @b wxVariantData class is used to implement a new type for wxVariant.
Derive from wxVariantData, and override the pure virtual functions.
-
+
wxVariantData is @ref overview_refcount "reference counted", but you don't
- normally have to care about this,
+ normally have to care about this,
as wxVariant manages the count automatically. However, in case your application
needs to take
ownership of wxVariantData, be aware that the object is created with reference
a wxVariantData
instance. Instead, wxVariantData::DecRef will delete the object automatically
when the reference count reaches zero.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxVariant
*/
-class wxVariantData
+class wxVariantData
{
public:
/**
Reads the data from @e stream or @e string.
*/
bool Read(ostream& stream);
- bool Read(wxString& string);
+ bool Read(wxString& string);
//@}
//@{
Writes the data to @e stream or @e string.
*/
bool Write(ostream& stream);
- bool Write(wxString& string);
+ bool Write(wxString& string);
//@}
/**
/**
@class wxVectorT
@wxheader{vector.h}
-
+
wxVectorT is a template class which implements most of the std::vector
class and can be used like it. If wxWidgets is compiled in STL mode,
wxVector will just be a typedef to std::vector. Just like for std::vector,
objects stored in wxVectorT need to be @e assignable but don't have to
be @e default constructible.
-
+
You can refer to the STL documentation for further information.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxcontaineroverview "Container classes overview", wxListT,
wxArrayT
*/
-class wxVector<T>
+class wxVector<T>
{
public:
//@{
Constructor.
*/
wxVectorT();
- wxVectorT(const wxVector<T>& c);
+ wxVectorT(const wxVector<T>& c);
//@}
/**
Returns item at position @e idx.
*/
const value_type at(size_type idx);
- value_type at(size_type idx);
+ value_type at(size_type idx);
//@}
//@{
Return last item.
*/
const value_type back();
- value_type back();
+ value_type back();
//@}
//@{
Return iterator to beginning of the vector.
*/
const_iterator begin();
- iterator begin();
+ iterator begin();
//@}
/**
Returns iterator to the end of the vector.
*/
const_iterator end();
- iterator end();
+ iterator end();
//@}
//@{
/**
- Erase items. When using values other than built-in integrals
+ Erase items. When using values other than built-in integrals
or classes with reference counting this can be an inefficient
operation.
*/
iterator erase(iterator it);
- iterator erase(iterator first, iterator last);
+ iterator erase(iterator first, iterator last);
//@}
//@{
Returns first item.
*/
const value_type front();
- value_type front();
+ value_type front();
//@}
/**
)
- Insert an item. When using values other than built-in integrals
+ Insert an item. When using values other than built-in integrals
or classes with reference counting this can be an inefficient
operation.
*/
Returns item at position @e idx.
*/
const value_type operator[](size_type idx);
- value_type operator[](size_type idx);
+ value_type operator[](size_type idx);
//@}
/**
void push_back(const value_type& v);
/**
- Reserves more memory of @e n is greater then
+ Reserves more memory of @e n is greater then
wxVector::size. Other this call has
no effect.
*/
/**
@class wxVListBox
@wxheader{vlbox.h}
-
+
wxVListBox is a listbox-like control with the following two main differences
from a regular listbox: it can have an arbitrarily huge number of items because
it doesn't store them itself but uses wxVListBox::OnDrawItem
have variable height as determined by
wxVListBox::OnMeasureItem (so it is also a listbox
with the lines of Variable height).
-
+
Also, as a consequence of its virtual nature, it doesn't have any methods to
append or insert items in it as it isn't necessary to do it: you just have to
call wxVListBox::SetItemCount to tell the control how
many items it should display. Of course, this also means that you will never
use this class directly because it has pure virtual functions, but will need to
derive your own class, such as wxHtmlListBox, from it.
-
+
However it emits the same events as wxListBox and the same
event macros may be used with it. Since wxVListBox does not store its items
itself, the events will only contain the index, not any contents such as the
string of an item.
-
+
@library{wxcore}
@category{ctrl}
@appearance{vlistbox.png}
-
+
@seealso
wxSimpleHtmlListBox, wxHtmlListBox
*/
const wxSize& size = wxDefaultSize,
size_t countItems = 0, long style = 0,
const wxString& name = wxVListBoxNameStr);
- wxVListBox();
+ wxVListBox();
//@}
/**
The derived class must implement this function to actually draw the item
with the given index on the provided DC.
- @param dc
+ @param dc
The device context to use for drawing
- @param rect
+ @param rect
The bounding rectangle for the item being drawn (DC clipping
region is set to this rectangle before calling this function)
- @param n
+ @param n
The index of the item to be drawn
*/
void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n);
The base class version of this method doesn't do anything.
- @param dc
+ @param dc
The device context to use for drawing
- @param rect
+ @param rect
The bounding rectangle for the item
- @param n
+ @param n
The index of the item
*/
void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n);
By default both margins are 0.
*/
void SetMargins(const wxPoint& pt);
- void SetMargins(wxCoord x, wxCoord y);
+ void SetMargins(wxCoord x, wxCoord y);
//@}
/**
/**
@class wxVarHScrollHelper
@wxheader{vscroll.h}
-
- This class provides functions wrapping the
+
+ This class provides functions wrapping the
wxVarScrollHelperBase class, targeted for
horizontal-specific scrolling using wxHScrolledWindow.
-
+
Like wxVarScrollHelperBase, this class is mostly only useful to those classes
built into wxWidgets deriving from here, and this documentation is mostly
only provided for referencing those functions provided. You will likely want
to derive your window from wxHScrolledWindow rather than from here directly.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxHScrolledWindow, wxHVScrolledWindow, wxVScrolledWindow
*/
/**
@class wxVarVScrollHelper
@wxheader{vscroll.h}
-
- This class provides functions wrapping the
+
+ This class provides functions wrapping the
wxVarScrollHelperBase class, targeted for
vertical-specific scrolling using wxVScrolledWindow.
-
+
Like wxVarScrollHelperBase, this class is mostly only useful to those classes
built into wxWidgets deriving from here, and this documentation is mostly
only provided for referencing those functions provided. You will likely want
to derive your window from wxVScrolledWindow rather than from here directly.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxHScrolledWindow, wxHVScrolledWindow, wxVScrolledWindow
*/
/**
@class wxVarScrollHelperBase
@wxheader{vscroll.h}
-
+
This class provides all common base functionality for scroll calculations
shared among all variable scrolled window implementations as well as
automatic scrollbar functionality, saved scroll positions, controlling
target windows to be scrolled, as well as defining all required virtual
functions that need to be implemented for any orientation specific work.
-
+
Documentation of this class is provided specifically for referencing use
of the functions provided by this class for use with the variable scrolled
windows that derive from here. You will likely want to derive your window
from one of the already implemented variable scrolled windows rather than
from wxVarScrollHelperBase directly.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxHScrolledWindow, wxHVScrolledWindow, wxVScrolledWindow
*/
-class wxVarScrollHelperBase
+class wxVarScrollHelperBase
{
public:
/**
/**
@class wxVScrolledWindow
@wxheader{vscroll.h}
-
+
In the name of this class, "V" may stand for "variable" because it can be
used for scrolling rows of variable heights; "virtual", because it is not
necessary to know the heights of all rows in advance -- only those which
are shown on the screen need to be measured; or even "vertical", because
this class only supports scrolling vertically.
-
+
In any case, this is a generalization of the
wxScrolledWindow class which can be only used when
all rows have the same heights. It lacks some other wxScrolledWindow features
however, notably it can't scroll only a rectangle of the window and not its
entire client area.
-
+
To use this class, you need to derive from it and implement the
wxVarVScrollHelper::OnGetRowHeight pure virtual
method. You also must call wxVarVScrollHelper::SetRowCount
select the lines to display. Note that the device context origin is not shifted
so the first visible row always appears at the point (0, 0) in physical as
well as logical coordinates.
-
+
@library{wxcore}
@category{miscwnd}
-
+
@seealso
wxHScrolledWindow, wxHVScrolledWindow
*/
Note that @c wxVSCROLL is always automatically added to our style, there is
no need to specify it explicitly.
- @param parent
+ @param parent
The parent window, must not be @NULL
- @param id
+ @param id
The identifier of this window, wxID_ANY by default
- @param pos
+ @param pos
The initial window position
- @param size
+ @param size
The initial window size
- @param style
+ @param style
The window style. There are no special style bits defined for
this class.
- @param name
+ @param name
The name for this window; usually not used
*/
wxVScrolledWindow();
- wxVScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPanelNameStr);
+ wxVScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxPanelNameStr);
//@}
/**
Deprecated for wxVarVScrollHelper::SetRowCount.
*/
size_t GetFirstVisibleLine();
- size_t GetLastVisibleLine();
- size_t GetLineCount();
- int HitTest(wxCoord x, wxCoord y);
- int HitTest(const wxPoint& pt);
- virtual wxCoord OnGetLineHeight(size_t line);
- virtual void OnGetLinesHint(size_t lineMin, size_t lineMax);
- virtual void RefreshLine(size_t line);
- virtual void RefreshLines(size_t from, size_t to);
- virtual bool ScrollLines(int lines);
- virtual bool ScrollPages(int pages);
- bool ScrollToLine(size_t line);
- void SetLineCount(size_t count);
+ size_t GetLastVisibleLine();
+ size_t GetLineCount();
+ int HitTest(wxCoord x, wxCoord y);
+ int HitTest(const wxPoint& pt);
+ virtual wxCoord OnGetLineHeight(size_t line);
+ virtual void OnGetLinesHint(size_t lineMin, size_t lineMax);
+ virtual void RefreshLine(size_t line);
+ virtual void RefreshLines(size_t from, size_t to);
+ virtual bool ScrollLines(int lines);
+ virtual bool ScrollPages(int pages);
+ bool ScrollToLine(size_t line);
+ void SetLineCount(size_t count);
//@}
};
/**
@class wxHVScrolledWindow
@wxheader{vscroll.h}
-
+
This window inherits all functionality of both vertical and horizontal,
variable scrolled windows. It automatically handles everything needed to
scroll both axis simultaneously with both variable row heights and variable
column widths.
-
+
This is a generalization of the wxScrolledWindow
class which can be only used when all rows and columns are the same size. It
lacks some other wxScrolledWindow features however, notably it can't scroll
only a rectangle of the window and not its entire client area.
-
+
To use this class, you must derive from it and implement both the
wxVarVScrollHelper::OnGetRowHeight and
wxVarHScrollHelper::OnGetColumnWidth pure virtual
lines to display. Note that the device context origin is not shifted so the
first visible row and column always appear at the point (0, 0) in physical
as well as logical coordinates.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxHScrolledWindow, wxVScrolledWindow
*/
Note that @c wxHSCROLL and @c wxVSCROLL are always automatically added
to our styles, there is no need to specify it explicitly.
- @param parent
+ @param parent
The parent window, must not be @NULL
- @param id
+ @param id
The identifier of this window, wxID_ANY by default
- @param pos
+ @param pos
The initial window position
- @param size
+ @param size
The initial window size
- @param style
+ @param style
The window style. There are no special style bits defined for
this class.
- @param name
+ @param name
The name for this window; usually not used
*/
wxHVScrolledWindow();
- wxHVScrolledWindow(wxWindow* parent,
- wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPanelNameStr);
+ wxHVScrolledWindow(wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxPanelNameStr);
//@}
/**
/**
@class wxVarHVScrollHelper
@wxheader{vscroll.h}
-
- This class provides functions wrapping the
+
+ This class provides functions wrapping the
wxVarHScrollHelper and
wxVarVScrollHelper classes, targeted for
scrolling a window in both axis using
also addresses some wrappers that help avoid the need to specify class scope
in your wxHVScrolledWindow-derived class when using wxVarScrollHelperBase
functionality.
-
+
Like all three of it's scroll helper base classes, this class is mostly only
useful to those classes built into wxWidgets deriving from here, and this
documentation is mostly only provided for referencing those functions
provided. You will likely want to derive your window from wxHVScrolledWindow
rather than from here directly.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxHScrolledWindow, wxHVScrolledWindow, wxVScrolledWindow
*/
responsible for repainting any invalidated areas of the window yourself to
account for the new scroll position.
- @param vscrolling
+ @param vscrolling
Specifies if physical scrolling should be turned on when scrolling vertically.
- @param hscrolling
+ @param hscrolling
Specifies if physical scrolling should be turned on when scrolling horizontally.
*/
void EnablePhysicalScrolling(bool vscrolling = @true,
(even if only partially visible) or @false otherwise.
*/
bool IsVisible(size_t row, size_t column);
- bool IsVisible(const wxPosition& pos);
+ bool IsVisible(const wxPosition& pos);
//@}
//@{
of the window if it is visible.
*/
virtual void RefreshRowColumn(size_t row, size_t column);
- virtual void RefreshRowColumn(const wxPosition& pos);
+ virtual void RefreshRowColumn(const wxPosition& pos);
//@}
//@{
virtual void RefreshRowsColumns(size_t fromRow, size_t toRow,
size_t fromColumn,
size_t toColumn);
- virtual void RefreshRowsColumns(const wxPosition& from,
- const wxPosition& to);
+ virtual void RefreshRowsColumns(const wxPosition& from,
+ const wxPosition& to);
//@}
//@{
@false if nothing was done.
*/
bool ScrollToRowColumn(size_t row, size_t column);
- bool ScrollToRowColumn(const wxPosition& pos);
+ bool ScrollToRowColumn(const wxPosition& pos);
//@}
/**
values) if none.
*/
wxPosition VirtualHitTest(wxCoord x, wxCoord y);
- wxPosition VirtualHitTest(const wxPoint& pos);
+ wxPosition VirtualHitTest(const wxPoint& pos);
//@}
};
/**
@class wxHScrolledWindow
@wxheader{vscroll.h}
-
+
In the name of this class, "H" stands for "horizontal" because it can be
used for scrolling columns of variable widths. It is not necessary to know
the widths of all columns in advance -- only those which are shown on the
screen need to be measured.
-
+
In any case, this is a generalization of the
wxScrolledWindow class which can be only used when
all columns have the same widths. It lacks some other wxScrolledWindow features
however, notably it can't scroll only a rectangle of the window and not its
entire client area.
-
+
To use this class, you need to derive from it and implement the
wxVarHScrollHelper::OnGetColumnWidth pure virtual
method. You also must call wxVarHScrollHelper::SetColumnCount
select the lines to display. Note that the device context origin is not shifted
so the first visible column always appears at the point (0, 0) in physical as
well as logical coordinates.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxHVScrolledWindow, wxVScrolledWindow
*/
Note that @c wxHSCROLL is always automatically added to our style, there is
no need to specify it explicitly.
- @param parent
+ @param parent
The parent window, must not be @NULL
- @param id
+ @param id
The identifier of this window, wxID_ANY by default
- @param pos
+ @param pos
The initial window position
- @param size
+ @param size
The initial window size
- @param style
+ @param style
The window style. There are no special style bits defined for
this class.
- @param name
+ @param name
The name for this window; usually not used
*/
wxHScrolledWindow();
- wxHScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPanelNameStr);
+ wxHScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxPanelNameStr);
//@}
/**
/**
@class wxWeakRefDynamicT
@wxheader{weakref.h}
-
- wxWeakRefDynamicT is a template class for weak references that is used in
- the same way as wxWeakRefT. The only difference is that wxWeakRefDynamic
- defaults to using @c dynamic_cast for establishing the object
- reference (while wxWeakRef defaults to @c static_cast).
-
+
+ wxWeakRefDynamicT is a template class for weak references that is used in
+ the same way as wxWeakRefT. The only difference is that wxWeakRefDynamic
+ defaults to using @c dynamic_cast for establishing the object
+ reference (while wxWeakRef defaults to @c static_cast).
+
So, wxWeakRef will detect a type mismatch during compile time and will
have a little better run-time performance. The role of wxWeakRefDynamic
- is to handle objects which derived type one does not know.
-
- @b Note: wxWeakRefT selects an implementation based on the static type
+ is to handle objects which derived type one does not know.
+
+ @b Note: wxWeakRefT selects an implementation based on the static type
of T. If T does not have wxTrackable statically, it defaults to to a mixed-
- mode operation, where it uses @c dynamic_cast as the last measure (if
- available from the compiler and enabled when building wxWidgets).
-
- For general cases, wxWeakRefT is the better choice.
-
+ mode operation, where it uses @c dynamic_cast as the last measure (if
+ available from the compiler and enabled when building wxWidgets).
+
+ For general cases, wxWeakRefT is the better choice.
+
For API documentation, see: wxWeakRef
-
+
@library{wxcore}
@category{FIXME}
*/
-class wxWeakRefDynamic<T>
+class wxWeakRefDynamic<T>
{
public:
-
+
};
/**
@class wxWeakRefT
@wxheader{weakref.h}
-
- wxWeakRef is a template class for weak references to wxWidgets objects,
- such as wxEvtHandler, wxWindow and
+
+ wxWeakRef is a template class for weak references to wxWidgets objects,
+ such as wxEvtHandler, wxWindow and
wxObject. A weak reference behaves much like an ordinary
pointer, but when the object pointed is destroyed, the weak reference is
- automatically reset to a @NULL pointer.
-
- wxWeakRefT can be used whenever one must keep a pointer to an object
+ automatically reset to a @NULL pointer.
+
+ wxWeakRefT can be used whenever one must keep a pointer to an object
that one does not directly own, and that may be destroyed before the object
- holding the reference.
-
- wxWeakRefT is a small object and the mechanism behind it is fast
- (@b O(1)). So the overall cost of using it is small.
-
+ holding the reference.
+
+ wxWeakRefT is a small object and the mechanism behind it is fast
+ (@b O(1)). So the overall cost of using it is small.
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxSharedPtr, wxScopedPtr
*/
-class wxWeakRef<T>
+class wxWeakRef<T>
{
public:
/**
/**
@class wxTempFileOutputStream
@wxheader{wfstream.h}
-
+
wxTempFileOutputStream is an output stream based on wxTempFile. It
provides a relatively safe way to replace the contents of the
existing file.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxTempFile
*/
public:
/**
Associates wxTempFileOutputStream with the file to be replaced and opens it.
- You should use
+ You should use
wxStreamBase::IsOk to verify if the constructor succeeded.
Call Commit() or wxOutputStream::Close to
- replace the old file and close this one. Calling Discard()
+ replace the old file and close this one. Calling Discard()
(or allowing the destructor to do it) will discard the changes.
*/
wxTempFileOutputStream(const wxString& fileName);
/**
@class wxFFileOutputStream
@wxheader{wfstream.h}
-
+
This class represents data written to a file. There are actually
- two such groups of classes: this one is based on wxFFile
+ two such groups of classes: this one is based on wxFFile
whereas wxFileInputStream is based in
the wxFile class.
-
- Note that wxOutputStream::SeekO
- can seek beyond the end of the stream (file) and will thus not return
+
+ Note that wxOutputStream::SeekO
+ can seek beyond the end of the stream (file) and will thus not return
@e wxInvalidOffset for that.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxBufferedOutputStream, wxFFileInputStream, wxFileInputStream
*/
*/
wxFFileOutputStream(const wxString& filename,
const wxString& mode="w+b");
- wxFFileOutputStream(wxFFile& file);
- wxFFileOutputStream(FILE * fp);
+ wxFFileOutputStream(wxFFile& file);
+ wxFFileOutputStream(FILE * fp);
//@}
/**
/**
@class wxFileOutputStream
@wxheader{wfstream.h}
-
+
This class represents data written to a file. There are actually
- two such groups of classes: this one is based on wxFile
+ two such groups of classes: this one is based on wxFile
whereas wxFFileInputStream is based in
the wxFFile class.
-
- Note that wxOutputStream::SeekO
- can seek beyond the end of the stream (file) and will thus not return
+
+ Note that wxOutputStream::SeekO
+ can seek beyond the end of the stream (file) and will thus not return
@e wxInvalidOffset for that.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxBufferedOutputStream, wxFileInputStream, wxFFileInputStream
*/
Initializes a file stream in write-only mode using the file descriptor @e fd.
*/
wxFileOutputStream(const wxString& ofileName);
- wxFileOutputStream(wxFile& file);
- wxFileOutputStream(int fd);
+ wxFileOutputStream(wxFile& file);
+ wxFileOutputStream(int fd);
//@}
/**
/**
@class wxFileInputStream
@wxheader{wfstream.h}
-
+
This class represents data read in from a file. There are actually
- two such groups of classes: this one is based on wxFile
+ two such groups of classes: this one is based on wxFile
whereas wxFFileInputStream is based in
the wxFFile class.
-
- Note that wxInputStream::SeekI
- can seek beyond the end of the stream (file) and will thus not return
+
+ Note that wxInputStream::SeekI
+ can seek beyond the end of the stream (file) and will thus not return
@e wxInvalidOffset for that.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxBufferedInputStream, wxFileOutputStream, wxFFileOutputStream
*/
Initializes a file stream in read-only mode using the specified file descriptor.
*/
wxFileInputStream(const wxString& ifileName);
- wxFileInputStream(wxFile& file);
- wxFileInputStream(int fd);
+ wxFileInputStream(wxFile& file);
+ wxFileInputStream(int fd);
//@}
/**
/**
@class wxFFileInputStream
@wxheader{wfstream.h}
-
+
This class represents data read in from a file. There are actually
- two such groups of classes: this one is based on wxFFile
+ two such groups of classes: this one is based on wxFFile
whereas wxFileInputStream is based in
the wxFile class.
-
- Note that wxInputStream::SeekI
- can seek beyond the end of the stream (file) and will thus not return
+
+ Note that wxInputStream::SeekI
+ can seek beyond the end of the stream (file) and will thus not return
@e wxInvalidOffset for that.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxBufferedInputStream, wxFFileOutputStream, wxFileOutputStream
*/
*/
wxFFileInputStream(const wxString& filename,
const wxString& mode = "rb");
- wxFFileInputStream(wxFFile& file);
- wxFFileInputStream(FILE * fp);
+ wxFFileInputStream(wxFFile& file);
+ wxFFileInputStream(FILE * fp);
//@}
/**
/**
@class wxFFileStream
@wxheader{wfstream.h}
-
-
+
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxStreamBuffer
*/
{
public:
/**
- Initializes a new file stream in read-write mode using the specified
+ Initializes a new file stream in read-write mode using the specified
@e iofilename name.
*/
wxFFileStream(const wxString& iofileName);
/**
@class wxFileStream
@wxheader{wfstream.h}
-
-
+
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
wxStreamBuffer
*/
{
public:
/**
- Initializes a new file stream in read-write mode using the specified
+ Initializes a new file stream in read-write mode using the specified
@e iofilename name.
*/
wxFileStream(const wxString& iofileName);
/**
@class wxWindow
@wxheader{window.h}
-
+
wxWindow is the base class for all windows and represents any visible object on
screen. All controls, top level windows and so on are windows. Sizers and
device contexts are not, however, as they don't appear on screen themselves.
-
+
Please note that all children of the window will be deleted automatically by
the destructor before the window itself is deleted which means that you don't
have to worry about deleting them manually. Please see the @ref
overview_windowdeletionoverview "window
deletion overview" for more information.
-
+
Also note that in this, and many others, wxWidgets classes some
@c GetXXX() methods may be overloaded (as, for example,
wxWindow::GetSize or
class, wxWidgets uses a unique protected virtual @c DoGetXXX() method
and all @c GetXXX() ones are forwarded to it, so overriding the former
changes the behaviour of the latter.
-
+
@beginStyleTable
@style{wxBORDER_DEFAULT}:
The window class will decide the kind of border to show, if any.
Currently this style applies on GTK+ 2 and Windows only, and full
repainting is always done on other platforms.
@endStyleTable
-
+
@beginExtraStyleTable
@style{wxWS_EX_VALIDATE_RECURSIVELY}:
By default, Validate/TransferDataTo/FromWindow() only work on
mode set by wxUpdateUIEvent::SetMode is
wxUPDATE_UI_PROCESS_SPECIFIED.
@endExtraStyleTable
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
@ref overview_eventhandlingoverview "Event handling overview", @ref
overview_windowsizingoverview "Window sizing overview"
Constructs a window, which can be a child of a frame, dialog or any other
non-control window.
- @param parent
+ @param parent
Pointer to a parent window.
- @param id
+ @param id
Window identifier. If wxID_ANY, will automatically create an identifier.
- @param pos
+ @param pos
Window position. wxDefaultPosition indicates that wxWidgets
should generate a default position for the window. If using the wxWindow class
directly, supply
an actual position.
- @param size
+ @param size
Window size. wxDefaultSize indicates that wxWidgets
should generate a default size for the window. If no suitable size can be
found, the
obviously not
correctly sized.
- @param style
+ @param style
Window style. For generic window styles, please see wxWindow.
- @param name
+ @param name
Window name.
*/
wxWindow();
- wxWindow(wxWindow* parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPanelNameStr);
+ wxWindow(wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxString& name = wxPanelNameStr);
//@}
/**
Notice that this function is mostly internal to wxWidgets and shouldn't be
called by the user code.
- @param child
+ @param child
Child window to add.
*/
virtual void AddChild(wxWindow* child);
This function is new since wxWidgets version 2.9.0
- @param hflag
+ @param hflag
Whether the horizontal scroll bar should always be visible.
- @param vflag
+ @param vflag
Whether the vertical scroll bar should always be visible.
@remarks This function is currently only implemented under Mac/Carbon.
void CacheBestSize(const wxSize& size);
/**
- Returns @true if the system supports transparent windows and calling
+ Returns @true if the system supports transparent windows and calling
SetTransparent() may succeed. If this function
returns @false, transparent windows are definitely not supported by the
current
/**
Centres the window.
- @param direction
+ @param direction
Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL
or wxBOTH. It may also include wxCENTRE_ON_SCREEN flag
if you want to center the window on the entire screen and not on its
Centres the window on its parent. This is a more readable synonym for
Centre().
- @param direction
+ @param direction
Specifies the direction for the centering. May be wxHORIZONTAL, wxVERTICAL
or wxBOTH.
Converts to screen coordinates from coordinates relative to this window.
- @param x
+ @param x
A pointer to a integer value for the x coordinate. Pass the client coordinate
in, and
a screen coordinate will be passed out.
- @param y
+ @param y
A pointer to a integer value for the y coordinate. Pass the client coordinate
in, and
a screen coordinate will be passed out.
- @param pt
+ @param pt
The client position for the second form of the function.
*/
virtual void ClientToScreen(int* x, int* y);
- virtual wxPoint ClientToScreen(const wxPoint& pt);
+ virtual wxPoint ClientToScreen(const wxPoint& pt);
//@}
/**
handler usually tries to close the window. It doesn't close the window itself,
however.
- @param force
+ @param force
@false if the window's close handler should be able to veto the destruction
of this window, @true if it cannot.
@sa ConvertPixelsToDialog()
*/
wxPoint ConvertDialogToPixels(const wxPoint& pt);
- wxSize ConvertDialogToPixels(const wxSize& sz);
+ wxSize ConvertDialogToPixels(const wxSize& sz);
//@}
//@{
@sa ConvertDialogToPixels()
*/
wxPoint ConvertPixelsToDialog(const wxPoint& pt);
- wxSize ConvertPixelsToDialog(const wxSize& sz);
+ wxSize ConvertPixelsToDialog(const wxSize& sz);
//@}
/**
/**
Enables or disables eligibility for drop file events (OnDropFiles).
- @param accept
+ @param accept
If @true, the window is eligible for drop file events. If @false, the window
will not accept drop file events.
disabled, all of its children are disabled as well and they are reenabled again
when the parent is.
- @param enable
+ @param enable
If @true, enables the window for input. If @false, disables the window.
@returns Returns @true if the window has been enabled or disabled, @false
Find a child of this window, by name.
*/
wxWindow* FindWindow(long id);
- wxWindow* FindWindow(const wxString& name);
+ wxWindow* FindWindow(const wxString& name);
//@}
/**
Use a solid colour for the background, this
- style is set automatically if you call
+ style is set automatically if you call
SetBackgroundColour() so you only need to
set it explicitly if you had changed the background style to something else
before.
The background is (partially) transparent,
- this style is automatically set if you call
+ this style is automatically set if you call
SetTransparent() which is used to set the
transparency level.
//@{
/**
- Returns a reference to the list of the window's children. @c wxWindowList
+ Returns a reference to the list of the window's children. @c wxWindowList
is a type-safe wxList-like class whose elements are of type
@c wxWindow *.
*/
wxWindowList GetChildren();
- const wxWindowList GetChildren();
+ const wxWindowList GetChildren();
//@}
/**
Note that if this window is a top-level one and it is currently minimized, the
return size is empty (both width and height are 0).
- @param width
+ @param width
Receives the client width in pixels.
- @param height
+ @param height
Receives the client height in pixels.
@sa GetSize(), GetVirtualSize()
*/
void GetClientSize(int* width, int* height);
- wxSize GetClientSize();
+ wxSize GetClientSize();
//@}
/**
method should be overridden if the help message depends on the position inside
the window, otherwise GetHelpText() can be used.
- @param point
+ @param point
Coordinates of the mouse at the moment of help event emission.
- @param origin
+ @param origin
Help event origin, see also wxHelpEvent::GetOrigin.
*/
virtual wxString GetHelpTextAtPoint(const wxPoint point,
virtual wxString GetLabel();
/**
- Returns the maximum size of window's client area.
+ Returns the maximum size of window's client area.
This is an indication to the sizer layout mechanism that this is the maximum
possible size as well as the upper bound on window's size settable using
- SetClientSize().
+ SetClientSize().
@sa GetMaxSize()
*/
/**
Returns the maximum size of the window. This is an indication to the sizer
layout mechanism that this is the maximum possible size as well as the upper
- bound on window's size settable using SetSize().
+ bound on window's size settable using SetSize().
@sa GetMaxClientSize()
*/
PopupMenu() function for simple menus proposing a
choice in a list of strings to the user.
- @param menu
+ @param menu
The menu to show
- @param pos
+ @param pos
The position at which to show the menu in client coordinates
- @param x
+ @param x
The horizontal position of the menu
- @param y
+ @param y
The vertical position of the menu
@returns The selected menu item id or wxID_NONE if none selected or an
*/
int GetPopupMenuSelectionFromUser(wxMenu& menu,
const wxPoint& pos);
- int GetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y);
+ int GetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y);
//@}
//@{
for the child windows or relative to the display origin for the top level
windows.
- @param x
+ @param x
Receives the x position of the window if non-@NULL.
- @param y
+ @param y
Receives the y position of the window if non-@NULL.
@sa GetScreenPosition()
*/
virtual void GetPosition(int* x, int* y);
- wxPoint GetPosition();
+ wxPoint GetPosition();
//@}
/**
Returns the window position in screen coordinates, whether the window is a
child window or a top level one.
- @param x
+ @param x
Receives the x position of the window on the screen if non-@NULL.
- @param y
+ @param y
Receives the y position of the window on the screen if non-@NULL.
@sa GetPosition()
*/
virtual void GetScreenPosition(int* x, int* y);
- wxPoint GetScreenPosition();
+ wxPoint GetScreenPosition();
//@}
/**
- Returns the position and size of the window on the screen as a
+ Returns the position and size of the window on the screen as a
wxRect object.
@sa GetRect()
Note that if this window is a top-level one and it is currently minimized, the
returned size is the restored window size, not the size of the window icon.
- @param width
+ @param width
Receives the window width.
- @param height
+ @param height
Receives the window height.
@sa GetClientSize(), GetVirtualSize()
*/
void GetSize(int* width, int* height);
- wxSize GetSize();
+ wxSize GetSize();
//@}
/**
Gets the dimensions of the string as it would be drawn on the
window with the currently selected font.
- The text extent is returned in @e w and @e h pointers (first form) or as a
+ The text extent is returned in @e w and @e h pointers (first form) or as a
wxSize object (second form).
- @param string
+ @param string
String whose extent is to be measured.
- @param w
+ @param w
Return value for width.
- @param h
+ @param h
Return value for height.
- @param descent
+ @param descent
Return value for descent (optional).
- @param externalLeading
+ @param externalLeading
Return value for external leading (optional).
- @param font
+ @param font
Font to use instead of the current window font (optional).
- @param use16
+ @param use16
If @true, string contains 16-bit characters. The default is @false.
*/
virtual void GetTextExtent(const wxString& string, int* w,
int* externalLeading = @NULL,
const wxFont* font = @NULL,
bool use16 = @false);
- wxSize GetTextExtent(const wxString& string);
+ wxSize GetTextExtent(const wxString& string);
//@}
/**
SetVirtualSize() it will return
that size.
- @param width
+ @param width
Receives the window virtual width.
- @param height
+ @param height
Receives the window virtual height.
*/
void GetVirtualSize(int* width, int* height);
- wxSize GetVirtualSize();
+ wxSize GetVirtualSize();
//@}
/**
/**
This method should be overridden to return @true if this window has
- multiple pages. All standard class with multiple pages such as
- wxNotebook, wxListbook and
+ multiple pages. All standard class with multiple pages such as
+ wxNotebook, wxListbook and
wxTreebook already override it to return @true
and user-defined classes with similar behaviour should do it as well to allow
the library to handle such windows appropriately.
/**
Returns @true if this window has a scroll bar for this orientation.
- @param orient
+ @param orient
Orientation to check, either wxHORIZONTAL or wxVERTICAL.
*/
virtual bool HasScrollbar(int orient);
This function hides a window, like Hide(), but using a
special visual effect if possible.
- The parameters of this function are the same as for
+ The parameters of this function are the same as for
ShowWithEffect(), please see their
description there.
/**
Returns @true if the window is enabled, i.e. if it accepts user input, @c
- @false
+ @false
otherwise.
Notice that this method can return @false even if this window itself hadn't
been explicitly disabled when one of its parent windows is disabled. To get the
- intrinsic status of this window, use
+ intrinsic status of this window, use
IsThisEnabled()
@sa Enable()
only redrawing those areas, which have been exposed.
*/
bool IsExposed(int x, int y);
- bool IsExposed(wxPoint amp;pt);
- bool IsExposed(int x, int y, int w, int h);
- bool IsExposed(wxRect amp;rect);
+ bool IsExposed(wxPoint amp;pt);
+ bool IsExposed(int x, int y, int w, int h);
+ bool IsExposed(wxRect amp;rect);
//@}
/**
- Returns @true if the window is currently frozen by a call to
+ Returns @true if the window is currently frozen by a call to
Freeze().
@sa Thaw()
/**
Return whether a scrollbar is always shown.
- @param orient
+ @param orient
Orientation to check, either wxHORIZONTAL or wxVERTICAL.
@sa AlwaysShowScrollbars()
Returns @true if this window is intrinsically enabled, @false otherwise,
i.e.
if @ref enable() Enable(@false) had been called. This method is
- mostly used for wxWidgets itself, user code should normally use
+ mostly used for wxWidgets itself, user code should normally use
IsEnabled() instead.
*/
bool IsThisEnabled();
Disables all other windows in the application so that
the user can only interact with this window.
- @param flag
+ @param flag
If @true, this call disables all other windows in the application so that
the user can only interact with this window. If @false, the effect is reversed.
*/
/**
Moves the window to the given position.
- @param x
+ @param x
Required x position.
- @param y
+ @param y
Required y position.
- @param pt
+ @param pt
wxPoint object representing the position.
@remarks Implementations of SetSize can also implicitly implement the
@sa SetSize()
*/
void Move(int x, int y);
- void Move(const wxPoint& pt);
+ void Move(const wxPoint& pt);
//@}
/**
MoveBeforeInTabOrder() allow to change
it after creating all the windows.
- @param win
+ @param win
A sibling of this window which should precede it in tab order,
must not be @NULL
*/
equivalent to calling NavigateIn() method on the
parent window.
- @param flags
+ @param flags
A combination of wxNavigationKeyEvent::IsForward and
wxNavigationKeyEvent::WinChange.
See @ref overview_windowidsoverview "Window IDs overview" for more information.
- @param count
+ @param count
The number of sequential IDs to reserve.
@returns Returns the ID or the first ID of the range, or wxID_NONE if the
/**
Removes and returns the top-most event handler on the event handler stack.
- @param deleteHandler
+ @param deleteHandler
If this is @true, the handler will be deleted after it is removed. The
default value is @false.
processed as usually. If the coordinates are not specified, current mouse
cursor position is used.
- @param menu
+ @param menu
Menu to pop up.
- @param pos
+ @param pos
The position where the menu will appear.
- @param x
+ @param x
Required x position for the menu to appear.
- @param y
+ @param y
Required y position for the menu to appear.
@remarks Just before the menu is popped up, wxMenu::UpdateUI is called to
*/
bool PopupMenu(wxMenu* menu,
const wxPoint& pos = wxDefaultPosition);
- bool PopupMenu(wxMenu* menu, int x, int y);
+ bool PopupMenu(wxMenu* menu, int x, int y);
//@}
/**
Pushes this event handler onto the event stack for the window.
- @param handler
+ @param handler
Specifies the handler to be pushed.
@remarks An event handler is an object that is capable of processing the
to update the window immediately you should use Update()
instead.
- @param eraseBackground
+ @param eraseBackground
If @true, the background will be
erased.
- @param rect
+ @param rect
If non-@NULL, only the given rectangle will
be treated as damaged.
and does not have the input focus because the user is working with some other
application.
- @param hotkeyId
+ @param hotkeyId
Numeric identifier of the hotkey. For applications this must be between 0 and
0xBFFF. If
this function is called from a shared DLL, it must be a system wide unique
identifier between 0xC000 and 0xFFFF.
This is a MSW specific detail.
- @param modifiers
+ @param modifiers
A bitwise combination of wxMOD_SHIFT, wxMOD_CONTROL, wxMOD_ALT
or wxMOD_WIN specifying the modifier keys that have to be pressed along with
the key.
- @param virtualKeyCode
+ @param virtualKeyCode
The virtual key code of the hotkey.
@returns @true if the hotkey was registered successfully. @false if some
Notice that this function is mostly internal to wxWidgets and shouldn't be
called by the user code.
- @param child
+ @param child
Child window to remove.
*/
virtual void RemoveChild(wxWindow* child);
Find the given @e handler in the windows event handler chain and remove (but
not delete) it from it.
- @param handler
+ @param handler
The event handler to remove, must be non-@NULL and
must be present in this windows event handlers chain
current parent window (e.g. a non-standard toolbar in a wxFrame)
and then re-inserted into another.
- @param newParent
+ @param newParent
New parent.
*/
virtual bool Reparent(wxWindow* newParent);
/**
Converts from screen to client window coordinates.
- @param x
+ @param x
Stores the screen x coordinate and receives the client x coordinate.
- @param y
+ @param y
Stores the screen x coordinate and receives the client x coordinate.
- @param pt
+ @param pt
The screen position for the second form of the function.
*/
virtual void ScreenToClient(int* x, int* y);
- virtual wxPoint ScreenToClient(const wxPoint& pt);
+ virtual wxPoint ScreenToClient(const wxPoint& pt);
//@}
/**
/**
Physically scrolls the pixels in the window and move child windows accordingly.
- @param dx
+ @param dx
Amount to scroll horizontally.
- @param dy
+ @param dy
Amount to scroll vertically.
- @param rect
+ @param rect
Rectangle to scroll, if it is @NULL, the whole window is
scrolled (this is always the case under wxGTK which doesn't support this
parameter)
/**
Determines whether the Layout() function will
be called automatically when the window is resized. Please note that this only
- happens for the windows usually used to contain children, namely
- wxPanel and wxTopLevelWindow
+ happens for the windows usually used to contain children, namely
+ wxPanel and wxTopLevelWindow
(and the classes deriving from them).
- This method is called implicitly by
- SetSizer() but if you use
+ This method is called implicitly by
+ SetSizer() but if you use
SetConstraints() you should call it
manually or otherwise the window layout won't be correctly updated when its
size changes.
- @param autoLayout
+ @param autoLayout
Set this to @true if you wish the Layout function to be
called automatically when the window is resized.
explanation of the difference between this method and
SetOwnBackgroundColour().
- @param colour
+ @param colour
The colour to be used as the background colour, pass
wxNullColour to reset to the default colour.
virtual bool SetBackgroundColour(const wxColour& colour);
/**
- Sets the background style of the window. see
+ Sets the background style of the window. see
GetBackgroundStyle() for the description
of the possible style values.
native TAB traversal (such as GTK+ 2.0). It is called by wxWidgets'
container control code to give the native system a hint when
doing TAB traversal. A call to this does not disable or change
- the effect of programmatically calling
+ the effect of programmatically calling
SetFocus().
@sa wxFocusEvent, wxPanel::SetFocus, wxPanel::SetFocusIgnoringChildren
window
around panel items, for example.
- @param width
+ @param width
The required client area width.
- @param height
+ @param height
The required client area height.
- @param size
+ @param size
The required client size.
*/
virtual void SetClientSize(int width, int height);
- virtual void SetClientSize(const wxSize& size);
+ virtual void SetClientSize(const wxSize& size);
//@}
/**
If an existing layout constraints object is already owned by the
window, it will be deleted.
- @param constraints
+ @param constraints
The constraints to set. Pass @NULL to disassociate and delete the window's
constraints.
The @e cursor may be @c wxNullCursor in which case the window cursor will
be reset back to default.
- @param cursor
+ @param cursor
Specifies the cursor that the window should normally display.
@sa ::wxSetCursor, wxCursor
/**
Sets the event handler for this window.
- @param handler
+ @param handler
Specifies the handler to be set.
@remarks An event handler is an object that is capable of processing the
see InheritAttributes() for more
explanations.
- Please notice that the given font is not automatically used for
+ Please notice that the given font is not automatically used for
wxPaintDC objects associated with this window, you need to
call wxDC::SetFont too. However this font is used by
- any standard controls for drawing their text as well as by
+ any standard controls for drawing their text as well as by
GetTextExtent().
- @param font
+ @param font
Font to associate with this window, pass
wxNullFont to reset to the default font.
explanation of the difference between this method and
SetOwnForegroundColour().
- @param colour
+ @param colour
The colour to be used as the foreground colour, pass
wxNullColour to reset to the default colour.
/**
Sets the window's label.
- @param label
+ @param label
The window label.
@sa GetLabel()
/**
Sets the window's name.
- @param name
+ @param name
A name to set for the window.
@sa GetName()
/**
Sets the position of one of the built-in scrollbars.
- @param orientation
+ @param orientation
Determines the scrollbar whose position is to be set. May be wxHORIZONTAL or
wxVERTICAL.
- @param pos
+ @param pos
Position in scroll units.
- @param refresh
+ @param refresh
@true to redraw the scrollbar, @false otherwise.
@remarks This function does not directly affect the contents of the
/**
Sets the scrollbar properties of a built-in scrollbar.
- @param orientation
+ @param orientation
Determines the scrollbar whose page size is to be set. May be wxHORIZONTAL or
wxVERTICAL.
- @param position
+ @param position
The position of the scrollbar in scroll units.
- @param thumbSize
+ @param thumbSize
The size of the thumb, or visible portion of the scrollbar, in scroll units.
- @param range
+ @param range
The maximum position of the scrollbar.
- @param refresh
+ @param refresh
@true to redraw the scrollbar, @false otherwise.
@remarks Let's say you wish to display 50 lines of text, using the same
/**
Sets the size of the window in pixels.
- @param x
+ @param x
Required x position in pixels, or wxDefaultCoord to indicate that the existing
value should be used.
- @param y
+ @param y
Required y position in pixels, or wxDefaultCoord to indicate that the existing
value should be used.
- @param width
+ @param width
Required width in pixels, or wxDefaultCoord to indicate that the existing
value should be used.
- @param height
+ @param height
Required height position in pixels, or wxDefaultCoord to indicate that the
existing
value should be used.
- @param size
+ @param size
wxSize object for setting the size.
- @param rect
+ @param rect
wxRect object for setting the position and size.
- @param sizeFlags
+ @param sizeFlags
Indicates the interpretation of other parameters. It is a bit list of the
following:
*/
virtual void SetSize(int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO);
- virtual void SetSize(const wxRect& rect);
- virtual void SetSize(int width, int height);
- virtual void SetSize(const wxSize& size);
+ virtual void SetSize(const wxRect& rect);
+ virtual void SetSize(int width, int height);
+ virtual void SetSize(const wxSize& size);
//@}
/**
Use of this function for windows which are not toplevel windows
- (such as wxDialog or wxFrame) is discouraged. Please use
+ (such as wxDialog or wxFrame) is discouraged. Please use
SetMinSize() and SetMaxSize()
instead.
SetAutoLayout() implicitly with @true
parameter if the @e sizer is non-@NULL and @false otherwise.
- @param sizer
+ @param sizer
The sizer to set. Pass @NULL to disassociate and conditionally delete
the window's sizer. See below.
- @param deleteOld
+ @param deleteOld
If @true (the default), this will delete any pre-existing sizer.
Pass @false if you wish to handle deleting the old sizer yourself.
void SetSizer(wxSizer* sizer, bool deleteOld=@true);
/**
- This method calls SetSizer() and then
+ This method calls SetSizer() and then
wxSizer::SetSizeHints which sets the initial
window size to the size needed to accommodate all sizer elements and sets the
size hints which, if this window is a top level one, prevent the user from
wxToolTip
*/
void SetToolTip(const wxString& tip);
- void SetToolTip(wxToolTip* tip);
+ void SetToolTip(wxToolTip* tip);
//@}
/**
Sets the virtual size of the window in pixels.
*/
void SetVirtualSize(int width, int height);
- void SetVirtualSize(const wxSize& size);
+ void SetVirtualSize(const wxSize& size);
//@}
//@{
If a pair of values is not set (or set to -1), the default values
will be used.
- @param minW
+ @param minW
Specifies the minimum width allowable.
- @param minH
+ @param minH
Specifies the minimum height allowable.
- @param maxW
+ @param maxW
Specifies the maximum width allowable.
- @param maxH
+ @param maxH
Specifies the maximum height allowable.
- @param minSize
+ @param minSize
Minimum size.
- @param maxSize
+ @param maxSize
Maximum size.
@remarks If this function is called, the user will not be able to size
*/
virtual void SetVirtualSizeHints(int minW, int minH, int maxW=-1,
int maxH=-1);
- void SetVirtualSizeHints(const wxSize& minSize=wxDefaultSize,
- const wxSize& maxSize=wxDefaultSize);
+ void SetVirtualSizeHints(const wxSize& minSize=wxDefaultSize,
+ const wxSize& maxSize=wxDefaultSize);
//@}
/**
for a top level window if you want to bring it to top, although this is not
needed if Show() is called immediately after the frame creation.
- @param show
+ @param show
If @true displays the window. Otherwise, hides it.
@returns @true if the window has been shown or hidden or @false if nothing
Expanding or collapsing effect
For the roll and slide effects the @e dir parameter specifies the animation
- direction: it can be one of @c wxTOP, @c wxBOTTOM, @c wxLEFT
+ direction: it can be one of @c wxTOP, @c wxBOTTOM, @c wxLEFT
or @c wxRIGHT. For the other effects, this parameter is unused.
The @e timeout parameter specifies the time of the animation, in
/**
Unregisters a system wide hotkey.
- @param hotkeyId
+ @param hotkeyId
Numeric identifier of the hotkey. Must be the same id that was passed to
RegisterHotKey.
See @ref overview_windowidsoverview "Window IDs overview" for more information.
- @param id
+ @param id
The starting ID of the range of IDs to unreserve.
- @param count
+ @param count
The number of sequential IDs to unreserve.
@sa NewControlId(), wxIdManager, @ref overview_windowidsoverview
/**
Calling this method immediately repaints the invalidated area of the window and
all of its children recursively while this would usually only happen when the
- flow of control returns to the event loop.
+ flow of control returns to the event loop.
Notice that this function doesn't invalidate any area of the window so
nothing happens if nothing has been invalidated (i.e. marked as requiring
a redraw). Use Refresh() first if you want to
@b NB: This function is not supported under Mac because Apple Human
Interface Guidelines forbid moving the mouse cursor programmatically.
- @param x
+ @param x
The new x position for the cursor.
- @param y
+ @param y
The new y position for the cursor.
*/
void WarpPointer(int x, int y);
/**
@class wxIdManager
@wxheader{windowid.h}
-
+
wxIdManager is responsible for allocating and releasing window IDs. It
is used by wxWindow::NewControlId and
wxWindow::UnreserveControlId, and can also
be used be used directly.
-
+
@library{wxcore}
@category{FIXME}
-
+
@seealso
wxWindow::NewControlId, wxWindow::UnreserveControlId, @ref
overview_windowidsoverview "Window IDs overview"
*/
-class wxIdManager
+class wxIdManager
{
public:
/**
Only ID values that are not assigned to a wxWindowIDRef
need to be unreserved.
- @param count
+ @param count
The number of sequential IDs to reserve.
@returns The value of the first ID in the sequence, or wxID_NONE.
/**
@class wxWizardPage
@wxheader{wizard.h}
-
+
wxWizardPage is one of the screens in wxWizard: it must
know what are the following and preceding pages (which may be @NULL for the
first/last page). Except for this extra knowledge, wxWizardPage is just a
panel, so the controls may be placed directly on it in the usual way.
-
+
This class allows the programmer to decide the order of pages in the wizard
dynamically (during run-time) and so provides maximal flexibility. Usually,
- however, the order of pages is known in advance in which case
+ however, the order of pages is known in advance in which case
wxWizardPageSimple class is enough and it is simpler
to use.
-
+
@library{wxadv}
@category{miscwnd}
-
+
@seealso
wxWizard, @ref overview_samplewizard "wxWizard sample"
*/
be of the same size). Notice that no other parameters are needed because the
wizard will resize and reposition the page anyhow.
- @param parent
+ @param parent
The parent wizard
- @param bitmap
+ @param bitmap
The page-specific bitmap if different from the global one
*/
wxWizardPage(wxWizard* parent,
/**
This method is called by wxWizard to get the bitmap to display alongside the
- page. By default, @c m_bitmap member variable which was set in the
+ page. By default, @c m_bitmap member variable which was set in the
@ref wxwizardpage() constructor.
If the bitmap was not explicitly set (i.e. if @c wxNullBitmap is returned),
/**
@class wxWizardEvent
@wxheader{wizard.h}
-
+
wxWizardEvent class represents an event generated by the
wizard: this event is first sent to the page itself and,
if not processed there, goes up the window hierarchy as usual.
-
+
@library{wxadv}
@category{events}
-
+
@seealso
wxWizard, @ref overview_samplewizard "wxWizard sample"
*/
/**
@class wxWizardPageSimple
@wxheader{wizard.h}
-
- wxWizardPageSimple is the simplest possible
+
+ wxWizardPageSimple is the simplest possible
wxWizardPage implementation: it just returns the
pointers given to its constructor from GetNext() and GetPrev() functions.
-
+
This makes it very easy to use the objects of this class in the wizards where
the pages order is known statically - on the other hand, if this is not the
- case you must derive your own class from wxWizardPage
+ case you must derive your own class from wxWizardPage
instead.
-
+
@library{wxadv}
@category{miscwnd}
-
+
@seealso
wxWizard, @ref overview_samplewizard "wxWizard sample"
*/
public:
/**
Constructor takes the previous and next pages. They may be modified later by
- SetPrev() or
+ SetPrev() or
SetNext().
*/
wxWizardPageSimple(wxWizard* parent = @NULL,
/**
@class wxWizard
@wxheader{wizard.h}
-
+
wxWizard is the central class for implementing 'wizard-like' dialogs. These
dialogs are mostly familiar to Windows users and are nothing other than a
sequence of 'pages', each displayed inside a dialog which has the
buttons to navigate to the next (and previous) pages.
-
+
The wizards are typically used to decompose a complex dialog into several
simple steps and are mainly useful to the novice users, hence it is important
to keep them as simple as possible.
-
+
To show a wizard dialog, you must first create an instance of the wxWizard class
using either the non-default constructor or a default one followed by call to
- the
+ the
wxWizard::Create function. Then you should add all pages you
want the wizard to show and call wxWizard::RunWizard.
Finally, don't forget to call @c wizard-Destroy(), otherwise your application
will hang on exit due to an undestroyed window.
-
+
You can supply a bitmap to display on the left of the wizard, either for all
pages
or for individual pages. If you need to have the bitmap resize to the height of
the wizard,
call wxWizard::SetBitmapPlacement and if necessary,
wxWizard::SetBitmapBackgroundColour and wxWizard::SetMinimumBitmapWidth.
-
+
To make wizard pages scroll when the display is too small to fit the whole
dialog, you can switch
layout adaptation on globally with wxDialog::EnableLayoutAdaptation or
per dialog with wxDialog::SetLayoutAdaptationMode. For more
about layout adaptation, see @ref overview_autoscrollingdialogs "Automatic
scrolling dialogs".
-
+
@library{wxadv}
@category{cmndlg}
-
+
@seealso
wxWizardEvent, wxWizardPage, @ref overview_samplewizard "wxWizard sample"
*/
Constructor which really creates the wizard -- if you use this constructor, you
shouldn't call Create().
- Notice that unlike almost all other wxWidgets classes, there is no @e size
+ Notice that unlike almost all other wxWidgets classes, there is no @e size
parameter in the wxWizard constructor because the wizard will have a predefined
- default size by default. If you want to change this, you should use the
+ default size by default. If you want to change this, you should use the
GetPageAreaSizer() function.
- @param parent
+ @param parent
The parent window, may be @NULL.
- @param id
+ @param id
The id of the dialog, will usually be just -1.
- @param title
+ @param title
The title of the dialog.
- @param bitmap
+ @param bitmap
The default bitmap used in the left side of the wizard. See
also GetBitmap.
- @param pos
+ @param pos
The position of the dialog, it will be centered on the screen
by default.
- @param style
+ @param style
Window style is passed to wxDialog.
*/
wxWizard();
- wxWizard(wxWindow* parent, int id = -1,
- const wxString& title = wxEmptyString,
- const wxBitmap& bitmap = wxNullBitmap,
- const wxPoint& pos = wxDefaultPosition,
- long style = wxDEFAULT_DIALOG_STYLE);
+ wxWizard(wxWindow* parent, int id = -1,
+ const wxString& title = wxEmptyString,
+ const wxBitmap& bitmap = wxNullBitmap,
+ const wxPoint& pos = wxDefaultPosition,
+ long style = wxDEFAULT_DIALOG_STYLE);
//@}
/**
Creates the wizard dialog. Must be called if the default constructor had been
used to create the object.
- Notice that unlike almost all other wxWidgets classes, there is no @e size
+ Notice that unlike almost all other wxWidgets classes, there is no @e size
parameter in the wxWizard constructor because the wizard will have a predefined
- default size by default. If you want to change this, you should use the
+ default size by default. If you want to change this, you should use the
GetPageAreaSizer() function.
- @param parent
+ @param parent
The parent window, may be @NULL.
- @param id
+ @param id
The id of the dialog, will usually be just -1.
- @param title
+ @param title
The title of the dialog.
- @param bitmap
+ @param bitmap
The default bitmap used in the left side of the wizard. See
also GetBitmap.
- @param pos
+ @param pos
The position of the dialog, it will be centered on the screen
by default.
- @param style
+ @param style
Window style is passed to wxDialog.
*/
bool Create(wxWindow* parent, int id = -1,
int GetBitmapPlacement();
/**
- Get the current page while the wizard is running. @NULL is returned if
+ Get the current page while the wizard is running. @NULL is returned if
RunWizard() is not being executed now.
*/
wxWizardPage* GetCurrentPage();
Page area sizer has a minimal size that is the maximum of several values. First,
all pages (or other objects) added to the sizer. Second, all pages reachable
- by repeatedly applying
+ by repeatedly applying
wxWizardPage::GetNext to
any page inserted into the sizer. Third,
- the minimal size specified using SetPageSize() and
+ the minimal size specified using SetPageSize() and
FitToPage(). Fourth, the total wizard height may
be increased to accommodate the bitmap height. Fifth and finally, wizards are
never smaller than some built-in minimal size to avoid wizards that are too
/**
Return @true if this page is not the last one in the wizard. The base
- class version implements this by calling
+ class version implements this by calling
@ref wxWizardPage::getnext page-GetNext but this could be undesirable if,
for example, the pages are created on demand only.
/**
Returns @true if this page is not the last one in the wizard. The base
- class version implements this by calling
+ class version implements this by calling
@ref wxWizardPage::getprev page-GetPrev but this could be undesirable if,
for example, the pages are created on demand only.
/**
Executes the wizard starting from the given page, returning @true if it was
- successfully finished or @false if user cancelled it. The @e firstPage
+ successfully finished or @false if user cancelled it. The @e firstPage
can not be @NULL.
*/
bool RunWizard(wxWizardPage* firstPage);
wizard will never be smaller than the default size.
The recommended way to use this function is to lay out all wizard pages using
- the sizers (even though the wizard is not resizeable) and then use
+ the sizers (even though the wizard is not resizeable) and then use
wxSizer::CalcMin in a loop to calculate the maximum
of minimal sizes of the pages and pass it to SetPageSize().
*/
/**
@class wxWrapSizer
@wxheader{wrapsizer.h}
-
- A wrap sizer lays out its items in a single line, like a box sizer -- as long
- as there is space available in that direction. Once all available space in
+
+ A wrap sizer lays out its items in a single line, like a box sizer -- as long
+ as there is space available in that direction. Once all available space in
the primary direction has been used, a new line is added and items are added
there.
-
+
So a wrap sizer has a primary orientation for adding items, and adds lines
- as needed in the secondary direction.
-
+ as needed in the secondary direction.
+
@library{wxcore}
@category{winlayout}
-
+
@seealso
wxBoxSizer, wxSizer, @ref overview_sizeroverview "Sizer overview"
*/
wxWrapSizer(int orient, int flags);
/**
- Not used by an application. This is the mechanism by which sizers can inform
+ Not used by an application. This is the mechanism by which sizers can inform
sub-items of the first determined size component. The sub-item can then better
- determine its size requirements.
+ determine its size requirements.
Returns @true if the information was used (and the sub-item min size was
updated).
/**
@class wxWindowUpdateLocker
@wxheader{wupdlock.h}
-
+
This tiny class prevents redrawing of a wxWindow during its
- lifetime by using wxWindow::Freeze and
+ lifetime by using wxWindow::Freeze and
wxWindow::Thaw methods. It is typically used for creating
automatic objects to temporarily suppress window updates before a batch of
operations is performed:
-
+
@code
void MyFrame::Foo()
{
m_text = new wxTextCtrl(this, ...);
-
+
wxWindowUpdateLocker noUpdates(m_text);
m_text-AppendText();
... many other operations with m_text...
m_text-WriteText();
}
@endcode
-
- Using this class is easier and safer than calling
+
+ Using this class is easier and safer than calling
wxWindow::Freeze and wxWindow::Thaw because you
don't risk to forget calling the latter.
-
+
@library{wxbase}
@category{FIXME}
*/
-class wxWindowUpdateLocker
+class wxWindowUpdateLocker
{
public:
/**
/////////////////////////////////////////////////////////////////////////////
- // Name: wxcrt.h
- // Purpose: documentation for global functions
- // Author: wxWidgets team
- // RCS-ID: $Id$
- // Licence: wxWindows license
- /////////////////////////////////////////////////////////////////////////////
-
- /**
- Returns a negative value, 0, or positive value if @e p1 is less than, equal
- to or greater than @e p2. The comparison is case-sensitive.
-
- This function complements the standard C function @e stricmp() which performs
- case-insensitive comparison.
+// Name: wxcrt.h
+// Purpose: documentation for global functions
+// Author: wxWidgets team
+// RCS-ID: $Id$
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+Returns a negative value, 0, or positive value if @e p1 is less than, equal
+to or greater than @e p2. The comparison is case-sensitive.
+
+This function complements the standard C function @e stricmp() which performs
+case-insensitive comparison.
*/
int wxStrcmp(const char * p1, const char * p2);
- /**
- @b NB: This function is obsolete, use wxString instead.
-
- A macro defined as:
- @code
- #define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0))
- @endcode
+/**
+@b NB: This function is obsolete, use wxString instead.
+
+A macro defined as:
+@code
+#define wxStringEq(s1, s2) (s1 && s2 && (strcmp(s1, s2) == 0))
+@endcode
*/
bool wxStringEq(const wxString& s1, const wxString& s2);
/**
@b NB: This function is obsolete, use wxString::Find instead.
-
+
Returns @true if the substring @e s1 is found within @e s2,
ignoring case if @e exact is @false. If @e subString is @false,
no substring matching is done.
like @c snprintf() available on some platforms. The only difference with
sprintf() is that an additional argument - buffer size - is taken and the
buffer is never overflowed.
-
+
Returns the number of characters copied to the buffer or -1 if there is not
enough space.
-
+
@sa wxVsnprintf, wxString::Printf
*/
int wxSnprintf(wxChar * buf, size_t len, const wxChar * format,
- ...);
+ ...);
/**
This is a convenience function wrapping
wxStringTokenizer which simply returns all tokens
found in the given @e str in an array.
-
+
Please see
wxStringTokenizer::wxStringTokenizer
for the description of the other parameters.
/**
The same as wxSnprintf but takes a @c va_list
argument instead of arbitrary number of parameters.
-
+
Note that if @c wxUSE_PRINTF_POS_PARAMS is set to 1, then this function supports
positional arguments (see wxString::Printf for more information).
However other functions of the same family (wxPrintf, wxSprintf, wxFprintf,
wxVfprintf, wxVprintf, wxVsprintf) currently do not to support positional
parameters
even when @c wxUSE_PRINTF_POS_PARAMS is 1.
-
+
@sa wxSnprintf, wxString::PrintfV
*/
int wxVsnprintf(wxChar * buf, size_t len, const wxChar * format,
/**
Returns a negative value, 0, or positive value if @e p1 is less than, equal
to or greater than @e p2. The comparison is case-insensitive.
-
+
This function complements the standard C function @e strcmp() which performs
case-sensitive comparison.
*/
/**
@class wxXmlNode
@headerfile xml.h wx/xml/xml.h
-
+
Represents a node in an XML document. See wxXmlDocument.
-
- Node has a name and may have content and attributes. Most common node types are
- @c wxXML_TEXT_NODE (name and attributes are irrelevant) and
+
+ Node has a name and may have content and attributes. Most common node types are
+ @c wxXML_TEXT_NODE (name and attributes are irrelevant) and
@c wxXML_ELEMENT_NODE (e.g. in @c titlehi/title there is an element
with name="title", irrelevant content and one child (@c wxXML_TEXT_NODE
with content="hi").
-
+
If @c wxUSE_UNICODE is 0, all strings are encoded in the encoding given to
wxXmlDocument::Load (default is UTF-8).
-
+
@library{wxxml}
@category{xml}
-
+
@seealso
wxXmlDocument, wxXmlAttribute
*/
-class wxXmlNode
+class wxXmlNode
{
public:
//@{
const wxString& content = wxEmptyString,
wxXmlAttribute* attrs = @NULL,
wxXmlNode* next = @NULL, int lineNo = -1);
- wxXmlNode(const wxXmlNode& node);
- wxXmlNode(wxXmlNodeType type, const wxString& name,
- const wxString& content = wxEmptyString,
- int lineNo = -1);
+ wxXmlNode(const wxXmlNode& node);
+ wxXmlNode(wxXmlNodeType type, const wxString& name,
+ const wxString& content = wxEmptyString,
+ int lineNo = -1);
//@}
/**
Appends given attribute to the list of attributes for this node.
*/
void AddAttribute(const wxString& name, const wxString& value);
- void AddAttribute(wxXmlAttribute* attr);
+ void AddAttribute(wxXmlAttribute* attr);
//@}
/**
If it does not exist, the @e defaultVal is returned.
*/
bool GetAttribute(const wxString& attrName, wxString* value);
- wxString GetAttribute(const wxString& attrName,
- const wxString& defaultVal);
+ wxString GetAttribute(const wxString& attrName,
+ const wxString& defaultVal);
//@}
/**
/**
@class wxXmlAttribute
@headerfile xml.h wx/xml/xml.h
-
+
Represents a node attribute.
-
+
Example: in @c img src="hello.gif" id="3"/, @c "src" is attribute with value
@c "hello.gif" and @c "id" is a attribute with value @c "3".
-
+
@library{wxxml}
@category{xml}
-
+
@seealso
wxXmlDocument, wxXmlNode
*/
-class wxXmlAttribute
+class wxXmlAttribute
{
public:
//@{
If @e next is not @NULL, then sets it as sibling of this attribute.
*/
wxXmlAttribute();
- wxXmlAttribute(const wxString& name, const wxString& value,
- wxXmlAttribute* next = @NULL);
+ wxXmlAttribute(const wxString& name, const wxString& value,
+ wxXmlAttribute* next = @NULL);
//@}
/**
/**
@class wxXmlDocument
@headerfile xml.h wx/xml/xml.h
-
+
This class holds XML data/document as parsed by XML parser in the root node.
-
+
wxXmlDocument internally uses the expat library which comes with wxWidgets to
parse the given stream.
-
+
A simple example of using XML classes is:
-
+
@code
wxXmlDocument doc;
if (!doc.Load(wxT("myfile.xml")))
return @false;
-
+
// start processing the XML file
if (doc.GetRoot()-GetName() != wxT("myroot-node"))
return @false;
-
+
wxXmlNode *child = doc.GetRoot()-GetChildren();
while (child) {
-
+
if (child-GetName() == wxT("tag1")) {
-
+
// process text enclosed by tag1/tag1
wxString content = child-GetNodeContent();
-
+
...
-
+
// process attributes of tag1
- wxString attrvalue1 =
- child-GetAttribute(wxT("attr1"),
+ wxString attrvalue1 =
+ child-GetAttribute(wxT("attr1"),
wxT("default-value"));
- wxString attrvalue2 =
- child-GetAttribute(wxT("attr2"),
+ wxString attrvalue2 =
+ child-GetAttribute(wxT("attr2"),
wxT("default-value"));
-
+
...
-
+
} else if (child-GetName() == wxT("tag2")) {
-
+
// process tag2 ...
}
-
+
child = child-GetNext();
}
@endcode
-
+
@b Note: if you want to preserve the original formatting of the loaded file
including whitespaces
and indentation, you need to turn off whitespace-only textnode removal and
automatic indentation:
-
+
@code
wxXmlDocument doc;
doc.Load(wxT("myfile.xml"), wxT("UTF-8"), wxXMLDOC_KEEP_WHITESPACE_NODES);
-
+
// myfile2.xml will be indentic to myfile.xml saving it this way:
doc.Save(wxT("myfile2.xml"), wxXML_NO_INDENTATION);
@endcode
-
+
Using default parameters, you will get a reformatted document which in general
is different from
the original loaded content:
-
+
@code
wxXmlDocument doc;
doc.Load(wxT("myfile.xml"));
doc.Save(wxT("myfile2.xml")); // myfile2.xml != myfile.xml
@endcode
-
+
@library{wxxml}
@category{xml}
-
+
@seealso
wxXmlNode, wxXmlAttribute
*/
Copy constructor. Deep copies all the XML tree of the given document.
*/
wxXmlDocument();
- wxXmlDocument(const wxString& filename);
- wxXmlDocument(wxInputStream& stream);
- wxXmlDocument(const wxXmlDocument& doc);
+ wxXmlDocument(const wxString& filename);
+ wxXmlDocument(wxInputStream& stream);
+ wxXmlDocument(const wxXmlDocument& doc);
//@}
/**
Like above but takes the data from given input stream.
*/
bool Load(const wxString& filename);
- int bool Load(wxInputStream& stream);
+ int bool Load(wxInputStream& stream);
//@}
//@{
of @c indentstep.
*/
bool Save(const wxString& filename, int indentstep = 1);
- bool Save(wxOutputStream& stream, int indentstep = 1);
+ bool Save(wxOutputStream& stream, int indentstep = 1);
//@}
/**
/**
Sets the root node of this document. Deletes previous root node.
- Use DetachRoot() and then
+ Use DetachRoot() and then
SetRoot() if you want
to replace the root node without deleting the old document tree.
*/
/**
@class wxXmlResource
@headerfile xmlres.h wx/xrc/xmlres.h
-
+
This is the main class for interacting with the XML-based resource system.
-
+
The class holds XML resources from one or more .xml files, binary files or zip
archive files.
-
+
See @ref overview_xrcoverview "XML-based resource system overview" for details.
-
+
@library{wxxrc}
@category{xrc}
*/
/**
Constructor.
- @param flags
+ @param flags
wxXRC_USE_LOCALE: translatable strings will be translated via _().
wxXRC_NO_SUBCLASSING: subclass property of object nodes will be ignored
(useful for previews in XRC editors). wxXRC_NO_RELOADING will prevent the
XRC files from being reloaded from disk in case they have been modified there
since being last loaded (may slightly speed up loading them).
- @param domain
+ @param domain
The name of the gettext catalog to search for
translatable strings. By default all loaded catalogs will be
searched. This provides a way to allow the strings to only come
wxXmlResource(const wxString& filemask,
int flags = wxXRC_USE_LOCALE,
const wxString domain = wxEmptyString);
- wxXmlResource(int flags = wxXRC_USE_LOCALE,
- const wxString domain = wxEmptyString);
+ wxXmlResource(int flags = wxXRC_USE_LOCALE,
+ const wxString domain = wxEmptyString);
//@}
/**
wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. The XML resource compiler
(wxxrc) can create include file that contains initialization code for
all controls used within the resource. Note that this handler should be
- allocated on the heap, since it will be delete by
+ allocated on the heap, since it will be delete by
ClearHandlers() later.
*/
void AddHandler(wxXmlResourceHandler* handler);
wxWindow* parent = @NULL);
/**
- Removes all handlers and deletes them (this means that any handlers added using
+ Removes all handlers and deletes them (this means that any handlers added using
AddHandler() must be allocated on the heap).
*/
void ClearHandlers();
Example:
*/
wxDialog* LoadDialog(wxWindow* parent, const wxString& name);
- bool LoadDialog(wxDialog* dlg, wxWindow* parent,
- const wxString& name);
+ bool LoadDialog(wxDialog* dlg, wxWindow* parent,
+ const wxString& name);
//@}
/**
Loads a menubar from resource. Returns @NULL on failure.
*/
wxMenuBar* LoadMenuBar(wxWindow* parent, const wxString& name);
- wxMenuBar* LoadMenuBar(const wxString& name);
+ wxMenuBar* LoadMenuBar(const wxString& name);
//@}
//@{
*/
wxObject* LoadObject(wxWindow* parent, const wxString& name,
const wxString& classname);
- bool LoadObject(wxObject* instance, wxWindow* parent,
- const wxString& name,
- const wxString& classname);
+ bool LoadObject(wxObject* instance, wxWindow* parent,
+ const wxString& name,
+ const wxString& classname);
//@}
//@{
is used to finish creation of an already existing instance.
*/
wxPanel* LoadPanel(wxWindow* parent, const wxString& name);
- bool LoadPanel(wxPanel* panel, wxWindow* parent,
- const wxString& name);
+ bool LoadPanel(wxPanel* panel, wxWindow* parent,
+ const wxString& name);
//@}
/**
void SetFlags(int flags);
/**
- This function unloads a resource previously loaded by
+ This function unloads a resource previously loaded by
Load().
Returns @true if the resource was successfully unloaded and @false if it
/**
@class wxXmlResourceHandler
@headerfile xmlres.h wx/xrc/xmlres.h
-
+
wxXmlResourceHandler is an abstract base class for resource handlers
capable of creating a control from an XML node.
-
+
See @ref overview_xrcoverview "XML-based resource system overview" for details.
-
+
@library{wxxrc}
@category{xrc}
*/
Gets colour in HTML syntax (#RRGGBB).
*/
wxColour GetColour(const wxString& param,
- const wxColour& default = wxNullColour);
+ const wxColour& default = wxNullColour);
/**
Returns the current file system.
/**
@class wxZipNotifier
@wxheader{zipstrm.h}
-
+
If you need to know when a wxZipInputStream
updates a wxZipEntry,
you can create a notifier by deriving from this abstract base class,
overriding wxZipNotifier::OnEntryUpdated.
An instance of your notifier class can then be assigned to wxZipEntry
objects, using wxZipEntry::SetNotifier.
-
+
Setting a notifier is not usually necessary. It is used to handle
certain cases when modifying an zip in a pipeline (i.e. between
non-seekable streams).
See '@ref overview_wxarcnoseek "Archives on non-seekable streams"'.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxarcnoseek "Archives on non-seekable streams", wxZipEntry,
wxZipInputStream, wxZipOutputStream
*/
-class wxZipNotifier
+class wxZipNotifier
{
public:
/**
/**
@class wxZipEntry
@wxheader{zipstrm.h}
-
+
Holds the meta-data for an entry in a zip.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", wxZipInputStream,
wxZipOutputStream, wxZipNotifier
Copy constructor.
*/
wxZipEntry(const wxString& name = wxEmptyString);
- wxZipEntry(const wxZipEntry& entry);
+ wxZipEntry(const wxZipEntry& entry);
//@}
/**
A short comment for this entry.
*/
wxString GetComment();
- void SetComment(const wxString& comment);
+ void SetComment(const wxString& comment);
//@}
//@{
@ref mode() Get/SetMode
*/
wxUint32 GetExternalAttributes();
- void SetExternalAttributes(wxUint32 attr);
+ void SetExternalAttributes(wxUint32 attr);
//@}
//@{
data. See Pkware's document 'appnote.txt' for information on its format.
*/
const char* GetExtra();
- size_t GetExtraLen();
- void SetExtra(const char* extra, size_t len);
+ size_t GetExtraLen();
+ void SetExtra(const char* extra, size_t len);
//@}
//@{
data. See Pkware's document 'appnote.txt' for information on its format.
*/
const char* GetLocalExtra();
- size_t GetLocalExtraLen();
- void SetLocalExtra(const char* extra, size_t len);
+ size_t GetLocalExtraLen();
+ void SetLocalExtra(const char* extra, size_t len);
//@}
//@{
choose the method when writing the entry.
*/
int GetMethod();
- void SetMethod(int method);
+ void SetMethod(int method);
//@}
//@{
stores @c mode in GetExternalAttributes().
Note that the default constructor
- sets @ref systemmadeby() GetSystemMadeBy to
+ sets @ref systemmadeby() GetSystemMadeBy to
wxZIP_SYSTEM_MSDOS by default. So to be able to store unix
permissions when creating zips, call SetSystemMadeBy(wxZIP_SYSTEM_UNIX).
*/
int GetMode();
- void SetMode(int mode);
+ void SetMode(int mode);
//@}
//@{
able to store unix permissions using @ref mode() SetMode.
*/
int GetSystemMadeBy();
- void SetSystemMadeBy(int system);
+ void SetSystemMadeBy(int system);
//@}
/**
@sa @ref overview_wxarcbyname "Looking up an archive entry by name"
*/
wxString GetInternalName();
- wxString GetInternalName(const wxString& name,
- wxPathFormat format = wxPATH_NATIVE,
- bool* pIsDir = @NULL);
+ wxString GetInternalName(const wxString& name,
+ wxPathFormat format = wxPATH_NATIVE,
+ bool* pIsDir = @NULL);
//@}
/**
Indicates that this entry's data is text in an 8-bit encoding.
*/
bool IsText();
- void SetIsText(bool isText = @true);
+ void SetIsText(bool isText = @true);
//@}
//@{
@sa @ref overview_wxarcnoseek "Archives on non-seekable streams", wxZipNotifier
*/
void SetNotifier(wxZipNotifier& notifier);
- void UnsetNotifier();
+ void UnsetNotifier();
//@}
/**
/**
@class wxZipInputStream
@wxheader{zipstrm.h}
-
+
Input stream for reading zip files.
-
+
wxZipInputStream::GetNextEntry returns an
wxZipEntry object containing the meta-data
for the next entry in the zip (and gives away ownership). Reading from
the wxZipInputStream then returns the entry's data. Eof() becomes @true
after an attempt has been made to read past the end of the entry's data.
When there are no more entries, GetNextEntry() returns @NULL and sets Eof().
-
+
Note that in general zip entries are not seekable, and
wxZipInputStream::SeekI() always returns wxInvalidOffset.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", wxZipEntry, wxZipOutputStream
*/
*/
wxZipInputStream(wxInputStream& stream,
wxMBConv& conv = wxConvLocal);
- wxZipInputStream(wxInputStream* stream,
- wxMBConv& conv = wxConvLocal);
- wxZipInputStream(const wxString& archive,
- const wxString& file);
+ wxZipInputStream(wxInputStream* stream,
+ wxMBConv& conv = wxConvLocal);
+ wxZipInputStream(const wxString& archive,
+ const wxString& file);
//@}
/**
/**
@class wxZipClassFactory
@wxheader{zipstrm.h}
-
+
Class factory for the zip archive format. See the base class
for details.
-
+
@library{wxbase}
@category{FIXME}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", @ref overview_wxarcgeneric
"Generic archive programming", wxZipEntry, wxZipInputStream, wxZipOutputStream
class wxZipClassFactory : public wxArchiveClassFactory
{
public:
-
+
};
/**
@class wxZipOutputStream
@wxheader{zipstrm.h}
-
+
Output stream for writing zip files.
-
+
wxZipOutputStream::PutNextEntry is used to create
a new entry in the output zip, then the entry's data is written to the
wxZipOutputStream. Another call to PutNextEntry() closes the current
entry and begins the next.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
@ref overview_wxarc "Archive formats such as zip", wxZipEntry, wxZipInputStream
*/
*/
wxZipOutputStream(wxOutputStream& stream, int level = -1,
wxMBConv& conv = wxConvLocal);
- wxZipOutputStream(wxOutputStream* stream, int level = -1,
- wxMBConv& conv = wxConvLocal);
+ wxZipOutputStream(wxOutputStream* stream, int level = -1,
+ wxMBConv& conv = wxConvLocal);
//@}
/**
which currently is equivalent to 6.
*/
int GetLevel();
- void SetLevel(int level);
+ void SetLevel(int level);
//@}
/**
Create a new entry with the given name, timestamp and size.
*/
bool PutNextEntry(wxZipEntry* entry);
- bool PutNextEntry(const wxString& name);
+ bool PutNextEntry(const wxString& name);
//@}
/**
/**
@class wxZlibOutputStream
@wxheader{zstream.h}
-
+
This stream compresses all data written to it. The compressed output can be
in zlib or gzip format.
Note that writing the gzip format requires zlib version 1.2.1 or greater
(the builtin version does support gzip format).
-
+
The stream is not seekable, wxOutputStream::SeekO returns
@e wxInvalidOffset.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxOutputStream, wxZlibInputStream
*/
public:
//@{
/**
- Creates a new write-only compressed stream. @e level means level of
+ Creates a new write-only compressed stream. @e level means level of
compression. It is number between 0 and 9 (including these values) where
0 means no compression and 9 best but slowest compression. -1 is default
value (currently equivalent to 6).
*/
wxZlibOutputStream(wxOutputStream& stream, int level = -1,
int flags = wxZLIB_ZLIB);
- wxZlibOutputStream(wxOutputStream* stream, int level = -1,
- int flags = wxZLIB_ZLIB);
+ wxZlibOutputStream(wxOutputStream* stream, int level = -1,
+ int flags = wxZLIB_ZLIB);
//@}
/**
/**
@class wxZlibInputStream
@wxheader{zstream.h}
-
+
This filter stream decompresses a stream that is in zlib or gzip format.
Note that reading the gzip format requires zlib version 1.2.1 or greater,
(the builtin version does support gzip format).
-
+
The stream is not seekable, wxInputStream::SeekI returns
@e wxInvalidOffset. Also wxStreamBase::GetSize is
not supported, it always returns 0.
-
+
@library{wxbase}
@category{streams}
-
+
@seealso
wxInputStream, wxZlibOutputStream.
*/
The following symbols can be use for the flags:
*/
wxZlibInputStream(wxInputStream& stream, int flags = wxZLIB_AUTO);
- wxZlibInputStream(wxInputStream* stream,
- int flags = wxZLIB_AUTO);
+ wxZlibInputStream(wxInputStream* stream,
+ int flags = wxZLIB_AUTO);
//@}
/**