Compare commits

..

1 Commits

Author SHA1 Message Date
Bryan Petty
c6440f0a90 This commit was manufactured by cvs2svn to create tag
'wxPython-2_1b3'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/wxPython-2_1b3@3555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
1999-09-02 06:01:53 +00:00
754 changed files with 207538 additions and 91088 deletions

View File

@@ -1,206 +0,0 @@
\section{\class{wxAcceleratorEntry}}\label{wxacceleratorentry}
An object used by an application wishing to create an \helpref{accelerator table}{wxacceleratortable}.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/accel.h>
\wxheading{See also}
\helpref{wxAcceleratorTable}{wxacceleratortable}, \helpref{wxWindow::SetAcceleratorTable}{wxwindowsetacceleratortable}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAcceleratorEntry::wxAcceleratorEntry}\label{wxacceleratorentryconstr}
\func{}{wxAcceleratorEntry}{\void}
Default constructor.
\func{}{wxAcceleratorEntry}{\param{int}{ flags}, \param{int}{ keyCode}, \param{int}{ cmd}}
Constructor.
\wxheading{Parameters}
\docparam{flags}{One of wxACCEL\_ALT, wxACCEL\_SHIFT, wxACCEL\_CTRL and wxACCEL\_NORMAL. Indicates
which modifier key is held down.}
\docparam{keyCode}{The keycode to be detected. See \helpref{Keycodes}{keycodes} for a full list of keycodes.}
\docparam{cmd}{The menu or control command identifier.}
\membersection{wxAcceleratorEntry::GetCommand}\label{wxacceleratorentrygetcommand}
\constfunc{int}{GetCommand}{\void}
Returns the command identifier for the accelerator table entry.
\membersection{wxAcceleratorEntry::GetFlags}\label{wxacceleratorentrygetflags}
\constfunc{int}{GetFlags}{\void}
Returns the flags for the accelerator table entry.
\membersection{wxAcceleratorEntry::GetKeyCode}\label{wxacceleratorentrygetkeycode}
\constfunc{int}{GetKeyCode}{\void}
Returns the keycode for the accelerator table entry.
\membersection{wxAcceleratorEntry::Set}\label{wxacceleratorentryset}
\func{void}{Set}{\param{int}{ flags}, \param{int}{ keyCode}, \param{int}{ cmd}}
Sets the accelerator entry parameters.
\wxheading{Parameters}
\docparam{flags}{One of wxACCEL\_ALT, wxACCEL\_SHIFT, wxACCEL\_CTRL and wxACCEL\_NORMAL. Indicates
which modifier key is held down.}
\docparam{keyCode}{The keycode to be detected. See \helpref{Keycodes}{keycodes} for a full list of keycodes.}
\docparam{cmd}{The menu or control command identifier.}
\section{\class{wxAcceleratorTable}}\label{wxacceleratortable}
An accelerator table allows the application to specify a table of keyboard shortcuts for
menus or other commands. On Windows, menu or button commands are supported; on GTK,
only menu commands are supported.
The object {\bf wxNullAcceleratorTable} is defined to be a table with no data, and is the
initial accelerator table for a window.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/accel.h>
\wxheading{Example}
{\small%
\begin{verbatim}
wxAcceleratorEntry entries[4];
entries[0].Set(wxACCEL_CTRL, (int) 'N', ID_NEW_WINDOW);
entries[1].Set(wxACCEL_CTRL, (int) 'X', wxID_EXIT);
entries[2].Set(wxACCEL_SHIFT, (int) 'A', ID_ABOUT);
entries[3].Set(wxACCEL_NORMAL, WXK_DELETE, wxID_CUT);
wxAcceleratorTable accel(4, entries);
frame->SetAcceleratorTable(accel);
\end{verbatim}
}
\wxheading{Remarks}
An accelerator takes precedence over normal processing and can be a convenient way to program some event handling.
For example, you can use an accelerator table to enable a dialog with a multi-line text control to
accept CTRL-Enter as meaning `OK' (but not in GTK at present).
\wxheading{See also}
\helpref{wxAcceleratorEntry}{wxacceleratorentry}, \helpref{wxWindow::SetAcceleratorTable}{wxwindowsetacceleratortable}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAcceleratorTable::wxAcceleratorTable}\label{wxacceleratortableconstr}
\func{}{wxAcceleratorTable}{\void}
Default constructor.
\func{}{wxAcceleratorTable}{\param{const wxAcceleratorTable\& }{bitmap}}
Copy constructor.
\func{}{wxAcceleratorTable}{\param{int}{ n}, \param{wxAcceleratorEntry}{ entries[]}}
Creates from an array of \helpref{wxAcceleratorEntry}{wxacceleratorentry} objects.
\func{}{wxAcceleratorTable}{\param{const wxString\&}{ resource}}
Loads the accelerator table from a Windows resource (Windows only).
\wxheading{Parameters}
\docparam{n}{Number of accelerator entries.}
\docparam{entries}{The array of entries.}
\docparam{resource}{Name of a Windows accelerator.}
\pythonnote{The wxPython constructor accepts a list of
wxAcceleratorEntry objects, or 3-tuples consisting of flags, keyCode,
and cmd values like you would construct wxAcceleratorEntry objects with.}
\perlnote{The wxPerl constructor accepts a list of either
Wx::AcceleratorEntry objects or references to 3-element arrays
( flags, keyCode, cmd ), like the parameters of Wx::AcceleratorEntry::new.}
\membersection{wxAcceleratorTable::\destruct{wxAcceleratorTable}}
\func{}{\destruct{wxAcceleratorTable}}{\void}
Destroys the wxAcceleratorTable object.
\membersection{wxAcceleratorTable::Ok}\label{wxacceleratortableok}
\constfunc{bool}{Ok}{\void}
Returns TRUE if the accelerator table is valid.
\membersection{wxAcceleratorTable::operator $=$}
\func{wxAcceleratorTable\& }{operator $=$}{\param{const wxAcceleratorTable\& }{accel}}
Assignment operator. This operator does not copy any data, but instead
passes a pointer to the data in {\it accel} and increments a reference
counter. It is a fast operation.
\wxheading{Parameters}
\docparam{accel}{Accelerator table to assign.}
\wxheading{Return value}
Returns reference to this object.
\membersection{wxAcceleratorTable::operator $==$}
\func{bool}{operator $==$}{\param{const wxAcceleratorTable\& }{accel}}
Equality operator. This operator tests whether the internal data pointers are
equal (a fast test).
\wxheading{Parameters}
\docparam{accel}{Accelerator table to compare with}
\wxheading{Return value}
Returns TRUE if the accelerator tables were effectively equal, FALSE otherwise.
\membersection{wxAcceleratorTable::operator $!=$}
\func{bool}{operator $!=$}{\param{const wxAcceleratorTable\& }{accel}}
Inequality operator. This operator tests whether the internal data pointers are
unequal (a fast test).
\wxheading{Parameters}
\docparam{accel}{Accelerator table to compare with}
\wxheading{Return value}
Returns TRUE if the accelerator tables were unequal, FALSE otherwise.

View File

@@ -1,61 +0,0 @@
\section{\class{wxActivateEvent}}\label{wxactivateevent}
An activate event is sent when a window or application is being activated
or deactivated.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Event table macros}
To process an activate event, use these event handler macros to direct input to a member
function that takes a wxActivateEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_ACTIVATE(func)}}{Process a wxEVT\_ACTIVATE event.}
\twocolitem{{\bf EVT\_ACTIVATE\_APP(func)}}{Process a wxEVT\_ACTIVATE\_APP event.}
\end{twocollist}%
\wxheading{Remarks}
A top-level window (a dialog or frame) receives an activate event when is
being activated or deactivated. This is indicated visually by the title
bar changing colour, and a subwindow gaining the keyboard focus.
An application is activated or deactivated when one of its frames becomes activated,
or a frame becomes inactivate resulting in all application frames being inactive. (Windows only)
\wxheading{See also}
%\helpref{wxWindow::OnActivate}{wxwindowonactivate},\rtfsp
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnActivate}{wxapponactivate},\rtfsp
\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxActivateEvent::wxActivateEvent}
\func{}{wxActivateEvent}{\param{WXTYPE }{eventType = 0}, \param{bool}{ active = TRUE}, \param{int }{id = 0}}
Constructor.
\membersection{wxActivateEvent::m\_active}
\member{bool}{m\_active}
TRUE if the window or application was activated.
\membersection{wxActivateEvent::GetActive}\label{wxactivateeventgetactive}
\constfunc{bool}{GetActive}{\void}
Returns TRUE if the application or window is being activated, FALSE otherwise.

View File

@@ -1,636 +0,0 @@
\section{\class{wxApp}}\label{wxapp}
The {\bf wxApp} class represents the application itself. It is used
to:
\begin{itemize}\itemsep=0pt
\item set and get application-wide properties;
\item implement the windowing system message or event loop;
\item initiate application processing via \helpref{wxApp::OnInit}{wxapponinit};
\item allow default processing of events not handled by other
objects in the application.
\end{itemize}
You should use the macro IMPLEMENT\_APP(appClass) in your application implementation
file to tell wxWindows 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.
\wxheading{Derived from}
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/app.h>
\wxheading{See also}
\helpref{wxApp overview}{wxappoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxApp::wxApp}
\func{void}{wxApp}{\void}
Constructor. Called implicitly with a definition of a wxApp object.
\membersection{wxApp::\destruct{wxApp}}
\func{void}{\destruct{wxApp}}{\void}
Destructor. Will be called implicitly on program exit if the wxApp
object is created on the stack.
\membersection{wxApp::argc}\label{wxappargc}
\member{int}{argc}
Number of command line arguments (after environment-specific processing).
\membersection{wxApp::argv}\label{wxappargv}
\member{char **}{argv}
Command line arguments (after environment-specific processing).
\membersection{wxApp::CreateLogTarget}\label{wxappcreatelogtarget}
\func{virtual wxLog*}{CreateLogTarget}{\void}
Creates a wxLog class for the application to use for logging errors. The default
implementation returns a new wxLogGui class.
\wxheading{See also}
\helpref{wxLog}{wxlog}
\membersection{wxApp::Dispatch}\label{wxappdispatch}
\func{void}{Dispatch}{\void}
Dispatches the next event in the windowing system event queue.
This can be used for programming event loops, e.g.
\begin{verbatim}
while (app.Pending())
Dispatch();
\end{verbatim}
\wxheading{See also}
\helpref{wxApp::Pending}{wxapppending}
\membersection{wxApp::FilterEvent}\label{wxappfilterevent}
\func{int}{FilterEvent}{\param{wxEvent\& }{event}}
This function is called before processing any event and allows the application
to preempt the processing of some events. If this method returns $-1$ the event
is processed normally, otherwise either {\tt TRUE} or {\tt FALSE} should be
returned and the event processing stops immediately considering that the event
had been already processed (for the former return value) or that it is not
going to be processed at all (for the latter one).
\membersection{wxApp::GetAppName}\label{wxappgetappname}
\constfunc{wxString}{GetAppName}{\void}
Returns the application name.
\wxheading{Remarks}
wxWindows sets this to a reasonable default before
calling \helpref{wxApp::OnInit}{wxapponinit}, but the application can reset it at will.
\membersection{wxApp::GetAuto3D}\label{wxappgetauto3d}
\constfunc{bool}{GetAuto3D}{\void}
Returns TRUE if 3D control mode is on, FALSE otherwise.
\wxheading{See also}
\helpref{wxApp::SetAuto3D}{wxappsetauto3d}
\membersection{wxApp::GetClassName}\label{wxappgetclassname}
\constfunc{wxString}{GetClassName}{\void}
Gets the class name of the application. The class name may be used in a platform specific
manner to refer to the application.
\wxheading{See also}
\helpref{wxApp::SetClassName}{wxappsetclassname}
\membersection{wxApp::GetExitOnFrameDelete}\label{wxappgetexitonframedelete}
\constfunc{bool}{GetExitFrameOnDelete}{\void}
Returns TRUE if the application will exit when the top-level window is deleted, FALSE
otherwise.
\wxheading{See also}
\helpref{wxApp::SetExitOnFrameDelete}{wxappsetexitonframedelete},\\
\helpref{wxApp shutdown overview}{wxappshutdownoverview}
\membersection{wxApp::GetTopWindow}\label{wxappgettopwindow}
\constfunc{virtual wxWindow *}{GetTopWindow}{\void}
Returns a pointer to the top window.
\wxheading{Remarks}
If the top window hasn't been set using \helpref{wxApp::SetTopWindow}{wxappsettopwindow}, this
function will find the first top-level window (frame or dialog) and return that.
\wxheading{See also}
\helpref{SetTopWindow}{wxappsettopwindow}
\membersection{wxApp::GetUseBestVisual}\label{wxappgetusebestvisual}
\constfunc{bool}{GetUseBestVisual}{\void}
Returns TRUE if the application will use the best visual on systems that support
different visuals, FALSE otherwise.
\wxheading{See also}
\helpref{SetUseBestVisual}{wxappsetusebestvisual}
\membersection{wxApp::GetVendorName}\label{wxappgetvendorname}
\constfunc{wxString}{GetVendorName}{\void}
Returns the application's vendor name.
\membersection{wxApp::ExitMainLoop}\label{wxappexitmainloop}
\func{void}{ExitMainLoop}{\void}
Call this to explicitly exit the main message (event) loop.
You should normally exit the main loop (and the application) by deleting
the top window.
\membersection{wxApp::Initialized}\label{wxappinitialized}
\func{bool}{Initialized}{\void}
Returns TRUE if the application has been initialized (i.e. if\rtfsp
\helpref{wxApp::OnInit}{wxapponinit} has returned successfully). This can be useful for error
message routines to determine which method of output is best for the
current state of the program (some windowing systems may not like
dialogs to pop up before the main loop has been entered).
\membersection{wxApp::MainLoop}\label{wxappmainloop}
\func{int}{MainLoop}{\void}
Called by wxWindows on creation of the application. Override this if you wish
to provide your own (environment-dependent) main loop.
\wxheading{Return value}
Returns 0 under X, and the wParam of the WM\_QUIT message under Windows.
%% VZ: OnXXX() functions should *not* be documented
%%
%%\membersection{wxApp::OnActivate}\label{wxapponactivate}
%%
%%\func{void}{OnActivate}{\param{wxActivateEvent\& }{event}}
%%
%%Provide this member function to know whether the application is being
%%activated or deactivated (Windows only).
%%
%%\wxheading{See also}
%%
%%\helpref{wxWindow::OnActivate}{wxwindowonactivate}, \helpref{wxActivateEvent}{wxactivateevent}
%%
%%\membersection{wxApp::OnCharHook}\label{wxapponcharhook}
%%
%%\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}}
%%
%%This event handler function is called (under Windows only) to allow the window to intercept keyboard events
%%before they are processed by child windows.
%%
%%\wxheading{Parameters}
%%
%%\docparam{event}{The keypress event.}
%%
%%\wxheading{Remarks}
%%
%%Use the wxEVT\_CHAR\_HOOK macro in your event table.
%%
%%If you use this member, you can selectively consume keypress events by calling\rtfsp
%%\helpref{wxEvent::Skip}{wxeventskip} for characters the application is not interested in.
%%
%%\wxheading{See also}
%%
%%\helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnChar}{wxwindowonchar},\rtfsp
%%\helpref{wxWindow::OnCharHook}{wxwindowoncharhook}, \helpref{wxDialog::OnCharHook}{wxdialogoncharhook}
\membersection{wxApp::OnAssert}\label{wxapponassert}
\func{void}{OnAssert}{\param{const wxChar }{*file}, \param{int }{line}, \param{const wxChar }{*cond}, \param{const wxChar }{*msg}}
This function is called when an assert failure occurs, i.e. the condition
specified in \helpref{wxASSERT}{wxassert} macro evaluated to {\tt FALSE}.
It is only called in debug mode (when {\tt \_\_WXDEBUG\_\_} is defined) as
asserts are not left in the release code at all.
The base class version show the default assert failure dialog box proposing to
the user to stop the program, continue or ignore all subsequent asserts.
\wxheading{Parameters}
\docparam{file}{the name of the source file where the assert occured}
\docparam{line}{the line number in this file where the assert occured}
\docparam{cond}{the condition of the failed assert in string form}
\docparam{msg}{the message specified as argument to
\helpref{wxASSERT\_MSG}{wxassertmsg} or \helpref{wxFAIL\_MSG}{wxfailmsg}, will
be {\tt NULL} if just \helpref{wxASSERT}{wxassert} or \helpref{wxFAIL}{wxfail}
was used}
\membersection{wxApp::OnExit}\label{wxapponexit}
\func{int}{OnExit}{\void}
Provide 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
wxWindows cleanup.
\membersection{wxApp::OnCmdLineError}\label{wxapponcmdlineerror}
\func{bool}{OnCmdLineError}{\param{wxCmdLineParser\& }{parser}}
Called when command line parsing fails (i.e. an incorrect command line option
was specified by the user). The default behaviour is to show the program usage
text and abort the program.
Return {\tt TRUE} to continue normal execution or {\tt FALSE} to return
{\tt FALSE} from \helpref{OnInit}{wxapponinit} thus terminating the program.
\wxheading{See also}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
\membersection{wxApp::OnCmdLineHelp}\label{wxapponcmdlinehelp}
\func{bool}{OnCmdLineHelp}{\param{wxCmdLineParser\& }{parser}}
Called when the help option ({\tt --help}) was specified on the command line.
The default behaviour is to show the program usage text and abort the program.
Return {\tt TRUE} to continue normal execution or {\tt FALSE} to return
{\tt FALSE} from \helpref{OnInit}{wxapponinit} thus terminating the program.
\wxheading{See also}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
\membersection{wxApp::OnCmdLineParsed}\label{wxapponcmdlineparsed}
\func{bool}{OnCmdLineParsed}{\param{wxCmdLineParser\& }{parser}}
Called after the command line had been successfully parsed. You may override
this method to test for the values of the various parameters which could be
set from the command line.
Don't forget to call the base class version unless you want to suppress
processing of the standard command line options.
Return {\tt TRUE} to continue normal execution or {\tt FALSE} to return
{\tt FALSE} from \helpref{OnInit}{wxapponinit} thus terminating the program.
\wxheading{See also}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
\membersection{wxApp::OnFatalException}\label{wxapponfatalexception}
\func{void}{OnFatalException}{\void}
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
\helpref{wxHandleFatalExceptions}{wxhandlefatalexceptions} to enable this.
Generally speaking, this function should only show a message to the user and
return. You may attempt to save unsaved data but this is not guaranteed to
work and, in fact, probably won't.
\wxheading{See also}
\helpref{wxHandleFatalExcetions}{wxhandlefatalexceptions}
%% VZ: the wxApp event handler are private and should not be documented here!
%%
%%\membersection{wxApp::OnIdle}\label{wxapponidle}
%%
%%\func{void}{OnIdle}{\param{wxIdleEvent\& }{event}}
%%
%%Override this member function for any processing which needs to be done
%%when the application is idle. You should call wxApp::OnIdle from your own function,
%%since this forwards OnIdle events to windows and also performs garbage collection for
%%windows whose destruction has been delayed.
%%
%%wxWindows' strategy for OnIdle processing is as follows. After pending user interface events for an
%%application have all been processed, wxWindows sends an OnIdle event to the application object. wxApp::OnIdle itself
%%sends an OnIdle event to each application window, allowing windows to do idle processing such as updating
%%their appearance. If either wxApp::OnIdle or a window OnIdle function requested more time, by
%%calling \helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}, wxWindows will send another OnIdle
%%event to the application object. This will occur in a loop until either a user event is found to be
%%pending, or OnIdle requests no more time. Then all pending user events are processed until the system
%%goes idle again, when OnIdle is called, and so on.
%%
%%\wxheading{See also}
%%
%%\helpref{wxWindow::OnIdle}{wxwindowonidle}, \helpref{wxIdleEvent}{wxidleevent},\rtfsp
%%\helpref{wxWindow::SendIdleEvents}{wxappsendidleevents}
%%
%%\membersection{wxApp::OnEndSession}\label{wxapponendsession}
%%
%%\func{void}{OnEndSession}{\param{wxCloseEvent\& }{event}}
%%
%%This is an event handler function called when the operating system or GUI session is
%%about to close down. The application has a chance to silently save information,
%%and can optionally close itself.
%%
%%Use the EVT\_END\_SESSION event table macro to handle query end session events.
%%
%%The default handler calls \helpref{wxWindow::Close}{wxwindowclose} with a TRUE argument
%%(forcing the application to close itself silently).
%%
%%\wxheading{Remarks}
%%
%%Under X, OnEndSession is called in response to the `die' event.
%%
%%Under Windows, OnEndSession is called in response to the WM\_ENDSESSION message.
%%
%%\wxheading{See also}
%%
%%\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
%%\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
%%\helpref{wxCloseEvent}{wxcloseevent},\rtfsp
%%\helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession}
\membersection{wxApp::OnInit}\label{wxapponinit}
\func{bool}{OnInit}{\void}
This must be provided by the application, and will usually create the
application's main window, optionally calling
\helpref{wxApp::SetTopWindow}{wxappsettopwindow}.
Notice that if you want to to use the command line processing provided by
wxWindows you have to call the base class version in the derived class
OnInit().
Return TRUE to continue processing, FALSE to exit the application.
\membersection{wxApp::OnInitCmdLine}\label{wxapponinitcmdline}
\func{void}{OnInitCmdLine}{\param{wxCmdLineParser\& }{parser}}
Called from \helpref{OnInit}{wxapponinit} and may be used to initialize the
parser with the command line options for this application. The base class
versions adds support for a few standard options only.
\membersection{wxApp::OnQueryEndSession}\label{wxapponqueryendsession}
\func{void}{OnQueryEndSession}{\param{wxCloseEvent\& }{event}}
This is an event handler function called when the operating system or GUI session is
about to close down. Typically, an application will try to save unsaved documents
at this point.
If \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns TRUE, the application
is allowed to veto the shutdown by calling \helpref{wxCloseEvent::Veto}{wxcloseeventveto}.
The application might veto the shutdown after prompting for documents to be saved, and the
user has cancelled the save.
Use the EVT\_QUERY\_END\_SESSION event table macro to handle query end session events.
You should check whether the application is forcing the deletion of the window
using \helpref{wxCloseEvent::GetForce}{wxcloseeventgetforce}. If this is TRUE,
destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
If not, it is up to you whether you respond by destroying the window.
The default handler calls \helpref{wxWindow::Close}{wxwindowclose} on the top-level window,
and vetoes the shutdown if Close returns FALSE. This will be sufficient for many applications.
\wxheading{Remarks}
Under X, OnQueryEndSession is called in response to the `save session' event.
Under Windows, OnQueryEndSession is called in response to the WM\_QUERYENDSESSION message.
\wxheading{See also}
\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
\helpref{wxCloseEvent}{wxcloseevent}
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnEndSession}{wxapponendsession}
\membersection{wxApp::ProcessMessage}\label{wxappprocessmessage}
\func{bool}{ProcessMessage}{\param{WXMSG *}{msg}}
Windows-only function for processing a message. This function
is called from the main message loop, checking for windows that
may wish to process it. The function returns TRUE if the message
was processed, FALSE otherwise. If you use wxWindows with another class
library with its own message loop, you should make sure that this
function is called to allow wxWindows to receive messages. For example,
to allow co-existence with the Microsoft Foundation Classes, override
the PreTranslateMessage function:
\begin{verbatim}
// Provide wxWindows message loop compatibility
BOOL CTheApp::PreTranslateMessage(MSG *msg)
{
if (wxTheApp && wxTheApp->ProcessMessage((WXMSW *)msg))
return TRUE;
else
return CWinApp::PreTranslateMessage(msg);
}
\end{verbatim}
\membersection{wxApp::Pending}\label{wxapppending}
\func{bool}{Pending}{\void}
Returns TRUE if unprocessed events are in the window system event queue.
\wxheading{See also}
\helpref{wxApp::Dispatch}{wxappdispatch}
\membersection{wxApp::SendIdleEvents}\label{wxappsendidleevents}
\func{bool}{SendIdleEvents}{\void}
Sends idle events to all top-level windows.
\func{bool}{SendIdleEvents}{\param{wxWindow*}{ win}}
Sends idle events to a window and its children.
\wxheading{Remarks}
These functions poll the top-level windows, and their children, for idle event processing.
If TRUE is returned, more OnIdle processing is requested by one or more window.
\wxheading{See also}
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnIdle}{wxapponidle}
\helpref{wxIdleEvent}{wxidleevent}
\membersection{wxApp::SetAppName}\label{wxappsetappname}
\func{void}{SetAppName}{\param{const wxString\& }{name}}
Sets the name of the application. The name may be used in dialogs
(for example by the document/view framework). A default name is set by
wxWindows.
\wxheading{See also}
\helpref{wxApp::GetAppName}{wxappgetappname}
\membersection{wxApp::SetAuto3D}\label{wxappsetauto3d}
\func{void}{SetAuto3D}{\param{const bool}{ auto3D}}
Switches automatic 3D controls on or off.
\wxheading{Parameters}
\docparam{auto3D}{If TRUE, all controls will be created with 3D appearances unless
overridden for a control or dialog. The default is TRUE}
\wxheading{Remarks}
This has an effect on Windows only.
\wxheading{See also}
\helpref{wxApp::GetAuto3D}{wxappgetauto3d}
\membersection{wxApp::SetClassName}\label{wxappsetclassname}
\func{void}{SetClassName}{\param{const wxString\& }{name}}
Sets the class name of the application. This may be used in a platform specific
manner to refer to the application.
\wxheading{See also}
\helpref{wxApp::GetClassName}{wxappgetclassname}
\membersection{wxApp::SetExitOnFrameDelete}\label{wxappsetexitonframedelete}
\func{void}{SetExitOnFrameDelete}{\param{bool}{ flag}}
Allows the programmer to specify whether the application will exit when the
top-level frame is deleted.
\wxheading{Parameters}
\docparam{flag}{If TRUE (the default), the application will exit when the top-level frame is
deleted. If FALSE, the application will continue to run.}
\wxheading{See also}
\helpref{wxApp::GetExitOnFrameDelete}{wxappgetexitonframedelete},\\
\helpref{wxApp shutdown overview}{wxappshutdownoverview}
\membersection{wxApp::SetTopWindow}\label{wxappsettopwindow}
\func{void}{SetTopWindow}{\param{wxWindow* }{window}}
Sets the `top' window. You can call this from within \helpref{wxApp::OnInit}{wxapponinit} to
let wxWindows know which is the main window. You don't have to set the top window;
it is only a convenience so that (for example) certain dialogs without parents can use a
specific window as the top window. If no top window is specified by the application,
wxWindows just uses the first frame or dialog in its top-level window list, when it
needs to use the top window.
\wxheading{Parameters}
\docparam{window}{The new top window.}
\wxheading{See also}
\helpref{wxApp::GetTopWindow}{wxappgettopwindow}, \helpref{wxApp::OnInit}{wxapponinit}
\membersection{wxApp::SetVendorName}\label{wxappsetvendorname}
\func{void}{SetVendorName}{\param{const wxString\& }{name}}
Sets the name of application's vendor. The name will be used
in registry access. A default name is set by
wxWindows.
\wxheading{See also}
\helpref{wxApp::GetVendorName}{wxappgetvendorname}
\membersection{wxApp::SetUseBestVisual}\label{wxappsetusebestvisual}
\func{void}{SetUseBestVisual}{\param{bool}{ flag}}
Allows the programmer to specify whether the application will use the best visual
on systems that support several visual on the same display. This is typically the
case under Solaris and IRIX, where the default visual is only 8-bit whereas certain
applications are supposed to run in TrueColour mode.
Note that this function has to be called in the constructor of the {\tt wxApp}
instance and won't have any effect when called later on.
This function currently only has effect under GTK.
\wxheading{Parameters}
\docparam{flag}{If TRUE, the app will use the best visual.}
\membersection{wxApp::Yield}\label{wxappyield}
\func{bool}{Yield}{\param{bool}{ onlyIfNeeded = FALSE}}
Yields control to pending messages in the windowing system. This can be useful, for example, when a
time-consuming process writes to a text window. Without an occasional
yield, the text window will not be updated properly, and on systems with
cooperative multitasking, such as Windows 3.1 other processes will not respond.
Caution should be exercised, however, since yielding may allow the
user to perform actions which are not compatible with the current task.
Disabling menu items or whole menus during processing can avoid unwanted
reentrance of code: see \helpref{::wxSafeYield}{wxsafeyield} for a better
function.
Note that Yield() will not flush the message logs. This is intentional as
calling Yield() is usually done to quickly update the screen and popping up a
message box dialog may be undesirable. If you do wish to flush the log
messages immediately (otherwise it will be done during the next idle loop
iteration), call \helpref{wxLog::FlushActive}{wxlogflushactive}.
Calling Yield() recursively is normally an error and an assert failure is
raised in debug build if such situation is detected. However if the the
{\it onlyIfNeeded} parameter is {\tt TRUE}, the method will just silently
return {\tt FALSE} instead.

View File

@@ -1,620 +0,0 @@
\section{\class{wxArray}}\label{wxarray}
This section describes the so called {\it dynamic arrays}. This is a C
array-like data structure i.e. the member access time is constant (and not
linear according to the number of container elements as for linked lists). However, these
arrays are dynamic in the sense that they will automatically allocate more
memory if there is not enough of it for adding a new element. They also perform
range checking on the index values but in debug mode only, so please be sure to
compile your application in debug mode to use it (see \helpref{debugging overview}{debuggingoverview} for
details). So, unlike the arrays in some other
languages, attempt to access an element beyond the arrays bound doesn't
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 elements)
making them much more efficient than linked lists (\helpref{wxList}{wxlist}).
Adding items to the arrays is also implemented in more or less constant time -
but the price is preallocating the memory in advance. In the \helpref{memory management}{wxarraymemorymanagement} section
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 {\it any space at all}.
wxWindows 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
WX\_DEFINE\_OBJARRAY() are used to define a new class deriving from it. The
classes declared will be called in this documentation wxArray, wxSortedArray and
wxObjArray but you should keep in mind that no classes with such names actually
exist, each time you use one of WX\_DEFINE\_XXXARRAY macro you define a class
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
all of wxArray's functions are inline, so it costs strictly nothing to define as
many array types as you want (either in terms of the executable size or the
speed) as long as at least one of them is defined and this is always the case
because wxArrays are used by wxWindows internally. This class has one serious
limitation: it can only be used for storing integral types (bool, char, short,
int, long and their unsigned variants) or pointers (of any kind). An attempt
to use with objects of sizeof() greater than sizeof(long) will provoke a
runtime assertion failure, however declaring a wxArray of floats will not (on
the machines where sizeof(float) <= sizeof(long)), yet it will {\bf not} work,
please use wxObjArray for storing floats and doubles (NB: a more efficient
wxArrayDouble class is scheduled for the next release of wxWindows).
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
its items in the sorted order (according to this function). Thus, it is
\helpref{Index()}{wxarrayindex} function execution time is $O(log(N))$ instead of
$O(N)$ for the usual arrays but the \helpref{Add()}{wxarrayadd} method is
slower: it is $O(log(N))$ instead of constant time (neglecting time spent in
memory allocation routine). However, in a usual situation elements are added to
an array much less often than searched inside it, so wxSortedArray may lead to
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
the definition of the wxObjArray arrays is split in two parts: first, you should
declare the new wxObjArray class using WX\_DECLARE\_OBJARRAY() macro and then
you must include the file defining the implementation of template type:
<wx/arrimpl.cpp> and define the array class with WX\_DEFINE\_OBJARRAY() macro
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:
\begin{verbatim}
#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!
\end{verbatim}
It is not as elegant as writing
\begin{verbatim}
typedef std::vector<MyDirectory> ArrayOfDirectories;
\end{verbatim}
but is not that complicated and allows the code to be compiled with any, however
dumb, C++ compiler in the world.
Things are much simpler for wxArray and wxSortedArray however: it is enough
just to write
\begin{verbatim}
WX_DEFINE_ARRAY(MyDirectory *, ArrayOfDirectories);
WX_DEFINE_SORTED_ARRAY(MyFile *, ArrayOfFiles);
\end{verbatim}
\wxheading{See also:}
\helpref{Container classes overview}{wxcontaineroverview}, \helpref{wxList}{wxlist}
\wxheading{Include files}
<wx/dynarray.h> for wxArray and wxSortedArray and additionally <wx/arrimpl.cpp>
for wxObjArray.
\latexignore{\rtfignore{\wxheading{Function groups}}}
\membersection{Macros for template array definition}
To use an array you must first define the array class. This is done with the
help of the macros in this section. The class of array elements must be (at
least) forward declared for WX\_DEFINE\_ARRAY, WX\_DEFINE\_SORTED\_ARRAY and
WX\_DECLARE\_OBJARRAY macros and must be fully declared before you use
WX\_DEFINE\_OBJARRAY macro.
\helpref{WX\_DEFINE\_ARRAY}{wxdefinearray}\\
\helpref{WX\_DEFINE\_EXPORTED\_ARRAY}{wxdefinearray}\\
\helpref{WX\_DEFINE\_USER\_EXPORTED\_ARRAY}{wxdefinearray}\\
\helpref{WX\_DEFINE\_SORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DEFINE\_SORTED\_EXPORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DEFINE\_SORTED\_USER\_EXPORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DECLARE\_EXPORTED\_OBJARRAY}{wxdeclareobjarray}\\
\helpref{WX\_DECLARE\_USER\_EXPORTED\_OBJARRAY}{wxdeclareobjarray}\\
\helpref{WX\_DEFINE\_OBJARRAY}{wxdefineobjarray}\\
\helpref{WX\_DEFINE\_EXPORTED\_OBJARRAY}{wxdefineobjarray}\\
\helpref{WX\_DEFINE\_USER\_EXPORTED\_OBJARRAY}{wxdefineobjarray}
\membersection{Constructors and destructors}
Array classes are 100\% C++ objects and as such they have the appropriate copy
constructors and assignment operators. Copying wxArray just copies the elements
but copying wxObjArray copies the arrays items. However, for memory-efficiency
sake, neither of these classes has virtual destructor. It is not very important
for wxArray which has trivial destructor anyhow, but it does mean that you
should avoid deleting wxObjArray through a wxBaseArray pointer (as you would
never use wxBaseArray anyhow it shouldn't be a problem) and that you should not
derive your own classes from the array classes.
\helpref{wxArray default constructor}{wxarrayctordef}\\
\helpref{wxArray copy constructors and assignment operators}{wxarrayctorcopy}\\
\helpref{\destruct{wxArray}}{wxarraydtor}
\membersection{Memory management}\label{wxarraymemorymanagement}
Automatic array memory management is quite trivial: the array starts by
preallocating some minimal amount of memory (defined by
WX\_ARRAY\_DEFAULT\_INITIAL\_SIZE) and when further new items exhaust already
allocated memory it reallocates it adding 50\% of the currently allocated
amount, but no more than some maximal number which is defined by
ARRAY\_MAXSIZE\_INCREMENT constant. Of course, this may lead to some memory
being wasted (ARRAY\_MAXSIZE\_INCREMENT in the worst case, i.e. 4Kb in the
current implementation), so the \helpref{Shrink()}{wxarrayshrink} function is
provided to deallocate the extra memory. The \helpref{Alloc()}{wxarrayalloc}
function can also be quite useful if you know in advance how many items you are
going to put in the array and will prevent the array code from reallocating the
memory more times than needed.
\helpref{Alloc}{wxarrayalloc}\\
\helpref{Shrink}{wxarrayshrink}
\membersection{Number of elements and simple item access}
Functions in this section return the total number of array elements and allow to
retrieve them - possibly using just the C array indexing $[]$ operator which
does exactly the same as \helpref{Item()}{wxarrayitem} method.
\helpref{Count}{wxarraycount}\\
\helpref{GetCount}{wxarraygetcount}\\
\helpref{IsEmpty}{wxarrayisempty}\\
\helpref{Item}{wxarrayitem}\\
\helpref{Last}{wxarraylast}
\membersection{Adding items}
\helpref{Add}{wxarrayadd}\\
\helpref{Insert}{wxarrayinsert}\\
\helpref{WX\_APPEND\_ARRAY}{wxappendarray}
\membersection{Removing items}
\helpref{WX\_CLEAR\_ARRAY}{wxcleararray}\\
\helpref{Empty}{wxarrayempty}\\
\helpref{Clear}{wxarrayclear}\\
\helpref{RemoveAt}{wxarrayremoveat}\\
\helpref{Remove}{wxarrayremove}
\membersection{Searching and sorting}
\helpref{Index}{wxarrayindex}\\
\helpref{Sort}{wxarraysort}
%%%%% MEMBERS HERE %%%%%
\helponly{\insertatlevel{2}{
\wxheading{Members}
}}
\membersection{WX\_DEFINE\_ARRAY}\label{wxdefinearray}
\func{}{WX\_DEFINE\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_USER\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}, \param{}{exportspec}}
This macro defines a new array class named {\it name} and containing the
elements of type {\it T}. The second form is used when compiling wxWindows as
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
\begin{verbatim}
WX_DEFINE_ARRAY(int, wxArrayInt);
class MyClass;
WX_DEFINE_ARRAY(MyClass *, wxArrayOfMyClass);
\end{verbatim}
Note that wxWindows predefines the following standard array classes: wxArrayInt,
wxArrayLong and wxArrayPtrVoid.
\membersection{WX\_DEFINE\_SORTED\_ARRAY}\label{wxdefinesortedarray}
\func{}{WX\_DEFINE\_SORTED\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_SORTED\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_SORTED\_USER\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}}
This macro defines a new sorted array class named {\it name} and containing
the elements of type {\it T}. The second form is used when compiling wxWindows as
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
\begin{verbatim}
WX_DEFINE_SORTED_ARRAY(int, wxSortedArrayInt);
class MyClass;
WX_DEFINE_SORTED_ARRAY(MyClass *, wxArrayOfMyClass);
\end{verbatim}
You will have to initialize the objects of this class by passing a comparison
function to the array object constructor like this:
\begin{verbatim}
int CompareInts(int n1, int n2)
{
return n1 - n2;
}
wxSortedArrayInt sorted(CompareInts);
int CompareMyClassObjects(MyClass *item1, MyClass *item2)
{
// sort the items by their address...
return Stricmp(item1->GetAddress(), item2->GetAddress());
}
wxArrayOfMyClass another(CompareMyClassObjects);
\end{verbatim}
\membersection{WX\_DECLARE\_OBJARRAY}\label{wxdeclareobjarray}
\func{}{WX\_DECLARE\_OBJARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DECLARE\_EXPORTED\_OBJARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DECLARE\_USER\_EXPORTED\_OBJARRAY}{\param{}{T}, \param{}{name}}
This macro declares a new object array class named {\it name} and containing
the elements of type {\it T}. The second form is used when compiling wxWindows as
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
\begin{verbatim}
class MyClass;
WX_DEFINE_OBJARRAY(MyClass, wxArrayOfMyClass); // note: not "MyClass *"!
\end{verbatim}
You must use \helpref{WX\_DEFINE\_OBJARRAY()}{wxdefineobjarray} macro to define
the array class - otherwise you would get link errors.
\membersection{WX\_DEFINE\_OBJARRAY}\label{wxdefineobjarray}
\func{}{WX\_DEFINE\_OBJARRAY}{\param{}{name}}
\func{}{WX\_DEFINE\_EXPORTED\_OBJARRAY}{\param{}{name}}
\func{}{WX\_DEFINE\_USER\_EXPORTED\_OBJARRAY}{\param{}{name}}
This macro defines the methods of the array class {\it name} not defined by the
\helpref{WX\_DECLARE\_OBJARRAY()}{wxdeclareobjarray} macro. You must include the
file <wx/arrimpl.cpp> before using this macro and you must have the full
declaration of the class of array elements in scope! If you forget to do the
first, the error will be caught by the compiler, but, unfortunately, many
compilers will not give any warnings if you forget to do the second - but the
objects of the class will not be copied correctly and their real destructor will
not be called. The latter two forms are merely aliases of the first to satisfy
some people's sense of symmetry when using the exported declarations.
Example of usage:
\begin{verbatim}
// first declare the class!
class MyClass
{
public:
MyClass(const MyClass&);
...
virtual ~MyClass();
};
#include <wx/arrimpl.cpp>
WX_DEFINE_OBJARRAY(wxArrayOfMyClass);
\end{verbatim}
\membersection{WX\_APPEND\_ARRAY}\label{wxappendarray}
\func{void}{WX\_APPEND\_ARRAY}{\param{wxArray\& }{array}, \param{wxArray\& }{other}}
This macro may be used to append all elements of the {\it other} array to the
{\it array}. The two arrays must be of the same type.
\membersection{WX\_CLEAR\_ARRAY}\label{wxcleararray}
\func{void}{WX\_CLEAR\_ARRAY}{\param{wxArray\& }{array}}
This macro may be used to delete all elements of the array before emptying it.
It can not be used with wxObjArrays - but they will delete their elements anyhow
when you call Empty().
\membersection{Default constructors}\label{wxarrayctordef}
\func{}{wxArray}{\void}
\func{}{wxObjArray}{\void}
Default constructor initializes an empty array object.
\func{}{wxSortedArray}{\param{int (*)(T first, T second)}{compareFunction}}
There is no default constructor for wxSortedArray classes - you must initialize it
with a function to use for item comparison. It is a function which is passed
two arguments of type {\it T} where {\it T} is the array element type and which
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.
\membersection{wxArray copy constructor and assignment operator}\label{wxarrayctorcopy}
\func{}{wxArray}{\param{const wxArray\& }{array}}
\func{}{wxSortedArray}{\param{const wxSortedArray\& }{array}}
\func{}{wxObjArray}{\param{const wxObjArray\& }{array}}
\func{wxArray\&}{operator$=$}{\param{const wxArray\& }{array}}
\func{wxSortedArray\&}{operator$=$}{\param{const wxSortedArray\& }{array}}
\func{wxObjArray\&}{operator$=$}{\param{const wxObjArray\& }{array}}
The copy constructors and assignment operators perform a shallow array copy
(i.e. they don't copy the objects pointed to even if the source array contains
the items of pointer type) for wxArray and wxSortedArray and a deep copy (i.e.
the array element are copied too) for wxObjArray.
\membersection{wxArray::\destruct{wxArray}}\label{wxarraydtor}
\func{}{\destruct{wxArray}}{\void}
\func{}{\destruct{wxSortedArray}}{\void}
\func{}{\destruct{wxObjArray}}{\void}
The wxObjArray destructor deletes all the items owned by the array. This is not
done by wxArray and wxSortedArray versions - you may use
\helpref{WX\_CLEAR\_ARRAY}{wxcleararray} macro for this.
\membersection{wxArray::Add}\label{wxarrayadd}
\func{void}{Add}{\param{T }{item}, \param{size\_t}{ copies = $1$}}
\func{void}{Add}{\param{T *}{item}}
\func{void}{Add}{\param{T \&}{item}, \param{size\_t}{ copies = $1$}}
Appends the given number of {\it copies} of the {\it item} to the array
consisting of the elements of type {\it T}.
The first version is used with wxArray and wxSortedArray. The second and the
third are used with wxObjArray. There is an important difference between
them: if you give a pointer to the array, it will take ownership of it, i.e.
will delete it when the item is deleted from the array. If you give a reference
to the array, however, the array will make a copy of the item and will not take
ownership of the original item. Once again, it only makes sense for wxObjArrays
because the other array types never take ownership of their elements. Also note
that you cannot append more than one pointer as reusing it would lead to
deleting it twice (or more) and hence to a crash.
You may also use \helpref{WX\_APPEND\_ARRAY}{wxappendarray} macro to append all
elements of one array to another one but it is more efficient to use
{\it copies} parameter and modify the elements in place later if you plan to
append a lot of items.
\membersection{wxArray::Alloc}\label{wxarrayalloc}
\func{void}{Alloc}{\param{size\_t }{count}}
Preallocates memory for a given number of array elements. It is worth calling
when the number of items which are going to be added to the array is known in
advance because it will save unneeded memory reallocation. If the array already
has enough memory for the given number of items, nothing happens.
\membersection{wxArray::Clear}\label{wxarrayclear}
\func{void}{Clear}{\void}
This function does the same as \helpref{Empty()}{wxarrayempty} and additionally
frees the memory allocated to the array.
\membersection{wxArray::Count}\label{wxarraycount}
\constfunc{size\_t}{Count}{\void}
Same as \helpref{GetCount()}{wxarraygetcount}. This function is deprecated -
it exists only for compatibility.
\membersection{wxObjArray::Detach}\label{wxobjarraydetach}
\func{T *}{Detach}{\param{size\_t }{index}}
Removes the element from the array, but, unlike,
\helpref{Remove()}{wxarrayremove} doesn't delete it. The function returns the
pointer to the removed element.
\membersection{wxArray::Empty}\label{wxarrayempty}
\func{void}{Empty}{\void}
Empties the array. For wxObjArray classes, this destroys all of the array
elements. For wxArray and wxSortedArray this does nothing except marking the
array of being empty - this function does not free the allocated memory, use
\helpref{Clear()}{wxarrayclear} for this.
\membersection{wxArray::GetCount}\label{wxarraygetcount}
\constfunc{size\_t}{GetCount}{\void}
Return the number of items in the array.
\membersection{wxArray::Index}\label{wxarrayindex}
\func{int}{Index}{\param{T\& }{item}, \param{bool }{searchFromEnd = FALSE}}
\func{int}{Index}{\param{T\& }{item}}
The first version of the function is for wxArray and wxObjArray, the second is
for wxSortedArray only.
Searches the element in the array, starting from either beginning or the end
depending on the value of {\it searchFromEnd} parameter. wxNOT\_FOUND is
returned if the element is not found, otherwise the index of the element is
returned.
Linear search is used for the wxArray and wxObjArray classes but binary search
in the sorted array is used for wxSortedArray (this is why searchFromEnd
parameter doesn't make sense for it).
{\bf NB:} even for wxObjArray classes, the operator==() of the elements in the
array is {\bf not} used by this function. It searches exactly the given
element in the array and so will only succeed if this element had been
previously added to the array, but fail even if another, identical, element is
in the array.
\membersection{wxArray::Insert}\label{wxarrayinsert}
\func{void}{Insert}{\param{T }{item}, \param{size\_t }{n}, \param{size\_t }{copies = $1$}}
\func{void}{Insert}{\param{T *}{item}, \param{size\_t }{n}}
\func{void}{Insert}{\param{T \&}{item}, \param{size\_t }{n}, \param{size\_t }{copies = $1$}}
Insert the given number of {\it copies} of the {\it item} into the array before
the existing item {\it n} - thus, {\it Insert(something, 0u)} will insert an
item in such way that it will become the first array element.
Please see \helpref{Add()}{wxarrayadd} for explanation of the differences
between the overloaded versions of this function.
\membersection{wxArray::IsEmpty}\label{wxarrayisempty}
\constfunc{bool}{IsEmpty}{\void}
Returns TRUE if the array is empty, FALSE otherwise.
\membersection{wxArray::Item}\label{wxarrayitem}
\constfunc{T\&}{Item}{\param{size\_t }{index}}
Returns the item at the given position in the array. If {\it index} is out of
bounds, an assert failure is raised in the debug builds but nothing special is
done in the release build.
The returned value is of type "reference to the array element type" for all of
the array classes.
\membersection{wxArray::Last}\label{wxarraylast}
\constfunc{T\&}{Last}{\void}
Returns the last element in the array, i.e. is the same as Item(GetCount() - 1).
An assert failure is raised in the debug mode if the array is empty.
The returned value is of type "reference to the array element type" for all of
the array classes.
\membersection{wxArray::Remove}\label{wxarrayremove}
\func{\void}{Remove}{\param{T }{item}}
Removes an element from the array by value: the first item of the
array equal to {\it item} is removed, an assert failure will result from an
attempt to remove an item which doesn't exist in the array.
When an element is removed from wxObjArray it is deleted by the array - use
\helpref{Detach()}{wxobjarraydetach} if you don't want this to happen. On the
other hand, when an object is removed from a wxArray nothing happens - you
should delete it manually if required:
\begin{verbatim}
T *item = array[n];
delete item;
array.Remove(n)
\end{verbatim}
See also \helpref{WX\_CLEAR\_ARRAY}{wxcleararray} macro which deletes all
elements of a wxArray (supposed to contain pointers).
\membersection{wxArray::RemoveAt}\label{wxarrayremoveat}
\func{\void}{RemoveAt}{\param{size\_t }{index}, \param{size\_t }{count = $1$}}
Removes {\it count} elements starting at {\it index} from the array. When an
element is removed from wxObjArray it is deleted by the array - use
\helpref{Detach()}{wxobjarraydetach} if you don't want this to happen. On
the other hand, when an object is removed from a wxArray nothing happens -
you should delete it manually if required:
\begin{verbatim}
T *item = array[n];
delete item;
array.RemoveAt(n)
\end{verbatim}
See also \helpref{WX\_CLEAR\_ARRAY}{wxcleararray} macro which deletes all
elements of a wxArray (supposed to contain pointers).
\membersection{wxArray::Shrink}\label{wxarrayshrink}
\func{void}{Shrink}{\void}
Frees all memory unused by the array. If the program knows that no new items
will be added to the array it may call Shrink() to reduce its memory usage.
However, if a new item is added to the array, some extra memory will be
allocated again.
\membersection{wxArray::Sort}\label{wxarraysort}
\func{void}{Sort}{\param{CMPFUNC<T> }{compareFunction}}
The notation CMPFUNC<T> should be read as if we had the following declaration:
\begin{verbatim}
template int CMPFUNC(T *first, T *second);
\end{verbatim}
where {\it T} is the type of the array elements. I.e. it is a function returning
{\it int} which is passed two arguments of type {\it T *}.
Sorts the array using the specified compare function: this function 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.
wxSortedArray doesn't have this function because it is always sorted.

View File

@@ -1,288 +0,0 @@
\section{\class{wxArrayString}}\label{wxarraystring}
wxArrayString is an efficient container for storing
\helpref{wxString}{wxstring} objects. It has the same features as all
\helpref{wxArray}{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 {\it 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 \helpref{arrays}{wxarray},
except that no {\it 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 {\it char *}
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 \helpref{Item}{wxarraystringitem},
\helpref{Last}{wxarraystringlast} or
\helpref{operator[]}{wxarraystringoperatorindex} are not constant, so the
array elements may be modified in place like this
\begin{verbatim}
array.Last().MakeUpper();
\end{verbatim}
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
\helpref{Index}{wxarraystringindex} 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.
\wxheading{Derived from}
Although this is not true strictly speaking, this class may be considered as a
specialization of \helpref{wxArray}{wxarray} class for the wxString member
data: it is not implemented like this, but it does have all of the wxArray
functions.
\wxheading{Include files}
<wx/string.h>
\wxheading{See also}
\helpref{wxArray}{wxarray}, \helpref{wxString}{wxstring}, \helpref{wxString overview}{wxstringoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArrayString::wxArrayString}\label{wxarraystringctor}
\func{}{wxArrayString}{\void}
\func{}{wxArrayString}{\param{const wxArrayString\&}{ array}}
Default and copy constructors.
Note that when an array is assigned to a sorted array, its contents is
automatically sorted during construction.
\membersection{wxArrayString::\destruct{wxArrayString}}\label{wxarraystringdtor}
\func{}{\destruct{wxArrayString}}{}
Destructor frees memory occupied by the array strings. For the performance
reasons it is not virtual, so this class should not be derived from.
\membersection{wxArrayString::operator=}\label{wxarraystringoperatorassign}
\func{wxArrayString \&}{operator $=$}{\param{const wxArrayString\&}{ array}}
Assignment operator.
\membersection{wxArrayString::operator==}\label{wxarraystringoperatorequal}
\constfunc{bool}{operator $==$}{\param{const wxArrayString\&}{ array}}
Compares 2 arrays respecting the case. Returns TRUE only if the arrays have
the same number of elements and the same strings in the same order.
\membersection{wxArrayString::operator!=}\label{wxarraystringoperatornotequal}
\constfunc{bool}{operator $!=$}{\param{const wxArrayString\&}{ array}}
Compares 2 arrays respecting the case. Returns TRUE if the arrays have
different number of elements or if the elements don't match pairwise.
\membersection{wxArrayString::operator[]}\label{wxarraystringoperatorindex}
\func{wxString\&}{operator[]}{\param{size\_t }{nIndex}}
Return the array element at position {\it nIndex}. An assert failure will
result from an attempt to access an element beyond the end of array in debug
mode, but no check is done in release mode.
This is the operator version of \helpref{Item}{wxarraystringitem} method.
\membersection{wxArrayString::Add}\label{wxarraystringadd}
\func{size\_t}{Add}{\param{const wxString\& }{str}, \param{size\_t}{ copies = $1$}}
Appends the given number of {\it copies} of the new item {\it str} to the
array and returns the index of the first new item in the array.
{\bf Warning:} For sorted arrays, the index of the inserted item will not be,
in general, equal to \helpref{GetCount()}{wxarraystringgetcount} - 1 because
the item is inserted at the correct position to keep the array sorted and not
appended.
See also: \helpref{Insert}{wxarraystringinsert}
\membersection{wxArrayString::Alloc}\label{wxarraystringalloc}
\func{void}{Alloc}{\param{size\_t }{nCount}}
Preallocates enough memory to store {\it nCount} items. This function may be
used to improve array class performance before adding a known number of items
consecutively.
See also: \helpref{Dynamic array memory management}{wxarraymemorymanagement}
\membersection{wxArrayString::Clear}\label{wxarraystringclear}
\func{void}{Clear}{\void}
Clears the array contents and frees memory.
See also: \helpref{Empty}{wxarraystringempty}
\membersection{wxArrayString::Count}\label{wxarraystringcount}
\constfunc{size\_t}{Count}{\void}
Returns the number of items in the array. This function is deprecated and is
for backwards compatibility only, please use
\helpref{GetCount}{wxarraystringgetcount} instead.
\membersection{wxArrayString::Empty}\label{wxarraystringempty}
\func{void}{Empty}{\void}
Empties the array: after a call to this function
\helpref{GetCount}{wxarraystringgetcount} 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
should use \helpref{Clear}{wxarraystringclear} to empty the array and free
memory.
\membersection{wxArrayString::GetCount}\label{wxarraystringgetcount}
\constfunc{size\_t}{GetCount}{\void}
Returns the number of items in the array.
\membersection{wxArrayString::Index}\label{wxarraystringindex}
\func{int}{Index}{\param{const char *}{ sz}, \param{bool}{ bCase = TRUE}, \param{bool}{ bFromEnd = FALSE}}
Search the element in the array, starting from the beginning if
{\it bFromEnd} is FALSE or from end otherwise. If {\it bCase}, comparison is
case sensitive (default), otherwise the case is ignored.
This function uses linear search for wxArrayString and binary search for
wxSortedArrayString, but it ignores the {\it bCase} and {\it bFromEnd}
parameters in the latter case.
Returns index of the first item matched or wxNOT\_FOUND if there is no match.
\membersection{wxArrayString::Insert}\label{wxarraystringinsert}
\func{void}{Insert}{\param{const wxString\& }{str}, \param{size\_t}{ nIndex}, \param{size\_t }{copies = $1$}}
Insert the given number of {\it copies} of the new element in the array before the position {\it nIndex}. Thus, for
example, to insert the string in the beginning of the array you would write
\begin{verbatim}
Insert("foo", 0);
\end{verbatim}
If {\it nIndex} is equal to {\it GetCount()} this function behaves as
\helpref{Add}{wxarraystringadd}.
{\bf Warning:} this function should not be used with sorted arrays because it
could break the order of items and, for example, subsequent calls to
\helpref{Index()}{wxarraystringindex} would then not work!
\membersection{wxArrayString::IsEmpty}\label{wxarraystringisempty}
\func{}{IsEmpty}{}
Returns TRUE if the array is empty, FALSE otherwise. This function returns the
same result as {\it GetCount() == 0} but is probably easier to read.
\membersection{wxArrayString::Item}\label{wxarraystringitem}
\constfunc{wxString\&}{Item}{\param{size\_t }{nIndex}}
Return the array element at position {\it nIndex}. An assert failure will
result from an attempt to access an element beyond the end of array in debug
mode, but no check is done in release mode.
See also \helpref{operator[]}{wxarraystringoperatorindex} for the operator
version.
\membersection{wxArrayString::Last}\label{wxarraystringlast}
\func{}{Last}{}
Returns the last element of the array. Attempt to access the last element of
an empty array will result in assert failure in debug build, however no checks
are done in release mode.
\membersection{wxArrayString::Remove}\label{wxarraystringremove}
\func{void}{Remove}{\param{const char *}{ sz}}
Removes the first item matching this value. An assert failure is provoked by
an attempt to remove an element which does not exist in debug build.
See also: \helpref{Index}{wxarraystringindex}
\func{void}{Remove}{\param{size\_t }{nIndex}, \param{size\_t }{count = $1$}}
Removes {\it count} items starting at position {\it nIndex} from the array.
\membersection{wxArrayString::Shrink}\label{wxarraystringshrink}
\func{void}{Shrink}{\void}
Releases the extra memory allocated by the array. This function is useful to
minimize the array memory consumption.
See also: \helpref{Alloc}{wxarraystringalloc}, \helpref{Dynamic array memory management}{wxarraymemorymanagement}
\membersection{wxArrayString::Sort}\label{wxarraystringsort}
\func{void}{Sort}{\param{bool}{ reverseOrder = FALSE}}
Sorts the array in alphabetical order or in reverse alphabetical order if
{\it reverseOrder} is TRUE.
{\bf Warning:} this function should not be used with sorted array because it
could break the order of items and, for example, subsequent calls to
\helpref{Index()}{wxarraystringindex} would then not work!
\func{void}{Sort}{\param{CompareFunction }{compareFunction}}
Sorts the array using the specified {\it compareFunction} for item comparison.
{\it CompareFunction} is defined as a function taking two {\it const
wxString\&} parameters and returning an {\it int} value less than, equal to or
greater than 0 if the first string is less than, equal to or greater than the
second one.
\wxheading{Example}
The following example sorts strings by their length.
\begin{verbatim}
static int CompareStringLen(const wxString& first, const wxString& second)
{
return first.length() - second.length();
}
...
wxArrayString array;
array.Add("one");
array.Add("two");
array.Add("three");
array.Add("four");
array.Sort(CompareStringLen);
\end{verbatim}
{\bf Warning:} this function should not be used with sorted array because it
could break the order of items and, for example, subsequent calls to
\helpref{Index()}{wxarraystringindex} would then not work!

View File

@@ -1,182 +0,0 @@
%
% automatically generated by HelpGen $Revision$ from
% artprov.h at 08/Apr/02 17:44:57
%
\section{\class{wxArtProvider}}\label{wxartprovider}
wxArtProvider class is used to customize the look of wxWindows application.
When wxWindows need to display an icon or a bitmap (e.g. in the standard file
dialog), it does not use hard-coded resource but asks wxArtProvider for it
instead. This way the users can plug in own wxArtProvider class and easily
replace standard art with his/her own version. It is easy thing to do: all
that is needed is to derive a class from wxArtProvider, override it's
\helpref{CreateBitmap}{wxartprovidercreatebitmap} method and register the
provider with
\helpref{wxArtProvider::PushProvider}{wxartproviderpushprovider}:
\begin{verbatim}
class MyProvider : public wxArtProvider
{
protected:
wxBitmap CreateBitmap(const wxArtID& id,
const wxArtClient& client,
const wxSize size)
{ ... }
};
...
wxArtProvider::PushProvider(new MyProvider);
\end{verbatim}
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
\helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap} or
\helpref{wxArtProvider::GetIcon}{wxartprovidergeticon} (NB: this is not yet really
possible as of wxWindows 2.3.3, the set of wxArtProvider bitmaps is too
small).
\membersection{Identifying art resources}
Every bitmap is known to wxArtProvider under an unique ID that is used by 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 \helpref{artprov}{sampleartprovider} sample):
\begin{itemize}\itemsep=0pt
\item wxART\_ADD\_BOOKMARK
\item wxART\_DEL\_BOOKMARK
\item wxART\_HELP\_SIDE\_PANEL
\item wxART\_HELP\_SETTINGS
\item wxART\_HELP\_BOOK
\item wxART\_HELP\_FOLDER
\item wxART\_HELP\_PAGE
\item wxART\_GO\_BACK
\item wxART\_GO\_FORWARD
\item wxART\_GO\_UP
\item wxART\_GO\_DOWN
\item wxART\_GO\_TO\_PARENT
\item wxART\_GO\_HOME
\item wxART\_FILE\_OPEN
\item wxART\_PRINT
\item wxART\_HELP
\item wxART\_TIP
\item wxART\_REPORT\_VIEW
\item wxART\_LIST\_VIEW
\item wxART\_NEW\_DIR
\item wxART\_FOLDER
\item wxART\_GO\_DIR\_UP
\item wxART\_EXECUTABLE\_FILE
\item wxART\_NORMAL\_FILE
\item wxART\_TICK\_MARK
\item wxART\_CROSS\_MARK
\item wxART\_ERROR
\item wxART\_QUESTION
\item wxART\_WARNING
\item wxART\_INFORMATION
\end{itemize}
\membersection{Clients}
Client is the entity that calls wxArtProvider's GetBitmap or GetIcon
function. It is represented by wxClientID type and can have one of these
values:
\begin{itemize}\itemsep=0pt
\item wxART\_TOOLBAR
\item wxART\_MENU
\item wxART\_FRAME\_ICON
\item wxART\_CMN\_DIALOG
\item wxART\_HELP\_BROWSER
\item wxART\_MESSAGE\_BOX
\item wxART\_OTHER (used for all requests that don't fit into any of the categories above)
\end{itemize}
Client ID servers as a hint to wxArtProvider that is supposed to help it to
choose the best looking bitmap. For example it is often desirable to use
slightly different icons in menus and toolbars even though they represent the
same action (e.g. {\tt wx\_ART\_FILE\_OPEN}). Remember that this is really
only a hint for wxArtProvider -- it is common that
\helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap}
returns identical bitmap for different {\it client} values!
\wxheading{See also}
See the \helpref{artprov}{sampleartprovider} sample for an example of wxArtProvider usage.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/artprov.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArtProvider::CreateBitmap}\label{wxartprovidercreatebitmap}
\func{wxBitmap}{CreateBitmap}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client}, \param{const wxSize\& }{size}}
Derived art provider classes must override this method to create requested
art resource. Note that returned bitmaps are cached by wxArtProvider and it is therefore
not neccessary to optimize CreateBitmap for speed (e.g. you may create wxBitmap objects
from XPMs here).
\wxheading{Parameters}
\docparam{id}{wxArtID unique identifier of the bitmap.}
\docparam{client}{wxArtClient identifier of the client (i.e. who is asking for the bitmap).
This only servers as a hint.}
\docparam{size}{Prefered size of the bitmap. The function may return a bitmap of different
dimensions, it will be automatically rescaled to meet client's request.}
\wxheading{Note}
This is {\bf not} part of wxArtProvider's public API, use
\helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap} or
\helpref{wxArtProvider::GetIcon}{wxartprovidergeticon}
to query wxArtProvider for a resource.
\membersection{wxArtProvider::GetBitmap}\label{wxartprovidergetbitmap}
\func{static wxBitmap}{GetBitmap}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client = wxART\_OTHER}, \param{const wxSize\& }{size = wxDefaultSize}}
Query registered providers for bitmap with given ID.
\wxheading{Parameters}
\docparam{id}{wxArtID unique identifier of the bitmap.}
\docparam{client}{wxArtClient identifier of the client (i.e. who is asking for the bitmap).}
\docparam{size}{Size of the returned bitmap or {\tt wxDefaultSize} if size doesn't matter.}
\wxheading{Return value}
The bitmap if one of registered providers recognizes the ID or wxNullBitmap otherwise.
\membersection{wxArtProvider::GetIcon}\label{wxartprovidergeticon}
\func{static wxIcon}{GetIcon}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client = wxART\_OTHER}, \param{const wxSize\& }{size = wxDefaultSize}}
Same as \helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap}, but
return a wxIcon object (or wxNullIcon on failure).
\membersection{wxArtProvider::PopProvider}\label{wxartproviderpopprovider}
\func{static bool}{PopProvider}{\void}
Remove latest added provider and delete it.
\membersection{wxArtProvider::PushProvider}\label{wxartproviderpushprovider}
\func{static void}{PushProvider}{\param{wxArtProvider* }{provider}}
Register new art provider (add it to the top of providers stack).
\membersection{wxArtProvider::RemoveProvider}\label{wxartproviderremoveprovider}
\func{static bool}{RemoveProvider}{\param{wxArtProvider* }{provider}}
Remove a provider from the stack. The provider must have been added previously
and is {\it not} deleted.

View File

@@ -1,201 +0,0 @@
\section{\class{wxAutomationObject}}\label{wxautomationobject}
The {\bf wxAutomationObject} class represents an OLE automation object containing a single data member,
an IDispatch pointer. It contains a number of functions that make it easy to perform
automation operations, and set and get properties. The class makes heavy use of the \helpref{wxVariant}{wxvariant} class.
The usage of these classes is quite close to OLE automation usage in Visual Basic. The API is
high-level, and the application can specify multiple properties in a single string. The following example
gets the current Excel instance, and if it exists, makes the active cell bold.
{\small
\begin{verbatim}
wxAutomationObject excelObject;
if (excelObject.GetInstance("Excel.Application"))
excelObject.PutProperty("ActiveCell.Font.Bold", TRUE);
\end{verbatim}
}
Note that this class works under Windows only, and currently only for Visual C++.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/msw/ole/automtn.h>
\wxheading{See also}
\helpref{wxVariant}{wxvariant}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAutomationObject::wxAutomationObject}\label{wxautomationobjectctor}
\func{}{wxAutomationObject}{\param{WXIDISPATCH*}{ dispatchPtr = NULL}}
Constructor, taking an optional IDispatch pointer which will be released when the
object is deleted.
\membersection{wxAutomationObject::\destruct{wxAutomationObject}}\label{wxautomationobjectdtor}
\func{}{\destruct{wxAutomationObject}}{\void}
Destructor. If the internal IDispatch pointer is non-null, it will be released.
\membersection{wxAutomationObject::CallMethod}\label{wxautomationobjectcallmethod}
\constfunc{wxVariant}{CallMethod}{\param{const wxString\&}{ method}, \param{int}{ noArgs},
\param{wxVariant }{args[]}}
\constfunc{wxVariant}{CallMethod}{\param{const wxString\&}{ method}, \param{...}{}}
Calls an automation method for this object. The first form takes a method name, number of
arguments, and an array of variants. The second form takes a method name and zero to six
constant references to variants. Since the variant class has constructors for the basic
data types, and C++ provides temporary objects automatically, both of the following lines
are syntactically valid:
{\small
\begin{verbatim}
wxVariant res = obj.CallMethod("Sum", wxVariant(1.2), wxVariant(3.4));
wxVariant res = obj.CallMethod("Sum", 1.2, 3.4);
\end{verbatim}
}
Note that {\it method} can contain dot-separated property names, to save the application
needing to call GetProperty several times using several temporary objects. For example:
{\small
\begin{verbatim}
object.CallMethod("ActiveCell.Font.ShowDialog", "My caption");
\end{verbatim}
}
\membersection{wxAutomationObject::CreateInstance}\label{wxautomationobjectcreateinstance}
\constfunc{bool}{CreateInstance}{\param{const wxString\&}{ classId}}
Creates a new object based on the class id, returning TRUE if the object was successfully created,
or FALSE if not.
\membersection{wxAutomationObject::GetDispatchPtr}\label{wxautomationobjectgetdispatchptr}
\constfunc{IDispatch*}{GetDispatchPtr}{\void}
Gets the IDispatch pointer.
\membersection{wxAutomationObject::GetInstance}\label{wxautomationobjectgetinstance}
\constfunc{bool}{GetInstance}{\param{const wxString\&}{ classId}}
Retrieves the current object associated with a class id, and attaches the IDispatch pointer
to this object. Returns TRUE if a pointer was successfully retrieved, FALSE otherwise.
Note that this cannot cope with two instances of a given OLE object being active simultaneously,
such as two copies of Excel running. Which object is referenced cannot currently be specified.
\membersection{wxAutomationObject::GetObject}\label{wxautomationobjectgetobject}
\constfunc{bool}{GetObject}{\param{wxAutomationObject\&}{obj} \param{const wxString\&}{ property},
\param{int}{ noArgs = 0}, \param{wxVariant }{args[] = NULL}}
Retrieves a property from this object, assumed to be a dispatch pointer, and initialises {\it obj} with it.
To avoid having to deal with IDispatch pointers directly, use this function in preference
to \helpref{wxAutomationObject::GetProperty}{wxautomationobjectgetproperty} when retrieving objects
from other objects.
Note that an IDispatch pointer is stored as a void* pointer in wxVariant objects.
\wxheading{See also}
\helpref{wxAutomationObject::GetProperty}{wxautomationobjectgetproperty}
\membersection{wxAutomationObject::GetProperty}\label{wxautomationobjectgetproperty}
\constfunc{wxVariant}{GetProperty}{\param{const wxString\&}{ property}, \param{int}{ noArgs},
\param{wxVariant }{args[]}}
\constfunc{wxVariant}{GetProperty}{\param{const wxString\&}{ property}, \param{...}{}}
Gets a property value from this object. The first form takes a property name, number of
arguments, and an array of variants. The second form takes a property name and zero to six
constant references to variants. Since the variant class has constructors for the basic
data types, and C++ provides temporary objects automatically, both of the following lines
are syntactically valid:
{\small
\begin{verbatim}
wxVariant res = obj.GetProperty("Range", wxVariant("A1"));
wxVariant res = obj.GetProperty("Range", "A1");
\end{verbatim}
}
Note that {\it property} can contain dot-separated property names, to save the application
needing to call GetProperty several times using several temporary objects.
\membersection{wxAutomationObject::Invoke}\label{wxautomationobjectinvoke}
\constfunc{bool}{Invoke}{\param{const wxString\&}{ member}, \param{int}{ action},
\param{wxVariant\& }{retValue}, \param{int}{ noArgs}, \param{wxVariant}{ args[]},
\param{const wxVariant*}{ ptrArgs[] = 0}}
This function is a low-level implementation that allows access to the IDispatch Invoke function.
It is not meant to be called directly by the application, but is used by other convenience functions.
\wxheading{Parameters}
\docparam{member}{The member function or property name.}
\docparam{action}{Bitlist: may contain DISPATCH\_PROPERTYPUT, DISPATCH\_PROPERTYPUTREF,
DISPATCH\_METHOD.}
\docparam{retValue}{Return value (ignored if there is no return value)}.
\docparam{noArgs}{Number of arguments in {\it args} or {\it ptrArgs}.}
\docparam{args}{If non-null, contains an array of variants.}
\docparam{ptrArgs}{If non-null, contains an array of constant pointers to variants.}
\wxheading{Return value}
TRUE if the operation was successful, FALSE otherwise.
\wxheading{Remarks}
Two types of argument array are provided, so that when possible pointers are used for efficiency.
\membersection{wxAutomationObject::PutProperty}\label{wxautomationobjectputproperty}
\constfunc{bool}{PutProperty}{\param{const wxString\&}{ property}, \param{int}{ noArgs},
\param{wxVariant }{args[]}}
\func{bool}{PutProperty}{\param{const wxString\&}{ property}, \param{...}{}}
Puts a property value into this object. The first form takes a property name, number of
arguments, and an array of variants. The second form takes a property name and zero to six
constant references to variants. Since the variant class has constructors for the basic
data types, and C++ provides temporary objects automatically, both of the following lines
are syntactically valid:
{\small
\begin{verbatim}
obj.PutProperty("Value", wxVariant(23));
obj.PutProperty("Value", 23);
\end{verbatim}
}
Note that {\it property} can contain dot-separated property names, to save the application
needing to call GetProperty several times using several temporary objects.
\membersection{wxAutomationObject::SetDispatchPtr}\label{wxautomationobjectsetdispatchptr}
\func{void}{SetDispatchPtr}{\param{WXIDISPATCH*}{ dispatchPtr}}
Sets the IDispatch pointer. This function does not check if there is already an IDispatch pointer.
You may need to cast from IDispatch* to WXIDISPATCH* when calling this function.

View File

@@ -1,245 +0,0 @@
\section{\class{wxBitmapButton}}\label{wxbitmapbutton}
A bitmap button is a control that contains a bitmap.
It may be placed on a \helpref{dialog box}{wxdialog} or \helpref{panel}{wxpanel}, or indeed
almost any other window.
\wxheading{Derived from}
\helpref{wxButton}{wxbutton}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/bmpbuttn.h>
\wxheading{Remarks}
A bitmap button can be supplied with a single bitmap, and wxWindows will draw
all button states using this bitmap. If the application needs more control, additional bitmaps for
the selected state, unpressed focused state, and greyed-out state may be supplied.
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxBU\_AUTODRAW}}{If
this is specified, the button will be drawn automatically using the label bitmap only, providing
a 3D-look border. If this style is not specified, the button will be drawn without borders and using all
provided bitmaps. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_LEFT}}{Left-justifies the bitmap label. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_TOP}}{Aligns the bitmap label to the top of the button. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_RIGHT}}{Right-justifies the bitmap label. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_BOTTOM}}{Aligns the bitmap label to the bottom of the button. WIN32 only.}
\end{twocollist}
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED event,
when the button is clicked.}
\end{twocollist}
\wxheading{See also}
\helpref{wxButton}{wxbutton}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBitmapButton::wxBitmapButton}\label{wxbitmapbuttonconstr}
\func{}{wxBitmapButton}{\void}
Default constructor.
\func{}{wxBitmapButton}{
\param{wxWindow* }{parent},
\param{wxWindowID }{id},
\param{const wxBitmap\& }{bitmap},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long }{style = wxBU\_AUTODRAW},
\param{const wxValidator\& }{validator = wxDefaultValidator},
\param{const wxString\& }{name = ``button"}}
Constructor, creating and showing a button.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Button identifier. A value of -1 indicates a default value.}
\docparam{bitmap}{Bitmap to be displayed.}
\docparam{pos}{Button position.}
\docparam{size}{Button size. If the default size (-1, -1) is specified then the button is sized
appropriately for the bitmap.}
\docparam{style}{Window style. See \helpref{wxBitmapButton}{wxbitmapbutton}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\wxheading{Remarks}
The {\it bitmap} parameter is normally the only bitmap you need to provide, and wxWindows will
draw the button correctly in its different states. If you want more control, call
any of the functions \helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected},\rtfsp
\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus},\rtfsp
\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled}.
Note that the bitmap passed is smaller than the actual button created.
\wxheading{See also}
\helpref{wxBitmapButton::Create}{wxbitmapbuttoncreate}, \helpref{wxValidator}{wxvalidator}
\membersection{wxBitmapButton::\destruct{wxBitmapButton}}
\func{}{\destruct{wxBitmapButton}}{\void}
Destructor, destroying the button.
\membersection{wxBitmapButton::Create}\label{wxbitmapbuttoncreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxBitmap\& }{bitmap},\rtfsp
\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}}
Button creation function for two-step creation. For more details, see \helpref{wxBitmapButton::wxBitmapButton}{wxbitmapbuttonconstr}.
\membersection{wxBitmapButton::GetBitmapDisabled}\label{wxbitmapbuttongetbitmapdisabled}
\constfunc{wxBitmap\&}{GetBitmapDisabled}{\void}
Returns the bitmap for the disabled state.
\wxheading{Return value}
A reference to the disabled state bitmap.
\wxheading{See also}
\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled}
\membersection{wxBitmapButton::GetBitmapFocus}\label{wxbitmapbuttongetbitmapfocus}
\constfunc{wxBitmap\&}{GetBitmapFocus}{\void}
Returns the bitmap for the focused state.
\wxheading{Return value}
A reference to the focused state bitmap.
\wxheading{See also}
\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus}
\membersection{wxBitmapButton::GetBitmapLabel}\label{wxbitmapbuttongetbitmaplabel}
\constfunc{wxBitmap\&}{GetBitmapLabel}{\void}
Returns the label bitmap (the one passed to the constructor).
\wxheading{Return value}
A reference to the button's label bitmap.
\wxheading{See also}
\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel}
\membersection{wxBitmapButton::GetBitmapSelected}\label{wxbitmapbuttongetbitmapselected}
\constfunc{wxBitmap\&}{GetBitmapSelected}{\void}
Returns the bitmap for the selected state.
\wxheading{Return value}
A reference to the selected state bitmap.
\wxheading{See also}
\helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected}
\membersection{wxBitmapButton::SetBitmapDisabled}\label{wxbitmapbuttonsetbitmapdisabled}
\func{void}{SetBitmapDisabled}{\param{const wxBitmap\& }{bitmap}}
Sets the bitmap for the disabled button appearance.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap to set.}
\wxheading{See also}
\helpref{wxBitmapButton::GetBitmapDisabled}{wxbitmapbuttongetbitmapdisabled},\rtfsp
\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel},\rtfsp
\helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected},\rtfsp
\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus}
\membersection{wxBitmapButton::SetBitmapFocus}\label{wxbitmapbuttonsetbitmapfocus}
\func{void}{SetBitmapFocus}{\param{const wxBitmap\& }{bitmap}}
Sets the bitmap for the button appearance when it has the keyboard focus.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap to set.}
\wxheading{See also}
\helpref{wxBitmapButton::GetBitmapFocus}{wxbitmapbuttongetbitmapfocus},\rtfsp
\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel},\rtfsp
\helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected},\rtfsp
\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled}
\membersection{wxBitmapButton::SetBitmapLabel}\label{wxbitmapbuttonsetbitmaplabel}
\func{void}{SetBitmapLabel}{\param{const wxBitmap\& }{bitmap}}
Sets the bitmap label for the button.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap label to set.}
\wxheading{Remarks}
This is the bitmap used for the unselected state, and for all other states
if no other bitmaps are provided.
\wxheading{See also}
\helpref{wxBitmapButton::GetBitmapLabel}{wxbitmapbuttongetbitmaplabel}
\membersection{wxBitmapButton::SetBitmapSelected}\label{wxbitmapbuttonsetbitmapselected}
\func{void}{SetBitmapSelected}{\param{const wxBitmap\& }{bitmap}}
Sets the bitmap for the selected (depressed) button appearance.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap to set.}
\wxheading{See also}
\helpref{wxBitmapButton::GetBitmapSelected}{wxbitmapbuttongetbitmapselected},\rtfsp
\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel},\rtfsp
\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus},\rtfsp
\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled}

View File

@@ -1,615 +0,0 @@
\section{\class{wxBitmap}}\label{wxbitmap}
%\overview{Overview}{wxbitmapoverview}
%
This class encapsulates the concept of a platform-dependent bitmap,
either monochrome or colour.
\wxheading{Derived from}
\helpref{wxGDIObject}{wxgdiobject}\\
\helpref{wxObject}{wxobject}
\wxheading{Include file}
<wx/bitmap.h>
\wxheading{Predefined objects}
Objects:
{\bf wxNullBitmap}
\wxheading{See also}
\helpref{wxBitmap overview}{wxbitmapoverview},
\helpref{supported bitmap file formats}{supportedbitmapformats},
\helpref{wxDC::Blit}{wxdcblit},
\helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}, \helpref{wxBitmap}{wxbitmap},
\helpref{wxMemoryDC}{wxmemorydc}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBitmap::wxBitmap}\label{wxbitmapconstr}
\func{}{wxBitmap}{\void}
Default constructor.
\func{}{wxBitmap}{\param{const wxBitmap\& }{bitmap}}
Copy constructor.
\func{}{wxBitmap}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
Creates a bitmap from the given data which is interpreted in platform-dependent
manner.
\func{}{wxBitmap}{\param{const char}{ bits[]}, \param{int}{ width}, \param{int}{ height}\\
\param{int}{ depth = 1}}
Creates a bitmap from an array of bits.
You should only use this function for monochrome bitmaps ({\it depth} 1) in
portable programs: in this case the {\it bits} parameter should contain an XBM
image.
For other bit depths, the behaviour is platform dependent: under Windows, the
data is passed without any changes to the underlying {\tt CreateBitmap()} API.
Under other platforms, only monochrome bitmaps may be created using this
constructor and \helpref{wxImage}{wximage} should be used for creating colour
bitmaps from static data.
\func{}{wxBitmap}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
Creates a new bitmap. A depth of -1 indicates the depth of the current screen
or visual. Some platforms only support 1 for monochrome and -1 for the current
colour setting.
\func{}{wxBitmap}{\param{const char**}{ bits}}
Creates a bitmap from XPM data.
\func{}{wxBitmap}{\param{const wxString\& }{name}, \param{long}{ type}}
Loads a bitmap from a file or resource.
\func{}{wxBitmap}{\param{const wxImage\&}{ img}, \param{int}{ depth = -1}}
Creates bitmap object from the image. This has to be done
to actually display an image as you cannot draw an image directly on a window.
The resulting bitmap will use the provided colour depth (or that of the
current system if depth is -1) which entails that a colour reduction has
to take place.
When in 8-bit mode (PseudoColour mode), the GTK port will use a color cube created
on program start-up to look up colors. This ensures a very fast conversion, but
the image quality won't be perfect (and could be better for photo images using more
sophisticated dithering algorithms).
On Windows, if there is a palette present (set with SetPalette), it will be used when
creating the wxBitmap (most useful in 8-bit display mode). On other platforms,
the palette is currently ignored.
\wxheading{Parameters}
\docparam{bits}{Specifies an array of pixel values.}
\docparam{width}{Specifies the width of the bitmap.}
\docparam{height}{Specifies the height of the bitmap.}
\docparam{depth}{Specifies the depth of the bitmap. If this is omitted, the display depth of the
screen is used.}
\docparam{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 {\it type} parameter.}
\docparam{type}{May be one of the following:
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{\indexit{wxBITMAP\_TYPE\_BMP}}{Load a Windows bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_RESOURCE}}{Load a Windows resource name.}
\end{twocollist}
The validity of these flags depends on the platform and wxWindows configuration.
If all possible wxWindows settings are used, the Windows platform supports BMP file, BMP resource,
XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM data, XPM file, and PNG file.
Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file.
In addition, wxBitmap can read all formats that \helpref{wxImage}{wximage} can, which currently include
wxBITMAP\_TYPE\_JPEG, wxBITMAP\_TYPE\_TIF, wxBITMAP\_TYPE\_PNG, wxBITMAP\_TYPE\_GIF, wxBITMAP\_TYPE\_PCX,
and wxBITMAP\_TYPE\_PNM. Of course, you must have wxImage handlers loaded. }
\docparam{img}{Platform-independent wxImage object.}
\wxheading{Remarks}
The first form constructs a bitmap object with no data; an assignment or another member function such as Create
or LoadFile must be called subsequently.
The second and third forms provide copy constructors. Note that these do not copy the
bitmap data, but instead a pointer to the data, keeping a reference count. They are therefore
very efficient operations.
The fourth form constructs a bitmap from data whose type and value depends on
the value of the {\it type} argument.
The fifth form constructs a (usually monochrome) bitmap from an array of pixel values, under both
X and Windows.
The sixth form constructs a new bitmap.
The seventh form constructs a bitmap from pixmap (XPM) data, if wxWindows has been configured
to incorporate this feature.
To use this constructor, you must first include an XPM file. For
example, assuming that the file {\tt mybitmap.xpm} contains an XPM array
of character pointers called mybitmap:
\begin{verbatim}
#include "mybitmap.xpm"
...
wxBitmap *bitmap = new wxBitmap(mybitmap);
\end{verbatim}
The eighth form constructs a bitmap from a file or resource. {\it name} can refer
to a resource name under MS Windows, or a filename under MS Windows and X.
Under Windows, {\it type} defaults to wxBITMAP\_TYPE\_BMP\_RESOURCE.
Under X, {\it type} defaults to wxBITMAP\_TYPE\_XPM.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}
\pythonnote{Constructors supported by wxPython are:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf wxBitmap(name, flag)}}{Loads a bitmap from a file}
\twocolitem{{\bf wxEmptyBitmap(width, height, depth = -1)}}{Creates an
empty bitmap with the given specifications}
\twocolitem{{\bf wxBitmapFromXPMData(listOfStrings)}}{Create a bitmap
from a Python list of strings whose contents are XPM data.}
\twocolitem{{\bf wxBitmapFromBits(bits, width, height,
depth=-1)}}{Create a bitmap from an array of bits contained in a
string.}
\twocolitem{{\bf wxBitmapFromImage(image, depth=-1)}}{Convert a
wxImage to a wxBitmap.}
\end{twocollist}}
}
\perlnote{Constructors supported by wxPerl are:\par
\begin{itemize}
\item{Wx::Bitmap->new( width, height, depth = -1 )}
\item{Wx::Bitmap->new( name, type )}
\item{Wx::Bitmap->new( icon )}
\item{Wx::Bitmap->newFromBits( bits, width, height, depth = 1 )}
\item{Wx::Bitmap->newFromXPM( data )}
\end{itemize}
}
\membersection{wxBitmap::\destruct{wxBitmap}}
\func{}{\destruct{wxBitmap}}{\void}
Destroys the wxBitmap object and possibly the underlying bitmap data.
Because reference counting is used, the bitmap may not actually be
destroyed at this point - only when the reference count is zero will the
data be deleted.
If the application omits to delete the bitmap explicitly, the bitmap will be
destroyed automatically by wxWindows when the application exits.
Do not delete a bitmap that is selected into a memory device context.
\membersection{wxBitmap::AddHandler}\label{wxbitmapaddhandler}
\func{static void}{AddHandler}{\param{wxBitmapHandler*}{ handler}}
Adds a handler to the end of the static list of format handlers.
\docparam{handler}{A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.}
\wxheading{See also}
\helpref{wxBitmapHandler}{wxbitmaphandler}
\membersection{wxBitmap::CleanUpHandlers}
\func{static void}{CleanUpHandlers}{\void}
Deletes all bitmap handlers.
This function is called by wxWindows on exit.
\membersection{wxBitmap::ConvertToImage}\label{wxbitmapconverttoimage}
\func{wxImage}{ConvertToImage}{\void}
Creates an image from a platform-dependent bitmap. This preserves
mask information so that bitmaps and images can be converted back
and forth without loss in that respect.
\membersection{wxBitmap::Create}\label{wxbitmapcreate}
\func{virtual bool}{Create}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
Creates a fresh bitmap. If the final argument is omitted, the display depth of
the screen is used.
\func{virtual bool}{Create}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
Creates a bitmap from the given data, which can be of arbitrary type.
\wxheading{Parameters}
\docparam{width}{The width of the bitmap in pixels.}
\docparam{height}{The height of the bitmap in pixels.}
\docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.}
\docparam{data}{Data whose type depends on the value of {\it type}.}
\docparam{type}{A bitmap type identifier - see \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for a list
of possible values.}
\wxheading{Return value}
TRUE if the call succeeded, FALSE otherwise.
\wxheading{Remarks}
The first form works on all platforms. The portability of the second form depends on the
type of data.
\wxheading{See also}
\helpref{wxBitmap::wxBitmap}{wxbitmapconstr}
\membersection{wxBitmap::FindHandler}
\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{name}}
Finds the handler with the given name.
\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{extension}, \param{long}{ bitmapType}}
Finds the handler associated with the given extension and type.
\func{static wxBitmapHandler*}{FindHandler}{\param{long }{bitmapType}}
Finds the handler associated with the given bitmap type.
\docparam{name}{The handler name.}
\docparam{extension}{The file extension, such as ``bmp".}
\docparam{bitmapType}{The bitmap type, such as wxBITMAP\_TYPE\_BMP.}
\wxheading{Return value}
A pointer to the handler if found, NULL otherwise.
\wxheading{See also}
\helpref{wxBitmapHandler}{wxbitmaphandler}
\membersection{wxBitmap::GetDepth}
\constfunc{int}{GetDepth}{\void}
Gets the colour depth of the bitmap. A value of 1 indicates a
monochrome bitmap.
\membersection{wxBitmap::GetHandlers}
\func{static wxList\&}{GetHandlers}{\void}
Returns the static list of bitmap format handlers.
\wxheading{See also}
\helpref{wxBitmapHandler}{wxbitmaphandler}
\membersection{wxBitmap::GetHeight}\label{wxbitmapgetheight}
\constfunc{int}{GetHeight}{\void}
Gets the height of the bitmap in pixels.
\membersection{wxBitmap::GetPalette}\label{wxbitmapgetpalette}
\constfunc{wxPalette*}{GetPalette}{\void}
Gets the associated palette (if any) which may have been loaded from a file
or set for the bitmap.
\wxheading{See also}
\helpref{wxPalette}{wxpalette}
\membersection{wxBitmap::GetMask}\label{wxbitmapgetmask}
\constfunc{wxMask*}{GetMask}{\void}
Gets the associated mask (if any) which may have been loaded from a file
or set for the bitmap.
\wxheading{See also}
\helpref{wxBitmap::SetMask}{wxbitmapsetmask}, \helpref{wxMask}{wxmask}
\membersection{wxBitmap::GetWidth}\label{wxbitmapgetwidth}
\constfunc{int}{GetWidth}{\void}
Gets the width of the bitmap in pixels.
\wxheading{See also}
\helpref{wxBitmap::GetHeight}{wxbitmapgetheight}
\membersection{wxBitmap::GetSubBitmap}\label{wxbitmapgetsubbitmap}
\constfunc{wxBitmap}{GetSubBitmap}{\param{const wxRect\&}{rect}}
Returns a sub bitmap of the current one as long as the rect belongs entirely to
the bitmap. This function preserves bit depth and mask information.
\membersection{wxBitmap::InitStandardHandlers}
\func{static void}{InitStandardHandlers}{\void}
Adds the standard bitmap format handlers, which, depending on wxWindows
configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM.
This function is called by wxWindows on startup.
\wxheading{See also}
\helpref{wxBitmapHandler}{wxbitmaphandler}
\membersection{wxBitmap::InsertHandler}
\func{static void}{InsertHandler}{\param{wxBitmapHandler*}{ handler}}
Adds a handler at the start of the static list of format handlers.
\docparam{handler}{A new bitmap format handler object. There is usually only one instance
of a given handler class in an application session.}
\wxheading{See also}
\helpref{wxBitmapHandler}{wxbitmaphandler}
\membersection{wxBitmap::LoadFile}\label{wxbitmaploadfile}
\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{long}{ type}}
Loads a bitmap from a file or resource.
\wxheading{Parameters}
\docparam{name}{Either a filename or a Windows resource name.
The meaning of {\it name} is determined by the {\it type} parameter.}
\docparam{type}{One of the following values:
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Load a Windows bitmap file.}
\twocolitem{{\bf wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.}
\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.}
\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.}
\end{twocollist}
The validity of these flags depends on the platform and wxWindows configuration.
In addition, wxBitmap can read all formats that \helpref{wxImage}{wximage} can
(wxBITMAP\_TYPE\_JPEG, wxBITMAP\_TYPE\_PNG, wxBITMAP\_TYPE\_GIF, wxBITMAP\_TYPE\_PCX, wxBITMAP\_TYPE\_PNM).
(Of course you must have wxImage handlers loaded.) }
\wxheading{Return value}
TRUE if the operation succeeded, FALSE otherwise.
\wxheading{Remarks}
A palette may be associated with the bitmap if one exists (especially for
colour Windows bitmaps), and if the code supports it. You can check
if one has been created by using the \helpref{GetPalette}{wxbitmapgetpalette} member.
\wxheading{See also}
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}
\membersection{wxBitmap::Ok}\label{wxbitmapok}
\constfunc{bool}{Ok}{\void}
Returns TRUE if bitmap data is present.
\membersection{wxBitmap::RemoveHandler}
\func{static bool}{RemoveHandler}{\param{const wxString\& }{name}}
Finds the handler with the given name, and removes it. The handler
is not deleted.
\docparam{name}{The handler name.}
\wxheading{Return value}
TRUE if the handler was found and removed, FALSE otherwise.
\wxheading{See also}
\helpref{wxBitmapHandler}{wxbitmaphandler}
\membersection{wxBitmap::SaveFile}\label{wxbitmapsavefile}
\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
Saves a bitmap in the named file.
\wxheading{Parameters}
\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
\docparam{type}{One of the following values:
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Save a Windows bitmap file.}
\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Save a GIF bitmap file.}
\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Save an X bitmap file.}
\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Save an XPM bitmap file.}
\end{twocollist}
The validity of these flags depends on the platform and wxWindows configuration.
In addition, wxBitmap can save all formats that \helpref{wxImage}{wximage} can
(wxBITMAP\_TYPE\_JPEG, wxBITMAP\_TYPE\_PNG).
(Of course you must have wxImage handlers loaded.) }
\docparam{palette}{An optional palette used for saving the bitmap.}
% TODO: this parameter should
%probably be eliminated; instead the app should set the palette before saving.
\wxheading{Return value}
TRUE if the operation succeeded, FALSE otherwise.
\wxheading{Remarks}
Depending on how wxWindows has been configured, not all formats may be available.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}
\membersection{wxBitmap::SetDepth}\label{wxbitmapsetdepth}
\func{void}{SetDepth}{\param{int }{depth}}
Sets the depth member (does not affect the bitmap data).
\wxheading{Parameters}
\docparam{depth}{Bitmap depth.}
\membersection{wxBitmap::SetHeight}\label{wxbitmapsetheight}
\func{void}{SetHeight}{\param{int }{height}}
Sets the height member (does not affect the bitmap data).
\wxheading{Parameters}
\docparam{height}{Bitmap height in pixels.}
\membersection{wxBitmap::SetMask}\label{wxbitmapsetmask}
\func{void}{SetMask}{\param{wxMask* }{mask}}
Sets the mask for this bitmap.
\wxheading{Remarks}
The bitmap object owns the mask once this has been called.
\wxheading{See also}
\helpref{wxBitmap::GetMask}{wxbitmapgetmask}, \helpref{wxMask}{wxmask}
%% VZ: this function is an implementation detail and shouldn't be documented
%%\membersection{wxBitmap::SetOk}
%%
%%\func{void}{SetOk}{\param{int }{isOk}}
%%
%%Sets the validity member (does not affect the bitmap data).
%%
%%\wxheading{Parameters}
%%
%%\docparam{isOk}{Validity flag.}
\membersection{wxBitmap::SetPalette}\label{wxbitmapsetpalette}
\func{void}{SetPalette}{\param{const wxPalette\& }{palette}}
Sets the associated palette.
\wxheading{Parameters}
\docparam{palette}{The palette to set.}
\wxheading{See also}
\helpref{wxPalette}{wxpalette}
\membersection{wxBitmap::SetWidth}
\func{void}{SetWidth}{\param{int }{width}}
Sets the width member (does not affect the bitmap data).
\wxheading{Parameters}
\docparam{width}{Bitmap width in pixels.}
\membersection{wxBitmap::operator $=$}
\func{wxBitmap\& }{operator $=$}{\param{const wxBitmap\& }{bitmap}}
Assignment operator. This operator does not copy any data, but instead
passes a pointer to the data in {\it bitmap} and increments a reference
counter. It is a fast operation.
\wxheading{Parameters}
\docparam{bitmap}{Bitmap to assign.}
\wxheading{Return value}
Returns 'this' object.
\membersection{wxBitmap::operator $==$}
\func{bool}{operator $==$}{\param{const wxBitmap\& }{bitmap}}
Equality operator. This operator tests whether the internal data pointers are
equal (a fast test).
\wxheading{Parameters}
\docparam{bitmap}{Bitmap to compare with 'this'}
\wxheading{Return value}
Returns TRUE if the bitmaps were effectively equal, FALSE otherwise.
\membersection{wxBitmap::operator $!=$}
\func{bool}{operator $!=$}{\param{const wxBitmap\& }{bitmap}}
Inequality operator. This operator tests whether the internal data pointers are
unequal (a fast test).
\wxheading{Parameters}
\docparam{bitmap}{Bitmap to compare with 'this'}
\wxheading{Return value}
Returns TRUE if the bitmaps were unequal, FALSE otherwise.

View File

@@ -1,60 +0,0 @@
\section{\class{wxBitmapDataObject}}\label{wxbitmapdataobject}
wxBitmapDataObject is a specialization of wxDataObject for bitmap data. It can
be used without change to paste data into the
\helpref{wxClipboard}{wxclipboard} or a \helpref{wxDropSource}{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.
\pythonnote{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.}
\wxheading{Virtual functions to override}
This class may be used as is, but
\helpref{GetBitmap}{wxbitmapdataobjectgetbitmap} may be overridden to increase
efficiency.
\wxheading{Derived from}
\helpref{wxDataObjectSimple}{wxdataobjectsimple}\\
\helpref{wxDataObject}{wxdataobject}
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{Clipboard and drag and drop overview}{wxdndoverview},
\helpref{wxDataObject}{wxdataobject},
\helpref{wxDataObjectSimple}{wxdataobjectsimple},
\helpref{wxFileDataObject}{wxfiledataobject},
\helpref{wxTextDataObject}{wxtextdataobject},
\helpref{wxDataObject}{wxdataobject}
\func{}{wxBitmapDataObject}{\param{const wxBitmap\& }{bitmap = wxNullBitmap}}
Constructor, optionally passing a bitmap (otherwise use
\helpref{SetBitmap}{wxbitmapdataobjectsetbitmap} later).
\membersection{wxBitmapDataObject::GetBitmap}\label{wxbitmapdataobjectgetbitmap}
\constfunc{virtual wxBitmap}{GetBitmap}{\void}
Returns the bitmap associated with the data object. You may wish to override
this method when offering data on-demand, but this is not required by
wxWindows' internals. Use this method to get data in bitmap form from
the \helpref{wxClipboard}{wxclipboard}.
\membersection{wxBitmapDataObject::SetBitmap}\label{wxbitmapdataobjectsetbitmap}
\func{virtual void}{SetBitmap}{\param{const wxBitmap\& }{bitmap}}
Sets the bitmap associated with the data object. This method is called when the
data object receives data. Usually there will be no reason to override this
function.

View File

@@ -1,165 +0,0 @@
\section{\class{wxBitmapHandler}}\label{wxbitmaphandler}
\overview{Overview}{wxbitmapoverview}
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 \helpref{wxBitmap::AddHandler}{wxbitmapaddhandler} in your
application initialisation.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/bitmap.h>
\wxheading{See also}
\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBitmapHandler::wxBitmapHandler}\label{wxbitmaphandlerconstr}
\func{}{wxBitmapHandler}{\void}
Default constructor. In your own default constructor, initialise the members
m\_name, m\_extension and m\_type.
\membersection{wxBitmapHandler::\destruct{wxBitmapHandler}}
\func{}{\destruct{wxBitmapHandler}}{\void}
Destroys the wxBitmapHandler object.
\membersection{wxBitmapHandler::Create}
\func{virtual bool}{Create}{\param{wxBitmap* }{bitmap}, \param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}}
Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object {\it bitmap} is
manipulated by this function.
\wxheading{Parameters}
\docparam{bitmap}{The wxBitmap object.}
\docparam{width}{The width of the bitmap in pixels.}
\docparam{height}{The height of the bitmap in pixels.}
\docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.}
\docparam{data}{Data whose type depends on the value of {\it type}.}
\docparam{type}{A bitmap type identifier - see \helpref{wxBitmapHandler::wxBitmapHandler}{wxbitmapconstr} for a list
of possible values.}
\wxheading{Return value}
TRUE if the call succeeded, FALSE otherwise (the default).
\membersection{wxBitmapHandler::GetName}
\constfunc{wxString}{GetName}{\void}
Gets the name of this handler.
\membersection{wxBitmapHandler::GetExtension}
\constfunc{wxString}{GetExtension}{\void}
Gets the file extension associated with this handler.
\membersection{wxBitmapHandler::GetType}
\constfunc{long}{GetType}{\void}
Gets the bitmap type associated with this handler.
\membersection{wxBitmapHandler::LoadFile}\label{wxbitmaphandlerloadfile}
\func{bool}{LoadFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\&}{ name}, \param{long}{ type}}
Loads a bitmap from a file or resource, putting the resulting data into {\it bitmap}.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap object which is to be affected by this operation.}
\docparam{name}{Either a filename or a Windows resource name.
The meaning of {\it name} is determined by the {\it type} parameter.}
\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.}
\wxheading{Return value}
TRUE if the operation succeeded, FALSE otherwise.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
\helpref{wxBitmapHandler::SaveFile}{wxbitmaphandlersavefile}
\membersection{wxBitmapHandler::SaveFile}\label{wxbitmaphandlersavefile}
\func{bool}{SaveFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
Saves a bitmap in the named file.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap object which is to be affected by this operation.}
\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.}
\docparam{palette}{An optional palette used for saving the bitmap.}
\wxheading{Return value}
TRUE if the operation succeeded, FALSE otherwise.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
\helpref{wxBitmapHandler::LoadFile}{wxbitmaphandlerloadfile}
\membersection{wxBitmapHandler::SetName}
\func{void}{SetName}{\param{const wxString\& }{name}}
Sets the handler name.
\wxheading{Parameters}
\docparam{name}{Handler name.}
\membersection{wxBitmapHandler::SetExtension}
\func{void}{SetExtension}{\param{const wxString\& }{extension}}
Sets the handler extension.
\wxheading{Parameters}
\docparam{extension}{Handler extension.}
\membersection{wxBitmapHandler::SetType}
\func{void}{SetType}{\param{long }{type}}
Sets the handler type.
\wxheading{Parameters}
\docparam{name}{Handler type.}

View File

@@ -1,723 +0,0 @@
\chapter{Introduction}\label{introduction}
\pagenumbering{arabic}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
\section{What is wxWindows?}
wxWindows is a C++ framework providing GUI (Graphical User
Interface) and other facilities on more than one platform. Version 2 currently
supports all desktop versions of MS Windows, Unix with GTK+, Unix with Motif,
and MacOS. An OS/2 port is in progress.
wxWindows was originally developed at the Artificial Intelligence
Applications Institute, University of Edinburgh, for internal use,
and was first made publicly available in 1992.
Version 2 is a vastly improved version written and maintained by
Julian Smart, Robert Roebling, Vadim Zeitlin, Vaclav Slavik and many others.
This manual contains a class reference and topic overviews.
For a selection of wxWindows tutorials, please see the documentation page on the \urlref{wxWindows web site}{http://www.wxwindows.org}.
Please note that in the following, ``MS Windows" often refers to all
platforms related to Microsoft Windows, including 16-bit and 32-bit
variants, unless otherwise stated. All trademarks are acknowledged.
\section{Why another cross-platform development tool?}
wxWindows was developed to provide a cheap and flexible way to maximize
investment in GUI application development. While a number of commercial
class libraries already existed for cross-platform development,
none met all of the following criteria:
\begin{enumerate}\itemsep=0pt
\item low price;
\item source availability;
\item simplicity of programming;
\item support for a wide range of compilers.
\end{enumerate}
Since wxWindows was started, several other free or almost-free
GUI frameworks have emerged. However, none has the range of
features, flexibility, documentation and the well-established
development team that wxWindows has.
As open source software, wxWindows has benefited from comments,
ideas, bug fixes, enhancements and the sheer enthusiasm of
users. This gives wxWindows a certain advantage over its
commercial competitors (and over free libraries without an
independent development team), plus a robustness against the
transience of one individual or company. This openness and
availability of source code is especially important when the
future of thousands of lines of application code may depend upon
the longevity of the underlying class library.
Version 2 goes much further than previous versions in terms of
generality and features, allowing applications to be produced
that are often indistinguishable from those produced using
single-platform toolkits such as Motif, GTK+ and MFC.
The importance of using a platform-independent class library
cannot be overstated, since GUI application development is very
time-consuming, and sustained popularity of particular GUIs
cannot be guaranteed. Code can very quickly become obsolete if
it addresses the wrong platform or audience. wxWindows helps to
insulate the programmer from these winds of change. Although
wxWindows may not be suitable for every application (such as an
OLE-intensive program), it provides access to most of the
functionality a GUI program normally requires, plus many extras
such as network programming, PostScript output, and HTML
rendering; and it can of course be extended as needs dictate.
As a bonus, it provides a far cleaner and easier programming
interface than the native APIs. Programmers may find it
worthwhile to use wxWindows even if they are developing on only
one platform.
It is impossible to sum up the functionality of wxWindows in a few paragraphs, but
here are some of the benefits:
\begin{itemize}\itemsep=0pt
\item Low cost (free, in fact!)
\item You get the source.
\item Available on a variety of popular platforms.
\item Works with almost all popular C++ compilers and Python.
\item Over 50 example programs.
\item Over 1000 pages of printable and on-line documentation.
\item Includes Tex2RTF, to allow you to produce your own documentation
in Windows Help, HTML and Word RTF formats.
\item Simple-to-use, object-oriented API.
\item Flexible event system.
\item Graphics calls include lines, rounded rectangles, splines, polylines, etc.
\item Constraint-based and sizer-based layouts.
\item Print/preview and document/view architectures.
\item Toolbar, notebook, tree control, advanced list control classes.
\item PostScript generation under Unix, normal MS Windows printing on the PC.
\item MDI (Multiple Document Interface) support.
\item Can be used to create DLLs under Windows, dynamic libraries on Unix.
\item Common dialogs for file browsing, printing, colour selection, etc.
\item Under MS Windows, support for creating metafiles and copying
them to the clipboard.
\item An API for invoking help from applications.
\item Ready-to-use HTML window (supporting a subset of HTML).
\item Dialog Editor for building dialogs.
\item Network support via a family of socket and protocol classes.
\item Support for platform independent image processing.
\item Built-in support for many file formats (BMP, PNG, JPEG, GIF, XPM, PNM, PCX).
\end{itemize}
\begin{comment}
\section{Changes from version 2.0}\label{versionchanges20}
These are a few of the differences between versions 2.0 and 2.2.
Removals:
\begin{itemize}\itemsep=0pt
\item GTK 1.0 no longer supported.
\end{itemize}
Additions and changes:
\begin{itemize}\itemsep=0pt
\item Corrected many classes to conform better to documented behaviour.
\item Added handlers for more image formats (Now GIF, JPEG, PCX, BMP, XPM, PNG, PNM).
\item Improved support for socket and network functions.
\item Support for different national font encodings.
\item Sizer based layout system.
\item HTML widget and help system.
\item Added some controls (e.g. wxSpinCtrl) and supplemented many.
\item Many optical improvements to GTK port.
\item Support for menu accelerators in GTK port.
\item Enhanced and improved support for scrolling, including child windows.
\item Complete rewrite of clipboard and drag and drop classes.
\item Improved support for ODBC databases.
\item Improved tab traversal in dialogs.
\end{itemize}
\end{comment}
\section{wxWindows requirements}\label{requirements}
To make use of wxWindows, you currently need one of the following setups.
(a) MS-Windows:
\begin{enumerate}\itemsep=0pt
\item A 486 or higher PC running MS Windows.
\item A Windows compiler: most are supported, but please see {\tt install.txt} for
details. Supported compilers include Microsoft Visual C++ 4.0 or higher, Borland C++, Cygwin,
Metrowerks CodeWarrior.
\item At least 60 MB of disk space.
\end{enumerate}
(b) Unix:
\begin{enumerate}\itemsep=0pt
\item Almost any C++ compiler, including GNU C++ (EGCS 1.1.1 or above).
\item Almost any Unix workstation, and one of: GTK+ 1.2, GTK+ 2.0, Motif 1.2 or higher, Lesstif.
\item At least 60 MB of disk space.
\end{enumerate}
(c) Mac OS/Mac OS X:
\begin{enumerate}\itemsep=0pt
\item A PowerPC Mac running Mac OS 8.6/9.x (eg. Classic) or Mac OS X 10.x.
\item CodeWarrior 5.3, 6 or 7 for Classic Mac OS.
\item The Apple Developer Tools (eg. GNU C++) or CodeWarrior 7 for Mac OS X.
\item At least 60 MB of disk space.
\end{enumerate}
\section{Availability and location of wxWindows}
\winhelponly{wxWindows is available by anonymous FTP and World Wide Web
from ftp://biolpc22.york.ac.uk/pub and/or http://www.wxwindows.org.}
\winhelpignore{wxWindows is available by anonymous FTP and World Wide Web
from \urlref{ftp://biolpc22.york.ac.uk/pub}{ftp://biolpc22.york.ac.uk/pub}
and/or \urlref{http://www.wxwindows.org}{http://www.wxwindows.org}.}
You can also buy a CD-ROM using the form on the Web site.
\section{Acknowledgements}
Thanks are due to AIAI for being willing to release the original version of
wxWindows into the public domain, and to our patient partners.
We would particularly like to thank the following for their contributions to wxWindows, and the many others who have been involved in
the project over the years. Apologies for any unintentional omissions from this list.
Yiorgos Adamopoulos, Jamshid Afshar, Alejandro Aguilar-Sierra, AIAI, Patrick Albert, Karsten Ballueder, Michael Bedward, Kai Bendorf, Yura Bidus, Keith
Gary Boyce, Chris Breeze, Pete Britton, Ian Brown, C. Buckley, Dmitri Chubraev, Robin Corbet, Cecil Coupe, Andrew Davison, Neil Dudman, Robin
Dunn, Hermann Dunkel, Jos van Eijndhoven, Tom Felici, Thomas Fettig, Matthew Flatt, Pasquale Foggia, Josep Fortiana, Todd Fries, Dominic Gallagher,
Guillermo Rodriguez Garcia, Wolfram Gloger, Norbert Grotz, Stefan Gunter, Bill Hale, Patrick Halke, Stefan Hammes, Guillaume Helle, Harco de Hilster, Cord Hockemeyer, Markus
Holzem, Olaf Klein, Leif Jensen, Bart Jourquin, Guilhem Lavaux, Jan Lessner, Nicholas Liebmann, Torsten Liermann, Per Lindqvist, Thomas Runge, Tatu
M\"{a}nnist\"{o}, Scott Maxwell, Thomas Myers, Oliver Niedung, Stefan Neis, Hernan Otero, Ian Perrigo, Timothy Peters, Giordano Pezzoli, Harri Pasanen, Thomaso Paoletti,
Garrett Potts, Marcel Rasche, Robert Roebling, Dino Scaringella, Jobst Schmalenbach, Arthur Seaton, Paul Shirley, Vaclav Slavik, Stein Somers, Petr Smilauer, Neil Smith,
Kari Syst\"{a}, Arthur Tetzlaff-Deas, Jonathan Tonberg, Jyrki Tuomi, David Webster, Janos Vegh, Andrea Venturoli, Vadim Zeitlin, Xiaokun Zhu, Edward Zimmermann.
`Graphplace', the basis for the wxGraphLayout library, is copyright Dr. Jos
T.J. van Eijndhoven of Eindhoven University of Technology. The code has
been used in wxGraphLayout with his permission.
We also acknowledge the author of XFIG, the excellent Unix drawing tool,
from the source of which we have borrowed some spline drawing code.
His copyright is included below.
{\it XFig2.1 is copyright (c) 1985 by Supoj Sutanthavibul. Permission to
use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided
that the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation, and that the name of M.I.T. not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission. M.I.T. makes no representations about the
suitability of this software for any purpose. It is provided ``as is''
without express or implied warranty.}
\chapter{Multi-platform development with wxWindows}\label{multiplat}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
This chapter describes the practical details of using wxWindows. Please
see the file install.txt for up-to-date installation instructions, and
changes.txt for differences between versions.
\section{Include files}
The main include file is {\tt "wx/wx.h"}; this includes the most commonly
used modules of wxWindows.
To save on compilation time, include only those header files relevant to the
source file. If you are using precompiled headers, you should include
the following section before any other includes:
\begin{verbatim}
// For compilers that support precompilation, includes "wx.h".
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
// Include your minimal set of headers here, or wx.h
#include <wx/wx.h>
#endif
... now your other include files ...
\end{verbatim}
The file {\tt "wx/wxprec.h"} includes {\tt "wx/wx.h"}. Although this incantation
may seem quirky, it is in fact the end result of a lot of experimentation,
and several Windows compilers to use precompilation (those tested are Microsoft Visual C++, Borland C++
and Watcom C++).
Borland precompilation is largely automatic. Visual C++ requires specification of {\tt "wx/wxprec.h"} as
the file to use for precompilation. Watcom C++ is automatic apart from the specification of
the .pch file. Watcom C++ is strange in requiring the precompiled header to be used only for
object files compiled in the same directory as that in which the precompiled header was created.
Therefore, the wxWindows Watcom C++ makefiles go through hoops deleting and recreating
a single precompiled header file for each module, thus preventing an accumulation of many
multi-megabyte .pch files.
\section{Libraries}
The GTK and Motif ports of wxWindow can create either a static library or a shared
library on most Unix or Unix-like systems. The static library is called libwx\_gtk.a
and libwx\_motif.a whereas the name of the shared library is dependent on the
system it is created on and the version you are using. The library name for the
GTK version of wxWindows 2.2 on Linux and Solaris will be libwx\_gtk-2.2.so.0.0.0,
on HP-UX, it will be libwx\_gtk-2.2.sl, on AIX just libwx\_gtk.a etc.
Under Windows, use the library wx.lib (release) or wxd.lib (debug) for stand-alone Windows
applications, or wxdll.lib (wxdlld.lib) for creating DLLs.
\section{Configuration}
Options are configurable in the file
\rtfsp{\tt "wx/XXX/setup.h"} where XXX is the required platform (such as msw, motif, gtk, mac). Some
settings are a matter of taste, some help with platform-specific problems, and
others can be set to minimize the size of the library. Please see the setup.h file
and {\tt install.txt} files for details on configuration.
Under Unix (GTK and Motif) the corresponding setup.h files are generated automatically
when configuring the wxWindows using the "configure" script. When using the RPM packages
for installing wxWindows on Linux, a correct setup.h is shipped in the package and
this must not be changed.
\section{Makefiles}
At the moment there is no attempt to make Unix makefiles and
PC makefiles compatible, i.e. one makefile is required for
each environment. The Unix ports use a sophisticated system based
on the GNU autoconf tool and this system will create the
makefiles as required on the respective platform. Although the
makefiles are not identical in Windows, Mac and Unix, care has
been taken to make them relatively similar so that moving from
one platform to another will be painless.
Sample makefiles for Unix (suffix .unx), MS C++ (suffix .DOS and .NT), Borland
C++ (.BCC and .B32) and Symantec C++ (.SC) are included for the library, demos
and utilities.
The controlling makefile for wxWindows is in the MS-Windows
directory {\tt src/msw} for the different Windows compiler and
in the build directory when using the Unix ports. The build
directory can be chosen by the user. It is the directory in
which the "configure" script is run. This can be the normal
base directory (by running {\tt ./configure} there) or any other
directory (e.g. {\tt ../configure} after creating a build-directory
in the directory level above the base directory).
Please see the platform-specific {\tt install.txt} file for further details.
\section{Windows-specific files}
wxWindows application compilation under MS Windows requires at least two
extra files, resource and module definition files.
\subsection{Resource file}\label{resources}
The least that must be defined in the Windows resource file (extension RC)
is the following statement:
\begin{verbatim}
rcinclude "wx/msw/wx.rc"
\end{verbatim}
which includes essential internal wxWindows definitions. The resource script
may also contain references to icons, cursors, etc., for example:
\begin{verbatim}
wxicon icon wx.ico
\end{verbatim}
The icon can then be referenced by name when creating a frame icon. See
the MS Windows SDK documentation.
\normalbox{Note: include wx.rc {\it after} any ICON statements
so programs that search your executable for icons (such
as the Program Manager) find your application icon first.}
\subsection{Module definition file}
A module definition file (extension DEF) is required for 16-bit applications, and
looks like the following:
\begin{verbatim}
NAME Hello
DESCRIPTION 'Hello'
EXETYPE WINDOWS
STUB 'WINSTUB.EXE'
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 1024
STACKSIZE 8192
\end{verbatim}
The only lines which will usually have to be changed per application are
NAME and DESCRIPTION.
\section{Allocating and deleting wxWindows objects}
In general, classes derived from wxWindow must dynamically allocated
with {\it new} and deleted with {\it delete}. If you delete a window,
all of its children and descendants will be automatically deleted,
so you don't need to delete these descendants explicitly.
When deleting a frame or dialog, use {\bf Destroy} rather than {\bf delete} so
that the wxWindows delayed deletion can take effect. This waits until idle time
(when all messages have been processed) to actually delete the window, to avoid
problems associated with the GUI sending events to deleted windows.
Don't create a window on the stack, because this will interfere
with delayed deletion.
If you decide to allocate a C++ array of objects (such as wxBitmap) that may
be cleaned up by wxWindows, make sure you delete the array explicitly
before wxWindows has a chance to do so on exit, since calling {\it delete} on
array members will cause memory problems.
wxColour can be created statically: it is not automatically cleaned
up and is unlikely to be shared between other objects; it is lightweight
enough for copies to be made.
Beware of deleting objects such as a wxPen or wxBitmap if they are still in use.
Windows is particularly sensitive to this: so make sure you
make calls like wxDC::SetPen(wxNullPen) or wxDC::SelectObject(wxNullBitmap) before deleting
a drawing object that may be in use. Code that doesn't do this will probably work
fine on some platforms, and then fail under Windows.
\section{Architecture dependency}
A problem which sometimes arises from writing multi-platform programs is that
the basic C types are not defined the same on all platforms. This holds true
for both the length in bits of the standard types (such as int and long) as
well as their byte order, which might be little endian (typically
on Intel computers) or big endian (typically on some Unix workstations). wxWindows
defines types and macros that make it easy to write architecture independent
code. The types are:
wxInt32, wxInt16, wxInt8, wxUint32, wxUint16 = wxWord, wxUint8 = wxByte
where wxInt32 stands for a 32-bit signed integer type etc. You can also check
which architecture the program is compiled on using the wxBYTE\_ORDER define
which is either wxBIG\_ENDIAN or wxLITTLE\_ENDIAN (in the future maybe wxPDP\_ENDIAN
as well).
The macros handling bit-swapping with respect to the applications endianness
are described in the \helpref{Byte order macros}{byteordermacros} section.
\section{Conditional compilation}
One of the purposes of wxWindows is to reduce the need for conditional
compilation in source code, which can be messy and confusing to follow.
However, sometimes it is necessary to incorporate platform-specific
features (such as metafile use under MS Windows). The symbols
listed in the file {\tt symbols.txt} may be used for this purpose,
along with any user-supplied ones.
\section{C++ issues}
The following documents some miscellaneous C++ issues.
\subsection{Templates}
wxWindows does not use templates since it is a notoriously unportable feature.
\subsection{RTTI}
wxWindows does not use run-time type information since wxWindows provides
its own run-time type information system, implemented using macros.
\subsection{Type of NULL}
Some compilers (e.g. the native IRIX cc) define NULL to be 0L so that
no conversion to pointers is allowed. Because of that, all these
occurrences of NULL in the GTK port use an explicit conversion such
as
{\small
\begin{verbatim}
wxWindow *my_window = (wxWindow*) NULL;
\end{verbatim}
}
It is recommended to adhere to this in all code using wxWindows as
this make the code (a bit) more portable.
\subsection{Precompiled headers}
Some compilers, such as Borland C++ and Microsoft C++, support
precompiled headers. This can save a great deal of compiling time. The
recommended approach is to precompile {\tt "wx.h"}, using this
precompiled header for compiling both wxWindows itself and any
wxWindows applications. For Windows compilers, two dummy source files
are provided (one for normal applications and one for creating DLLs)
to allow initial creation of the precompiled header.
However, there are several downsides to using precompiled headers. One
is that to take advantage of the facility, you often need to include
more header files than would normally be the case. This means that
changing a header file will cause more recompilations (in the case of
wxWindows, everything needs to be recompiled since everything includes {\tt "wx.h"}!)
A related problem is that for compilers that don't have precompiled
headers, including a lot of header files slows down compilation
considerably. For this reason, you will find (in the common
X and Windows parts of the library) conditional
compilation that under Unix, includes a minimal set of headers;
and when using Visual C++, includes {\tt wx.h}. This should help provide
the optimal compilation for each compiler, although it is
biased towards the precompiled headers facility available
in Microsoft C++.
\section{File handling}
When building an application which may be used under different
environments, one difficulty is coping with documents which may be
moved to different directories on other machines. Saving a file which
has pointers to full pathnames is going to be inherently unportable. One
approach is to store filenames on their own, with no directory
information. The application searches through a number of locally
defined directories to find the file. To support this, the class {\bf
wxPathList} makes adding directories and searching for files easy, and
the global function {\bf wxFileNameFromPath} allows the application to
strip off the filename from the path if the filename must be stored.
This has undesirable ramifications for people who have documents of the
same name in different directories.
As regards the limitations of DOS 8+3 single-case filenames versus
unrestricted Unix filenames, the best solution is to use DOS filenames
for your application, and also for document filenames {\it if} the user
is likely to be switching platforms regularly. Obviously this latter
choice is up to the application user to decide. Some programs (such as
YACC and LEX) generate filenames incompatible with DOS; the best
solution here is to have your Unix makefile rename the generated files
to something more compatible before transferring the source to DOS.
Transferring DOS files to Unix is no problem, of course, apart from EOL
conversion for which there should be a utility available (such as
dos2unix).
See also the File Functions section of the reference manual for
descriptions of miscellaneous file handling functions.
\chapter{Utilities and libraries supplied with wxWindows}\label{utilities}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
In addition to the core wxWindows library, a number of further
libraries and utilities are supplied with each distribution.
Some are under the 'contrib' hierarchy which mirrors the
structure of the main wxWindows hierarchy. See also the 'utils'
hierarchy. The first place to look for documentation about
these tools and libraries is under the wxWindows 'docs' hierarchy,
for example {\tt docs/htmlhelp/fl.chm}.
For other user-contributed packages, please see the Contributions page
on the \urlref{wxWindows Web site}{http://www.wxwindows.org}.
\begin{description}\itemsep=0pt
\item[{\bf Helpview}]
Helpview is a program for displaying wxWindows HTML
Help files. In many cases, you may wish to use the wxWindows HTML
Help classes from within your application, but this provides a
handy stand-alone viewer. See \helpref{wxHTML Notes}{wxhtml} for more details.
You can find it in {\tt samples/html/helpview}.
\item[{\bf Tex2RTF}]
Supplied with wxWindows is a utility called Tex2RTF for converting\rtfsp
\LaTeX\ manuals HTML, MS HTML Help, wxHTML Help, RTF, and Windows
Help RTF formats. Tex2RTF is used for the wxWindows manuals and can be used independently
by authors wishing to create on-line and printed manuals from the same\rtfsp
\LaTeX\ source. Please see the separate documentation for Tex2RTF.
You can find it under {\tt utils/tex2rtf}.
\item[{\bf Helpgen}]
Helpgen takes C++ header files and generates a Tex2RTF-compatible
documentation file for each class it finds, using comments as appropriate.
This is a good way to start a reference for a set of classes.
\item[{\bf Dialog Editor}]
Dialog Editor allows interactive construction of dialogs using
absolute positioning, producing WXR output files. This tool is generally deprecated
in favour of sizer-based tools. You can find Dialog Editor
in {\tt utils/dialoged}.
\item[{\bf XRC resource system}]
This is the sizer-aware replacement for the WXR resource system, and uses
XML-based resource specifications that can be generated by tools
such as \urlref{wxDesigner}{http://www.roebling.de} and XRC's own wxrcedit.
You can find this in {\tt contrib/src/xrc}, {\tt contrib/include/wx/xrc}, {\tt contrib/samples/xrc}, and {\tt contrib/utils/wxrcedit}.
For more information, see the \helpref{XML-based resource system overview}{xrcoverview}.
\item[{\bf Object Graphics Library}]
OGL defines an API for applications that need to display objects connected by lines.
The objects can be moved around and interacted with.
You can find this in {\tt contrib/src/ogl}, {\tt contrib/include/wx/ogl}, and {\tt contrib/samples/ogl}.
\item[{\bf Frame Layout library}]
FL provides sophisticated pane dragging and docking facilities.
You can find this in {\tt contrib/src/fl}, {\tt contrib/include/wx/fl}, and {\tt contrib/samples/fl}.
\item[{\bf Gizmos library}]
Gizmos is a collection of useful widgets and other classes. Classes include wxLEDNumberCtrl,
wxEditableListBox, wxMultiCellCanvas.
You can find this in {\tt contrib/src/fl}, {\tt contrib/include/wx/fl}, and {\tt contrib/samples/fl}.
\item[{\bf Net library}]
Net is a collection of very simple mail and web related classes. Currently
there is only wxEmail, which makes it easy to send email messages via MAPI on Windows or sendmail on Unix.
You can find this in {\tt contrib/src/net} and {\tt contrib/include/wx/net}.
\item[{\bf Animate library}]
Animate allows you to load animated GIFs and play them on a window. The library can be extended
to use other animation formats.
You can find this in {\tt contrib/src/animate}, {\tt contrib/include/wx/animate}, and {\tt contrib/samples/animate}.
\item[{\bf Canvas library}]
Canvas supports high-level, double-buffered drawing operations with transformations.
You can find this in {\tt contrib/src/canvas}, {\tt contrib/include/wx/canvas}, and {\tt contrib/samples/canvas}.
\item[{\bf MMedia library}]
Mmedia supports a variety of multimedia functionality. The status of this library is currently unclear.
You can find this in {\tt contrib/src/mmedia}, {\tt contrib/include/wx/mmedia}, and {\tt contrib/samples/mmedia}.
\item[{\bf Styled Text Control library}]
STC is a wrapper around Scintilla, a syntax-highlighting text editor.
You can find this in {\tt contrib/src/stc}, {\tt contrib/include/wx/stc}, and {\tt contrib/samples/stc}.
\item[{\bf Plot}]
Plot is a simple curve plotting library.
You can find this in {\tt contrib/src/plot}, {\tt contrib/include/wx/plot}, and {\tt contrib/samples/plot}.
\end{description}
\chapter{Programming strategies}\label{strategies}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
This chapter is intended to list strategies that may be useful when
writing and debugging wxWindows programs. If you have any good tips,
please submit them for inclusion here.
\section{Strategies for reducing programming errors}
\subsection{Use ASSERT}
Although I haven't done this myself within wxWindows, it is good
practice to use ASSERT statements liberally, that check for conditions that
should or should not hold, and print out appropriate error messages.
These can be compiled out of a non-debugging version of wxWindows
and your application. Using ASSERT is an example of `defensive programming':
it can alert you to problems later on.
\subsection{Use wxString in preference to character arrays}
Using wxString can be much safer and more convenient than using char *.
Again, I haven't practiced what I'm preaching, but I'm now trying to use
wxString wherever possible. You can reduce the possibility of memory
leaks substantially, and it is much more convenient to use the overloaded
operators than functions such as strcmp. wxString won't add a significant
overhead to your program; the overhead is compensated for by easier
manipulation (which means less code).
The same goes for other data types: use classes wherever possible.
\section{Strategies for portability}
\subsection{Use relative positioning or constraints}
Don't use absolute panel item positioning if you can avoid it. Different GUIs have
very differently sized panel items. Consider using the constraint system, although this
can be complex to program.
Alternatively, you could use alternative .wrc (wxWindows resource files) on different
platforms, with slightly different dimensions in each. Or space your panel items out
to avoid problems.
\subsection{Use wxWindows resource files}
Use .wrc (wxWindows resource files) where possible, because they can be easily changed
independently of source code. Bitmap resources can be set up to load different
kinds of bitmap depending on platform (see the section on resource files).
\section{Strategies for debugging}\label{debugstrategies}
\subsection{Positive thinking}
It is common to blow up the problem in one's imagination, so that it seems to threaten
weeks, months or even years of work. The problem you face may seem insurmountable:
but almost never is. Once you have been programming for some time, you will be able
to remember similar incidents that threw you into the depths of despair. But
remember, you always solved the problem, somehow!
Perseverance is often the key, even though a seemingly trivial problem
can take an apparently inordinate amount of time to solve. In the end,
you will probably wonder why you worried so much. That's not to say it
isn't painful at the time. Try not to worry -- there are many more important
things in life.
\subsection{Simplify the problem}
Reduce the code exhibiting the problem to the smallest program possible
that exhibits the problem. If it is not possible to reduce a large and
complex program to a very small program, then try to ensure your code
doesn't hide the problem (you may have attempted to minimize the problem
in some way: but now you want to expose it).
With luck, you can add a small amount of code that causes the program
to go from functioning to non-functioning state. This should give a clue
to the problem. In some cases though, such as memory leaks or wrong
deallocation, this can still give totally spurious results!
\subsection{Use a debugger}
This sounds like facetious advice, but it is surprising how often people
don't use a debugger. Often it is an overhead to install or learn how to
use a debugger, but it really is essential for anything but the most
trivial programs.
\subsection{Use logging functions}
There is a variety of logging functions that you can use in your program:
see \helpref{Logging functions}{logfunctions}.
Using tracing statements may be more convenient than using the debugger
in some circumstances (such as when your debugger doesn't support a lot
of debugging code, or you wish to print a bunch of variables).
\subsection{Use the wxWindows debugging facilities}
You can use wxDebugContext to check for
memory leaks and corrupt memory: in fact in debugging mode, wxWindows will
automatically check for memory leaks at the end of the program if wxWindows is suitably
configured. Depending on the operating system and compiler, more or less
specific information about the problem will be logged.
You should also use \helpref{debug macros}{debugmacros} as part of a `defensive programming' strategy,
scattering wxASSERTs liberally to test for problems in your code as early as possible. Forward thinking
will save a surprising amount of time in the long run.
See the \helpref{debugging overview}{debuggingoverview} for further information.
\subsection{Check Windows debug messages}
Under Windows, it is worth running your program with
\urlref{DbgView}{http://www.sysinternals.com} running or
some other program that shows Windows-generated debug messages. It is
possible it will show invalid handles being used. You may have fun seeing
what commercial programs cause these normally hidden errors! Microsoft
recommend using the debugging version of Windows, which shows up even
more problems. However, I doubt it is worth the hassle for most
applications. wxWindows is designed to minimize the possibility of such
errors, but they can still happen occasionally, slipping through unnoticed
because they are not severe enough to cause a crash.
\subsection{Genetic mutation}
If we had sophisticated genetic algorithm tools that could be applied
to programming, we could use them. Until then, a common -- if rather irrational --
technique is to just make arbitrary changes to the code until something
different happens. You may have an intuition why a change will make a difference;
otherwise, just try altering the order of code, comment lines out, anything
to get over an impasse. Obviously, this is usually a last resort.

View File

@@ -1,46 +0,0 @@
\section{\class{wxBoxSizer}}\label{wxboxsizer}
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 \helpref{Programming with wxBoxSizer}{boxsizerprogramming}.
\wxheading{Derived from}
\helpref{wxSizer}{wxsizer}\\
\helpref{wxObject}{wxobject}
\wxheading{See also}
\helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview}
\membersection{wxBoxSizer::wxBoxSizer}\label{wxboxsizerwxboxsizer}
\func{}{wxBoxSizer}{\param{int }{orient}}
Constructor for a wxBoxSizer. {\it orient} may be either of wxVERTICAL
or wxHORIZONTAL for creating either a column sizer or a row sizer.
\membersection{wxBoxSizer::RecalcSizes}\label{wxboxsizerrecalcsizes}
\func{void}{RecalcSizes}{\void}
Implements the calculation of a box sizer's dimensions and then sets
the size of its its children (calling \helpref{wxWindow::SetSize}{wxwindowsetsize}
if the child is a window). It is used internally only and must not be called
by the user. Documented for information.
\membersection{wxBoxSizer::CalcMin}\label{wxboxsizercalcmin}
\func{wxSize}{CalcMin}{\void}
Implements the calculation of a box sizer's minimal. It is used internally
only and must not be called by the user. Documented for information.
\membersection{wxBoxSizer::GetOrientation}\label{wxboxsizergetorientation}
\func{int}{GetOrientation}{\void}
Returns the orientation of the box sizer, either wxVERTICAL
or wxHORIZONTAL.

View File

@@ -1,371 +0,0 @@
\section{\class{wxBrush}}\label{wxbrush}
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.
\wxheading{Derived from}
\helpref{wxGDIObject}{wxgdiobject}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/brush.h>
\wxheading{Predefined objects}
Objects:
{\bf wxNullBrush}
Pointers:
{\bf wxBLUE\_BRUSH\\
wxGREEN\_BRUSH\\
wxWHITE\_BRUSH\\
wxBLACK\_BRUSH\\
wxGREY\_BRUSH\\
wxMEDIUM\_GREY\_BRUSH\\
wxLIGHT\_GREY\_BRUSH\\
wxTRANSPARENT\_BRUSH\\
wxCYAN\_BRUSH\\
wxRED\_BRUSH}
\wxheading{Remarks}
On a monochrome display, wxWindows shows
all brushes as white unless the colour is really black.
Do not initialize objects on the stack before the program commences,
since other required structures may not have been set up yet. Instead,
define global pointers to objects and create them in \helpref{wxApp::OnInit}{wxapponinit} or
when required.
An application may wish to create brushes with different
characteristics dynamically, and there is the consequent danger that a
large number of duplicate brushes will be created. Therefore an
application may wish to get a pointer to a brush by using the global
list of brushes {\bf wxTheBrushList}, and calling the member function
\rtfsp{\bf FindOrCreateBrush}.
wxBrush uses a reference counting system, so assignments between brushes are very
cheap. You can therefore use actual wxBrush objects instead of pointers without
efficiency problems. Once one wxBrush object changes its data it will create its
own brush data internally so that other brushes, which previously shared the
data using the reference counting, are not affected.
%TODO: an overview for wxBrush.
\wxheading{See also}
\helpref{wxBrushList}{wxbrushlist}, \helpref{wxDC}{wxdc}, \helpref{wxDC::SetBrush}{wxdcsetbrush}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBrush::wxBrush}
\func{}{wxBrush}{\void}
Default constructor. The brush will be uninitialised, and \helpref{wxBrush::Ok}{wxbrushok} will
return FALSE.
\func{}{wxBrush}{\param{const wxColour\&}{ colour}, \param{int}{ style}}
Constructs a brush from a colour object and style.
\func{}{wxBrush}{\param{const wxString\& }{colourName}, \param{int}{ style}}
Constructs a brush from a colour name and style.
\func{}{wxBrush}{\param{const wxBitmap\& }{stippleBitmap}}
Constructs a stippled brush using a bitmap.
\func{}{wxBrush}{\param{const wxBrush\&}{ brush}}
Copy constructor. This uses reference counting so is a cheap operation.
\wxheading{Parameters}
\docparam{colour}{Colour object.}
\docparam{colourName}{Colour name. The name will be looked up in the colour database.}
\docparam{style}{One of:
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxTRANSPARENT}}{Transparent (no fill).}
\twocolitem{{\bf wxSOLID}}{Solid.}
\twocolitem{{\bf wxBDIAGONAL\_HATCH}}{Backward diagonal hatch.}
\twocolitem{{\bf wxCROSSDIAG\_HATCH}}{Cross-diagonal hatch.}
\twocolitem{{\bf wxFDIAGONAL\_HATCH}}{Forward diagonal hatch.}
\twocolitem{{\bf wxCROSS\_HATCH}}{Cross hatch.}
\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.}
\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.}
\end{twocollist}}
\docparam{brush}{Pointer or reference to a brush to copy.}
\docparam{stippleBitmap}{A bitmap to use for stippling.}
\wxheading{Remarks}
If a stipple brush is created, the brush style will be set to wxSTIPPLE.
\wxheading{See also}
\helpref{wxBrushList}{wxbrushlist}, \helpref{wxColour}{wxcolour}, \helpref{wxColourDatabase}{wxcolourdatabase}
\membersection{wxBrush::\destruct{wxBrush}}
\func{void}{\destruct{wxBrush}}{\void}
Destructor.
\wxheading{Remarks}
The destructor may not delete the underlying brush object of the native windowing
system, since wxBrush uses a reference counting system for efficiency.
Although all remaining brushes are deleted when the application exits,
the application should try to clean up all brushes itself. This is because
wxWindows cannot know if a pointer to the brush object is stored in an
application data structure, and there is a risk of double deletion.
\membersection{wxBrush::GetColour}\label{wxbrushgetcolour}
\constfunc{wxColour\&}{GetColour}{\void}
Returns a reference to the brush colour.
\wxheading{See also}
\helpref{wxBrush::SetColour}{wxbrushsetcolour}
\membersection{wxBrush::GetStipple}\label{wxbrushgetstipple}
\constfunc{wxBitmap *}{GetStipple}{\void}
Gets a pointer to the stipple bitmap. If the brush does not have a wxSTIPPLE style,
this bitmap may be non-NULL but uninitialised (\helpref{wxBitmap::Ok}{wxbitmapok} returns FALSE).
\wxheading{See also}
\helpref{wxBrush::SetStipple}{wxbrushsetstipple}
\membersection{wxBrush::GetStyle}\label{wxbrushgetstyle}
\constfunc{int}{GetStyle}{\void}
Returns the brush style, one of:
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxTRANSPARENT}}{Transparent (no fill).}
\twocolitem{{\bf wxSOLID}}{Solid.}
\twocolitem{{\bf wxBDIAGONAL\_HATCH}}{Backward diagonal hatch.}
\twocolitem{{\bf wxCROSSDIAG\_HATCH}}{Cross-diagonal hatch.}
\twocolitem{{\bf wxFDIAGONAL\_HATCH}}{Forward diagonal hatch.}
\twocolitem{{\bf wxCROSS\_HATCH}}{Cross hatch.}
\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.}
\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.}
\twocolitem{{\bf wxSTIPPLE}}{Stippled using a bitmap.}
\twocolitem{{\bf wxSTIPPLE\_MASK\_OPAQUE}}{Stippled using a bitmap's mask.}
\end{twocollist}
\wxheading{See also}
\helpref{wxBrush::SetStyle}{wxbrushsetstyle}, \helpref{wxBrush::SetColour}{wxbrushsetcolour},\rtfsp
\helpref{wxBrush::SetStipple}{wxbrushsetstipple}
\membersection{wxBrush::Ok}\label{wxbrushok}
\constfunc{bool}{Ok}{\void}
Returns TRUE if the brush is initialised. It will return FALSE if the default
constructor has been used (for example, the brush is a member of a class, or
NULL has been assigned to it).
\membersection{wxBrush::SetColour}\label{wxbrushsetcolour}
\func{void}{SetColour}{\param{wxColour\& }{colour}}
Sets the brush colour using a reference to a colour object.
\func{void}{SetColour}{\param{const wxString\& }{colourName}}
Sets the brush colour using a colour name from the colour database.
\func{void}{SetColour}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}}
Sets the brush colour using red, green and blue values.
\wxheading{See also}
\helpref{wxBrush::GetColour}{wxbrushgetcolour}
\membersection{wxBrush::SetStipple}\label{wxbrushsetstipple}
\func{void}{SetStipple}{\param{const wxBitmap\&}{ bitmap}}
Sets the stipple bitmap.
\wxheading{Parameters}
\docparam{bitmap}{The bitmap to use for stippling.}
\wxheading{Remarks}
The style will be set to wxSTIPPLE, unless the bitmap has a mask associated
to it, in which case the style will be set to wxSTIPPLE\_MASK\_OPAQUE.
If the wxSTIPPLE variant is used, the bitmap will be used to fill out the
area to be drawn. If the wxSTIPPLE\_MASK\_OPAQUE is used, the current
text foreground and text background determine what colours are used for
displaying and the bits in the mask (which is a mono-bitmap actually)
determine where to draw what.
Note that under Windows 95, only 8x8 pixel large stipple bitmaps are
supported, Windows 98 and NT as well as GTK support arbitrary bitmaps.
\wxheading{See also}
\helpref{wxBitmap}{wxbitmap}
\membersection{wxBrush::SetStyle}\label{wxbrushsetstyle}
\func{void}{SetStyle}{\param{int}{ style}}
Sets the brush style.
\docparam{style}{One of:
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxTRANSPARENT}}{Transparent (no fill).}
\twocolitem{{\bf wxSOLID}}{Solid.}
\twocolitem{{\bf wxBDIAGONAL\_HATCH}}{Backward diagonal hatch.}
\twocolitem{{\bf wxCROSSDIAG\_HATCH}}{Cross-diagonal hatch.}
\twocolitem{{\bf wxFDIAGONAL\_HATCH}}{Forward diagonal hatch.}
\twocolitem{{\bf wxCROSS\_HATCH}}{Cross hatch.}
\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.}
\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.}
\twocolitem{{\bf wxSTIPPLE}}{Stippled using a bitmap.}
\twocolitem{{\bf wxSTIPPLE\_MASK\_OPAQUE}}{Stippled using a bitmap's mask.}
\end{twocollist}}
\wxheading{See also}
\helpref{wxBrush::GetStyle}{wxbrushgetstyle}
\membersection{wxBrush::operator $=$}\label{wxbrushassignment}
\func{wxBrush\&}{operator $=$}{\param{const wxBrush\& }{brush}}
Assignment operator, using reference counting. Returns a reference
to `this'.
\membersection{wxBrush::operator $==$}\label{wxbrushequals}
\func{bool}{operator $==$}{\param{const wxBrush\& }{brush}}
Equality operator. Two brushes are equal if they contain pointers
to the same underlying brush data. It does not compare each attribute,
so two independently-created brushes using the same parameters will
fail the test.
\membersection{wxBrush::operator $!=$}\label{wxbrushnotequals}
\func{bool}{operator $!=$}{\param{const wxBrush\& }{brush}}
Inequality operator. Two brushes are not equal if they contain pointers
to different underlying brush data. It does not compare each attribute.
\section{\class{wxBrushList}}\label{wxbrushlist}
A brush list is a list containing all brushes which have been created.
\wxheading{Derived from}
\helpref{wxList}{wxlist}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/gdicmn.h>
\wxheading{Remarks}
There is only one instance of this class: {\bf wxTheBrushList}. Use
this object to search for a previously created brush of the desired
type and create it if not already found. In some windowing systems,
the brush may be a scarce resource, so it can pay to reuse old
resources if possible. When an application finishes, all brushes will
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 wxWindows which make the
brush list less useful than it once was. Under Windows, scarce resources
are cleaned up internally if they are not being used. Also, a referencing
counting mechanism applied to all GDI objects means that some sharing
of underlying resources is possible. You don't have to keep track of pointers,
working out when it is safe delete a brush, because the referencing counting does
it for you. For example, you can set a brush in a device context, and then
immediately delete the brush you passed, because the brush is `copied'.
So you may find it easier to ignore the brush list, and instead create
and copy brushes 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 brush list is for wxWindows to keep
track of brushes in order to clean them up on exit. It is also kept for
backward compatibility with earlier versions of wxWindows.
\wxheading{See also}
\helpref{wxBrush}{wxbrush}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBrushList::wxBrushList}\label{wxbrushlistconstr}
\func{void}{wxBrushList}{\void}
Constructor. The application should not construct its own brush list:
use the object pointer {\bf wxTheBrushList}.
\membersection{wxBrushList::AddBrush}\label{wxbrushlistaddbrush}
\func{void}{AddBrush}{\param{wxBrush *}{brush}}
Used internally by wxWindows to add a brush to the list.
\membersection{wxBrushList::FindOrCreateBrush}\label{wxbrushlistfindorcreatebrush}
\func{wxBrush *}{FindOrCreateBrush}{\param{const wxColour\& }{colour}, \param{int}{ style}}
Finds a brush with the specified attributes and returns it, else creates a new brush, adds it
to the brush list, and returns it.
\func{wxBrush *}{FindOrCreateBrush}{\param{const wxString\& }{colourName}, \param{int}{ style}}
Finds a brush with the specified attributes and returns it, else creates a new brush, adds it
to the brush list, and returns it.
Finds a brush of the given specification, or creates one and adds it to the list.
\wxheading{Parameters}
\docparam{colour}{Colour object.}
\docparam{colourName}{Colour name, which should be in the colour database.}
\docparam{style}{Brush style. See \helpref{wxBrush::SetStyle}{wxbrushsetstyle} for a list of styles.}
\membersection{wxBrushList::RemoveBrush}\label{wxbrushlistremovebrush}
\func{void}{RemoveBrush}{\param{wxBrush *}{brush}}
Used by wxWindows to remove a brush from the list.

View File

@@ -1,46 +0,0 @@
\section{\class{wxBusyCursor}}\label{wxbusycursor}
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:
\begin{verbatim}
wxBusyCursor wait;
for (int i = 0; i < 100000; i++)
DoACalculation();
\end{verbatim}
It works by calling \helpref{wxBeginBusyCursor}{wxbeginbusycursor} in the constructor,
and \helpref{wxEndBusyCursor}{wxendbusycursor} in the destructor.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/utils.h>
\wxheading{See also}
\helpref{wxBeginBusyCursor}{wxbeginbusycursor},\rtfsp
\helpref{wxEndBusyCursor}{wxendbusycursor},\rtfsp
\helpref{wxWindowDisabler}{wxwindowdisabler}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBusyCursor::wxBusyCursor}
\func{}{wxBusyCursor}{\param{wxCursor*}{ cursor = wxHOURGLASS\_CURSOR}}
Constructs a busy cursor object, calling \helpref{wxBeginBusyCursor}{wxbeginbusycursor}.
\membersection{wxBusyCursor::\destruct{wxBusyCursor}}
\func{}{\destruct{wxBusyCursor}}{\void}
Destroys the busy cursor object, calling \helpref{wxEndBusyCursor}{wxendbusycursor}.

View File

@@ -1,69 +0,0 @@
\section{\class{wxBusyInfo}}\label{wxbusyinfo}
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:
\begin{verbatim}
wxBusyInfo wait("Please wait, working...");
for (int i = 0; i < 100000; i++)
{
DoACalculation();
}
\end{verbatim}
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:
\begin{verbatim}
wxWindowDisabler disableAll;
wxBusyInfo wait("Please wait, working...");
for (int i = 0; i < 100000; i++)
{
DoACalculation();
if ( !(i % 1000) )
wxTheApp->Yield();
}
\end{verbatim}
but take care to not cause undesirable reentrancies when doing it (see
\helpref{wxApp::Yield()}{wxappyield} for more details). The simplest way to do
it is to use \helpref{wxWindowDisabler}{wxwindowdisabler} class as illustrated
in the above example.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/busyinfo.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBusyInfo::wxBusyInfo}
\func{}{wxBusyInfo}{\param{const wxString\&}{ msg}, \param{wxParent }{*parent = NULL}}
Constructs a busy info window as child of {\it parent} and displays {\it msg}
in it.
{\bf NB:} If {\it parent} is not {\tt NULL} you must ensure that it is not
closed while the busy info is shown.
\membersection{wxBusyInfo::\destruct{wxBusyInfo}}
\func{}{\destruct{wxBusyInfo}}{\void}
Hides and closes the window containing the information text.

View File

@@ -1,153 +0,0 @@
\section{\class{wxButton}}\label{wxbutton}
A button is a control that contains a text string,
and is one of the commonest elements of a GUI. It may be placed on a
\rtfsp\helpref{dialog box}{wxdialog} or \helpref{panel}{wxpanel}, or indeed
almost any other window.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/button.h>
\wxheading{Window styles}
\twocolwidtha{5cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxBU\_LEFT}}{Left-justifies the label. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_TOP}}{Aligns the label to the top of the button. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_RIGHT}}{Right-justifies the bitmap label. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_BOTTOM}}{Aligns the label to the bottom of the button. WIN32 only.}
\twocolitem{\windowstyle{wxBU\_EXACTFIT}}{Creates the button as small as possible instead of making it of the standard size (which is the default behaviour ).}
\end{twocollist}
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED event,
when the button is clicked.}
\end{twocollist}
\wxheading{See also}
\helpref{wxBitmapButton}{wxbitmapbutton}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxButton::wxButton}\label{wxbuttonconstr}
\func{}{wxButton}{\void}
Default constructor.
\func{}{wxButton}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}}
Constructor, creating and showing a button.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Button identifier. A value of -1 indicates a default value.}
\docparam{label}{Text to be displayed on the button.}
\docparam{pos}{Button position.}
\docparam{size}{Button size. If the default size (-1, -1) is specified then the button is sized
appropriately for the text.}
\docparam{style}{Window style. See \helpref{wxButton}{wxbutton}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\wxheading{See also}
\helpref{wxButton::Create}{wxbuttoncreate}, \helpref{wxValidator}{wxvalidator}
\membersection{wxButton::\destruct{wxButton}}
\func{}{\destruct{wxButton}}{\void}
Destructor, destroying the button.
\membersection{wxButton::Create}\label{wxbuttoncreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}}
Button creation function for two-step creation. For more details, see \helpref{wxButton::wxButton}{wxbuttonconstr}.
\membersection{wxButton::GetLabel}\label{wxbuttongetlabel}
\constfunc{wxString}{GetLabel}{\void}
Returns the string label for the button.
\wxheading{Return value}
The button's label.
\wxheading{See also}
\helpref{wxButton::SetLabel}{wxbuttonsetlabel}
\membersection{wxButton::GetDefaultSize}\label{wxbuttongetdefaultsize}
\func{wxSize}{GetDefaultSize}{\void}
Returns the default size for the buttons. It is advised to make all the dialog
buttons of the same size and this function allows to retrieve the (platform and
current font dependent size) which should be the best suited for this.
\membersection{wxButton::SetDefault}\label{wxbuttonsetdefault}
\func{void}{SetDefault}{\void}
This sets the button to be the default item for the panel or dialog
box.
\wxheading{Remarks}
Under Windows, only dialog box buttons respond to this function. As
normal under Windows and Motif, pressing return causes the default button to
be depressed when the return key is pressed. See also \helpref{wxWindow::SetFocus}{wxwindowsetfocus}\rtfsp
which sets the keyboard focus for windows and text panel items,\rtfsp
and \helpref{wxPanel::SetDefaultItem}{wxpanelsetdefaultitem}.
Note that under Motif, calling this function immediately after
creation of a button and before the creation of other buttons
will cause misalignment of the row of buttons, since default
buttons are larger. To get around this, call {\it SetDefault}\rtfsp
after you have created a row of buttons: wxWindows will
then set the size of all buttons currently on the panel to
the same size.
\membersection{wxButton::SetLabel}\label{wxbuttonsetlabel}
\func{void}{SetLabel}{\param{const wxString\& }{label}}
Sets the string label for the button.
\wxheading{Parameters}
\docparam{label}{The label to set.}
\wxheading{See also}
\helpref{wxButton::GetLabel}{wxbuttongetlabel}

View File

@@ -1,64 +0,0 @@
\section{\class{wxCalculateLayoutEvent}}\label{wxcalculatelayoutevent}
This event is sent by \helpref{wxLayoutAlgorithm}{wxlayoutalgorithm} to
calculate the amount of the remaining client area that the window should
occupy.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/laywin.h>
\wxheading{Event table macros}
\twocolwidtha{7cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CALCULATE\_LAYOUT(func)}}{Process a wxEVT\_CALCULATE\_LAYOUT event,
which asks the window to take a 'bite' out of a rectangle provided by the algorithm.}
\end{twocollist}
\wxheading{See also}
\helpref{wxQueryLayoutInfoEvent}{wxquerylayoutinfoevent},\rtfsp
\helpref{wxSashLayoutWindow}{wxsashlayoutwindow},\rtfsp
\helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}.
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCalculateLayoutEvent::wxCalculateLayoutEvent}
\func{}{wxCalculateLayoutEvent}{\param{wxWindowID }{id = 0}}
Constructor.
\membersection{wxCalculateLayoutEvent::GetFlags}\label{wxcalculatelayouteventgetflags}
\constfunc{int}{GetFlags}{\void}
Returns the flags associated with this event. Not currently used.
\membersection{wxCalculateLayoutEvent::GetRect}\label{wxcalculatelayouteventgetrect}
\constfunc{wxRect}{GetRect}{\void}
Before the event handler is entered, returns the remaining parent client area that the window
could occupy. When the event handler returns, this should contain the remaining parent client rectangle,
after the event handler has subtracted the area that its window occupies.
\membersection{wxCalculateLayoutEvent::SetFlags}\label{wxcalculatelayouteventsetflags}
\func{void}{SetFlags}{\param{int }{flags}}
Sets the flags associated with this event. Not currently used.
\membersection{wxCalculateLayoutEvent::SetRect}\label{wxcalculatelayouteventsetrect}
\func{void}{SetRect}{\param{const wxRect\& }{rect}}
Call this to specify the new remaining parent client area, after the space occupied by the
window has been subtracted.

View File

@@ -1,453 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: calctrl.tex
%% Purpose: wxCalendarCtrl documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 03.01.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxCalendarCtrl}}\label{wxcalendarctrl}
The calendar control allows the user to pick a date interactively. For this,
it displays a window containing several parts: the control to pick the month
and the year at the top (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
{\tt EVT\_CALENDAR} event) by pressing {\tt <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 \helpref{wxCalendarDateAttr}{wxcalendardateattr} class.
An item without custom attributes is drawn with the default colours and
font and without border, but setting custom attributes with
\helpref{SetAttr}{wxcalendarctrlsetattr} 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 \helpref{wxDateTime}{tdateholidays} using
\helpref{SetHoliday}{wxcalendardateattrsetholiday} 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
{\tt EVT\_CALENDAR\_MONTH} event handler.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/calctrl.h>
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=4pt
\twocolitem{\windowstyle{wxCAL\_SUNDAY\_FIRST}}{Show Sunday as the first day in the week}
\twocolitem{\windowstyle{wxCAL\_MONDAY\_FIRST}}{Show Monday as the first day in the week}
\twocolitem{\windowstyle{wxCAL\_SHOW\_HOLIDAYS}}{Highlight holidays in the calendar}
\twocolitem{\windowstyle{wxCAL\_NO\_YEAR\_CHANGE}}{Disable the year changing}
\twocolitem{\windowstyle{wxCAL\_NO\_MONTH\_CHANGE}}{Disable the month (and, implicitly, the year) changing}
\twocolitem{\windowstyle{wxCAL\_SHOW\_SURROUNDING\_WEEKS}}{Show the neighbouring weeks in the previous and next months}
\twocolitem{\windowstyle{wxCAL\_SEQUENTIAL\_MONTH\_SELECTION}}{Use alternative, more compact, style for the month and year selection controls.}
\end{twocollist}
The default calendar style is {\tt wxCAL\_SHOW\_HOLIDAYS}.
\wxheading{Event table macros}
To process input from a calendar control, use these event handler macros to
direct input to member functions that take a
\helpref{wxCalendarEvent}{wxcalendarevent} argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=7pt
\twocolitem{{\bf EVT\_CALENDAR(id, func)}}{A day was double clicked in the calendar.}
\twocolitem{{\bf EVT\_CALENDAR\_SEL\_CHANGED(id, func)}}{The selected date changed.}
\twocolitem{{\bf EVT\_CALENDAR\_DAY(id, func)}}{The selected day changed.}
\twocolitem{{\bf EVT\_CALENDAR\_MONTH(id, func)}}{The selected month changed.}
\twocolitem{{\bf EVT\_CALENDAR\_YEAR(id, func)}}{The selected year changed.}
\twocolitem{{\bf EVT\_CALENDAR\_WEEKDAY\_CLICKED(id, func)}}{User clicked on the week day header}
\end{twocollist}%
Note that changing the selected date will result in either of
{\tt EVT\_CALENDAR\_DAY}, {\tt MONTH} or {\tt YEAR} events and
{\tt EVT\_CALENDAR\_SEL\_CHANGED} one.
\wxheading{Constants}
The following are the possible return values for
\helpref{HitTest}{wxcalendarctrlhittest} method:
{\small
\begin{verbatim}
enum wxCalendarHitTestResult
{
wxCAL_HITTEST_NOWHERE, // outside of anything
wxCAL_HITTEST_HEADER, // on the header (weekdays)
wxCAL_HITTEST_DAY // on a day in the calendar
}
\end{verbatim}
}
\wxheading{See also}
\helpref{Calendar sample}{samplecalendar}\\
\helpref{wxCalendarDateAttr}{wxcalendardateattr}\\
\helpref{wxCalendarEvent}{wxcalendarevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCalendarCtrl::wxCalendarCtrl}\label{wxcalendarctrlwxcalendarctrldef}
\func{}{wxCalendarCtrl}{\void}
Default constructor, use \helpref{Create}{wxcalendarctrlcreate} after it.
\membersection{wxCalendarCtrl::wxCalendarCtrl}\label{wxcalendarctrlwxcalendarctrl}
\func{}{wxCalendarCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxDateTime\& }{date = wxDefaultDateTime}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxCAL\_SHOW\_HOLIDAYS}, \param{const wxString\& }{name = wxCalendarNameStr}}
Does the same as \helpref{Create}{wxcalendarctrlcreate} method.
\membersection{wxCalendarCtrl::Create}\label{wxcalendarctrlcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxDateTime\& }{date = wxDefaultDateTime}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxCAL\_SHOW\_HOLIDAYS}, \param{const wxString\& }{name = wxCalendarNameStr}}
Creates the control. See \helpref{wxWindow}{wxwindowctor} for the meaning of
the parameters and the control overview for the possible styles.
\membersection{wxCalendarCtrl::\destruct{wxCalendarCtrl}}\label{wxcalendarctrldtor}
\func{}{\destruct{wxCalendarCtrl}}{\void}
Destroys the control.
\membersection{wxCalendarCtrl::SetDate}\label{wxcalendarctrlsetdate}
\func{void}{SetDate}{\param{const wxDateTime\& }{date}}
Sets the current date.
\membersection{wxCalendarCtrl::GetDate}\label{wxcalendarctrlgetdate}
\constfunc{const wxDateTime\&}{GetDate}{\void}
Gets the currently selected date.
\membersection{wxCalendarCtrl::EnableYearChange}\label{wxcalendarctrlenableyearchange}
\func{void}{EnableYearChange}{\param{bool }{enable = TRUE}}
This function should be used instead of changing {\tt wxCAL\_NO\_YEAR\_CHANGE}
style bit directly. It allows or disallows the user to change the year
interactively.
\membersection{wxCalendarCtrl::EnableMonthChange}\label{wxcalendarctrlenablemonthchange}
\func{void}{EnableMonthChange}{\param{bool }{enable = TRUE}}
This function should be used instead of changing
{\tt 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.
\membersection{wxCalendarCtrl::EnableHolidayDisplay}\label{wxcalendarctrlenableholidaydisplay}
\func{void}{EnableHolidayDisplay}{\param{bool }{display = TRUE}}
This function should be used instead of changing {\tt wxCAL\_SHOW\_HOLIDAYS}
style bit directly. It enables or disables the special highlighting of the
holidays.
\membersection{wxCalendarCtrl::SetHeaderColours}\label{wxcalendarctrlsetheadercolours}
\func{void}{SetHeaderColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}}
Set the colours used for painting the weekdays at the top of the control.
\membersection{wxCalendarCtrl::GetHeaderColourFg}\label{wxcalendarctrlgetheadercolourfg}
\constfunc{const wxColour\&}{GetHeaderColourFg}{\void}
Gets the foreground colour of the header part of the calendar window.
\wxheading{See also}
\helpref{SetHeaderColours}{wxcalendarctrlsetheadercolours}
\membersection{wxCalendarCtrl::GetHeaderColourBg}\label{wxcalendarctrlgetheadercolourbg}
\constfunc{const wxColour\&}{GetHeaderColourBg}{\void}
Gets the background colour of the header part of the calendar window.
\wxheading{See also}
\helpref{SetHeaderColours}{wxcalendarctrlsetheadercolours}
\membersection{wxCalendarCtrl::SetHighlightColours}\label{wxcalendarctrlsethighlightcolours}
\func{void}{SetHighlightColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}}
Set the colours to be used for highlighting the currently selected date.
\membersection{wxCalendarCtrl::GetHighlightColourFg}\label{wxcalendarctrlgethighlightcolourfg}
\constfunc{const wxColour\&}{GetHighlightColourFg}{\void}
Gets the foreground highlight colour.
\wxheading{See also}
\helpref{SetHighlightColours}{wxcalendarctrlsethighlightcolours}
\membersection{wxCalendarCtrl::GetHighlightColourBg}\label{wxcalendarctrlgethighlightcolourbg}
\constfunc{const wxColour\&}{GetHighlightColourBg}{\void}
Gets the background highlight colour.
\wxheading{See also}
\helpref{SetHighlightColours}{wxcalendarctrlsethighlightcolours}
\membersection{wxCalendarCtrl::SetHolidayColours}\label{wxcalendarctrlsetholidaycolours}
\func{void}{SetHolidayColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}}
Sets the colours to be used for the holidays highlighting (only used if the
window style includes {\tt wxCAL\_SHOW\_HOLIDAYS} flag).
\membersection{wxCalendarCtrl::GetHolidayColourFg}\label{wxcalendarctrlgetholidaycolourfg}
\constfunc{const wxColour\&}{GetHolidayColourFg}{\void}
Return the foreground colour currently used for holiday highlighting.
\wxheading{See also}
\helpref{SetHolidayColours}{wxcalendarctrlsetholidaycolours}
\membersection{wxCalendarCtrl::GetHolidayColourBg}\label{wxcalendarctrlgetholidaycolourbg}
\constfunc{const wxColour\&}{GetHolidayColourBg}{\void}
Return the background colour currently used for holiday highlighting.
\wxheading{See also}
\helpref{SetHolidayColours}{wxcalendarctrlsetholidaycolours}
\membersection{wxCalendarCtrl::GetAttr}\label{wxcalendarctrlgetattr}
\constfunc{wxCalendarDateAttr *}{GetAttr}{\param{size\_t }{day}}
Returns the attribute for the given date (should be in the range $1\ldots31$).
The returned pointer may be {\tt NULL}.
\membersection{wxCalendarCtrl::SetAttr}\label{wxcalendarctrlsetattr}
\func{void}{SetAttr}{\param{size\_t }{day}, \param{wxCalendarDateAttr* }{attr}}
Associates the attribute with the specified date (in the range $1\ldots31$).
If the pointer is {\tt NULL}, the items attribute is cleared.
\membersection{wxCalendarCtrl::SetHoliday}\label{wxcalendarctrlsetholiday}
\func{void}{SetHoliday}{\param{size\_t }{day}}
Marks the specified day as being a holiday in the current month.
\membersection{wxCalendarCtrl::ResetAttr}\label{wxcalendarctrlresetattr}
\func{void}{ResetAttr}{\param{size\_t }{day}}
Clears any attributes associated with the given day (in the range
$1\ldots31$).
\membersection{wxCalendarCtrl::HitTest}\label{wxcalendarctrlhittest}
\func{wxCalendarHitTestResult}{HitTest}{\param{const wxPoint\& }{pos}, \param{wxDateTime* }{date = NULL}, \param{wxDateTime::WeekDay* }{wd = NULL}}
Returns one of {\tt wxCAL\_HITTEST\_XXX}
\helpref{constants}{wxcalendarctrl} and fills either {\it date} or
{\it wd} pointer with the corresponding value depending on the hit test code.
\section{\class{wxCalendarDateAttr}}\label{wxcalendardateattr}
wxCalendarDateAttr is a custom attributes for a calendar date. The objects of
this class are used with \helpref{wxCalendarCtrl}{wxcalendarctrl}.
\wxheading{Derived from}
No base class
\wxheading{Constants}
Here are the possible kinds of borders which may be used to decorate a date:
\begin{verbatim}
enum wxCalendarDateBorder
{
wxCAL_BORDER_NONE, // no border (default)
wxCAL_BORDER_SQUARE, // a rectangular border
wxCAL_BORDER_ROUND // a round border
}
\end{verbatim}
\wxheading{See also}
\helpref{wxCalendarCtrl}{wxcalendarctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCalendarDateAttr::wxCalendarDateAttr}\label{wxcalendardateattrwxcalendardateattr}
\func{}{wxCalendarDateAttr}{\void}
\func{}{wxCalendarDateAttr}{\param{const wxColour\& }{colText}, \param{const wxColour\& }{colBack = wxNullColour}, \param{const wxColour\& }{colBorder = wxNullColour}, \param{const wxFont\& }{font = wxNullFont}, \param{wxCalendarDateBorder }{border = wxCAL\_BORDER\_NONE}}
\func{}{wxCalendarDateAttr}{\param{wxCalendarDateBorder }{border}, \param{const wxColour\& }{colBorder = wxNullColour}}
The constructors.
\membersection{wxCalendarDateAttr::SetTextColour}\label{wxcalendardateattrsettextcolour}
\func{void}{SetTextColour}{\param{const wxColour\& }{colText}}
Sets the text (foreground) colour to use.
\membersection{wxCalendarDateAttr::SetBackgroundColour}\label{wxcalendardateattrsetbackgroundcolour}
\func{void}{SetBackgroundColour}{\param{const wxColour\& }{colBack}}
Sets the text background colour to use.
\membersection{wxCalendarDateAttr::SetBorderColour}\label{wxcalendardateattrsetbordercolour}
\func{void}{SetBorderColour}{\param{const wxColour\& }{col}}
Sets the border colour to use.
\membersection{wxCalendarDateAttr::SetFont}\label{wxcalendardateattrsetfont}
\func{void}{SetFont}{\param{const wxFont\& }{font}}
Sets the font to use.
\membersection{wxCalendarDateAttr::SetBorder}\label{wxcalendardateattrsetborder}
\func{void}{SetBorder}{\param{wxCalendarDateBorder }{border}}
Sets the \helpref{border kind}{wxcalendardateattr}
\membersection{wxCalendarDateAttr::SetHoliday}\label{wxcalendardateattrsetholiday}
\func{void}{SetHoliday}{\param{bool }{holiday}}
Display the date with this attribute as a holiday.
\membersection{wxCalendarDateAttr::HasTextColour}\label{wxcalendardateattrhastextcolour}
\constfunc{bool}{HasTextColour}{\void}
Returns {\tt TRUE} if this item has a non default text foreground colour.
\membersection{wxCalendarDateAttr::HasBackgroundColour}\label{wxcalendardateattrhasbackgroundcolour}
\constfunc{bool}{HasBackgroundColour}{\void}
Returns {\tt TRUE} if this attribute specifies a non default text background colour.
\membersection{wxCalendarDateAttr::HasBorderColour}\label{wxcalendardateattrhasbordercolour}
\constfunc{bool}{HasBorderColour}{\void}
Returns {\tt TRUE} if this attribute specifies a non default border colour.
\membersection{wxCalendarDateAttr::HasFont}\label{wxcalendardateattrhasfont}
\constfunc{bool}{HasFont}{\void}
Returns {\tt TRUE} if this attribute specifies a non default font.
\membersection{wxCalendarDateAttr::HasBorder}\label{wxcalendardateattrhasborder}
\constfunc{bool}{HasBorder}{\void}
Returns {\tt TRUE} if this attribute specifies a non default (i.e. any) border.
\membersection{wxCalendarDateAttr::IsHoliday}\label{wxcalendardateattrisholiday}
\constfunc{bool}{IsHoliday}{\void}
Returns {\tt TRUE} if this attribute specifies that this item should be
displayed as a holiday.
\membersection{wxCalendarDateAttr::GetTextColour}\label{wxcalendardateattrgettextcolour}
\constfunc{const wxColour\&}{GetTextColour}{\void}
Returns the text colour to use for the item with this attribute.
\membersection{wxCalendarDateAttr::GetBackgroundColour}\label{wxcalendardateattrgetbackgroundcolour}
\constfunc{const wxColour\&}{GetBackgroundColour}{\void}
Returns the background colour to use for the item with this attribute.
\membersection{wxCalendarDateAttr::GetBorderColour}\label{wxcalendardateattrgetbordercolour}
\constfunc{const wxColour\&}{GetBorderColour}{\void}
Returns the border colour to use for the item with this attribute.
\membersection{wxCalendarDateAttr::GetFont}\label{wxcalendardateattrgetfont}
\constfunc{const wxFont\&}{GetFont}{\void}
Returns the font to use for the item with this attribute.
\membersection{wxCalendarDateAttr::GetBorder}\label{wxcalendardateattrgetborder}
\constfunc{wxCalendarDateBorder}{GetBorder}{\void}
Returns the \helpref{border}{wxcalendardateattr} to use for the item with this attribute.
\section{\class{wxCalendarEvent}}\label{wxcalendarevent}
The wxCalendarEvent class is used together with
\helpref{wxCalendarCtrl}{wxcalendarctrl}.
\wxheading{See also}
\helpref{wxCalendarCtrl}{wxcalendarctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCalendarEvent::GetDate}{wxcalendareventgetdate}
\constfunc{const wxDateTime\&}{GetDate}{\void}
Returns the date. This function may be called for all event types except
{\tt EVT\_CALENDAR\_WEEKDAY\_CLICKED} one for which it doesn't make sense.
\membersection{wxCalendarEvent::GetWeekDay}{wxcalendareventgetweekday}
\constfunc{wxDateTime::WeekDay}{GetWeekDay}{\void}
Returns the week day on which the user clicked in
{\tt EVT\_CALENDAR\_WEEKDAY\_CLICKED} handler. It doesn't make sense to call
this function in other handlers.

View File

@@ -1,165 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: caret.tex
%% Purpose: wxCaret documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 20.06.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxCaret}}\label{wxcaret}
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 \helpref{wxWindow::GetCaret}{wxwindowgetcaret}. The same caret
can't be reused in two different windows.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/caret.h>
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCaret::wxCaret}\label{wxcaretwxcaret}
\func{}{wxCaret}{\void}
Default constructor: you must use one of Create() functions later.
\func{}{wxCaret}{\param{wxWindow* }{window}, \param{int }{width}, \param{int }{height}}
\func{}{wxCaret}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
Create the caret of given (in pixels) width and height and associates it
with the given window.
\membersection{wxCaret::Create}\label{wxcaretcreate}
\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{int }{width}, \param{int }{height}}
\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
Create the caret of given (in pixels) width and height and associates it
with the given window (same as constructor).
\membersection{wxCaret::GetBlinkTime}\label{wxcaretgetblinktime}
\func{static int}{GetBlinkTime}{\void}
Returns the blink time which is measured in milliseconds and is the time elapsed
between 2 inversions of the caret (blink time of the caret is the same
for all carets, so this functions is static).
\membersection{wxCaret::GetPosition}\label{wxcaretgetposition}
\constfunc{void}{GetPosition}{\param{int* }{x}, \param{int* }{y}}
\constfunc{wxPoint}{GetPosition}{\void}
Get the caret position (in pixels).
\perlnote{In wxPerl there are two methods instead of a single overloaded
method:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetPosition()}}{Returns a Wx::Point}
\twocolitem{{\bf GetPositionXY()}}{Returns a 2-element list
{\tt ( x, y )}}
\end{twocollist}
}}
\membersection{wxCaret::GetSize}\label{wxcaretgetsize}
\constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}}
\constfunc{wxSize}{GetSize}{\void}
Get the caret size.
\perlnote{In wxPerl there are two methods instead of a single overloaded
method:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetSize()}}{Returns a Wx::Size}
\twocolitem{{\bf GetSizeWH()}}{Returns a 2-element list
{\tt ( width, height )}}
\end{twocollist}
}}
\membersection{wxCaret::GetWindow}\label{wxcaretgetwindow}
\constfunc{wxWindow*}{GetWindow}{\void}
Get the window the caret is associated with.
\membersection{wxCaret::Hide}\label{wxcarethide}
\func{void}{Hide}{\void}
Same as \helpref{wxCaret::Show(FALSE)}{wxcaretshow}.
\membersection{wxCaret::IsOk}\label{wxcaretisok}
\constfunc{bool}{IsOk}{\void}
Returns TRUE if the caret was created successfully.
\membersection{wxCaret::IsVisible}\label{wxcaretisvisible}
\constfunc{bool}{IsVisible}{\void}
Returns TRUE if the caret is visible and FALSE if it is permanently
hidden (if it is is blinking and not shown currently but will be after the
next blink, this method still returns TRUE).
\membersection{wxCaret::Move}\label{wxcaretmove}
\func{void}{Move}{\param{int }{x}, \param{int }{y}}
\func{void}{Move}{\param{const wxPoint\& }{pt}}
Move the caret to given position (in logical coordinates).
\membersection{wxCaret::SetBlinkTime}\label{wxcaretsetblinktime}
\func{static void}{SetBlinkTime}{\param{int }{milliseconds}}
Sets the blink time for all the carets.
\wxheading{Remarks}
Under Windows, this function will change the blink time for {\bf all} carets
permanently (until the next time it is called), even for the carets in other
applications.
\wxheading{See also}
\helpref{GetBlinkTime}{wxcaretgetblinktime}
\membersection{wxCaret::SetSize}\label{wxcaretsetsize}
\func{void}{SetSize}{\param{int }{width}, \param{int }{height}}
\func{void}{SetSize}{\param{const wxSize\& }{size}}
Changes the size of the caret.
\membersection{wxCaret::Show}\label{wxcaretshow}
\func{void}{Show}{\param{bool }{show = TRUE}}
Shows or hides the caret. Notice that if the caret was hidden $N$ times, it
must be shown $N$ times as well to reappear on the screen.

View File

@@ -1,623 +0,0 @@
\chapter{Classes by category}\label{classesbycat}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
A classification of wxWindows classes by category.
{\large {\bf Managed windows}}
There are several types of window that are directly controlled by the
window manager (such as MS Windows, or the Motif Window Manager).
Frames may contain windows, and dialog boxes may directly contain controls.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDialog}{wxdialog}}{Dialog box}
\twocolitem{\helpref{wxFrame}{wxframe}}{Normal frame}
\twocolitem{\helpref{wxMDIChildFrame}{wxmdichildframe}}{MDI child frame}
\twocolitem{\helpref{wxMDIParentFrame}{wxmdiparentframe}}{MDI parent frame}
\twocolitem{\helpref{wxMiniFrame}{wxminiframe}}{A frame with a small title bar}
\twocolitem{\helpref{wxSplashScreen}{wxsplashscreen}}{Splash screen class}
%\twocolitem{\helpref{wxTabbedDialog}{wxtabbeddialog}}{Tabbed dialog
%(deprecated, use wxNotebook instead)}
\twocolitem{\helpref{wxTipWindow}{wxtipwindow}}{Shows text in a small window}
\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog}
\end{twocollist}
See also {\bf Common dialogs}.
{\large {\bf Miscellaneous windows}}
The following are a variety of classes that are derived from wxWindow.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxPanel}{wxpanel}}{A window whose colour changes according to current user settings}
\twocolitem{\helpref{wxScrolledWindow}{wxscrolledwindow}}{Window with automatically managed scrollbars}
\twocolitem{\helpref{wxGrid}{wxgrid}}{A grid (table) window}
\twocolitem{\helpref{wxSplitterWindow}{wxsplitterwindow}}{Window which can be split vertically or horizontally}
\twocolitem{\helpref{wxStatusBar}{wxstatusbar}}{Implements the status bar on a frame}
\twocolitem{\helpref{wxToolBar}{wxtoolbar}}{Toolbar class}
%\twocolitem{\helpref{wxTabbedPanel}{wxtabbedpanel}}{Tabbed panel (to be replaced with wxNotebook)}
\twocolitem{\helpref{wxNotebook}{wxnotebook}}{Notebook class}
\twocolitem{\helpref{wxPlotWindow}{wxplotwindow}}{A class to display data.}
\twocolitem{\helpref{wxSashWindow}{wxsashwindow}}{Window with four optional sashes that can be dragged}
\twocolitem{\helpref{wxSashLayoutWindow}{wxsashlayoutwindow}}{Window that can be involved in an IDE-like layout arrangement}
\twocolitem{\helpref{wxWizardPage}{wxwizardpage}}{A base class for the page in wizard dialog.}
\twocolitem{\helpref{wxWizardPageSimple}{wxwizardpagesimple}}{A page in wizard dialog.}
\end{twocollist}
{\large {\bf Common dialogs}}
\overview{Overview}{commondialogsoverview}
Common dialogs are ready-made dialog classes which are frequently used
in an application.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDialog}{wxdialog}}{Base class for common dialogs}
\twocolitem{\helpref{wxColourDialog}{wxcolourdialog}}{Colour chooser dialog}
\twocolitem{\helpref{wxDirDialog}{wxdirdialog}}{Directory selector dialog}
\twocolitem{\helpref{wxFileDialog}{wxfiledialog}}{File selector dialog}
\twocolitem{\helpref{wxFindReplaceDialog}{wxfindreplacedialog}}{Text search/replace dialog}
\twocolitem{\helpref{wxMultipleChoiceDialog}{wxmultiplechoicedialog}}{Dialog to get one or more selections from a list}
\twocolitem{\helpref{wxSingleChoiceDialog}{wxsinglechoicedialog}}{Dialog to get a single selection from a list and return the string}
\twocolitem{\helpref{wxTextEntryDialog}{wxtextentrydialog}}{Dialog to get a single line of text from the user}
\twocolitem{\helpref{wxFontDialog}{wxfontdialog}}{Font chooser dialog}
\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog}
\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog}
\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog}
\twocolitem{\helpref{wxMessageDialog}{wxmessagedialog}}{Simple message box dialog}
\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog.}
\end{twocollist}
{\large {\bf Controls}}
Typically, these are small windows which provide interaction with the user. Controls
that are not static can have \helpref{validators}{wxvalidator} associated with them.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxControl}{wxcontrol}}{The base class for controls}
\twocolitem{\helpref{wxButton}{wxbutton}}{Push button control, displaying text}
\twocolitem{\helpref{wxBitmapButton}{wxbitmapbutton}}{Push button control, displaying a bitmap}
\twocolitem{\helpref{wxToggleButton}{wxtogglebutton}}{A button which stays pressed when clicked by user.}
\twocolitem{\helpref{wxCalendarCtrl}{wxcalendarctrl}}{Date picker control}
\twocolitem{\helpref{wxCheckBox}{wxcheckbox}}{Checkbox control}
\twocolitem{\helpref{wxCheckListBox}{wxchecklistbox}}{A listbox with a checkbox to the left of each item}
\twocolitem{\helpref{wxChoice}{wxchoice}}{Choice control (a combobox without the editable area)}
\twocolitem{\helpref{wxComboBox}{wxcombobox}}{A choice with an editable area}
\twocolitem{\helpref{wxGauge}{wxgauge}}{A control to represent a varying quantity, such as time remaining}
\twocolitem{\helpref{wxGenericDirCtrl}{wxgenericdirctrl}}{A control for displaying a directory tree}
\twocolitem{\helpref{wxStaticBox}{wxstaticbox}}{A static, or group box for visually grouping related controls}
\twocolitem{\helpref{wxListBox}{wxlistbox}}{A list of strings for single or multiple selection}
\twocolitem{\helpref{wxListCtrl}{wxlistctrl}}{A control for displaying lists of strings and/or icons, plus a multicolumn report view}
\twocolitem{\helpref{wxListView}{wxlistview}}{A simpler interface ({\it fa\c{c}ade} for wxListCtrl in report mode}
\twocolitem{\helpref{wxTabCtrl}{wxtabctrl}}{Manages several tabs}
\twocolitem{\helpref{wxTextCtrl}{wxtextctrl}}{Single or multiline text editing control}
\twocolitem{\helpref{wxTreeCtrl}{wxtreectrl}}{Tree (hierarchy) control}
\twocolitem{\helpref{wxScrollBar}{wxscrollbar}}{Scrollbar control}
\twocolitem{\helpref{wxSpinButton}{wxspinbutton}}{A spin or `up-down' control}
\twocolitem{\helpref{wxSpinCtrl}{wxspinctrl}}{A spin control - i.e. spin button and text control}
\twocolitem{\helpref{wxStaticText}{wxstatictext}}{One or more lines of non-editable text}
\twocolitem{\helpref{wxStaticBitmap}{wxstaticbitmap}}{A control to display a bitmap}
\twocolitem{\helpref{wxRadioBox}{wxradiobox}}{A group of radio buttons}
\twocolitem{\helpref{wxRadioButton}{wxradiobutton}}{A round button to be used with others in a mutually exclusive way}
\twocolitem{\helpref{wxSlider}{wxslider}}{A slider that can be dragged by the user}
\end{twocollist}
{\large {\bf Menus}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxMenu}{wxmenu}}{Displays a series of menu items for selection}
\twocolitem{\helpref{wxMenuBar}{wxmenubar}}{Contains a series of menus for use with a frame}
\twocolitem{\helpref{wxMenuItem}{wxmenuitem}}{Represents a single menu item}
\end{twocollist}
{\large {\bf Window layout}}
There are two different systems for laying out windows (and dialogs in particular).
One is based upon so-called sizers and it requires less typing, thinking and calculating
and will in almost all cases produce dialogs looking equally well on all platforms, the
other is based on so-called constraints and is deprecated, though still available.
\overview{Sizer overview}{sizeroverview} describes sizer-based layout.
These are the classes relevant to sizer-based layout.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxSizer}{wxsizer}}{Abstract base class}
\twocolitem{\helpref{wxGridSizer}{wxgridsizer}}{A sizer for laying out windows in a grid with all fields having the same size}
\twocolitem{\helpref{wxFlexGridSizer}{wxflexgridsizer}}{A sizer for laying out windows in a flexible grid}
\twocolitem{\helpref{wxBoxSizer}{wxboxsizer}}{A sizer for laying out windows in a row or column}
\twocolitem{\helpref{wxStaticBoxSizer}{wxstaticboxsizer}}{Same as wxBoxSizer, but with a surrounding static box}
\twocolitem{\helpref{wxNotebookSizer}{wxnotebooksizer}}{Sizer to use with the wxNotebook control}
\end{twocollist}
\overview{Constraints overview}{constraintsoverview} describes constraints-based layout.
These are the classes relevant to constraints-based window layout.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}}{Represents a single constraint dimension}
\twocolitem{\helpref{wxLayoutConstraints}{wxlayoutconstraints}}{Represents the constraints for a window class}
\end{twocollist}
{\large {\bf Device contexts}}
\overview{Overview}{dcoverview}
Device contexts are surfaces that may be drawn on, and provide an
abstraction that allows parameterisation of your drawing code
by passing different device contexts.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxClientDC}{wxclientdc}}{A device context to access the client area outside {\bf OnPaint} events}
\twocolitem{\helpref{wxPaintDC}{wxpaintdc}}{A device context to access the client area inside {\bf OnPaint} events}
\twocolitem{\helpref{wxWindowDC}{wxwindowdc}}{A device context to access the non-client area}
\twocolitem{\helpref{wxScreenDC}{wxscreendc}}{A device context to access the entire screen}
\twocolitem{\helpref{wxDC}{wxdc}}{The device context base class}
\twocolitem{\helpref{wxMemoryDC}{wxmemorydc}}{A device context for drawing into bitmaps}
\twocolitem{\helpref{wxMetafileDC}{wxmetafiledc}}{A device context for drawing into metafiles}
\twocolitem{\helpref{wxPostScriptDC}{wxpostscriptdc}}{A device context for drawing into PostScript files}
\twocolitem{\helpref{wxPrinterDC}{wxprinterdc}}{A device context for drawing to printers}
\end{twocollist}
{\large {\bf Graphics device interface}}
\overview{Bitmaps overview}{wxbitmapoverview}
These classes are related to drawing on device contexts and windows.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxColour}{wxcolour}}{Represents the red, blue and green elements of a colour}
\twocolitem{\helpref{wxDCClipper}{wxdcclipper}}{Wraps the operations of setting and destroying the clipping region}
\twocolitem{\helpref{wxBitmap}{wxbitmap}}{Represents a bitmap}
\twocolitem{\helpref{wxBrush}{wxbrush}}{Used for filling areas on a device context}
\twocolitem{\helpref{wxBrushList}{wxbrushlist}}{The list of previously-created brushes}
\twocolitem{\helpref{wxCursor}{wxcursor}}{A small, transparent bitmap representing the cursor}
\twocolitem{\helpref{wxFont}{wxfont}}{Represents fonts}
\twocolitem{\helpref{wxFontList}{wxfontlist}}{The list of previously-created fonts}
\twocolitem{\helpref{wxIcon}{wxicon}}{A small, transparent bitmap for assigning to frames and drawing on device contexts}
\twocolitem{\helpref{wxImage}{wximage}}{A platform-independent image class}
\twocolitem{\helpref{wxImageList}{wximagelist}}{A list of images, used with some controls}
\twocolitem{\helpref{wxMask}{wxmask}}{Represents a mask to be used with a bitmap for transparent drawing}
\twocolitem{\helpref{wxPen}{wxpen}}{Used for drawing lines on a device context}
\twocolitem{\helpref{wxPenList}{wxpenlist}}{The list of previously-created pens}
\twocolitem{\helpref{wxPalette}{wxpalette}}{Represents a table of indices into RGB values}
\twocolitem{\helpref{wxRegion}{wxregion}}{Represents a simple or complex region on a window or device context}
\end{twocollist}
{\large {\bf Events}}
\overview{Overview}{eventhandlingoverview}
An event object contains information about a specific event. Event handlers
(usually member functions) have a single, event argument.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxActivateEvent}{wxactivateevent}}{A window or application activation event}
\twocolitem{\helpref{wxCalendarEvent}{wxcalendarevent}}{Used with \helpref{wxCalendarCtrl}{wxcalendarctrl}}
\twocolitem{\helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}}{Used to calculate window layout}
\twocolitem{\helpref{wxCloseEvent}{wxcloseevent}}{A close window or end session event}
\twocolitem{\helpref{wxCommandEvent}{wxcommandevent}}{An event from a variety of standard controls}
\twocolitem{\helpref{wxDialUpEvent}{wxdialupevent}}{Event send by \helpref{wxDialUpManager}{wxdialupmanager}}
\twocolitem{\helpref{wxDropFilesEvent}{wxdropfilesevent}}{A drop files event}
\twocolitem{\helpref{wxEraseEvent}{wxeraseevent}}{An erase background event}
\twocolitem{\helpref{wxEvent}{wxevent}}{The event base class}
\twocolitem{\helpref{wxFindDialogEvent}{wxfinddialogevent}}{Event sent by
\helpref{wxFindReplaceDialog}{wxfindreplacedialog}}
\twocolitem{\helpref{wxFocusEvent}{wxfocusevent}}{A window focus event}
\twocolitem{\helpref{wxKeyEvent}{wxkeyevent}}{A keypress event}
\twocolitem{\helpref{wxIconizeEvent}{wxiconizeevent}}{An iconize/restore event}
\twocolitem{\helpref{wxIdleEvent}{wxidleevent}}{An idle event}
\twocolitem{\helpref{wxInitDialogEvent}{wxinitdialogevent}}{A dialog initialisation event}
\twocolitem{\helpref{wxJoystickEvent}{wxjoystickevent}}{A joystick event}
\twocolitem{\helpref{wxListEvent}{wxlistevent}}{A list control event}
\twocolitem{\helpref{wxMaximizeEvent}{wxmaximizeevent}}{A maximize event}
\twocolitem{\helpref{wxMenuEvent}{wxmenuevent}}{A menu event}
\twocolitem{\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}}{A mouse capture changed event}
\twocolitem{\helpref{wxMouseEvent}{wxmouseevent}}{A mouse event}
\twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{A move event}
\twocolitem{\helpref{wxNotebookEvent}{wxnotebookevent}}{A notebook control event}
\twocolitem{\helpref{wxNotifyEvent}{wxnotifyevent}}{A notification event, which can be vetoed}
\twocolitem{\helpref{wxPaintEvent}{wxpaintevent}}{A paint event}
\twocolitem{\helpref{wxProcessEvent}{wxprocessevent}}{A process ending event}
\twocolitem{\helpref{wxQueryLayoutInfoEvent}{wxquerylayoutinfoevent}}{Used to query layout information}
\twocolitem{\helpref{wxScrollEvent}{wxscrollevent}}{A scroll event from sliders, stand-alone scrollbars and spin buttons}
\twocolitem{\helpref{wxScrollWinEvent}{wxscrollwinevent}}{A scroll event from scrolled windows}
\twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{A size event}
\twocolitem{\helpref{wxSocketEvent}{wxsocketevent}}{A socket event}
\twocolitem{\helpref{wxSpinEvent}{wxspinevent}}{An event from \helpref{wxSpinButton}{wxspinbutton}}
\twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{A system colour change event}
\twocolitem{\helpref{wxTabEvent}{wxtabevent}}{A tab control event}
\twocolitem{\helpref{wxTreeEvent}{wxtreeevent}}{A tree control event}
\twocolitem{\helpref{wxUpdateUIEvent}{wxupdateuievent}}{A user interface update event}
\twocolitem{\helpref{wxWizardEvent}{wxwizardevent}}{A wizard event}
\end{twocollist}
{\large {\bf Validators}}
\overview{Overview}{validatoroverview}
These are the window validators, used for filtering and validating
user input.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxValidator}{wxvalidator}}{Base validator class}
\twocolitem{\helpref{wxTextValidator}{wxtextvalidator}}{Text control validator class}
\twocolitem{\helpref{wxGenericValidator}{wxgenericvalidator}}{Generic control validator class}
\end{twocollist}
{\large {\bf Data structures}}
These are the data structure classes supported by wxWindows.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class}
\twocolitem{\helpref{wxDate}{wxdate}}{A class for date manipulation (deprecated in favour of wxDateTime)}
\twocolitem{\helpref{wxDateSpan}{wxdatespan}}{A logical time interval.}
\twocolitem{\helpref{wxDateTime}{wxdatetime}}{A class for date/time manipulations}
\twocolitem{\helpref{wxExpr}{wxexpr}}{A class for flexible I/O}
\twocolitem{\helpref{wxExprDatabase}{wxexprdatabase}}{A class for flexible I/O}
\twocolitem{\helpref{wxHashMap}{wxhashmap}}{A simple hash map implementation}
\twocolitem{\helpref{wxHashTable}{wxhashtable}}{A simple hash table implementation (deprecated, use wxHashMap)}
% \twocolitem{\helpref{wxHashTableLong}{wxhashtablelong}}{A wxHashTable version for storing long data}
\twocolitem{\helpref{wxList}{wxlist}}{A simple linked list implementation}
\twocolitem{\helpref{wxLongLong}{wxlonglong}}{A portable 64 bit integer type}
\twocolitem{\helpref{wxNode}{wxnode}}{Represents a node in the wxList implementation}
\twocolitem{\helpref{wxObject}{wxobject}}{The root class for most wxWindows classes}
\twocolitem{\helpref{wxPathList}{wxpathlist}}{A class to help search multiple paths}
\twocolitem{\helpref{wxPoint}{wxpoint}}{Representation of a point}
\twocolitem{\helpref{wxRect}{wxrect}}{A class representing a rectangle}
\twocolitem{\helpref{wxRegEx}{wxregex}}{Regular expression support}
\twocolitem{\helpref{wxRegion}{wxregion}}{A class representing a region}
\twocolitem{\helpref{wxString}{wxstring}}{A string class}
\twocolitem{\helpref{wxStringList}{wxstringlist}}{A class representing a list of strings}
\twocolitem{\helpref{wxStringTokenizer}{wxstringtokenizer}}{A class for interpreting a string as a list of tokens or words}
\twocolitem{\helpref{wxRealPoint}{wxrealpoint}}{Representation of a point using floating point numbers}
\twocolitem{\helpref{wxSize}{wxsize}}{Representation of a size}
\twocolitem{\helpref{wxTime}{wxtime}}{A class for time manipulation (deprecated in favour of wxDateTime)}
\twocolitem{\helpref{wxTimeSpan}{wxtimespan}}{A time interval.}
\twocolitem{\helpref{wxVariant}{wxvariant}}{A class for storing arbitrary types that may change at run-time}
\end{twocollist}
{\large {\bf Run-time class information system}}
\overview{Overview}{runtimeclassoverview}
wxWindows supports run-time manipulation of class information, and dynamic
creation of objects given class names.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxClassInfo}{wxclassinfo}}{Holds run-time class information}
\twocolitem{\helpref{wxObject}{wxobject}}{Root class for classes with run-time information}
\twocolitem{\helpref{RTTI macros}{rttimacros}}{Macros for manipulating run-time information}
\end{twocollist}
{\large {\bf Debugging features}}
\overview{Overview}{wxlogoverview}
wxWindows provides several classes and functions for the message logging.
Please see the \helpref{wxLog overview}{wxlogoverview} for more details.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxLog}{wxlog}}{The base log class}
\twocolitem{\helpref{wxLogStderr}{wxlogstderr}}{Log messages to a C STDIO stream}
\twocolitem{\helpref{wxLogStream}{wxlogstream}}{Log messages to a C++ iostream}
\twocolitem{\helpref{wxLogTextCtrl}{wxlogtextctrl}}{Log messages to a \helpref{wxTextCtrl}{wxtextctrl}}
\twocolitem{\helpref{wxLogWindow}{wxlogwindow}}{Log messages to a log frame}
\twocolitem{\helpref{wxLogGui}{wxloggui}}{Default log target for GUI programs}
\twocolitem{\helpref{wxLogNull}{wxlognull}}{Temporarily suppress message logging}
\twocolitem{\helpref{wxLogChain}{wxlogchain}}{Allows to chain two log targets}
\twocolitem{\helpref{wxLogPassThrough}{wxlogpassthrough}}{Allows to filter the log messages}
\twocolitem{\helpref{wxStreamToTextRedirector}{wxstreamtotextredirector}}{Allows
to redirect output sent to {\tt cout} to a \helpref{wxTextCtrl}{wxtextctrl}}
\twocolitem{\helpref{Log functions}{logfunctions}}{Error and warning logging functions}
\end{twocollist}
{\large {\bf Debugging features}}
\overview{Overview}{debuggingoverview}
wxWindows supports some aspects of debugging an application through
classes, functions and macros.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDebugContext}{wxdebugcontext}}{Provides memory-checking facilities}
%\twocolitem{\helpref{wxDebugStreamBuf}{wxdebugstreambuf}}{A stream buffer writing to the debug stream}
\twocolitem{\helpref{Debugging macros}{debugmacros}}{Debug macros for assertion and checking}
\twocolitem{\helpref{WXDEBUG\_NEW}{debugnew}}{Use this macro to give further debugging information}
%\twocolitem{\helpref{WXTRACE}{trace}}{Trace macro}
%\twocolitem{\helpref{WXTRACELEVEL}{tracelevel}}{Trace macro with levels}
\end{twocollist}
{\large {\bf Networking classes}}
wxWindows provides its own classes for socket based networking.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDialUpManager}{wxdialupmanager}}{Provides functions to check the status of network connection and to establish one}
\twocolitem{\helpref{wxIPV4address}{wxipv4address}}{Represents an Internet address}
\twocolitem{\helpref{wxSocketBase}{wxsocketbase}}{Represents a socket base object}
\twocolitem{\helpref{wxSocketClient}{wxsocketclient}}{Represents a socket client}
\twocolitem{\helpref{wxSocketServer}{wxsocketserver}}{Represents a socket server}
\twocolitem{\helpref{wxSocketEvent}{wxsocketevent}}{A socket event}
\twocolitem{\helpref{wxFTP}{wxftp}}{FTP protocol class}
\twocolitem{\helpref{wxHTTP}{wxhttp}}{HTTP protocol class}
\twocolitem{\helpref{wxURL}{wxurl}}{Represents a Universal Resource Locator}
\end{twocollist}
{\large {\bf Interprocess communication}}
\overview{Overview}{ipcoverview}
wxWindows provides simple interprocess communications facilities
based on Windows DDE, but available on most platforms using TCP.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxClient}{wxddeclient}}{Represents a client}
\twocolitem{\helpref{wxConnection}{wxddeconnection}}{Represents the connection between a client and a server}
\twocolitem{\helpref{wxServer}{wxddeserver}}{Represents a server}
%\twocolitem{\helpref{wxSocketHandler}{wxsockethandler}}{Represents a socket handler}
\end{twocollist}
{\large {\bf Document/view framework}}
\overview{Overview}{docviewoverview}
wxWindows supports a document/view framework which provides
housekeeping for a document-centric application.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDocument}{wxdocument}}{Represents a document}
\twocolitem{\helpref{wxView}{wxview}}{Represents a view}
\twocolitem{\helpref{wxDocTemplate}{wxdoctemplate}}{Manages the relationship between a document class and a view class}
\twocolitem{\helpref{wxDocManager}{wxdocmanager}}{Manages the documents and views in an application}
\twocolitem{\helpref{wxDocChildFrame}{wxdocchildframe}}{A child frame for showing a document view}
\twocolitem{\helpref{wxDocParentFrame}{wxdocparentframe}}{A parent frame to contain views}
%\twocolitem{\helpref{wxMDIDocChildFrame}{wxmdidocchildframe}}{An MDI child frame for showing a document view}
%\twocolitem{\helpref{wxMDIDocParentFrame}{wxmdidocparentframe}}{An MDI parent frame to contain views}
\end{twocollist}
{\large {\bf Printing framework}}
\overview{Overview}{printingoverview}
A printing and previewing framework is implemented to
make it relatively straightforward to provide document printing
facilities.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxPreviewFrame}{wxpreviewframe}}{Frame for displaying a print preview}
\twocolitem{\helpref{wxPreviewCanvas}{wxpreviewcanvas}}{Canvas for displaying a print preview}
\twocolitem{\helpref{wxPreviewControlBar}{wxpreviewcontrolbar}}{Standard control bar for a print preview}
\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog}
\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog}
\twocolitem{\helpref{wxPrinter}{wxprinter}}{Class representing the printer}
\twocolitem{\helpref{wxPrinterDC}{wxprinterdc}}{Printer device context}
\twocolitem{\helpref{wxPrintout}{wxprintout}}{Class representing a particular printout}
\twocolitem{\helpref{wxPrintPreview}{wxprintpreview}}{Class representing a print preview}
\twocolitem{\helpref{wxPrintData}{wxprintdata}}{Represents information about the document being printed}
\twocolitem{\helpref{wxPrintDialogData}{wxprintdialogdata}}{Represents information about the print dialog}
\twocolitem{\helpref{wxPageSetupDialogData}{wxpagesetupdialogdata}}{Represents information about the page setup dialog}
\end{twocollist}
{\large {\bf Drag and drop and clipboard classes}}
\overview{Drag and drop and clipboard overview}{wxdndoverview}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDataObject}{wxdataobject}}{Data object class}
\twocolitem{\helpref{wxDataFormat}{wxdataformat}}{Represents a data format}
\twocolitem{\helpref{wxTextDataObject}{wxtextdataobject}}{Text data object class}
\twocolitem{\helpref{wxFileDataObject}{wxtextdataobject}}{File data object class}
\twocolitem{\helpref{wxBitmapDataObject}{wxbitmapdataobject}}{Bitmap data object class}
\twocolitem{\helpref{wxCustomDataObject}{wxcustomdataobject}}{Custom data object class}
\twocolitem{\helpref{wxClipboard}{wxclipboard}}{Clipboard class}
\twocolitem{\helpref{wxDropTarget}{wxdroptarget}}{Drop target class}
\twocolitem{\helpref{wxFileDropTarget}{wxfiledroptarget}}{File drop target class}
\twocolitem{\helpref{wxTextDropTarget}{wxtextdroptarget}}{Text drop target class}
\twocolitem{\helpref{wxDropSource}{wxdropsource}}{Drop source class}
\end{twocollist}
{\large {\bf File related classes}}
wxWindows has several small classes to work with disk files, see \helpref{file classes
overview}{wxfileoverview} for more details.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxFileName}{wxfilename}}{Operations with the file name and attributes}
\twocolitem{\helpref{wxDir}{wxdir}}{Class for enumerating files/subdirectories.}
\twocolitem{\helpref{wxDirTraverser}{wxdirtraverser}}{Class used together with wxDir for recursively enumerating the files/subdirectories}
\twocolitem{\helpref{wxFile}{wxfile}}{Low-level file input/output class.}
\twocolitem{\helpref{wxFFile}{wxffile}}{Another low-level file input/output class.}
\twocolitem{\helpref{wxTempFile}{wxtempfile}}{Class to safely replace an existing file}
\twocolitem{\helpref{wxTextFile}{wxtextfile}}{Class for working with text files as with arrays of lines}
\end{twocollist}
{\large {\bf Stream classes}}
wxWindows has its own set of stream classes, as an alternative to often buggy standard stream
libraries, and to provide enhanced functionality.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxStreamBase}{wxstreambase}}{Stream base class}
\twocolitem{\helpref{wxStreamBuffer}{wxstreambuffer}}{Stream buffer class}
\twocolitem{\helpref{wxInputStream}{wxinputstream}}{Input stream class}
\twocolitem{\helpref{wxOutputStream}{wxoutputstream}}{Output stream class}
\twocolitem{\helpref{wxCountingOutputStream}{wxcountingoutputstream}}{Stream class for querying what size a stream would have.}
\twocolitem{\helpref{wxFilterInputStream}{wxfilterinputstream}}{Filtered input stream class}
\twocolitem{\helpref{wxFilterOutputStream}{wxfilteroutputstream}}{Filtered output stream class}
\twocolitem{\helpref{wxBufferedInputStream}{wxbufferedinputstream}}{Buffered input stream class}
\twocolitem{\helpref{wxBufferedOutputStream}{wxbufferedoutputstream}}{Buffered output stream class}
\twocolitem{\helpref{wxMemoryInputStream}{wxmeminputstream}}{Memory input stream class}
\twocolitem{\helpref{wxMemoryOutputStream}{wxmemoutputstream}}{Memory output stream class}
\twocolitem{\helpref{wxDataInputStream}{wxdatainputstream}}{Platform-independent binary data input stream class}
\twocolitem{\helpref{wxDataOutputStream}{wxdataoutputstream}}{Platform-independent binary data output stream class}
\twocolitem{\helpref{wxTextInputStream}{wxtextinputstream}}{Platform-independent text data input stream class}
\twocolitem{\helpref{wxTextOutputStream}{wxtextoutputstream}}{Platform-independent text data output stream class}
\twocolitem{\helpref{wxFileInputStream}{wxfileinputstream}}{File input stream class}
\twocolitem{\helpref{wxFileOutputStream}{wxfileoutputstream}}{File output stream class}
\twocolitem{\helpref{wxFFileInputStream}{wxffileinputstream}}{Another file input stream class}
\twocolitem{\helpref{wxFFileOutputStream}{wxffileoutputstream}}{Another file output stream class}
\twocolitem{\helpref{wxZlibInputStream}{wxzlibinputstream}}{Zlib (compression) input stream class}
\twocolitem{\helpref{wxZlibOutputStream}{wxzliboutputstream}}{Zlib (compression) output stream class}
\twocolitem{\helpref{wxZipInputStream}{wxzipinputstream}}{Input stream for reading from ZIP archives}
\twocolitem{\helpref{wxSocketInputStream}{wxsocketinputstream}}{Socket input stream class}
\twocolitem{\helpref{wxSocketOutputStream}{wxsocketoutputstream}}{Socket output stream class}
\end{twocollist}
{\large {\bf Threading classes}}
\overview{Multithreading overview}{wxthreadoverview}
wxWindows provides a set of classes to make use of the native thread
capabilities of the various platforms.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxThread}{wxthread}}{Thread class}
\twocolitem{\helpref{wxMutex}{wxmutex}}{Mutex class}
\twocolitem{\helpref{wxMutexLocker}{wxmutexlocker}}{Mutex locker utility class}
\twocolitem{\helpref{wxCriticalSection}{wxcriticalsection}}{Critical section class}
\twocolitem{\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker}}{Critical section locker utility class}
\twocolitem{\helpref{wxCondition}{wxcondition}}{Condition class}
\twocolitem{\helpref{wxSemaphore}{wxsemaphore}}{Semaphore class}
\end{twocollist}
{\large {\bf HTML classes}}
wxWindows provides a set of classes to display text in HTML format. These
class include a help system based on the HTML widget.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}}{HTML help controller class}
\twocolitem{\helpref{wxHtmlWindow}{wxhtmlwindow}}{HTML window class}
\twocolitem{\helpref{wxHtmlEasyPrinting}{wxhtmleasyprinting}}{Simple class for printing HTML}
\twocolitem{\helpref{wxHtmlPrintout}{wxhtmlprintout}}{Generic HTML wxPrintout class}
\twocolitem{\helpref{wxHtmlParser}{wxhtmlparser}}{Generic HTML parser class}
\twocolitem{\helpref{wxHtmlTagHandler}{wxhtmltaghandler}}{HTML tag handler, pluginable into wxHtmlParser}
\twocolitem{\helpref{wxHtmlWinParser}{wxhtmlwinparser}}{HTML parser class for wxHtmlWindow}
\twocolitem{\helpref{wxHtmlWinTagHandler}{wxhtmlwintaghandler}}{HTML tag handler, pluginable into wxHtmlWinParser}
\end{twocollist}
{\large {\bf Virtual file system classes}}
wxWindows provides a set of classes that implement an extensible virtual file system,
used internally by the HTML classes.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxFSFile}{wxfsfile}}{Represents a file in the virtual file system}
\twocolitem{\helpref{wxFileSystem}{wxfilesystem}}{Main interface for the virtual file system}
\twocolitem{\helpref{wxFileSystemHandler}{wxfilesystemhandler}}{Class used to announce file system type}
\end{twocollist}
{\large {\bf XML-based resource system classes}}
\overview{XML-based resource system overview}{xrcoverview}
Resources allow your application to create controls and other user interface elements
from specifications stored in an XML format.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxXmlResource}{wxxmlresource}}{The main class for working with resources.}
\twocolitem{\helpref{wxXmlResourceHandler}{wxxmlresourcehandler}}{The base class for XML resource handlers.}
\end{twocollist}
{\large {\bf Online help}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxHelpController}{wxhelpcontroller}}{Family of classes for controlling help windows}
\twocolitem{\helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}}{HTML help controller class}
\twocolitem{\helpref{wxContextHelp}{wxcontexthelp}}{Class to put application into context-sensitive help mode}
\twocolitem{\helpref{wxContextHelpButton}{wxcontexthelpbutton}}{Button class for putting application into context-sensitive help mode}
\twocolitem{\helpref{wxHelpProvider}{wxhelpprovider}}{Abstract class for context-sensitive help provision}
\twocolitem{\helpref{wxSimpleHelpProvider}{wxsimplehelpprovider}}{Class for simple context-sensitive help provision}
\twocolitem{\helpref{wxHelpControllerHelpProvider}{wxhelpcontrollerhelpprovider}}{Class for context-sensitive help provision via a help controller}
\twocolitem{\helpref{wxToolTip}{wxtooltip}}{Class implementing tooltips}
\end{twocollist}
{\large {\bf Database classes}}
\overview{Database classes overview}{odbcoverview}
wxWindows provides two alternative sets of classes for accessing Microsoft's ODBC (Open Database Connectivity)
product. The new version by Remstar, known as wxODBC, is more powerful,
portable, flexible and better supported, so please use the classes below for
working with databases:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDb}{wxdb}}{ODBC database connection}
\twocolitem{\helpref{wxDbTable}{wxdbtable}}{Provides access to a database table}
\twocolitem{\helpref{wxDbInf}{wxdbinf}}{}
\twocolitem{\helpref{wxDbTableInf}{wxdbtableinf}}{}
\twocolitem{\helpref{wxDbColDef}{wxdbcoldef}}{}
\twocolitem{\helpref{wxDbColInf}{wxdbcolinf}}{}
\twocolitem{\helpref{wxDbColDataPtr}{wxdbcoldataptr}}{}
\twocolitem{\helpref{wxDbColFor}{wxdbcolfor}}{}
\twocolitem{\helpref{wxDbConnectInf}{wxdbconnectinf}}{}
\twocolitem{\helpref{wxDbIdxDef}{wxdbidxdef}}{}
\end{twocollist}
The documentation for the older classes is still included, but you should avoid
using any of them in new programs:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDatabase}{wxdatabase}}{Database class}
\twocolitem{\helpref{wxQueryCol}{wxquerycol}}{Class representing a column}
\twocolitem{\helpref{wxQueryField}{wxqueryfield}}{Class representing a field}
\twocolitem{\helpref{wxRecordSet}{wxrecordset}}{Class representing one or more record}
\end{twocollist}
{\large {\bf Miscellaneous}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxApp}{wxapp}}{Application class}
\twocolitem{\helpref{wxCaret}{wxcaret}}{A caret (cursor) object}
\twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class}
\twocolitem{\helpref{wxConfig}{wxconfigbase}}{Classes for configuration reading/writing (using either INI files or registry)}
\twocolitem{\helpref{wxDllLoader}{wxdllloader}}{Class to work with shared libraries.}
\twocolitem{\helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}}{An alternative window layout facility}
\twocolitem{\helpref{wxProcess}{wxprocess}}{Process class}
\twocolitem{\helpref{wxTimer}{wxtimer}}{Timer class}
\twocolitem{\helpref{wxStopWatch}{wxstopwatch}}{Stop watch class}
\twocolitem{\helpref{wxMimeTypesManager}{wxmimetypesmanager}}{MIME-types manager class}
\twocolitem{\helpref{wxSystemSettings}{wxsystemsettings}}{System settings class for obtaining various global parameters}
\twocolitem{\helpref{wxSystemOptions}{wxsystemoptions}}{System options class for run-time configuration}
\twocolitem{\helpref{wxAcceleratorTable}{wxacceleratortable}}{Accelerator table}
\twocolitem{\helpref{wxAutomationObject}{wxautomationobject}}{OLE automation class}
\twocolitem{\helpref{wxFontMapper}{wxfontmapper}}{Font mapping, finding suitable font for given encoding}
\twocolitem{\helpref{wxEncodingConverter}{wxencodingconverter}}{Encoding conversions}
\twocolitem{\helpref{wxCalendarDateAttr}{wxcalendardateattr}}{Used with \helpref{wxCalendarCtrl}{wxcalendarctrl}}
\twocolitem{\helpref{wxQuantize}{wxquantize}}{Class to perform quantization, or colour reduction}
\twocolitem{\helpref{wxSingleInstanceChecker}{wxsingleinstancechecker}}{Check that only single program instance is running}
\end{twocollist}

View File

@@ -1,116 +0,0 @@
\section{\class{wxCheckBox}}\label{wxcheckbox}
A checkbox is a labelled box which is either on (checkmark is visible)
or off (no checkmark).
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/checkbox.h>
\wxheading{Window styles}
There are no special styles for wxCheckBox.
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED event,
when the checkbox is clicked.}
\end{twocollist}
\wxheading{See also}
\helpref{wxRadioButton}{wxradiobutton}, \helpref{wxCommandEvent}{wxcommandevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCheckBox::wxCheckBox}\label{wxcheckboxconstr}
\func{}{wxCheckBox}{\void}
Default constructor.
\func{}{wxCheckBox}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
Constructor, creating and showing a checkbox.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Checkbox identifier. A value of -1 indicates a default value.}
\docparam{label}{Text to be displayed next to the checkbox.}
\docparam{pos}{Checkbox position. If the position (-1, -1) is specified then a default position is chosen.}
\docparam{size}{Checkbox size. If the default size (-1, -1) is specified then a default size is chosen.}
\docparam{style}{Window style. See \helpref{wxCheckBox}{wxcheckbox}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\wxheading{See also}
\helpref{wxCheckBox::Create}{wxcheckboxcreate}, \helpref{wxValidator}{wxvalidator}
\membersection{wxCheckBox::\destruct{wxCheckBox}}
\func{}{\destruct{wxCheckBox}}{\void}
Destructor, destroying the checkbox.
\membersection{wxCheckBox::Create}\label{wxcheckboxcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
Creates the checkbox for two-step construction. See \helpref{wxCheckBox::wxCheckBox}{wxcheckboxconstr}\rtfsp
for details.
\membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue}
\constfunc{bool}{GetValue}{\void}
Gets the state of the checkbox.
\wxheading{Return value}
Returns {\tt TRUE} if it is checked, {\tt FALSE} otherwise.
\membersection{wxCheckBox::IsChecked}\label{wxcheckboxischecked}
\constfunc{bool}{IsChecked}{\void}
This is just a maybe more readable synonym for
\helpref{GetValue}{wxcheckboxgetvalue}: just as the latter, it returns
{\tt TRUE} if the checkbox is checked and {\tt FALSE} otherwise.
\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
\func{void}{SetValue}{\param{const bool}{ state}}
Sets the checkbox to the given state. This does not cause a
wxEVT\_COMMAND\_CHECKBOX\_CLICKED event to get emitted.
\wxheading{Parameters}
\docparam{state}{If {\tt TRUE}, the check is on, otherwise it is off.}

View File

@@ -1,111 +0,0 @@
\section{\class{wxCheckListBox}}\label{wxchecklistbox}
A checklistbox is like a listbox, but allows items to be checked or unchecked.
This class is currently implemented under Windows and GTK. When using this
class under Windows wxWindows must be compiled with USE\_OWNER\_DRAWN set to 1.
Only the new functions for this class are documented; see also \helpref{wxListBox}{wxlistbox}.
\wxheading{Derived from}
\helpref{wxListBox}{wxlistbox}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/checklst.h>
\wxheading{Window styles}
See \helpref{wxListBox}{wxlistbox}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CHECKLISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE event,
when an item in the check list box is checked or unchecked.}
\end{twocollist}
\wxheading{See also}
\helpref{wxListBox}{wxlistbox}, \helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}, \helpref{wxListCtrl}{wxlistctrl},
\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCheckListBox::wxCheckListBox}\label{wxchecklistboxconstr}
\func{}{wxCheckListBox}{\void}
Default constructor.
\func{}{wxCheckListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
\param{int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}}
Constructor, creating and showing a list box.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
\docparam{pos}{Window position.}
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
appropriately.}
\docparam{n}{Number of strings with which to initialise the control.}
\docparam{choices}{An array of strings with which to initialise the control.}
\docparam{style}{Window style. See \helpref{wxCheckListBox}{wxchecklistbox}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\pythonnote{The wxCheckListBox constructor in wxPython reduces the {\tt n}
and {\tt choices} arguments are to a single argument, which is
a list of strings.}
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{wxCheckListBox::\destruct{wxCheckListBox}}
\func{void}{\destruct{wxCheckListBox}}{\void}
Destructor, destroying the list box.
\membersection{wxCheckListBox::Check}\label{wxchecklistboxcheck}
\func{void}{Check}{\param{int }{item}, \param{bool}{ check = TRUE}}
Checks the given item. Note that calling this method doesn't result in
wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
\wxheading{Parameters}
\docparam{item}{Index of item to check.}
\docparam{check}{TRUE if the item is to be checked, FALSE otherwise.}
\membersection{wxCheckListBox::IsChecked}\label{wxchecklistboxischecked}
\constfunc{bool}{IsChecked}{\param{int}{ item}}
Returns TRUE if the given item is checked, FALSE otherwise.
\wxheading{Parameters}
\docparam{item}{Index of item whose check status is to be returned.}

View File

@@ -1,135 +0,0 @@
\section{\class{wxChoice}}\label{wxchoice}
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.
\wxheading{Derived from}
\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/choice.h>
\wxheading{Window styles}
There are no special styles for wxChoice.
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CHOICE(id, func)}}{Process a wxEVT\_COMMAND\_CHOICE\_SELECTED event,
when an item on the list is selected.}
\end{twocollist}
\wxheading{See also}
\helpref{wxListBox}{wxlistbox}, \helpref{wxComboBox}{wxcombobox},
\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxChoice::wxChoice}\label{wxchoiceconstr}
\func{}{wxChoice}{\void}
Default constructor.
\func{}{wxChoice}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp
\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``choice"}}
Constructor, creating and showing a choice.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
\docparam{pos}{Window position.}
\docparam{size}{Window size. If the default size (-1, -1) is specified then the choice is sized
appropriately.}
\docparam{n}{Number of strings with which to initialise the choice control.}
\docparam{choices}{An array of strings with which to initialise the choice control.}
\docparam{style}{Window style. See \helpref{wxChoice}{wxchoice}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\wxheading{See also}
\helpref{wxChoice::Create}{wxchoicecreate}, \helpref{wxValidator}{wxvalidator}
\pythonnote{The wxChoice constructor in wxPython reduces the {\tt n}
and {\tt choices} arguments are to a single argument, which is
a list of strings.}
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{wxChoice::\destruct{wxChoice}}
\func{}{\destruct{wxChoice}}{\void}
Destructor, destroying the choice item.
\membersection{wxChoice::Create}\label{wxchoicecreate}
\func{bool}{Create}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp
\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
\param{long}{ style = 0}, \param{const wxString\& }{name = ``choice"}}
Creates the choice for two-step construction. See \helpref{wxChoice::wxChoice}{wxchoiceconstr}.
\membersection{wxChoice::Delete}\label{wxchoicedelete}
\func{void}{Delete}{\param{int }{n}}
Deletes the item with the given index from the control.
\wxheading{Parameters}
\docparam{n}{The item to delete.}
\membersection{wxChoice::GetColumns}\label{wxchoicegetcolumns}
\constfunc{int}{GetColumns}{\void}
Gets the number of columns in this choice item.
\wxheading{Remarks}
This is implemented for Motif only and always returns $1$ for the other
platforms.
\membersection{wxChoice::SetColumns}\label{wxchoicesetcolumns}
\func{void}{SetColumns}{\param{int}{ n = 1}}
Sets the number of columns in this choice item.
\wxheading{Parameters}
\docparam{n}{Number of columns.}
\wxheading{Remarks}
This is implemented for Motif only and doesn't do anything under other
platforms.

View File

@@ -1,79 +0,0 @@
\section{\class{wxClassInfo}}\label{wxclassinfo}
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 {\bf DECLARE\_DYNAMIC\_CLASS} and {\bf IMPLEMENT\_DYNAMIC\_CLASS}.
\wxheading{Derived from}
No parent class.
\wxheading{Include files}
<wx/object.h>
\wxheading{See also}
\helpref{Overview}{wxclassinfooverview}, \helpref{wxObject}{wxobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClassInfo::wxClassInfo}\label{wxclassinfoconstr}
\func{}{wxClassInfo}{\param{char* }{className}, \param{char* }{baseClass1}, \param{char* }{baseClass2},
\param{int}{ size}, \param{wxObjectConstructorFn }{fn}}
Constructs a wxClassInfo object. The supplied macros implicitly construct objects of this
class, so there is no need to create such objects explicitly in an application.
\membersection{wxClassInfo::CreateObject}
\func{wxObject*}{CreateObject}{\void}
Creates an object of the appropriate kind. Returns NULL if the class has not been declared
dynamically creatable (typically, it is an abstract class).
\membersection{wxClassInfo::FindClass}
\func{static wxClassInfo *}{FindClass}{\param{char* }{name}}
Finds the wxClassInfo object for a class of the given string name.
\membersection{wxClassInfo::GetBaseClassName1}
\constfunc{char*}{GetBaseClassName1}{\void}
Returns the name of the first base class (NULL if none).
\membersection{wxClassInfo::GetBaseClassName2}
\constfunc{char*}{GetBaseClassName2}{\void}
Returns the name of the second base class (NULL if none).
\membersection{wxClassInfo::GetClassName}
\constfunc{char *}{GetClassName}{\void}
Returns the string form of the class name.
\membersection{wxClassInfo::GetSize}
\constfunc{int}{GetSize}{\void}
Returns the size of the class.
\membersection{wxClassInfo::InitializeClasses}
\func{static void}{InitializeClasses}{\void}
Initializes pointers in the wxClassInfo objects for fast execution
of IsKindOf. Called in base wxWindows library initialization.
\membersection{wxClassInfo::IsKindOf}\label{wxclassinfoiskindof}
\func{bool}{IsKindOf}{\param{wxClassInfo* }{info}}
Returns TRUE if this class is a kind of (inherits from) the given class.

View File

@@ -1,326 +0,0 @@
\chapter{Alphabetical class reference}\label{classref}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
% NB: the files should be in alphabetic order of the classes documented in
% them and *not* in alphabetic order of the file names!
\input accel.tex
\input activevt.tex
\input app.tex
\input array.tex
\input arrstrng.tex
\input artprov.tex
\input autoobj.tex
\input bitmap.tex
\input bbutton.tex
\input bmpdatob.tex
\input bmphand.tex
\input boxsizer.tex
\input brush.tex
\input strmbfrd.tex
\input busycurs.tex
\input busyinfo.tex
\input button.tex
\input calclevt.tex
\input calctrl.tex
\input caret.tex
\input checkbox.tex
\input checklst.tex
\input choice.tex
\input clasinfo.tex
\input ipcclint.tex
\input clientdc.tex
\input clientdat.tex
\input clipbrd.tex
\input closeevt.tex
\input cmdlpars.tex
\input colour.tex
\input colordlg.tex
\input combobox.tex
\input command.tex
\input cmdevent.tex
\input cmdproc.tex
\input conditn.tex
\input config.tex
\input ipcconn.tex
\input cshelp.tex
\input control.tex
\input ctrlsub.tex
\input countstr.tex
\input critsect.tex
\input crtslock.tex
\input csconv.tex
\input cursor.tex
\input custdobj.tex
\input database.tex
\input dataform.tex
\input datistrm.tex
\input dataobj.tex
\input dobjcomp.tex
\input dobjsmpl.tex
\input datostrm.tex
\input date.tex
\input datespan.tex
\input datetime.tex
\input db.tex
\input dc.tex
\input debugcxt.tex
\input dialog.tex
\input dialevt.tex
\input dialup.tex
\input dir.tex
\input dirdlg.tex
\input dirtrav.tex
\input dllload.tex
\input docchfrm.tex
\input docmanag.tex
\input docmdich.tex
\input docmdipr.tex
\input docprfrm.tex
\input doctempl.tex
\input document.tex
\input dragimag.tex
\input dropevt.tex
\input dropsrc.tex
\input droptrgt.tex
\input dynlib.tex
\input encconv.tex
\input eraseevt.tex
\input event.tex
\input evthand.tex
\input expr.tex
\input ffile.tex
\input ffilestr.tex
\input file.tex
\input fildatob.tex
\input filedlg.tex
\input fildrptg.tex
\input filehist.tex
\input fileistr.tex
\input filename.tex
\input fileostr.tex
\input filestrm.tex
\input filesys.tex
\input filesysh.tex
\input filetype.tex
\input fltinstr.tex
\input fltoutst.tex
\input fdrepdlg.tex
\input flexsizr.tex
\input focusevt.tex
\input font.tex
\input fontdlg.tex
\input fontenum.tex
\input fontlist.tex
\input fontmap.tex
\input frame.tex
\input fsfile.tex
\input ftp.tex
\input gauge.tex
\input gdiobj.tex
\input dirctrl.tex
\input valgen.tex
\input glcanvas.tex
\input grid.tex
\input gridattr.tex
\input gridedit.tex
\input gridevt.tex
\input gridrend.tex
\input gridtbl.tex
\input gridsizr.tex
\input hashmap.tex
\input hash.tex
\input helpinst.tex
\input hprovcnt.tex
\input helpevt.tex
\input helpprov.tex
\input htcell.tex
\input htcolor.tex
\input htcontnr.tex
\input htdcrend.tex
\input hteasypr.tex
\input htfilter.tex
\input hthelpct.tex
\input hthlpdat.tex
\input hthlpfrm.tex
\input htlnkinf.tex
\input htparser.tex
\input htprint.tex
\input httag.tex
\input httaghnd.tex
\input httagmod.tex
\input htwidget.tex
\input htwindow.tex
\input htwinprs.tex
\input htwinhnd.tex
\input http.tex
\input icon.tex
\input iconbndl.tex
\input iconevt.tex
\input idleevt.tex
\input image.tex
\input imaglist.tex
\input ilayout.tex
\input indlgevt.tex
\input inputstr.tex
\input ipvaddr.tex
\input joystick.tex
\input joyevent.tex
\input keyevent.tex
\input layalgor.tex
\input layout.tex
\input list.tex
\input listbox.tex
\input listctrl.tex
\input listevt.tex
\input listitem.tex
\input listview.tex
\input locale.tex
\input log.tex
\input longlong.tex
\input mask.tex
\input maxzevt.tex
\input mbconv.tex
\input mbcnvfil.tex
\input mbcnvut7.tex
\input mbcnvut8.tex
\input mdi.tex
\input memorydc.tex
\input fs_mem.tex
\input strmmem.tex
\input menu.tex
\input menuevt.tex
\input menuitem.tex
\input msgdlg.tex
\input metafile.tex
\input mimetype.tex
\input minifram.tex
\input module.tex
\input mcaptevt.tex
\input mouseevt.tex
\input moveevt.tex
\input mltchdlg.tex
\input mutex.tex
\input mutexlck.tex
\input node.tex
\input notebook.tex
\input noteevt.tex
\input nbsizer.tex
\input notifevt.tex
\input object.tex
\input outptstr.tex
\input pagedlg.tex
\input paintdc.tex
\input paintevt.tex
\input palette.tex
\input panel.tex
\input pathlist.tex
\input pen.tex
\input plotcurve.tex
\input plotwindow.tex
\input point.tex
\input postscpt.tex
\input prevwin.tex
\input print.tex
\input prvtdrpt.tex
\input process.tex
\input procevt.tex
\input progdlg.tex
\input protocol.tex
\input quantize.tex
\input query.tex
\input qylayevt.tex
\input radiobox.tex
\input radiobut.tex
\input realpoin.tex
\input recrdset.tex
\input rect.tex
\input regex.tex
\input region.tex
\input sashevt.tex
\input sashlayw.tex
\input sashwin.tex
\input screendc.tex
\input scpdarry.tex
\input scpdptr.tex
\input scrolbar.tex
\input scrolwin.tex
\input scrolevt.tex
\input scrlwevt.tex
\input semaphor.tex
\input ipcservr.tex
\input hprovsmp.tex
\input sngchdlg.tex
\input snglinst.tex
\input size.tex
\input sizeevt.tex
\input sizer.tex
\input slider.tex
\input sckaddr.tex
\input socket.tex
\input strmsock.tex
\input socksrv.tex
\input spinbutt.tex
\input spinctrl.tex
\input spinevt.tex
\input splash.tex
\input splitevt.tex
\input splitter.tex
\input statbmp.tex
\input statbox.tex
\input sbsizer.tex
\input statline.tex
\input stattext.tex
\input statusbr.tex
\input stopwtch.tex
\input strmbase.tex
\input stream.tex
\input strtotxt.tex
\input wxstring.tex
\input strcldat.tex
\input strlist.tex
\input tokenizr.tex
\input sysclevt.tex
\input sysopt.tex
\input settings.tex
\input tabctrl.tex
\input tabevent.tex
\input taskbar.tex
\input tempfile.tex
\input text.tex
\input txtdatob.tex
\input txtdrptg.tex
\input textdlg.tex
\input textfile.tex
\input txtstrm.tex
\input valtext.tex
\input thread.tex
\input time.tex
\input timer.tex
\input timespan.tex
\input tipprov.tex
\input tipwin.tex
\input tglbtn.tex
\input toolbar.tex
\input tooltip.tex
\input treectrl.tex
\input treeevt.tex
\input treedata.tex
\input treelay.tex
\input upduievt.tex
\input url.tex
\input validatr.tex
\input variant.tex
\input view.tex
\input wave.tex
\input window.tex
\input windowdc.tex
\input wnddisbl.tex
\input wizard.tex
\input wizevt.tex
\input wizpage.tex
\input xmlres.tex
\input xmlresh.tex
\input zipstrm.tex
\input strmzlib.tex

View File

@@ -1,113 +0,0 @@
\section{\class{wxClientData}}\label{wxclientdata}
All classes deriving from \helpref{wxEvtHandler}{wxevthandler}
(such as all controls and \helpref{wxApp}{wxapp})
can hold arbitrary data which is here referred to as "client data".
This is useful e.g. for scripting languages which need to handle
shadow objects for most of wxWindows' classes and which store
a handle to such a shadow class as client data in that class.
This data can either be of type void - in which case the data
{\it container} does not take care of freeing the data again
or it is of type wxClientData or its derivates. In that case the
container (e.g. a control) will free the memory itself later.
Note that you {\it 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
\helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}
and \helpref{wxListBox}{wxlistbox}. \helpref{wxTreeCtrl}{wxtreectrl}
has a specialized class \helpref{wxTreeItemData}{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 \helpref{wxClientDataContainer}{wxclientdatacontainer}.
\wxheading{Include files}
<wx/clntdata.h>
\wxheading{See also}
\helpref{wxEvtHandler}{wxevthandler}, \helpref{wxTreeItemData}{wxtreeitemdata},
\helpref{wxStringClientData}{wxstringclientdata}, \helpref{wxClientDataContainer}{wxclientdatacontainer}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClientData::wxClientData}\label{wxclientdatawxclientdata}
\func{}{wxClientData}{\void}
Constructor.
\membersection{wxClientData::\destruct{wxClientData}}\label{wxclientdatadtor}
\func{}{\destruct{wxClientData}}{\void}
Virtual destructor.
\section{\class{wxClientDataContainer}}\label{wxclientdatacontainer}
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
{\it container} does not take care of freeing the data again
or it is of type wxClientData or its derivates. In that case the
container will free the memory itself later.
Note that you {\it 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 heirachy.
\wxheading{See also}
\helpref{wxEvtHandler}{wxevthandler}, \helpref{wxClientData}{wxclientdata}
\wxheading{Derived from}
No base class
\wxheading{Include files}
<clntdata.h>
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClientDataContainer::wxClientDataContainer}\label{wxclientdatacontainerwxclientdatacontainer}
\func{}{wxClientDataContainer}{\void}
\membersection{wxClientDataContainer::\destruct{wxClientDataContainer}}\label{wxclientdatacontainerdtor}
\func{}{\destruct{wxClientDataContainer}}{\void}
\membersection{wxClientDataContainer::GetClientData}\label{wxclientdatacontainergetclientdata}
\constfunc{void*}{GetClientData}{\void}
Get the untyped client data.
\membersection{wxClientDataContainer::GetClientObject}\label{wxclientdatacontainergetclientobject}
\constfunc{wxClientData*}{GetClientObject}{\void}
Get a pointer to the client data object.
\membersection{wxClientDataContainer::SetClientData}\label{wxclientdatacontainersetclientdata}
\func{void}{SetClientData}{\param{void* }{data}}
Set the untyped client data.
\membersection{wxClientDataContainer::SetClientObject}\label{wxclientdatacontainersetclientobject}
\func{void}{SetClientObject}{\param{wxClientData* }{data}}
Set the client data object. Any previous object will be deleted.

View File

@@ -1,36 +0,0 @@
\section{\class{wxClientDC}}\label{wxclientdc}
A wxClientDC must be constructed if an application wishes to paint on the
client area of a window from outside an {\bf 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 {\bf OnPaint}, construct a \helpref{wxPaintDC}{wxpaintdc} object.
To draw on the whole window including decorations, construct a \helpref{wxWindowDC}{wxwindowdc} object
(Windows only).
\wxheading{Derived from}
\helpref{wxWindowDC}{wxwindowdc}\\
\helpref{wxDC}{wxdc}
\wxheading{Include files}
<wx/dcclient.h>
\wxheading{See also}
\helpref{wxDC}{wxdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPaintDC}{wxpaintdc},\rtfsp
\helpref{wxWindowDC}{wxwindowdc}, \helpref{wxScreenDC}{wxscreendc}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClientDC::wxClientDC}
\func{}{wxClientDC}{\param{wxWindow*}{ window}}
Constructor. Pass a pointer to the window on which you wish to paint.

View File

@@ -1,156 +0,0 @@
\section{\class{wxClipboard}}\label{wxclipboard}
A class for manipulating the clipboard. Note that this is not compatible with the
clipboard class from wxWindows 1.xx, which has the same name but a different implementation.
To use the clipboard, you call member functions of the global {\bf wxTheClipboard} object.
See also the \helpref{wxDataObject overview}{wxdataobjectoverview} for further information.
Call \helpref{wxClipboard::Open}{wxclipboardopen} to get ownership of the clipboard. If this operation returns TRUE, you
now own the clipboard. Call \helpref{wxClipboard::SetData}{wxclipboardsetdata} to put data
on the clipboard, or \helpref{wxClipboard::GetData}{wxclipboardgetdata} to
retrieve data from the clipboard. Call \helpref{wxClipboard::Close}{wxclipboardclose} to close
the clipboard and relinquish ownership. You should keep the clipboard open only momentarily.
For example:
\begin{verbatim}
// Write some text to the clipboard
if (wxTheClipboard->Open())
{
// 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())
{
if (wxTheClipboard->IsSupported( wxDF_TEXT ))
{
wxTextDataObject data;
wxTheClipboard->GetData( data );
wxMessageBox( data.GetText() );
}
wxTheClipboard->Close();
}
\end{verbatim}
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/clipbrd.h>
\wxheading{See also}
\helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDataObject}{wxdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClipboard::wxClipboard}
\func{}{wxClipboard}{\void}
Constructor.
\membersection{wxClipboard::\destruct{wxClipboard}}
\func{}{\destruct{wxClipboard}}{\void}
Destructor.
\membersection{wxClipboard::AddData}\label{wxclipboardadddata}
\func{bool}{AddData}{\param{wxDataObject*}{ data}}
Call this function to add the data object to the clipboard. You may call
this function repeatedly after having cleared the clipboard using \helpref{wxClipboard::Clear}{wxclipboardclear}.
After this function has been called, the clipboard owns the data, so do not delete
the data explicitly.
\wxheading{See also}
\helpref{wxClipboard::SetData}{wxclipboardsetdata}
\membersection{wxClipboard::Clear}\label{wxclipboardclear}
\func{void}{Clear}{\void}
Clears the global clipboard object and the system's clipboard if possible.
\membersection{wxClipboard::Close}\label{wxclipboardclose}
\func{bool}{Close}{\void}
Call this function to close the clipboard, having opened it with \helpref{wxClipboard::Open}{wxclipboardopen}.
\membersection{wxClipboard::Flush}\label{wxclipboardflush}
\func{bool}{Flush}{\void}
Flushes the clipboard: this means that the data which is currently on
clipboard will stay available even after the application exits (possibly
eating memory), otherwise the clipboard will be emptied on exit.
Returns FALSE if the operation is unsuccesful for any reason.
\membersection{wxClipboard::GetData}\label{wxclipboardgetdata}
\func{bool}{GetData}{\param{wxDataObject\&}{ data}}
Call this function to fill {\it data} with data on the clipboard, if available in the required
format. Returns TRUE on success.
\membersection{wxClipboard::IsOpened}\label{wxclipboardisopened}
\constfunc{bool}{IsOpened}{\void}
Returns TRUE if the clipboard has been opened.
\membersection{wxClipboard::IsSupported}\label{wxclipboardissupported}
\func{bool}{IsSupported}{\param{const wxDataFormat\&}{ format}}
Returns TRUE if the format of the given data object is available on the clipboard.
\membersection{wxClipboard::Open}\label{wxclipboardopen}
\func{bool}{Open}{\void}
Call this function to open the clipboard before calling \helpref{wxClipboard::SetData}{wxclipboardsetdata}
and \helpref{wxClipboard::GetData}{wxclipboardgetdata}.
Call \helpref{wxClipboard::Close}{wxclipboardclose} when you have finished with the clipboard. You
should keep the clipboard open for only a very short time.
Returns TRUE on success. This should be tested (as in the sample shown above).
\membersection{wxClipboard::SetData}\label{wxclipboardsetdata}
\func{bool}{SetData}{\param{wxDataObject*}{ data}}
Call this function to set the data object to the clipboard. This function will
clear all previous contents in the clipboard, so calling it several times
does not make any sense.
After this function has been called, the clipboard owns the data, so do not delete
the data explicitly.
\wxheading{See also}
\helpref{wxClipboard::AddData}{wxclipboardadddata}
\membersection{wxClipboard::UsePrimarySelection}\label{wxclipboarduseprimary}
\func{void}{UsePrimarySelection}{\param{bool}{ primary = TRUE}}
On platforms supporting it (currently only GTK), selects the so called
PRIMARY SELECTION as the clipboard as opposed to the normal clipboard,
if {\it primary} is TRUE.

View File

@@ -1,113 +0,0 @@
\section{\class{wxCloseEvent}}\label{wxcloseevent}
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 \helpref{wxWindow::Close}{wxwindowclose} function.
You should check whether the application is forcing the deletion of the window
using \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto}. If this is {\tt FALSE},
you {\it must} destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
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 \helpref{wxCloseEvent::Veto}{wxcloseeventveto} to
let the calling code know that you did not destroy the window. This allows the \helpref{wxWindow::Close}{wxwindowclose} function
to return {\tt TRUE} or {\tt FALSE} depending on whether the close instruction was honoured or not.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}
\wxheading{Include files}
<wx/event.h>
\wxheading{Event table macros}
To process a close event, use these event handler macros to direct input to member
functions that take a wxCloseEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CLOSE(func)}}{Process a close event, supplying the member function. This
event applies to wxFrame and wxDialog classes.}
\twocolitem{{\bf EVT\_QUERY\_END\_SESSION(func)}}{Process a query end session event, supplying the member function.
This event applies to wxApp only.}
\twocolitem{{\bf EVT\_END\_SESSION(func)}}{Process an end session event, supplying the member function.
This event applies to wxApp only.}
\end{twocollist}%
\wxheading{See also}
\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
\helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession},\rtfsp
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnEndSession}{wxapponendsession},\rtfsp
\helpref{Window deletion overview}{windowdeletionoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCloseEvent::wxCloseEvent}
\func{}{wxCloseEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}}
Constructor.
\membersection{wxCloseEvent::CanVeto}\label{wxcloseeventcanveto}
\func{bool}{CanVeto}{\void}
Returns TRUE if you can veto a system shutdown or a window close event.
Vetoing a window close event is not possible if the calling code wishes to
force the application to exit, and so this function must be called to check this.
\membersection{wxCloseEvent::GetLoggingOff}\label{wxcloseeventgetloggingoff}
\constfunc{bool}{GetLoggingOff}{\void}
Returns TRUE if the user is logging off.
\membersection{wxCloseEvent::GetSessionEnding}\label{wxcloseeventgetsessionending}
\constfunc{bool}{GetSessionEnding}{\void}
Returns TRUE if the session is ending.
\membersection{wxCloseEvent::GetForce}\label{wxcloseeventgetforce}
\constfunc{bool}{GetForce}{\void}
Returns TRUE if the application wishes to force the window to close.
This will shortly be obsolete, replaced by CanVeto.
\membersection{wxCloseEvent::SetCanVeto}\label{wxcloseeventsetcanveto}
\func{void}{SetCanVeto}{\param{bool}{ canVeto}}
Sets the 'can veto' flag.
\membersection{wxCloseEvent::SetForce}\label{wxcloseeventsetforce}
\constfunc{void}{SetForce}{\param{bool}{ force}}
Sets the 'force' flag.
\membersection{wxCloseEvent::SetLoggingOff}\label{wxcloseeventsetloggingoff}
\constfunc{void}{SetLoggingOff}{\param{bool}{ loggingOff}}
Sets the 'logging off' flag.
\membersection{wxCloseEvent::Veto}\label{wxcloseeventveto}
\func{void}{Veto}{\param{bool}{ veto = TRUE}}
Call this from your event handler to veto a system shutdown or to signal
to the calling application that a window close did not happen.
You can only veto a shutdown if \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto} returns
TRUE.

View File

@@ -1,206 +0,0 @@
\section{\class{wxCommandEvent}}\label{wxcommandevent}
This event class contains information about command events, which originate from a variety of
simple controls. More complex controls, such as \helpref{wxTreeCtrl}{wxtreectrl}, have separate command event classes.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}
\wxheading{Include files}
<wx/event.h>
\wxheading{Event table macros}
To process a menu command event, use these event handler macros to direct input to member
functions that take a wxCommandEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_COMMAND(id, event, func)}}{Process a command, supplying the window identifier,
command event identifier, and member function.}
\twocolitem{{\bf EVT\_COMMAND\_RANGE(id1, id2, event, func)}}{Process a command for a range
of window identifiers, supplying the minimum and maximum window identifiers,
command event identifier, and member function.}
\twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED command,
which is generated by a wxButton control.}
\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED command,
which is generated by a wxCheckBox control.}
\twocolitem{{\bf EVT\_CHOICE(id, func)}}{Process a wxEVT\_COMMAND\_CHOICE\_SELECTED command,
which is generated by a wxChoice control.}
\twocolitem{{\bf EVT\_LISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_SELECTED command,
which is generated by a wxListBox control.}
\twocolitem{{\bf EVT\_LISTBOX\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED command,
which is generated by a wxListBox control.}
\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED command,
which is generated by a wxTextCtrl control.}
\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER command,
which is generated by a wxTextCtrl control. Note that you must use
wxTE\_PROCESS\_ENTER flag when creating the control if you want it to generate
such events.}
\twocolitem{{\bf EVT\_TEXT\_MAXLEN(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_MAXLEN command,
which is generated by a wxTextCtrl control when the user tries to enter more
characters into it than the limit previously set with
\helpref{SetMaxLength}{wxtextctrlsetmaxlength}.}
\twocolitem{{\bf EVT\_MENU(id, func)}}{Process a wxEVT\_COMMAND\_MENU\_SELECTED command,
which is generated by a menu item.}
\twocolitem{{\bf EVT\_MENU\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_MENU\_RANGE command,
which is generated by a range of menu items.}
\twocolitem{{\bf EVT\_CONTEXT\_MENU(func)}}{Process the event generated
when the user has requested a popup menu to appear by pressing a special
keyboard key (under Windows) or by right clicking the mouse.}
\twocolitem{{\bf EVT\_SLIDER(id, func)}}{Process a wxEVT\_COMMAND\_SLIDER\_UPDATED command,
which is generated by a wxSlider control.}
\twocolitem{{\bf EVT\_RADIOBOX(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBOX\_SELECTED command,
which is generated by a wxRadioBox control.}
\twocolitem{{\bf EVT\_RADIOBUTTON(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED command,
which is generated by a wxRadioButton control.}
\twocolitem{{\bf EVT\_SCROLLBAR(id, func)}}{Process a wxEVT\_COMMAND\_SCROLLBAR\_UPDATED command,
which is generated by a wxScrollBar control. This is provided for compatibility only;
more specific scrollbar event macros should be used instead (see \helpref{wxScrollEvent}{wxscrollevent}).}
\twocolitem{{\bf EVT\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED command,
which is generated by a wxComboBox control.}
\twocolitem{{\bf EVT\_TOOL(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED event
(a synonym for wxEVT\_COMMAND\_MENU\_SELECTED). Pass the id of the tool.}
\twocolitem{{\bf EVT\_TOOL\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED event
for a range id identifiers. Pass the ids of the tools.}
\twocolitem{{\bf EVT\_TOOL\_RCLICKED(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED event.
Pass the id of the tool.}
\twocolitem{{\bf EVT\_TOOL\_RCLICKED\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED event
for a range of ids. Pass the ids of the tools.}
\twocolitem{{\bf EVT\_TOOL\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_ENTER event.
Pass the id of the toolbar itself. The value of wxCommandEvent::GetSelection is the tool id, or -1 if the mouse cursor has moved off a tool.}
\twocolitem{{\bf EVT\_COMMAND\_LEFT\_CLICK(id, func)}}{Process a wxEVT\_COMMAND\_LEFT\_CLICK command,
which is generated by a control (Windows 95 and NT only).}
\twocolitem{{\bf EVT\_COMMAND\_LEFT\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LEFT\_DCLICK command,
which is generated by a control (Windows 95 and NT only).}
\twocolitem{{\bf EVT\_COMMAND\_RIGHT\_CLICK(id, func)}}{Process a wxEVT\_COMMAND\_RIGHT\_CLICK command,
which is generated by a control (Windows 95 and NT only).}
\twocolitem{{\bf EVT\_COMMAND\_SET\_FOCUS(id, func)}}{Process a wxEVT\_COMMAND\_SET\_FOCUS command,
which is generated by a control (Windows 95 and NT only).}
\twocolitem{{\bf EVT\_COMMAND\_KILL\_FOCUS(id, func)}}{Process a wxEVT\_COMMAND\_KILL\_FOCUS command,
which is generated by a control (Windows 95 and NT only).}
\twocolitem{{\bf EVT\_COMMAND\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_ENTER command,
which is generated by a control.}
\end{twocollist}%
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCommandEvent::m\_clientData}
\member{void*}{m\_clientData}
Contains a pointer to client data for listboxes and choices, if the event
was a selection. Beware, this is not implemented anyway...
\membersection{wxCommandEvent::m\_commandInt}
\member{int}{m\_commandInt}
Contains an integer identifier corresponding to a listbox, choice or
radiobox selection (only if the event was a selection, not a
deselection), or a boolean value representing the value of a checkbox.
\membersection{wxCommandEvent::m\_commandString}
\member{wxString}{m\_commandString}
Contains a string corresponding to a listbox or choice selection.
\membersection{wxCommandEvent::m\_extraLong}
\member{long}{m\_extraLong}
Extra information. If the event comes from a listbox selection, it is
a boolean determining whether the event was a selection (TRUE) or a
deselection (FALSE). A listbox deselection only occurs for
multiple-selection boxes, and in this case the index and string values
are indeterminate and the listbox must be examined by the application.
\membersection{wxCommandEvent::wxCommandEvent}
\func{}{wxCommandEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}}
Constructor.
\membersection{wxCommandEvent::Checked}
\constfunc{bool}{Checked}{\void}
Deprecated, use \helpref{IsChecked}{wxcommandeventischecked} instead.
\membersection{wxCommandEvent::GetClientData}
\func{void*}{GetClientData}{\void}
Returns client data pointer for a listbox or choice selection event
(not valid for a deselection).
\membersection{wxCommandEvent::GetExtraLong}
\func{long}{GetExtraLong}{\void}
Returns the {\bf m\_extraLong} member.
\membersection{wxCommandEvent::GetInt}
\func{int}{GetInt}{\void}
Returns the {\bf m\_commandInt} member.
\membersection{wxCommandEvent::GetSelection}
\func{int}{GetSelection}{\void}
Returns item index for a listbox or choice selection event (not valid for
a deselection).
\membersection{wxCommandEvent::GetString}
\func{wxString}{GetString}{\void}
Returns item string for a listbox or choice selection event (not valid for
a deselection).
\membersection{wxCommandEvent::IsChecked}\label{wxcommandeventischecked}
\constfunc{bool}{IsChecked}{\void}
This method can be used with checkbox and menu events: for the checkboxes, the
method returns {\tt TRUE} for a selection event and {\tt FALSE} for a
deselection one. For the menu events, this method indicates if the menu item
just has become checked or unchecked (and thus only makes sense for checkable
menu items).
\membersection{wxCommandEvent::IsSelection}
\func{bool}{IsSelection}{\void}
For a listbox or choice event, returns TRUE if it is a selection, FALSE if it
is a deselection.
\membersection{wxCommandEvent::SetClientData}
\func{void}{SetClientData}{\param{void*}{ clientData}}
Sets the client data for this event.
\membersection{wxCommandEvent::SetExtraLong}
\func{void}{SetExtraLong}{\param{int}{ extraLong}}
Sets the {\bf m\_extraLong} member.
\membersection{wxCommandEvent::SetInt}
\func{void}{SetInt}{\param{int}{ intCommand}}
Sets the {\bf m\_commandInt} member.
\membersection{wxCommandEvent::SetString}
\func{void}{SetString}{\param{const wxString\&}{ string}}
Sets the {\bf m\_commandString} member.

View File

@@ -1,487 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: cmdlpars.tex
%% Purpose: wxCmdLineParser documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 27.03.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxCmdLineParser}}\label{wxcmdlineparser}
wxCmdLineParser is a class for parsing command line.
It has the following features:
\begin{enumerate}\itemsep=0pt
\item distinguishes options, switches and parameters; allows option grouping
\item allows both short and long options
\item automatically generates the usage message from the command line description
\item does type checks on the options values (number, date, $\ldots$).
\end{enumerate}
To use it you should follow these steps:
\begin{enumerate}\itemsep=0pt
\item \helpref{construct}{wxcmdlineparserconstruction} an object of this class
giving it the command line to parse and optionally its description or use
{\tt AddXXX()} functions later
\item call {\tt Parse()}
\item use {\tt Found()} to retrieve the results
\end{enumerate}
In the documentation below the following terminology is used:
\begin{twocollist}\itemsep=0pt
\twocolitem{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,
{\tt -v} might be a switch meaning "enable verbose mode".}
\twocolitem{option}{Option for us here is something which comes with a value 0
unlike a switch. For example, {\tt -o:filename} might be an option which allows
to specify the name of the output file.}
\twocolitem{parameter}{This is a required program argument.}
\end{twocollist}
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/cmdline.h>
\wxheading{Constants}
The structure wxCmdLineEntryDesc is used to describe the one command
line switch, option or parameter. An array of such structures should be passed
to \helpref{SetDesc()}{wxcmdlineparsersetdesc}. Also, the meanings of parameters
of the {\tt AddXXX()} functions are the same as of the corresponding fields in
this structure:
\begin{verbatim}
struct wxCmdLineEntryDesc
{
wxCmdLineEntryType kind;
const wxChar *shortName;
const wxChar *longName;
const wxChar *description;
wxCmdLineParamType type;
int flags;
};
\end{verbatim}
The type of a command line entity is in the {\tt kind} field and may be one of
the following constants:
{\small%
\begin{verbatim}
enum wxCmdLineEntryType
{
wxCMD_LINE_SWITCH,
wxCMD_LINE_OPTION,
wxCMD_LINE_PARAM,
wxCMD_LINE_NONE // use this to terminate the list
}
\end{verbatim}
}
The field {\tt shortName} is the usual, short, name of the switch or the option.
{\tt longName} is the corresponding long name or NULL if the option has no long
name. Both of these fields are unused for the parameters. Both the short and
long option names can contain only letters, digits and the underscores.
{\tt description} is used by the \helpref{Usage()}{wxcmdlineparserusage} method
to construct a help message explaining the syntax of the program.
The possible values of {\tt type} which specifies the type of the value accepted
by an option or parameter are:
{\small%
\begin{verbatim}
enum wxCmdLineParamType
{
wxCMD_LINE_VAL_STRING, // default
wxCMD_LINE_VAL_NUMBER,
wxCMD_LINE_VAL_DATE,
wxCMD_LINE_VAL_NONE
}
\end{verbatim}
}
Finally, the {\tt flags} field is a combination of the following bit masks:
{\small%
\begin{verbatim}
enum
{
wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given
wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted
wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated
wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request
wxCMD_LINE_NEEDS_SEPARATOR = 0x10, // must have sep before the value
}
\end{verbatim}
}
Notice that by default (i.e. if flags are just $0$), options are optional (sic)
and each call to \helpref{AddParam()}{wxcmdlineparseraddparam} allows one more
parameter - this may be changed by giving non-default flags to it, i.e. use
{\tt wxCMD\_LINE\_OPTION\_MANDATORY} to require that the option is given and
{\tt wxCMD\_LINE\_PARAM\_OPTIONAL} to make a parameter optional. Also,
{\tt wxCMD\_LINE\_PARAM\_MULTIPLE} may be specified if the programs accepts a
variable number of parameters - but it only can be given for the last parameter
in the command line description. If you use this flag, you will probably need to
use \helpref{GetParamCount}{wxcmdlineparsergetparamcount} to retrieve the number
of parameters effectively specified after calling
\helpref{Parse}{wxcmdlineparserparse}.
The last flag {\tt wxCMD\_LINE\_NEEDS\_SEPARATOR} can be specified to require a
separator (either a colon, an equal sign or white space) between the option
name and its value. By default, no separator is required.
\wxheading{See also}
\helpref{wxApp::argc}{wxappargc} and \helpref{wxApp::argv}{wxappargv}\\
console sample
%%%%%%%%%%%%% Methods by group %%%%%%%%%%%%%
\latexignore{\rtfignore{\wxheading{Function groups}}}
\membersection{Construction}\label{wxcmdlineparserconstruction}
Before \helpref{Parse}{wxcmdlineparserparse} can be called, the command line
parser object must have the command line to parse and also the rules saying
which switches, options and parameters are valid - this is called command line
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
\helpref{Parse}{wxcmdlineparserparse}.
To specify the command line to parse you may use either one of constructors
accepting it (\helpref{wxCmdLineParser(argc, argv)}{wxcmdlineparserwxcmdlineparserargc} or
\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserdescargc} usually) or,
if you use \helpref{the default constructor}{wxcmdlineparserwxcmdlineparserdef},
you can do it later by calling
\helpref{SetCmdLine}{wxcmdlineparsersetcmdlineargc}.
The same holds for command line description: it can be specified either in
the constructor (\helpref{without command line}{wxcmdlineparserwxcmdlineparserdesc} or
\helpref{together with it}{wxcmdlineparserwxcmdlineparserdescargc}) or
constructed later using either \helpref{SetDesc}{wxcmdlineparsersetdesc} or
combination of \helpref{AddSwitch}{wxcmdlineparseraddswitch},
\helpref{AddOption}{wxcmdlineparseraddoption} and
\helpref{AddParam}{wxcmdlineparseraddparam} methods.
Using constructors or \helpref{SetDesc}{wxcmdlineparsersetdesc} uses a (usually
{\tt 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
{\tt AddXXX()} functions above might be preferable.
\membersection{Customization}\label{wxcmdlineparsercustomization}
wxCmdLineParser has several global options which may be changed by the
application. All of the functions described in this section should be called
before \helpref{Parse}{wxcmdlineparserparse}.
First global option is the support for long (also known as GNU-style) options.
The long options are the ones which start with two dashes ({\tt "--"}) and look
like this: {\tt --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
\helpref{DisableLongOptions}{wxcmdlineparserdisablelongoptions}.
Another global option is the set of characters which may be used to start an
option (otherwise, the word on the command line is assumed to be a parameter).
Under Unix, {\tt '-'} is always used, but Windows has at least two common
choices for this: {\tt '-'} and {\tt '/'}. Some programs also use {\tt '+'}.
The default is to use what suits most the current platform, but may be changed
with \helpref{SetSwitchChars}{wxcmdlineparsersetswitchchars} method.
Finally, \helpref{SetLogo}{wxcmdlineparsersetlogo} can be used to show some
application-specific text before the explanation given by
\helpref{Usage}{wxcmdlineparserusage} function.
\membersection{Parsing command line}\label{wxcmdlineparserparsing}
After the command line description was constructed and the desired options were
set, you can finally call \helpref{Parse}{wxcmdlineparserparse} method.
It returns $0$ if the command line was correct and was parsed, $-1$ if the help
option was specified (this is a separate case as, normally, the program will
terminate after this) or a positive number if there was an error during the
command line parsing.
In the latter case, the appropriate error message and usage information are
logged by wxCmdLineParser itself using the standard wxWindows logging functions.
\membersection{Getting results}\label{wxcmdlineparsergettingresults}
After calling \helpref{Parse}{wxcmdlineparserparse} (and if it returned $0$),
you may access the results of parsing using one of overloaded {\tt Found()}
methods.
For a simple switch, you will simply call
\helpref{Found}{wxcmdlineparserfoundswitch} to determine if the switch was given
or not, for an option or a parameter, you will call a version of {\tt Found()}
which also returns the associated value in the provided variable. All
{\tt Found()} functions return TRUE if the switch or option were found in the
command line or FALSE if they were not specified.
%%%%%%%%%%%%% Methods in alphabetic order %%%%%%%%%%%%%
\helponly{\insertatlevel{2}{
\wxheading{Members}
}}
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdef}
\func{}{wxCmdLineParser}{\void}
Default constructor. You must use
\helpref{SetCmdLine}{wxcmdlineparsersetcmdlineargc} later.
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserargc}
\func{}{wxCmdLineParser}{\param{int }{argc}, \param{char** }{argv}}
Constructor specifies the command line to parse. This is the traditional
(Unix) command line format. The parameters {\it argc} and {\it argv} have the
same meaning as for {\tt main()} function.
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserstr}
\func{}{wxCmdLineParser}{\param{const wxString\& }{cmdline}}
Constructor specifies the command line to parse in Windows format. The parameter
{\it cmdline} has the same meaning as the corresponding parameter of
{\tt WinMain()}.
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdesc}
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}}
Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserdef}, but also
specifies the \helpref{command line description}{wxcmdlineparsersetdesc}.
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdescargc}
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}, \param{int }{argc}, \param{char** }{argv}}
Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserargc}, but also
specifies the \helpref{command line description}{wxcmdlineparsersetdesc}.
\membersection{wxCmdLineParser::wxCmdLineParser}\label{wxcmdlineparserwxcmdlineparserdescstr}
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}, \param{const wxString\& }{cmdline}}
Same as \helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserstr}, but also
specifies the \helpref{command line description}{wxcmdlineparsersetdesc}.
\membersection{wxCmdLineParser::ConvertStringToArgs}\label{wxcmdlineparserconvertstringtoargs}
\func{static wxArrayString}{ConvertStringToArgs}{\param{const wxChar }{*cmdline}}
Breaks down the string containing the full command line in words. The words are
separated by whitespace. The quotes can be used in the input string to quote
the white space and the back slashes can be used to quote the quotes.
\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdlineargc}
\func{void}{SetCmdLine}{\param{int }{argc}, \param{char** }{argv}}
Set command line to parse after using one of the constructors which don't do it.
\wxheading{See also}
\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserargc}
\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdlinestr}
\func{void}{SetCmdLine}{\param{const wxString\& }{cmdline}}
Set command line to parse after using one of the constructors which don't do it.
\wxheading{See also}
\helpref{wxCmdLineParser}{wxcmdlineparserwxcmdlineparserstr}
\membersection{wxCmdLineParser::\destruct{wxCmdLineParser}}\label{wxcmdlineparserdtor}
\func{}{\destruct{wxCmdLineParser}}{\void}
Frees resources allocated by the object.
{\bf NB:} destructor is not virtual, don't use this class polymorphically.
\membersection{wxCmdLineParser::SetSwitchChars}\label{wxcmdlineparsersetswitchchars}
\func{void}{SetSwitchChars}{\param{const wxString\& }{switchChars}}
{\it switchChars} contains all characters with which an option or switch may
start. Default is {\tt "-"} for Unix, {\tt "-/"} for Windows.
\membersection{wxCmdLineParser::EnableLongOptions}\label{wxcmdlineparserenablelongoptions}
\func{void}{EnableLongOptions}{\param{bool }{enable = TRUE}}
Enable or disable support for the long options.
As long options are not (yet) POSIX-compliant, this option allows to disable
them.
\wxheading{See also}
\helpref{Customization}{wxcmdlineparsercustomization} and \helpref{AreLongOptionsEnabled}{wxcmdlineparserarelongoptionsenabled}
\membersection{wxCmdLineParser::DisableLongOptions}\label{wxcmdlineparserdisablelongoptions}
\func{void}{DisableLongOptions}{\void}
Identical to \helpref{EnableLongOptions(FALSE)}{wxcmdlineparserenablelongoptions}.
\membersection{wxCmdLineParser::AreLongOptionsEnabled}\label{wxcmdlineparserarelongoptionsenabled}
\func{bool}{AreLongOptionsEnabled}{\void}
Returns TRUE if long options are enabled, otherwise FALSE.
\wxheading{See also}
\helpref{EnableLongOptions}{wxcmdlineparserenablelongoptions}
\membersection{wxCmdLineParser::SetLogo}\label{wxcmdlineparsersetlogo}
\func{void}{SetLogo}{\param{const wxString\& }{logo}}
{\it logo} is some extra text which will be shown by
\helpref{Usage}{wxcmdlineparserusage} method.
\membersection{wxCmdLineParser::SetDesc}\label{wxcmdlineparsersetdesc}
\func{void}{SetDesc}{\param{const wxCmdLineEntryDesc* }{desc}}
Construct the command line description
Take the command line description from the wxCMD\_LINE\_NONE terminated table.
Example of usage:
\begin{verbatim}
static const wxCmdLineEntryDesc cmdLineDesc[] =
{
{ wxCMD_LINE_SWITCH, "v", "verbose", "be verbose" },
{ wxCMD_LINE_SWITCH, "q", "quiet", "be quiet" },
{ wxCMD_LINE_OPTION, "o", "output", "output file" },
{ wxCMD_LINE_OPTION, "i", "input", "input dir" },
{ wxCMD_LINE_OPTION, "s", "size", "output block size", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "d", "date", "output file date", wxCMD_LINE_VAL_DATE },
{ wxCMD_LINE_PARAM, NULL, NULL, "input file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE },
{ wxCMD_LINE_NONE }
};
wxCmdLineParser parser;
parser.SetDesc(cmdLineDesc);
\end{verbatim}
\membersection{wxCmdLineParser::AddSwitch}\label{wxcmdlineparseraddswitch}
\func{void}{AddSwitch}{\param{const wxString\& }{name}, \param{const wxString\& }{lng = wxEmptyString}, \param{const wxString\& }{desc = wxEmptyString}, \param{int }{flags = 0}}
Add a switch {\it name} with an optional long name {\it lng} (no long name if it
is empty, which is default), description {\it desc} and flags {\it flags} to the
command line description.
\membersection{wxCmdLineParser::AddOption}\label{wxcmdlineparseraddoption}
\func{void}{AddOption}{\param{const wxString\& }{name}, \param{const wxString\& }{lng = wxEmptyString}, \param{const wxString\& }{desc = wxEmptyString}, \param{wxCmdLineParamType }{type = wxCMD\_LINE\_VAL\_STRING}, \param{int }{flags = 0}}
Add an option {\it name} with an optional long name {\it lng} (no long name if
it is empty, which is default) taking a value of the given type (string by
default) to the command line description.
\membersection{wxCmdLineParser::AddParam}\label{wxcmdlineparseraddparam}
\func{void}{AddParam}{\param{const wxString\& }{desc = wxEmptyString}, \param{wxCmdLineParamType }{type = wxCMD\_LINE\_VAL\_STRING}, \param{int }{flags = 0}}
Add a parameter of the given {\it type} to the command line description.
\membersection{wxCmdLineParser::Parse}\label{wxcmdlineparserparse}
\func{int}{Parse}{\param{bool }{giveUsage = {\tt TRUE}}}
Parse the command line, return $0$ if ok, $-1$ if {\tt "-h"} or {\tt "--help"}
option was encountered and the help message was given or a positive value if a
syntax error occured.
\wxheading{Parameters}
\docparam{giveUsage}{If {\tt TRUE} (default), the usage message is given if a
syntax error was encountered while parsing the command line or if help was
requested. If {\tt FALSE}, only error messages about possible syntax errors
are given, use \helpref{Usage}{wxcmdlineparserusage} to show the usage message
from the caller if needed.}
\membersection{wxCmdLineParser::Usage}\label{wxcmdlineparserusage}
\func{void}{Usage}{\void}
Give the standard usage message describing all program options. It will use the
options and parameters descriptions specified earlier, so the resulting message
will not be helpful to the user unless the descriptions were indeed specified.
\wxheading{See also}
\helpref{SetLogo}{wxcmdlineparsersetlogo}
\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundswitch}
\constfunc{bool}{Found}{\param{const wxString\& }{name}}
Returns TRUE if the given switch was found, FALSE otherwise.
\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundstringoption}
\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{wxString* }{value}}
Returns TRUE if an option taking a string value was found and stores the
value in the provided pointer (which should not be NULL).
\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfoundintoption}
\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{long* }{value}}
Returns TRUE if an option taking an integer value was found and stores
the value in the provided pointer (which should not be NULL).
\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfounddateoption}
\constfunc{bool}{Found}{\param{const wxString\& }{name}, \param{wxDateTime* }{value}}
Returns TRUE if an option taking a date value was found and stores the
value in the provided pointer (which should not be NULL).
\membersection{wxCmdLineParser::GetParamCount}\label{wxcmdlineparsergetparamcount}
\constfunc{size\_t}{GetParamCount}{\void}
Returns the number of parameters found. This function makes sense mostly if you
had used {\tt wxCMD\_LINE\_PARAM\_MULTIPLE} flag.
\membersection{wxCmdLineParser::GetParam}\label{wxcmdlineparsergetparam}
\constfunc{wxString}{GetParam}{\param{size\_t }{n = 0u}}
Returns the value of Nth parameter (as string only for now).
\wxheading{See also}
\helpref{GetParamCount}{wxcmdlineparsergetparamcount}

View File

@@ -1,153 +0,0 @@
\section{\class{wxCommandProcessor}}\label{wxcommandprocessor}
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.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cmdproc.h>
\wxheading{See also}
\helpref{wxCommandProcessor overview}{wxcommandprocessoroverview}, \helpref{wxCommand}{wxcommand}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCommandProcessor::wxCommandProcessor}
\func{}{wxCommandProcessor}{\param{int}{ maxCommands = $-1$}}
Constructor.
{\it maxCommands} may be set to a positive integer to limit the number of
commands stored to it, otherwise (and by default) the list of commands can grow
arbitrarily.
\membersection{wxCommandProcessor::\destruct{wxCommandProcessor}}
\func{}{\destruct{wxCommandProcessor}}{\void}
Destructor.
\membersection{wxCommandProcessor::CanUndo}
\func{virtual bool}{CanUndo}{\void}
Returns TRUE if the currently-active command can be undone, FALSE otherwise.
\membersection{wxCommandProcessor::ClearCommands}
\func{virtual void}{ClearCommands}{\void}
Deletes all the commands in the list and sets the current command pointer to NULL.
\membersection{wxCommandProcessor::Redo}
\func{virtual bool}{Redo}{\void}
Executes (redoes) the current command (the command that has just been undone if any).
\membersection{wxCommandProcessor::GetCommands}
\constfunc{wxList\&}{GetCommands}{\void}
Returns the list of commands.
\membersection{wxCommandProcessor::GetMaxCommands}
\constfunc{int}{GetMaxCommands}{\void}
Returns the maximum number of commands that the command processor stores.
\membersection{wxCommandProcessor::GetEditMenu}
\constfunc{wxMenu*}{GetEditMenu}{\void}
Returns the edit menu associated with the command processor.
\membersection{wxCommandProcessor::GetRedoAccelerator}\label{wxcommandprocessorgetredoaccelerator}
\constfunc{const wxString\&}{GetRedoAccelerator}{\void}
Returns the string that will be appended to the Redo menu item.
\membersection{wxCommandProcessor::GetRedoMenuLabel}\label{wxcommandprocessorgetredomenulabel}
\constfunc{wxString}{GetRedoMenuLabel}{\void}
Returns the string that will be shown for the redo menu item.
\membersection{wxCommandProcessor::GetUndoAccelerator}\label{wxcommandprocessorgetundoaccelerator}
\constfunc{const wxString\&}{GetUndoAccelerator}{\void}
Returns the string that will be appended to the Undo menu item.
\membersection{wxCommandProcessor::GetUndoMenuLabel}\label{wxcommandprocessorgetundomenulabel}
\constfunc{wxString}{GetUndoMenuLabel}{\void}
Returns the string that will be shown for the undo menu item.
\membersection{wxCommandProcessor::Initialize}
\func{virtual void}{Initialize}{\void}
Initializes the command processor, setting the current command to the
last in the list (if any), and updating the edit menu (if one has been
specified).
\membersection{wxCommandProcessor::SetEditMenu}
\func{void}{SetEditMenu}{\param{wxMenu* }{menu}}
Tells the command processor to update the Undo and Redo items on this
menu as appropriate. Set this to NULL if the menu is about to be
destroyed and command operations may still be performed, or the command
processor may try to access an invalid pointer.
\membersection{wxCommandProcessor::SetMenuStrings}
\func{void}{SetMenuStrings}{\void}
Sets the menu labels according to the currently set menu and the current
command state.
\membersection{wxCommandProcessor::SetRedoAccelerator}\label{wxcommandprocessorsetredoaccelerator}
\func{void}{SetRedoAccelerator}{\param{const wxString\&}{accel}}
Sets the string that will be appended to the Redo menu item.
\membersection{wxCommandProcessor::SetUndoAccelerator}\label{wxcommandprocessorsetundoaccelerator}
\func{void}{SetUndoAccelerator}{\param{const wxString\&}{accel}}
Sets the string that will be appended to the Undo menu item.
\membersection{wxCommandProcessor::Submit}
\func{virtual bool}{Submit}{\param{wxCommand *}{command}, \param{bool}{ storeIt = TRUE}}
Submits a new command to the command processor. The command processor
calls wxCommand::Do to execute the command; if it succeeds, the command
is stored in the history list, and the associated edit menu (if any) updated
appropriately. If it fails, the command is deleted
immediately. Once Submit has been called, the passed command should not
be deleted directly by the application.
{\it storeIt} indicates whether the successful command should be stored
in the history list.
\membersection{wxCommandProcessor::Undo}
\func{virtual bool}{Undo}{\void}
Undoes the command just executed.

View File

@@ -1,61 +0,0 @@
\section{\class{wxColourDialog}}\label{wxcolourdialog}
This class represents the colour chooser dialog.
\wxheading{Derived from}
\helpref{wxDialog}{wxdialog}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/colordlg.h>
\wxheading{See also}
\helpref{wxColourDialog Overview}{wxcolourdialogoverview},\\
\helpref{wxColour}{wxcolour},\\
\helpref{wxColourData}{wxcolourdata},\\
\helpref{wxGetColourFromUser}{wxgetcolourfromuser}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxColourDialog::wxColourDialog}\label{wxcolourdialogwxcolourdialog}
\func{}{wxColourDialog}{\param{wxWindow* }{parent}, \param{wxColourData* }{data = NULL}}
Constructor. Pass a parent window, and optionally a pointer to a block of colour
data, which will be copied to the colour dialog's colour data.
\wxheading{See also}
\helpref{wxColourData}{wxcolourdata}
\membersection{wxColourDialog::\destruct{wxColourDialog}}
\func{}{\destruct{wxColourDialog}}{\void}
Destructor.
\membersection{wxColourDialog::Create}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxColourData* }{data = NULL}}
Same as \helpref{constructor}{wxcolourdialogwxcolourdialog}.
\membersection{wxColourDialog::GetColourData}
\func{wxColourData\&}{GetColourData}{\void}
Returns the \helpref{colour data}{wxcolourdata} associated with the colour dialog.
\membersection{wxColourDialog::ShowModal}
\func{int}{ShowModal}{\void}
Shows the dialog, returning wxID\_OK if the user pressed OK, and wxOK\_CANCEL
otherwise.

View File

@@ -1,302 +0,0 @@
\section{\class{wxColour}}\label{wxcolour}
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 \helpref{wxColourDatabase}{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.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/colour.h>
\wxheading{Predefined objects}
Objects:
{\bf wxNullColour}
Pointers:
{\bf wxBLACK\\
wxWHITE\\
wxRED\\
wxBLUE\\
wxGREEN\\
wxCYAN\\
wxLIGHT\_GREY}
\wxheading{See also}
\helpref{wxColourDatabase}{wxcolourdatabase}, \helpref{wxPen}{wxpen}, \helpref{wxBrush}{wxbrush},\rtfsp
\helpref{wxColourDialog}{wxcolourdialog}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxColour::wxColour}\label{wxcolourconstr}
\func{}{wxColour}{\void}
Default constructor.
\func{}{wxColour}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}}
Constructs a colour from red, green and blue values.
\func{}{wxColour}{\param{const wxString\& }{colourNname}}
Constructs a colour object using a colour name
listed in {\bf wxTheColourDatabase}.
\func{}{wxColour}{\param{const wxColour\&}{ colour}}
Copy constructor.
\wxheading{Parameters}
\docparam{red}{The red value.}
\docparam{green}{The green value.}
\docparam{blue}{The blue value.}
\docparam{colourName}{The colour name.}
\docparam{colour}{The colour to copy.}
\wxheading{See also}
\helpref{wxColourDatabase}{wxcolourdatabase}
\pythonnote{Constructors supported by wxPython are:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf wxColour(red=0, green=0, blue=0)}}{}
\twocolitem{{\bf wxNamedColour(name)}}{}
\end{twocollist}}
}
\membersection{wxColour::Blue}\label{wxcolourblue}
\constfunc{unsigned char}{Blue}{\void}
Returns the blue intensity.
\membersection{wxColour::GetPixel}\label{wxcolourgetpixel}
\constfunc{long}{GetPixel}{\void}
Returns a pixel value which is platform-dependent. On Windows, a COLORREF is returned.
On X, an allocated pixel value is returned.
-1 is returned if the pixel is invalid (on X, unallocated).
\membersection{wxColour::Green}\label{wxcolourgreen}
\constfunc{unsigned char}{Green}{\void}
Returns the green intensity.
\membersection{wxColour::Ok}\label{wxcolourok}
\constfunc{bool}{Ok}{\void}
Returns TRUE if the colour object is valid (the colour has been initialised with RGB values).
\membersection{wxColour::Red}\label{wxcolourred}
\constfunc{unsigned char}{Red}{\void}
Returns the red intensity.
\membersection{wxColour::Set}\label{wxcolourset}
\func{void}{Set}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}}
Sets the RGB intensity values.
\membersection{wxColour::operator $=$}\label{wxcolourassign}
\func{wxColour\&}{operator $=$}{\param{const wxColour\&}{ colour}}
Assignment operator, taking another colour object.
\func{wxColour\&}{operator $=$}{\param{const wxString\&}{ colourName}}
Assignment operator, using a colour name to be found in the colour database.
\wxheading{See also}
\helpref{wxColourDatabase}{wxcolourdatabase}
\membersection{wxColour::operator $==$}\label{wxcolourequality}
\func{bool}{operator $==$}{\param{const wxColour\&}{ colour}}
Tests the equality of two colours by comparing individual red, green blue colours.
\membersection{wxColour::operator $!=$}\label{wxcolourinequality}
\func{bool}{operator $!=$}{\param{const wxColour\&}{ colour}}
Tests the inequality of two colours by comparing individual red, green blue colours.
\section{\class{wxColourData}}\label{wxcolourdata}
This class holds a variety of information related to colour dialogs.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cmndata.h>
\wxheading{See also}
\helpref{wxColour}{wxcolour}, \helpref{wxColourDialog}{wxcolourdialog}, \helpref{wxColourDialog overview}{wxcolourdialogoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxColourData::wxColourData}\label{wxcolourdataconstr}
\func{}{wxColourData}{\void}
Constructor. Initializes the custom colours to white, the {\it data colour} setting
to black, and the {\it choose full} setting to TRUE.
\membersection{wxColourData::\destruct{wxColourData}}
\func{}{\destruct{wxColourData}}{\void}
Destructor.
\membersection{wxColourData::GetChooseFull}\label{wxcolourdatagetchoosefull}
\constfunc{bool}{GetChooseFull}{\void}
Under Windows, determines whether the Windows colour dialog will display the full dialog
with custom colour selection controls. Has no meaning under other platforms.
The default value is TRUE.
\membersection{wxColourData::GetColour}\label{wxcolourdatagetcolour}
\constfunc{wxColour\&}{GetColour}{\void}
Gets the current colour associated with the colour dialog.
The default colour is black.
\membersection{wxColourData::GetCustomColour}\label{wxcolourdatagetcustomcolour}
\constfunc{wxColour\&}{GetCustomColour}{\param{int}{ i}}
Gets the {\it i}th custom colour associated with the colour dialog. {\it i} should
be an integer between 0 and 15.
The default custom colours are all white.
\membersection{wxColourData::SetChooseFull}\label{wxcolourdatasetchoosefull}
\func{void}{SetChooseFull}{\param{const bool }{flag}}
Under Windows, tells the Windows colour dialog to display the full dialog
with custom colour selection controls. Under other platforms, has no effect.
The default value is TRUE.
\membersection{wxColourData::SetColour}\label{wxcolourdatasetcolour}
\func{void}{SetColour}{\param{const wxColour\&}{ colour}}
Sets the default colour for the colour dialog.
The default colour is black.
\membersection{wxColourData::SetCustomColour}\label{wxcolourdatasetcustomcolour}
\func{void}{SetCustomColour}{\param{int}{ i}, \param{const wxColour\&}{ colour}}
Sets the {\it i}th custom colour for the colour dialog. {\it i} should
be an integer between 0 and 15.
The default custom colours are all white.
\membersection{wxColourData::operator $=$}\label{wxcolourdataassign}
\func{void}{operator $=$}{\param{const wxColourData\&}{ data}}
Assignment operator for the colour data.
\section{\class{wxColourDatabase}}\label{wxcolourdatabase}
wxWindows 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 {\it Append}. There
is only one instance of this class: {\bf wxTheColourDatabase}.
\wxheading{Derived from}
\helpref{wxList}{wxlist}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/gdicmn.h>
\wxheading{Remarks}
The colours in the standard database are as follows:
AQUAMARINE, BLACK, BLUE, BLUE VIOLET, BROWN, CADET BLUE, CORAL,
CORNFLOWER BLUE, CYAN, DARK GREY, DARK GREEN, DARK OLIVE GREEN, DARK
ORCHID, DARK SLATE BLUE, DARK SLATE GREY DARK TURQUOISE, DIM GREY,
FIREBRICK, FOREST GREEN, GOLD, GOLDENROD, GREY, GREEN, GREEN YELLOW,
INDIAN RED, KHAKI, LIGHT BLUE, LIGHT GREY, LIGHT STEEL BLUE, LIME GREEN,
MAGENTA, MAROON, MEDIUM AQUAMARINE, MEDIUM BLUE, MEDIUM FOREST GREEN,
MEDIUM GOLDENROD, MEDIUM ORCHID, MEDIUM SEA GREEN, MEDIUM SLATE BLUE,
MEDIUM SPRING GREEN, MEDIUM TURQUOISE, MEDIUM VIOLET RED, MIDNIGHT BLUE,
NAVY, ORANGE, ORANGE RED, ORCHID, PALE GREEN, PINK, PLUM, PURPLE, RED,
SALMON, SEA GREEN, SIENNA, SKY BLUE, SLATE BLUE, SPRING GREEN, STEEL
BLUE, TAN, THISTLE, TURQUOISE, VIOLET, VIOLET RED, WHEAT, WHITE, YELLOW,
YELLOW GREEN.
\wxheading{See also}
\helpref{wxColour}{wxcolour}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxColourDatabase::wxColourDatabase}\label{wxcolourdatabaseconstr}
\func{}{wxColourDatabase}{\void}
Constructs the colour database.
\membersection{wxColourDatabase::FindColour}\label{wxcolourdatabasefindcolour}
\func{wxColour*}{FindColour}{\param{const wxString\& }{colourName}}
Finds a colour given the name. Returns NULL if not found.
\membersection{wxColourDatabase::FindName}\label{wxcolourdatabasefindname}
\constfunc{wxString}{FindName}{\param{const wxColour\&}{ colour}}
Finds a colour name given the colour. Returns NULL if not found.
\membersection{wxColourDatabase::Initialize}\label{wxcolourdatabaseinitialize}
\func{void}{Initialize}{\void}
Initializes the database with a number of stock colours. Called by wxWindows
on start-up.

View File

@@ -1,223 +0,0 @@
\section{\class{wxComboBox}}\label{wxcombobox}
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.
\wxheading{Derived from}
\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxChoice}{wxchoice}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/combobox.h>
\wxheading{Window styles}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCB\_SIMPLE}}{Creates a combobox with a permanently displayed list. Windows only. }
\twocolitem{\windowstyle{wxCB\_DROPDOWN}}{Creates a combobox with a drop-down list.}
\twocolitem{\windowstyle{wxCB\_READONLY}}{Same as wxCB\_DROPDOWN but only the
strings specified as the combobox choices can be selected, it is impossible to
select (even from a program) a string which is not in the choices list.}
\twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries in the list alphabetically.}
\end{twocollist}
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED event,
when an item on the list is selected.}
\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED event,
when the combobox text changes.}
\end{twocollist}
\wxheading{See also}
\helpref{wxListBox}{wxlistbox}, \helpref{wxTextCtrl}{wxtextctrl}, \helpref{wxChoice}{wxchoice},
\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxComboBox::wxComboBox}\label{wxcomboboxconstr}
\func{}{wxComboBox}{\void}
Default constructor.
\func{}{wxComboBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
Constructor, creating and showing a combobox.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
\docparam{value}{Initial selection string. An empty string indicates no selection.}
\docparam{pos}{Window position.}
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
appropriately.}
\docparam{n}{Number of strings with which to initialise the control.}
\docparam{choices}{An array of strings with which to initialise the control.}
\docparam{style}{Window style. See \helpref{wxComboBox}{wxcombobox}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\wxheading{See also}
\helpref{wxComboBox::Create}{wxcomboboxcreate}, \helpref{wxValidator}{wxvalidator}
\pythonnote{The wxComboBox constructor in wxPython reduces the {\tt n}
and {\tt choices} arguments are to a single argument, which is
a list of strings.}
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{wxComboBox::\destruct{wxComboBox}}
\func{}{\destruct{wxComboBox}}{\void}
Destructor, destroying the combobox.
\membersection{wxComboBox::Create}\label{wxcomboboxcreate}
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
Creates the combobox for two-step construction. Derived classes
should call or replace this function. See \helpref{wxComboBox::wxComboBox}{wxcomboboxconstr}\rtfsp
for further details.
\membersection{wxComboBox::Copy}\label{wxcomboboxcopy}
\func{void}{Copy}{\void}
Copies the selected text to the clipboard.
\membersection{wxComboBox::Cut}\label{wxcomboboxcut}
\func{void}{Cut}{\void}
Copies the selected text to the clipboard and removes the selection.
\membersection{wxComboBox::GetInsertionPoint}\label{wxcomboboxgetinsertionpoint}
\constfunc{long}{GetInsertionPoint}{\void}
Returns the insertion point for the combobox's text field.
\membersection{wxComboBox::GetLastPosition}\label{wxcomboboxgetlastposition}
\constfunc{long}{GetLastPosition}{\void}
Returns the last position in the combobox text field.
\membersection{wxComboBox::GetValue}\label{wxcomboboxgetvalue}
\constfunc{wxString}{GetValue}{\void}
Returns the current value in the combobox text field.
\membersection{wxComboBox::Paste}\label{wxcomboboxpaste}
\func{void}{Paste}{\void}
Pastes text from the clipboard to the text field.
\membersection{wxComboBox::Replace}\label{wxcomboboxreplace}
\func{void}{Replace}{\param{long}{ from}, \param{long}{ to}, \param{const wxString\& }{text}}
Replaces the text between two positions with the given text, in the combobox text field.
\wxheading{Parameters}
\docparam{from}{The first position.}
\docparam{to}{The second position.}
\docparam{text}{The text to insert.}
\membersection{wxComboBox::Remove}\label{wxcomboboxremove}
\func{void}{Remove}{\param{long}{ from}, \param{long}{ to}}
Removes the text between the two positions in the combobox text field.
\wxheading{Parameters}
\docparam{from}{The first position.}
\docparam{to}{The last position.}
\membersection{wxComboBox::SetInsertionPoint}\label{wxcomboboxsetinsertionpoint}
\func{void}{SetInsertionPoint}{\param{long}{ pos}}
Sets the insertion point in the combobox text field.
\wxheading{Parameters}
\docparam{pos}{The new insertion point.}
\membersection{wxComboBox::SetInsertionPointEnd}\label{wxcomboboxsetinsertionpointend}
\func{void}{SetInsertionPointEnd}{\void}
Sets the insertion point at the end of the combobox text field.
\membersection{wxComboBox::SetSelection}\label{wxcomboboxsetselection}
\func{void}{SetSelection}{\param{long}{ from}, \param{long}{ to}}
Selects the text between the two positions, in the combobox text field.
\wxheading{Parameters}
\docparam{from}{The first position.}
\docparam{to}{The second position.}
\pythonnote{This method is called {\tt SetMark} in wxPython, {\tt SetSelection}
name is kept for
\helpref{wxControlWithItems::SetSelection}{wxcontrolwithitemssetselection}.}
\membersection{wxComboBox::SetValue}\label{wxcomboboxsetvalue}
\func{void}{SetValue}{\param{const wxString\& }{text}}
Sets the text for the combobox text field.
{\bf NB:} For a combobox with {\tt wxCB\_READONLY} style the string must be in
the combobox choices list, otherwise the call to SetValue() is ignored.
\wxheading{Parameters}
\docparam{text}{The text to set.}

View File

@@ -1,89 +0,0 @@
\section{\class{wxCommand}}\label{wxcommand}
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.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cmdproc.h>
\wxheading{See also}
\overview{Overview}{wxcommandoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCommand::wxCommand}
\func{}{wxCommand}{\param{bool}{ canUndo = FALSE}, \param{const wxString\& }{name = NULL}}
Constructor. wxCommand is an abstract class, so you will need to derive
a new class and call this constructor from your own constructor.
{\it canUndo} tells the command processor whether this command is undo-able. You
can achieve the same functionality by overriding the CanUndo member function (if for example
the criteria for undoability is context-dependent).
{\it name} must be supplied for the command processor to display the command name
in the application's edit menu.
\membersection{wxCommand::\destruct{wxCommand}}
\func{}{\destruct{wxCommand}}{\void}
Destructor.
\membersection{wxCommand::CanUndo}
\func{bool}{CanUndo}{\void}
Returns TRUE if the command can be undone, FALSE otherwise.
\membersection{wxCommand::Do}
\func{bool}{Do}{\void}
Override this member function to execute the appropriate action when called.
Return TRUE to indicate that the action has taken place, FALSE otherwise.
Returning FALSE will indicate to the command processor that the action is
not undoable and should not be added to the command history.
\membersection{wxCommand::GetName}
\func{wxString}{GetName}{\void}
Returns the command name.
\membersection{wxCommand::Undo}
\func{bool}{Undo}{\void}
Override this member function to un-execute a previous Do.
Return TRUE to indicate that the action has taken place, FALSE otherwise.
Returning FALSE will indicate to the command processor that the action is
not redoable and no change should be made to the command history.
How you implement this command is totally application dependent, but typical
strategies include:
\begin{itemize}\itemsep=0pt
\item Perform an inverse operation on the last modified piece of
data in the document. When redone, a copy of data stored in command
is pasted back or some operation reapplied. This relies on the fact that
you know the ordering of Undos; the user can never Undo at an arbitrary position
in the command history.
\item Restore the entire document state (perhaps using document transactioning).
Potentially very inefficient, but possibly easier to code if the user interface
and data are complex, and an `inverse execute' operation is hard to write.
\end{itemize}
The docview sample uses the first method, to remove or restore segments
in the drawing.

View File

@@ -1,162 +0,0 @@
\section{\class{wxCondition}}\label{wxcondition}
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
\helpref{Wait()}{wxthreadwait} for the worker thread, but if there are several
worker threads it already makes much more sense).
Note that a call to \helpref{Signal()}{wxconditionsignal} may happen before the
other thread calls \helpref{Wait()}{wxconditionwait} and, just as with the
pthread conditions, the signal is then lost and so if you want to be sure to
get it you must use a mutex together with the condition variable.
\wxheading{Example}
This example shows how a main thread may launch a worker thread which starts
running and then waits until the main thread signals it to continue:
\begin{verbatim}
class MySignallingThread : public wxThread
{
public:
MySignallingThread(wxMutex *mutex, wxCondition *condition)
{
m_mutex = mutex;
m_condition = condition;
Create();
}
virtual ExitCode Entry()
{
... do our job ...
// tell the other(s) thread(s) that we're about to terminate: we must
// lock the mutex first or we might signal the condition before the
// waiting threads start waiting on it!
wxMutexLocker lock(m_mutex);
m_condition.Broadcast(); // same as Signal() here -- one waiter only
return 0;
}
private:
wxCondition *m_condition;
wxMutex *m_mutex;
};
int main()
{
wxMutex mutex;
wxCondition condition(mutex);
// the mutex should be initially locked
mutex.Lock();
// create and run the thread but notice that it won't be able to
// exit (and signal its exit) before we unlock the mutex below
MySignallingThread *thread = new MySignallingThread(&mutex, &condition);
thread->Run();
// wait for the thread termination: Wait() atomically unlocks the mutex
// which allows the thread to continue and starts waiting
condition.Wait();
// now we can exit
return 0;
}
\end{verbatim}
Of course, here it would be much better to simply use a joinable thread and
call \helpref{wxThread::Wait}{wxthreadwait} on it, but this example does
illustrate the importance of properly locking the mutex when using
wxCondition.
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/thread.h>
\wxheading{See also}
\helpref{wxThread}{wxthread}, \helpref{wxMutex}{wxmutex}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCondition::wxCondition}\label{wxconditionconstr}
\func{}{wxCondition}{\param{wxMutex\& }{mutex}}
Default and only constructor. The {\it mutex} must be locked by the caller
before calling \helpref{Wait}{wxconditionwait} function.
\membersection{wxCondition::\destruct{wxCondition}}
\func{}{\destruct{wxCondition}}{\void}
Destroys the wxCondition object. The destructor is not virtual so this class
should not be used polymorphically.
\membersection{wxCondition::Broadcast}\label{wxconditionbroadcast}
\func{void}{Broadcast}{\void}
Broadcasts to all waiting threads, waking all of them up. Note that this method
may be called whether the mutex associated with this condition is locked or
not.
\wxheading{See also}
\helpref{wxCondition::Signal}{wxconditionsignal}
\membersection{wxCondition::Signal}\label{wxconditionsignal}
\func{void}{Signal}{\void}
Signals the object waking up at most one thread. If several threads are waiting
on the same condition, the exact thread which is woken up is undefined. If no
threads are waiting, the signal is lost and the condition would have to be
signalled again to wake up any thread which may start waiting on it later.
Note that this method may be called whether the mutex associated with this
condition is locked or not.
\wxheading{See also}
\helpref{wxCondition::Broadcast}{wxconditionbroadcast}
\membersection{wxCondition::Wait}\label{wxconditionwait}
\func{void}{Wait}{\void}
Waits until the condition is signalled.
\func{bool}{Wait}{\param{unsigned long}{ sec}, \param{unsigned long}{ nsec}}
Waits until the condition is signalled or the timeout has elapsed.
Note that the mutex associated with this condition {\bf must} be acquired by
the thread before calling this method.
\wxheading{Parameters}
\docparam{sec}{Timeout in seconds}
\docparam{nsec}{Timeout nanoseconds component (added to {\it sec}).}
\wxheading{Return value}
The second form returns {\tt TRUE} if the condition has been signalled, or
{\tt FALSE} if it returned because the timeout has elapsed.

View File

@@ -1,771 +0,0 @@
\section{\class{wxConfigBase}}\label{wxconfigbase}
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: wxIniConfig, 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
the registry under Win32 or text-based config files under Unix (or even
Windows 3.1 .INI files if you're really unlucky). To make writing the portable
code even easier, wxWindows provides a typedef wxConfig
which is mapped onto the native wxConfigBase implementation on the given
platform: i.e. wxRegConfig under Win32, wxIniConfig under Win16 and
wxFileConfig otherwise.
See \helpref{config overview}{wxconfigoverview} for the descriptions of all
features of this class.
It is highly recommended to use static functions {\it Get()} and/or {\it Set()},
so please have a \helpref{look at them.}{wxconfigstaticfunctions}
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/config.h> (to let wxWindows choose a wxConfig class for your platform)\\
<wx/confbase.h> (base config class)\\
<wx/fileconf.h> (wxFileconfig class)\\
<wx/msw/regconf.h> (wxRegConfig class)\\
<wx/msw/iniconf.h> (wxIniConfig class)
\wxheading{Example}
Here is how you would typically use this class:
\begin{verbatim}
// using wxConfig instead of writing wxFileConfig or wxRegConfig enhances
// portability of the code
wxConfig *config = new wxConfig("MyAppName");
wxString str;
if ( config->Read("LastPrompt", &str) ) {
// last prompt was found in the config file/registry and its value is now
// in str
...
}
else {
// no last prompt...
}
// another example: using default values and the full path instead of just
// key name: if the key is not found , the value 17 is returned
long value = config->Read("/LastRun/CalculatedValues/MaxValue", 17);
...
...
...
// at the end of the program we would save everything back
config->Write("LastPrompt", str);
config->Write("/LastRun/CalculatedValues/MaxValue", value);
// the changes will be written back automatically
delete config;
\end{verbatim}
This basic example, of course, doesn't show all wxConfig features, such as
enumerating, testing for existence and deleting the entries and groups of
entries in the config file, its abilities to automatically store the default
values or expand the environment variables on the fly. However, the main idea
is that using this class is easy and that it should normally do what you
expect it to.
NB: in the documentation of this class, the words "config file" also mean
"registry hive" for wxRegConfig and, generally speaking, might mean any
physical storage where a wxConfigBase-derived class stores its data.
\latexignore{\rtfignore{\wxheading{Function groups}}}
\membersection{Static functions}\label{wxconfigstaticfunctions}
These functions deal with the "default" config object. Although its usage is
not at all mandatory it may be convenient to use a global config object
instead of creating and deleting the local config objects each time you need
one (especially because creating a wxFileConfig object might be a time
consuming operation). In this case, you may create this global config object
in the very start of the program and {\it Set()} it as the default. Then, from
anywhere in your program, you may access it using the {\it Get()} function.
Note that wxWindows will delete this config object for you during the program
shutdown (from \helpref{wxApp::OnExit}{wxapponexit} to be precise) but you can
also do it yourself earlier if needed.
As it happens, you may even further simplify the procedure described above:
you may forget about calling {\it Set()}. When {\it Get()} is called and there
is no current object, it will create one using {\it Create()} function. To
disable this behaviour {\it DontCreateOnDemand()} is provided.
{\bf Note:} You should use either {\it Set()} or {\it Get()} because wxWindows
library itself would take advantage of it and could save various information
in it. For example \helpref{wxFontMapper}{wxfontmapper} or Unix version
of \helpref{wxFileDialog}{wxfiledialog} have ability to use wxConfig class.
\helpref{Set}{wxconfigbaseset}\\
\helpref{Get}{wxconfigbaseget}\\
\helpref{Create}{wxconfigbasecreate}\\
\helpref{DontCreateOnDemand}{wxconfigbasedontcreateondemand}
\membersection{Constructor and destructor}
\helpref{wxConfigBase}{wxconfigbasector}\\
\helpref{\destruct{wxConfigBase}}{wxconfigbasedtor}
\membersection{Path management}
As explained in \helpref{config overview}{wxconfigoverview}, the config classes
support a file system-like hierarchy of keys (files) and groups (directories).
As in the file system case, to specify a key in the config class you must use
a path to it. Config classes also support the notion of the current group,
which makes it possible to use the relative paths. To clarify all this, here
is an example (it is only for the sake of demonstration, it doesn't do anything
sensible!):
\begin{verbatim}
wxConfig *config = new wxConfig("FooBarApp");
// right now the current path is '/'
conf->Write("RootEntry", 1);
// go to some other place: if the group(s) don't exist, they will be created
conf->SetPath("/Group/Subgroup");
// create an entry in subgroup
conf->Write("SubgroupEntry", 3);
// '..' is understood
conf->Write("../GroupEntry", 2);
conf->SetPath("..");
wxASSERT( conf->Read("Subgroup/SubgroupEntry", 0l) == 3 );
// use absolute path: it is allowed, too
wxASSERT( conf->Read("/RootEntry", 0l) == 1 );
\end{verbatim}
{\it Warning}: it is probably a good idea to always restore the path to its
old value on function exit:
\begin{verbatim}
void foo(wxConfigBase *config)
{
wxString strOldPath = config->GetPath();
config->SetPath("/Foo/Data");
...
config->SetPath(strOldPath);
}
\end{verbatim}
because otherwise the assert in the following example will surely fail
(we suppose here that {\it foo()} function is the same as above except that it
doesn't save and restore the path):
\begin{verbatim}
void bar(wxConfigBase *config)
{
config->Write("Test", 17);
foo(config);
// we're reading "/Foo/Data/Test" here! -1 will probably be returned...
wxASSERT( config->Read("Test", -1) == 17 );
}
\end{verbatim}
Finally, the path separator in wxConfigBase and derived classes is always '/',
regardless of the platform (i.e. it is {\bf not} '$\backslash\backslash$' under Windows).
\helpref{SetPath}{wxconfigbasesetpath}\\
\helpref{GetPath}{wxconfigbasegetpath}
\membersection{Enumeration}
The functions in this section allow to enumerate all entries and groups in the
config file. All functions here return FALSE when there are no more items.
You must pass the same index to GetNext and GetFirst (don't modify it).
Please note that it is {\bf not} the index of the current item (you will have
some great surprises with wxRegConfig if you assume this) and you shouldn't
even look at it: it is just a "cookie" which stores the state of the
enumeration. It can't be stored inside the class because it would prevent you
from running several enumerations simultaneously, that's why you must pass it
explicitly.
Having said all this, enumerating the config entries/groups is very simple:
\begin{verbatim}
wxArrayString aNames;
// enumeration variables
wxString str;
long dummy;
// first enum all entries
bool bCont = config->GetFirstEntry(str, dummy);
while ( bCont ) {
aNames.Add(str);
bCont = GetConfig()->GetNextEntry(str, dummy);
}
... we have all entry names in aNames...
// now all groups...
bCont = GetConfig()->GetFirstGroup(str, dummy);
while ( bCont ) {
aNames.Add(str);
bCont = GetConfig()->GetNextGroup(str, dummy);
}
... we have all group (and entry) names in aNames...
\end{verbatim}
There are also functions to get the number of entries/subgroups without
actually enumerating them, but you will probably never need them.
\helpref{GetFirstGroup}{wxconfigbasegetfirstgroup}\\
\helpref{GetNextGroup}{wxconfigbasegetnextgroup}\\
\helpref{GetFirstEntry}{wxconfigbasegetfirstentry}\\
\helpref{GetNextEntry}{wxconfigbasegetnextentry}\\
\helpref{GetNumberOfEntries}{wxconfigbasegetnumberofentries}\\
\helpref{GetNumberOfGroups}{wxconfigbasegetnumberofgroups}
\membersection{Tests of existence}
\helpref{HasGroup}{wxconfigbasehasgroup}\\
\helpref{HasEntry}{wxconfigbasehasentry}\\
\helpref{Exists}{wxconfigbaseexists}\\
\helpref{GetEntryType}{wxconfigbasegetentrytype}
\membersection{Miscellaneous functions}
\helpref{GetAppName}{wxconfigbasegetappname}\\
\helpref{GetVendorName}{wxconfigbasegetvendorname}\\
\helpref{SetUmask}{wxfileconfigsetumask}
\membersection{Key access}
These function are the core of wxConfigBase class: they allow you to read and
write config file data. All {\it Read} function take a default value which
will be returned if the specified key is not found in the config file.
Currently, only two types of data are supported: string and long (but it might
change in the near future). To work with other types: for {\it int} or {\it
bool} you can work with function taking/returning {\it long} and just use the
casts. Better yet, just use {\it long} for all variables which you're going to
save in the config file: chances are that {\tt sizeof(bool) == sizeof(int) == sizeof(long)} anyhow on your system. For {\it float}, {\it double} and, in
general, any other type you'd have to translate them to/from string
representation and use string functions.
Try not to read long values into string variables and vice versa: although it
just might work with wxFileConfig, you will get a system error with
wxRegConfig because in the Windows registry the different types of entries are
indeed used.
Final remark: the {\it szKey} parameter for all these functions can contain an
arbitrary path (either relative or absolute), not just the key name.
\helpref{Read}{wxconfigbaseread}\\
\helpref{Write}{wxconfigbasewrite}\\
\helpref{Flush}{wxconfigbaseflush}
\membersection{Rename entries/groups}
The functions in this section allow to rename entries or subgroups of the
current group. They will return FALSE on error. typically because either the
entry/group with the original name doesn't exist, because the entry/group with
the new name already exists or because the function is not supported in this
wxConfig implementation.
\helpref{RenameEntry}{wxconfigbaserenameentry}\\
\helpref{RenameGroup}{wxconfigbaserenamegroup}
\membersection{Delete entries/groups}
The functions in this section delete entries and/or groups of entries from the
config file. {\it DeleteAll()} is especially useful if you want to erase all
traces of your program presence: for example, when you uninstall it.
\helpref{DeleteEntry}{wxconfigbasedeleteentry}\\
\helpref{DeleteGroup}{wxconfigbasedeletegroup}\\
\helpref{DeleteAll}{wxconfigbasedeleteall}
\membersection{Options}
Some aspects of wxConfigBase behaviour can be changed during run-time. The
first of them is the expansion of environment variables in the string values
read from the config file: for example, if you have the following in your
config file:
\begin{verbatim}
# config file for my program
UserData = $HOME/data
# the following syntax is valud only under Windows
UserData = %windir%\\data.dat
\end{verbatim}
% $ % help EMACS syntax highlighting...
the call to {\tt config->Read("UserData")} will return something like
{\tt "/home/zeitlin/data"} if you're lucky enough to run a Linux system ;-)
Although this feature is very useful, it may be annoying if you read a value
which containts '\$' or '\%' symbols (\% is used for environment variables
expansion under Windows) which are not used for environment variable
expansion. In this situation you may call SetExpandEnvVars(FALSE) just before
reading this value and SetExpandEnvVars(TRUE) just after. Another solution
would be to prefix the offending symbols with a backslash.
The following functions control this option:
\helpref{IsExpandingEnvVars}{wxconfigbaseisexpandingenvvars}\\
\helpref{SetExpandEnvVars}{wxconfigbasesetexpandenvvars}\\
\helpref{SetRecordDefaults}{wxconfigbasesetrecorddefaults}\\
\helpref{IsRecordingDefaults}{wxconfigbaseisrecordingdefaults}
%%%%% MEMBERS HERE %%%%%
\helponly{\insertatlevel{2}{
\wxheading{Members}
}}
\membersection{wxConfigBase::wxConfigBase}\label{wxconfigbasector}
\func{}{wxConfigBase}{\param{const wxString\& }{appName = wxEmptyString},
\param{const wxString\& }{vendorName = wxEmptyString},
\param{const wxString\& }{localFilename = wxEmptyString},
\param{const wxString\& }{globalFilename = wxEmptyString},
\param{long}{ style = 0}}
This is the default and only constructor of the wxConfigBase class, and
derived classes.
\wxheading{Parameters}
\docparam{appName}{The application name. If this is empty, the class will
normally use \helpref{wxApp::GetAppName}{wxappgetappname} 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.}
\docparam{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.}
\docparam{localFilename}{Some config classes require a local filename. If this
is not present, but required, the application name will be used instead.}
\docparam{globalFilename}{Some config classes require a global filename. If
this is not present, but required, the application name will be used instead.}
\docparam{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. For wxFileConfig, these styles determine whether
a local or global config file is created or used. If the flag is present but
the parameter is empty, the parameter will be set to a default. If the
parameter is present but the style flag not, the relevant flag will be added
to the style. For wxFileConfig you can also add wxCONFIG\_USE\_RELATIVE\_PATH
by logically or'ing it to either of the \_FILE options to tell wxFileConfig to
use relative instead of absolute paths. 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 {\it foo} key with some backslash characters will be stored as {\tt foo=C:$\backslash$mydir} instead
of the usual storage of {\tt foo=C:$\backslash\backslash$mydir}.
The wxCONFIG\_USE\_NO\_ESCAPE\_CHARACTERS style can be helpful if your config
file must be read or written to by a non-wxWindows 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.}
\wxheading{Remarks}
By default, environment variable expansion is on and recording defaults is
off.
\membersection{wxConfigBase::\destruct{wxConfigBase}}\label{wxconfigbasedtor}
\func{}{\destruct{wxConfigBase}}{\void}
Empty but ensures that dtor of all derived classes is virtual.
\membersection{wxConfigBase::Create}\label{wxconfigbasecreate}
\func{static wxConfigBase *}{Create}{\void}
Create a new config object: this function will create the "best"
implementation of wxConfig available for the current platform, see comments
near the definition of wxCONFIG\_WIN32\_NATIVE for details. It returns the
created object and also sets it as the current one.
\membersection{wxConfigBase::DontCreateOnDemand}\label{wxconfigbasedontcreateondemand}
\func{void}{DontCreateOnDemand}{\void}
Calling this function will prevent {\it Get()} from automatically creating a
new config object if the current one is NULL. It might be useful to call it
near the program end to prevent new config object "accidental" creation.
\membersection{wxConfigBase::DeleteAll}\label{wxconfigbasedeleteall}
\func{bool}{DeleteAll}{\void}
Delete the whole underlying object (disk file, registry key, ...). Primarly
for use by desinstallation routine.
\membersection{wxConfigBase::DeleteEntry}\label{wxconfigbasedeleteentry}
\func{bool}{DeleteEntry}{\param{const wxString\& }{ key}, \param{bool}{ bDeleteGroupIfEmpty = TRUE}}
Deletes the specified entry and the group it belongs to if it was the last key
in it and the second parameter is true.
\membersection{wxConfigBase::DeleteGroup}\label{wxconfigbasedeletegroup}
\func{bool}{DeleteGroup}{\param{const wxString\& }{ key}}
Delete the group (with all subgroups)
\membersection{wxConfigBase::Exists}\label{wxconfigbaseexists}
\constfunc{bool}{Exists}{\param{wxString\& }{strName}}
returns TRUE if either a group or an entry with a given name exists
\membersection{wxConfigBase::Flush}\label{wxconfigbaseflush}
\func{bool}{Flush}{\param{bool }{bCurrentOnly = FALSE}}
permanently writes all changes (otherwise, they're only written from object's
destructor)
\membersection{wxConfigBase::Get}\label{wxconfigbaseget}
\func{static wxConfigBase *}{Get}{\param{bool }{CreateOnDemand = TRUE}}
Get the current config object. If there is no current object and
{\it CreateOnDemand} is TRUE, creates one
(using {\it Create}) unless DontCreateOnDemand was called previously.
\membersection{wxConfigBase::GetAppName}\label{wxconfigbasegetappname}
\constfunc{wxString}{GetAppName}{\void}
Returns the application name.
\membersection{wxConfigBase::GetEntryType}\label{wxconfigbasegetentrytype}
\constfunc{enum wxConfigBase::EntryType}{GetEntryType}{\param{const wxString\& }{name}}
Returns the type of the given entry or {\it Unknown} if the entry doesn't
exist. This function should be used to decide which version of Read() should
be used because some of wxConfig implementations will complain about type
mismatch otherwise: e.g., an attempt to read a string value from an integer
key with wxRegConfig will fail.
The result is an element of enum EntryType:
\begin{verbatim}
enum EntryType
{
Unknown,
String,
Boolean,
Integer,
Float
};
\end{verbatim}
\membersection{wxConfigBase::GetFirstGroup}\label{wxconfigbasegetfirstgroup}
\constfunc{bool}{GetFirstGroup}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the first group.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method takes no arguments and returns a 3-element
list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetFirstEntry}\label{wxconfigbasegetfirstentry}
\constfunc{bool}{GetFirstEntry}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the first entry.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method takes no arguments and returns a 3-element
list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetNextGroup}\label{wxconfigbasegetnextgroup}
\constfunc{bool}{GetNextGroup}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the next group.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method only takes the {\tt index} parameter
and returns a 3-element list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetNextEntry}\label{wxconfigbasegetnextentry}
\constfunc{bool}{GetNextEntry}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the next entry.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method only takes the {\tt index} parameter
and returns a 3-element list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetNumberOfEntries}\label{wxconfigbasegetnumberofentries}
\constfunc{uint }{GetNumberOfEntries}{\param{bool }{bRecursive = FALSE}}
\membersection{wxConfigBase::GetNumberOfGroups}\label{wxconfigbasegetnumberofgroups}
\constfunc{uint}{GetNumberOfGroups}{\param{bool }{bRecursive = FALSE}}
Get number of entries/subgroups in the current group, with or without its
subgroups.
\membersection{wxConfigBase::GetPath}\label{wxconfigbasegetpath}
\constfunc{const wxString\&}{GetPath}{\void}
Retrieve the current path (always as absolute path).
\membersection{wxConfigBase::GetVendorName}\label{wxconfigbasegetvendorname}
\constfunc{wxString}{GetVendorName}{\void}
Returns the vendor name.
\membersection{wxConfigBase::HasEntry}\label{wxconfigbasehasentry}
\constfunc{bool}{HasEntry}{\param{wxString\& }{strName}}
returns TRUE if the entry by this name exists
\membersection{wxConfigBase::HasGroup}\label{wxconfigbasehasgroup}
\constfunc{bool}{HasGroup}{\param{const wxString\& }{strName}}
returns TRUE if the group by this name exists
\membersection{wxConfigBase::IsExpandingEnvVars}\label{wxconfigbaseisexpandingenvvars}
\constfunc{bool}{IsExpandingEnvVars}{\void}
Returns TRUE if we are expanding environment variables in key values.
\membersection{wxConfigBase::IsRecordingDefaults}\label{wxconfigbaseisrecordingdefaults}
\constfunc{bool}{IsRecordingDefaults}{\void}
Returns TRUE if we are writing defaults back to the config file.
\membersection{wxConfigBase::Read}\label{wxconfigbaseread}
\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ str}}
Read a string from the key, returning TRUE if the value was read. If the key
was not found, {\it str} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ str}, \param{const wxString\& }{defaultVal}}
Read a string from the key. The default value is returned if the key was not
found.
Returns TRUE if value was really read, FALSE if the default was used.
\constfunc{wxString}{Read}{\param{const wxString\& }{key}, \param{const
wxString\& }{defaultVal}}
Another version of {\it Read()}, returning the string value directly.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{long*}{ l}}
Reads a long value, returning TRUE if the value was found. If the value was
not found, {\it l} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{long*}{ l},
\param{long}{ defaultVal}}
Reads a long value, returning TRUE if the value was found. If the value was
not found, {\it defaultVal} is used instead.
\constfunc{long }{Read}{\param{const wxString\& }{key}, \param{long}{ defaultVal}}
Reads a long value from the key and returns it. {\it defaultVal} is returned
if the key is not found.
NB: writing
{\small
\begin{verbatim}
conf->Read("key", 0);
\end{verbatim}
}
won't work because the call is ambiguous: compiler can not choose between two
{\it Read} functions. Instead, write:
{\small
\begin{verbatim}
conf->Read("key", 0l);
\end{verbatim}
}
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{double*}{ d}}
Reads a double value, returning TRUE if the value was found. If the value was
not found, {\it d} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{double*}{ d},
\param{double}{ defaultVal}}
Reads a double value, returning TRUE if the value was found. If the value was
not found, {\it defaultVal} is used instead.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{bool*}{ b}}
Reads a bool value, returning TRUE if the value was found. If the value was
not found, {\it b} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{bool*}{ d},
\param{bool}{ defaultVal}}
Reads a bool value, returning TRUE if the value was found. If the value was
not found, {\it defaultVal} is used instead.
\pythonnote{In place of a single overloaded method name, wxPython
implements the following methods:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Read(key, default="")}}{Returns a string.}
\twocolitem{{\bf ReadInt(key, default=0)}}{Returns an int.}
\twocolitem{{\bf ReadFloat(key, default=0.0)}}{Returns a floating point number.}
\end{twocollist}}
}
\perlnote{In place of a single overloaded method, wxPerl uses:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Read(key, default="")}}{Returns a string}
\twocolitem{{\bf ReadInt(key, default=0)}}{Returns an integer}
\twocolitem{{\bf ReadFloat(key, default=0.0)}}{Returns a floating point number}
\twocolitem{{\bf ReadBool(key, default=0)}}{Returns a boolean}
\end{twocollist}
}}
\membersection{wxConfigBase::RenameEntry}\label{wxconfigbaserenameentry}
\func{bool}{RenameEntry}{\param{const wxString\& }{ oldName}, \param{const wxString\& }{ newName}}
Renames an entry in the current group. The entries names (both the old and
the new one) shouldn't contain backslashes, i.e. only simple names and not
arbitrary paths are accepted by this function.
Returns FALSE if the {\it oldName} doesn't exist or if {\it newName} already
exists.
\membersection{wxConfigBase::RenameGroup}\label{wxconfigbaserenamegroup}
\func{bool}{RenameGroup}{\param{const wxString\& }{ oldName}, \param{const wxString\& }{ newName}}
Renames a subgroup of the current group. The subgroup names (both the old and
the new one) shouldn't contain backslashes, i.e. only simple names and not
arbitrary paths are accepted by this function.
Returns FALSE if the {\it oldName} doesn't exist or if {\it newName} already
exists.
\membersection{wxConfigBase::Set}\label{wxconfigbaseset}
\func{static wxConfigBase *}{Set}{\param{wxConfigBase *}{pConfig}}
Sets the config object as the current one, returns the pointer to the previous
current object (both the parameter and returned value may be NULL)
\membersection{wxConfigBase::SetExpandEnvVars}\label{wxconfigbasesetexpandenvvars}
\func{void}{SetExpandEnvVars }{\param{bool }{bDoIt = TRUE}}
Determine whether we wish to expand environment variables in key values.
\membersection{wxConfigBase::SetPath}\label{wxconfigbasesetpath}
\func{void}{SetPath}{\param{const wxString\& }{strPath}}
Set current path: if the first character is '/', it is the absolute path,
otherwise it is a relative path. '..' is supported. If the strPath doesn't
exist it is created.
\membersection{wxConfigBase::SetRecordDefaults}\label{wxconfigbasesetrecorddefaults}
\func{void}{SetRecordDefaults}{\param{bool }{bDoIt = TRUE}}
Sets whether defaults are recorded to the config file whenever an attempt to
read read the value which is not present in it is done.
If on (default is off) all default values for the settings used by the program
are written back to the config file. This allows the user to see what config
options may be changed and is probably useful only for wxFileConfig.
\membersection{wxConfigBase::SetUmask}\label{wxfileconfigsetumask}
\func{void}{SetUmask}{\param{int }{mode}}
{\bf NB:} this function is not in the base wxConfigBase class but is only
implemented in wxFileConfig. Moreover, this function is Unix-specific and
doesn't do anything on other platforms.
SetUmask() 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
should do {\tt SetUmask(0077)}.
\membersection{wxConfigBase::Write}\label{wxconfigbasewrite}
\func{bool}{Write}{\param{const wxString\& }{ key}, \param{const wxString\& }{
value}}
\func{bool}{Write}{\param{const wxString\& }{ key}, \param{long}{ value}}
\func{bool}{Write}{\param{const wxString\& }{ key}, \param{double}{ value}}
\func{bool}{Write}{\param{const wxString\& }{ key}, \param{bool}{ value}}
These functions write the specified value to the config file and return TRUE
on success.
\pythonnote{In place of a single overloaded method name, wxPython
implements the following methods:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Write(key, value)}}{Writes a string.}
\twocolitem{{\bf WriteInt(key, value)}}{Writes an int.}
\twocolitem{{\bf WriteFloat(key, value)}}{Writes a floating point number.}
\end{twocollist}}
}
\perlnote{In place of a single overloaded method, wxPerl uses:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Write(key, value)}}{Writes a string}
\twocolitem{{\bf WriteInt(key, value)}}{Writes an integer}
\twocolitem{{\bf WriteFloat(key, value)}}{Writes a floating point number}
\twocolitem{{\bf WriteBool(key, value)}}{Writes a boolean}
\end{twocollist}
}}

View File

@@ -1,10 +0,0 @@
\chapter{Constants}\label{constants}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}
This chapter describes the constants defined by wxWindows.
\input cppconst.tex
\input stdevtid.tex
\input keycode.tex

View File

@@ -1,41 +0,0 @@
\section{\class{wxControl}}\label{wxcontrol}
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.
\wxheading{Derived from}
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/control.h>
\wxheading{See also}
\helpref{wxValidator}{wxvalidator}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxControl::Command}\label{wxcontrolcommand}
\func{void}{Command}{\param{wxCommandEvent\& }{event}}
Simulates the effect of the user issuing a command to the item. See \helpref{wxCommandEvent}{wxcommandevent}.
\membersection{wxControl::GetLabel}\label{wxcontrolgetlabel}
\func{wxString\&}{GetLabel}{\void}
Returns the control's text.
\membersection{wxControl::SetLabel}\label{wxcontrolsetlabel}
\func{void}{SetLabel}{\param{const wxString\& }{label}}
Sets the item's text.

View File

@@ -1,46 +0,0 @@
% -----------------------------------------------------------------------------
% wxCountingOutputStream
% -----------------------------------------------------------------------------
\section{\class{wxCountingOutputStream}}\label{wxcountingoutputstream}
wxCountingOutputStream is a specialized output stream which does not write any data anyway,
instead it counts how many bytes would get written if this were a normal stream. This
can sometimes be useful or required if some data gets serialized to a stream or compressed
by using stream compression and thus the final size of the stream cannot be known other
than pretending to write the stream. One case where the resulting size would have to be
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
memory stream).
\wxheading{Derived from}
\helpref{wxOutputStream}{wxoutputstream}
\helpref{wxStreamBase}{wxstreambase}
\wxheading{Include files}
<wx/stream.h>
\latexignore{\rtfignore{\wxheading{Members}}}
% -----------
% ctor & dtor
% -----------
\membersection{wxCountingOutputStream::wxCountingOutputStream}
\func{}{wxCountingOutputStream}{\void}
Creates a wxCountingOutputStream object.
\membersection{wxCountingOutputStream::\destruct{wxCountingOutputStream}}
\func{}{\destruct{wxCountingOutputStream}}{\void}
Destructor.
\membersection{wxCountingOutputStream::GetSize}
\constfunc{size\_t}{GetSize}{\void}
Returns the current size of the stream.

View File

@@ -1,106 +0,0 @@
\section{Preprocesser symbols defined by wxWindows}\label{cppconst}
Here is the list of preprocessor symbols used in the wxWindows source grouped
by category (and sorted by alphabetical order inside each category).
\subsection{GUI system}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_WINDOWS\_\_}{any Windows, yom may also use \_\_WXMSW\_\_}
\twocolitem{\_\_WIN16\_\_}{Win16 API}
\twocolitem{\_\_WIN32\_\_}{Win32 API}
\twocolitem{\_\_WIN95\_\_}{Windows 95 or NT 4.0 and above system (not NT 3.5x)}
\twocolitem{\_\_WXGTK\_\_}{GTK}
\twocolitem{\_\_WXGTK12\_\_}{GTK 1.2 or higher}
\twocolitem{\_\_WXGTK20\_\_}{GTK 2.0 or higher}
\twocolitem{\_\_WXMOTIF\_\_}{Motif}
\twocolitem{\_\_WXMAC\_\_}{Mac OS whether Classic (Mac OS 8/9 TARGET\_CARBON == 0) or Carbon (including Mac OS X TARGET\_CARBON == 1)}
\twocolitem{\_\_WXMGL\_\_}{SciTech Soft MGL (\_\_WXUNIVERSAL\_\_ will be also
defined)}
\twocolitem{\_\_WXMSW\_\_}{Any Windows}
\twocolitem{\_\_WXOS2\_\_}{Identical to \_\_WXPM\_\_}
\twocolitem{\_\_WXPM\_\_}{OS/2 native Presentation Manager}
\twocolitem{\_\_WXSTUBS\_\_}{Stubbed version ('template' wxWin implementation)}
\twocolitem{\_\_WXXT\_\_}{Xt; mutually exclusive with WX\_MOTIF, not
implemented in wxWindows 2.x}
\twocolitem{\_\_WXX11\_\_}{wxX11 (\_\_WXUNIVERSAL\_\_ will be also defined)}
\twocolitem{\_\_WXWINE\_\_}{WINE (i.e. Win32 on Unix)}
\twocolitem{\_\_WXUNIVERSAL\_\_}{wxUniversal port, always defined in addition
to one of the symbols above so this should be tested first.}
\twocolitem{\_\_X\_\_}{any X11-based GUI toolkit except GTK+}
\end{twocollist}
In fact, they should better all start with \_\_WX instead of \_\_ only. The
only GUIs implemented for 2.0 are \_\_WXGTK\_\_, \_\_WXMSW\_\_ and
\_\_WXMOTIF\_\_ yet. Any new ones, please start the define with \_\_WX.
\subsection{Operating systems}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_APPLE\_\_}{any Mac OS version}
\twocolitem{\_\_AIX\_\_}{AIX}
\twocolitem{\_\_BSD\_\_}{Any *BSD system}
\twocolitem{\_\_CYGWIN\_\_}{Cygwin: Unix on Win32}
\twocolitem{\_\_DARWIN\_\_}{Mac OS X using the BSD Unix C library (as opposed to using the Metrowerks MSL C/C++ library)}
\twocolitem{\_\_DATA\_GENERAL\_\_}{DG-UX}
\twocolitem{\_\_DOS\_GENERAL\_\_}{DOS (used with wxMGL only)}
\twocolitem{\_\_FREEBSD\_\_}{FreeBSD}
\twocolitem{\_\_HPUX\_\_}{HP-UX (Unix)}
\twocolitem{\_\_LINUX\_\_}{Linux}
\twocolitem{\_\_MACH\_\_}{Mach-O Architecture (Mac OS X only builds)}
\twocolitem{\_\_OSF\_\_}{OSF/1}
\twocolitem{\_\_SGI\_\_}{IRIX}
\twocolitem{\_\_SOLARIS\_\_}{Solaris}
\twocolitem{\_\_SUN\_\_}{Any Sun}
\twocolitem{\_\_SUNOS\_\_}{Sun OS}
\twocolitem{\_\_SVR4\_\_}{SystemV R4}
\twocolitem{\_\_SYSV\_\_}{SystemV generic}
\twocolitem{\_\_ULTRIX\_\_}{Ultrix}
\twocolitem{\_\_UNIX\_\_}{any Unix}
\twocolitem{\_\_UNIX\_LIKE\_\_}{Unix, BeOS or VMS}
\twocolitem{\_\_VMS\_\_}{VMS}
\twocolitem{\_\_WINDOWS\_\_}{any Windows}
\end{twocollist}
\subsection{Hardware architectures}
Note that not all of these symbols are always defined, it depends on the
compiler used.
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_ALPHA\_\_}{DEC Alpha architecture}
\twocolitem{\_\_INTEL\_\_}{Intel i386 or compatible}
\twocolitem{\_\_POWERPC\_\_}{Motorola Power PC}
\end{twocollist}
\subsection{Compilers}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_BORLANDC\_\_}{Borland C++. The value of the macro corresponds
to the compiler version: $500$ is $5.0$.}
\twocolitem{\_\_DJGPP\_\_}{DJGPP}
\twocolitem{\_\_GNUG\_\_}{Gnu C++ on any platform, see also
\helpref{wxCHECK\_GCC\_VERSION}{wxcheckgccversion}}
\twocolitem{\_\_GNUWIN32\_\_}{Gnu-Win32 compiler, see also
\helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}}
\twocolitem{\_\_MWERKS\_\_}{CodeWarrior MetroWerks compiler}
\twocolitem{\_\_SUNCC\_\_}{Sun CC}
\twocolitem{\_\_SYMANTECC\_\_}{Symantec C++}
\twocolitem{\_\_VISAGECPP\_\_}{IBM Visual Age (OS/2)}
\twocolitem{\_\_VISUALC\_\_}{Microsoft Visual C++. The value of this macro
corresponds to the compiler version: $1020$ for $4.2$ (the first supported
version), $1100$ for $5.0$, $1200$ for $6.0$ and so on}
\twocolitem{\_\_XLC\_\_}{AIX compiler}
\twocolitem{\_\_WATCOMC\_\_}{Watcom C++. The value of this macro corresponds to
the compiler version, $1100$ is $11.0$ and $1200$ is OpenWatcom.}
\end{twocollist}
\subsection{Miscellaneous}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_WXDEBUG\_\_}{defined in debug mode, undefined in release mode}
\twocolitem{wxUSE\_XXX}{if defined as $1$, feature XXX is active
(the symbols of this form are always defined, use #if and not #ifdef to test
for them)}
\end{twocollist}

View File

@@ -1,58 +0,0 @@
\section{\class{wxCriticalSection}}\label{wxcriticalsection}
A critical section object is used for exactly the same purpose as
\helpref{mutexes}{wxmutex}. 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
\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker} class whenever
possible instead of directly using wxCriticalSection for the same reasons
\helpref{wxMutexLocker}{wxmutexlocker} is preferrable to
\helpref{wxMutex}{wxmutex} - please see wxMutex for an example.
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/thread.h>
\wxheading{See also}
\helpref{wxThread}{wxthread}, \helpref{wxCondition}{wxcondition},
\helpref{wxMutexLocker}{wxmutexlocker}, \helpref{wxCriticalSection}{wxcriticalsection}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCriticalSection::wxCriticalSection}\label{wxcriticalsectionctor}
\func{}{wxCriticalSection}{\void}
Default constructor initializes critical section object.
\membersection{wxCriticalSection::\destruct{wxCriticalSection}}\label{wxcriticalsectiondtor}
\func{}{\destruct{wxCriticalSection}}{\void}
Destructor frees the resources.
\membersection{wxCriticalSection::Enter}\label{wxcriticalsectionenter}
\func{void }{Enter}{\void}
Enter the critical section (same as locking a mutex). There is no error return
for this function. After entering the critical section protecting some global
data the thread running in critical section may safely use/modify it.
\membersection{wxCriticalSection::Leave}\label{wxcriticalsectionleave}
\func{void }{Leave}{\void}
Leave the critical section allowing other threads use the global data protected
by it. There is no error return for this function.

View File

@@ -1,63 +0,0 @@
\section{\class{wxCriticalSectionLocker}}\label{wxcriticalsectionlocker}
This is a small helper class to be used with \helpref{wxCriticalSection}{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:
\begin{verbatim}
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;
}
\end{verbatim}
Without wxCriticalSectionLocker, you would need to remember to manually leave
the critical section before each {\tt return}.
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/thread.h>
\wxheading{See also}
\helpref{wxCriticalSection}{wxcriticalsection},
\helpref{wxMutexLocker}{wxmutexlocker}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCriticalSectionLocker::wxCriticalSectionLocker}\label{wxcriticalsectionlockerctor}
\func{}{wxCriticalSectionLocker}{\param{wxCriticalSection\& }{criticalsection}}
Constructs a wxCriticalSectionLocker object associated with given
{\it criticalsection} and enters it.
\membersection{wxCriticalSectionLocker::\destruct{wxCriticalSectionLocker}}\label{wxcriticalsectionlockerdtor}
\func{}{\destruct{wxCriticalSectionLocker}}{\void}
Destructor leaves the critical section.

View File

@@ -1,60 +0,0 @@
%
% automatically generated by HelpGen from
% ../include/wx/strconv.h at 25/Mar/00 10:20:56
%
\section{\class{wxCSConv}}\label{wxcsconv}
This class converts between any character sets and Unicode.
It has one predefined instance, {\bf wxConvLocal}, for the
default user character set.
\wxheading{Derived from}
\helpref{wxMBConv}{wxmbconv}
\wxheading{Include files}
<wx/strconv.h>
\wxheading{See also}
\helpref{wxMBConv}{wxmbconv},
\helpref{wxEncodingConverter}{wxencodingconverter},
\helpref{wxMBConv classes overview}{mbconvclasses}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCSConv::wxCSConv}\label{wxcsconvwxcsconv}
\func{}{wxCSConv}{\param{const wxChar* }{charset}}
Constructor. Specify the name of the character set you want to convert
from/to.
\membersection{wxCSConv::\destruct{wxCSConv}}\label{wxcsconvdtor}
\func{}{\destruct{wxCSConv}}{\void}
Destructor.
\membersection{wxCSConv::LoadNow}\label{wxcsconvloadnow}
\func{void}{LoadNow}{\void}
If the conversion tables needs to be loaded from disk, this method
will do so. Otherwise, they will be loaded when any of the conversion
methods are called.
\membersection{wxCSConv::MB2WC}\label{wxcsconvmb2wc}
\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}}
Converts from the selected character set to Unicode. Returns the size of the destination buffer.
\membersection{wxCSConv::WC2MB}\label{wxcsconvwc2mb}
\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}}
Converts from Unicode to the selected character set. Returns the size of the destination buffer.

View File

@@ -1,130 +0,0 @@
\section{\class{wxContextHelp}}\label{wxcontexthelp}
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:
\begin{verbatim}
wxContextHelp contextHelp(myWindow);
\end{verbatim}
There are a couple of ways to invoke this behaviour implicitly:
\begin{itemize}
\item 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 help mode automatically,
with further programming.
\item Create a \helpref{wxContextHelpButton}{wxcontexthelpbutton}, whose predefined behaviour is to create a context help object.
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).
\end{itemize}
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cshelp.h>
\wxheading{See also}
\helpref{wxHelpEvent}{wxhelpevent},
\helpref{wxHelpController}{wxhelpcontroller},
\helpref{wxContextHelpButton}{wxcontexthelpbutton}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxContextHelp::wxContextHelp}
\func{}{wxContextHelp}{\param{wxWindow*}{ window = NULL}, \param{bool}{ doNow = TRUE}}
Constructs a context help object, calling \helpref{BeginContextHelp}{wxcontexthelpbegincontexthelp} if\rtfsp
{\it doNow} is TRUE (the default).
If {\it window} is NULL, the top window is used.
\membersection{wxContextHelp::\destruct{wxContextHelp}}
\func{}{\destruct{wxContextHelp}}{\void}
Destroys the context help object.
\membersection{wxContextHelp::BeginContextHelp}\label{wxcontexthelpbegincontexthelp}
\func{bool}{BeginContextHelp}{\param{wxWindow*}{ window = NULL}}
Puts the application into context-sensitive help mode. {\it window} is the window
which will be used to catch events; if NULL, the top window will be used.
Returns TRUE if the application was successfully put into context-sensitive help mode.
This function only returns when the event loop has finished.
\membersection{wxContextHelp::EndContextHelp}\label{wxcontexthelpendcontexthelp}
\func{bool}{EndContextHelp}{\void}
Ends context-sensitive help mode. Not normally called by the application.
\section{\class{wxContextHelpButton}}\label{wxcontexthelpbutton}
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 \helpref{wxContextHelp}{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.
\wxheading{Derived from}
\helpref{wxBitmapButton}{wxbitmapbutton}\\
\helpref{wxButton}{wxbutton}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cshelp.h>
\wxheading{See also}
\helpref{wxBitmapButton}{wxbitmapbutton}, \helpref{wxContextHelp}{wxcontexthelp}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxContextHelpButton::wxContextHelpButton}\label{wxcontexthelpbuttonconstr}
\func{}{wxContextHelpButton}{\void}
Default constructor.
\func{}{wxContextHelpButton}{
\param{wxWindow* }{parent},
\param{wxWindowID }{id = wxID\_CONTEXT\_HELP},
\param{const wxPoint\& }{pos = wxDefaultPosition},
\param{const wxSize\& }{size = wxDefaultSize},
\param{long }{style = wxBU\_AUTODRAW}}
Constructor, creating and showing a context help button.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Button identifier. Defaults to wxID\_CONTEXT\_HELP.}
\docparam{pos}{Button position.}
\docparam{size}{Button size. If the default size (-1, -1) is specified then the button is sized
appropriately for the question mark bitmap.}
\docparam{style}{Window style.}
\wxheading{Remarks}
Normally you need pass only the parent window to the constructor, and use the defaults for the remaining parameters.

View File

@@ -1,322 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: ctrlsub.tex
%% Purpose: wxControlWithItems documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 01.01.03
%% RCS-ID: $Id$
%% Copyright: (c) 2003 Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxControlWithItems}}\label{wxcontrolwithitems}
This class is an abstract base class for some wxWindows controls which contain
several items, such as \helpref{wxListBox}{wxlistbox} and
\helpref{wxCheckListBox}{wxchecklistbox} derived from it,
\helpref{wxChoice}{wxchoice} and \helpref{wxComboBox}{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 ({\tt void *}) pointers which are simply
stored by the control but not used in any way by it, or typed pointers
({\tt wxClientData *}) which are owned by the control meaning that the typed
client data (and only it) will be deleted when an item is
\helpref{deleted}{wxcontrolwithitemsdelete} or the entire control is
\helpref{cleared}{wxcontrolwithitemsclear} (which also happens when it is
destroyed). Finally note that in the same control all items must have client
data of the same type (typed or untyped), if any. This type is determined by
the first call to \helpref{Append}{wxcontrolwithitemsappend} (the version with
client data pointer) or \helpref{SetClientData}{wxcontrolwithitemssetclientdata}.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/ctrlsub.h> but usually never included directly
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxControlWithItems::Append}\label{wxcontrolwithitemsappend}
\func{int}{Append}{\param{const wxString\& }{ item}}
Adds the item to the end of the list box.
\func{int}{Append}{\param{const wxString\& }{ item}, \param{void *}{clientData}}
\func{int}{Append}{\param{const wxString\& }{ item}, \param{wxClientData *}{clientData}}
Adds the item to the end of the list box, associating the given, typed or
untyped, client data pointer with the item.
\func{void}{Append}{\param{const wxArrayString\& }{strings}}
Appends several items at once to the control. Notice that calling this method
may be much faster than appending the items one by one if you need to add a lot
of items.
\wxheading{Parameters}
\docparam{item}{String to add.}
\docparam{clientData}{Client data to associate with the item.}
\wxheading{Return value}
When appending a single item, the return value is the index of the newly added
item which may be different from the last one if the control is sorted (e.g.
has {\tt wxLB\_SORT} or {\tt wxCB\_SORT} style).
\membersection{wxControlWithItems::Clear}\label{wxcontrolwithitemsclear}
\func{void}{Clear}{\void}
Removes all items from the control.
{\it Clear()} also deletes the client data of the existing items if it is owned
by the control.
\membersection{wxControlWithItems::Delete}\label{wxcontrolwithitemsdelete}
\func{void}{Delete}{\param{int}{ n}}
Deletes an item from the control. The client data associated with the item
will be also deleted if it is owned by the control.
Note that it is an error (signalled by an assert failure in debug builds) to
remove an item with the index negative or greater or equal than the number of
items in the control.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\wxheading{See also}
\helpref{Clear}{wxcontrolwithitemsclear}
\membersection{wxControlWithItems::FindString}\label{wxcontrolwithitemsfindstring}
\func{int}{FindString}{\param{const wxString\& }{string}}
Finds an item whose label matches the given string.
\wxheading{Parameters}
\docparam{string}{String to find.}
\wxheading{Return value}
The zero-based position of the item, or {\tt wxNOT\_FOUND} if the string was
not found.
\membersection{wxControlWithItems::GetClientData}\label{wxcontrolwithitemsgetclientdata}
\constfunc{void *}{GetClientData}{\param{int}{ n}}
Returns a pointer to the client data associated with the given item (if any).
It is an error to call this function for a control which doesn't have untyped
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).
\wxheading{Parameters}
\docparam{n}{The zero-based position of the item.}
\wxheading{Return value}
A pointer to the client data, or {\tt NULL} if not present.
\membersection{wxControlWithItems::GetClientObject}\label{wxcontrolwithitemsgetclientobject}
\constfunc{wxClientData *}{GetClientObject}{\param{int}{ n}}
Returns a pointer to the client data associated with the given item (if any).
It is an error to call this function for a control which doesn't have typed
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).
\wxheading{Parameters}
\docparam{n}{The zero-based position of the item.}
\wxheading{Return value}
A pointer to the client data, or {\tt NULL} if not present.
\membersection{wxControlWithItems::GetCount}\label{wxcontrolwithitemsgetcount}
\constfunc{int}{GetCount}{\void}
Returns the number of items in the control.
\wxheading{See also}
\helpref{IsEmpty}{wxcontrolwithitemsisempty}
\membersection{wxControlWithItems::GetSelection}\label{wxcontrolwithitemsgetselection}
\constfunc{int}{GetSelection}{\void}
Returns the index of the selected item or {\tt wxNOT\_FOUND} if no item is
selected.
\wxheading{Return value}
The position of the current selection.
\wxheading{Remarks}
This method can be used with single selection list boxes only, you should use
\helpref{wxListBox::GetSelections}{wxlistboxgetselections} for the list boxes
with {\tt wxLB\_MULTIPLE} style.
\wxheading{See also}
\helpref{SetSelection}{wxcontrolwithitemssetselection},\rtfsp
\helpref{GetStringSelection}{wxcontrolwithitemsgetstringselection}
\membersection{wxControlWithItems::GetString}\label{wxcontrolwithitemsgetstring}
\constfunc{wxString}{GetString}{\param{int}{ n}}
Returns the label of the item with the given index.
\wxheading{Parameters}
\docparam{n}{The zero-based index.}
\wxheading{Return value}
The label of the item or an empty string if the position was invalid.
\membersection{wxControlWithItems::GetStringSelection}\label{wxcontrolwithitemsgetstringselection}
\constfunc{wxString}{GetStringSelection}{\void}
Returns the label of the selected item or an empty string if no item is
selected.
\wxheading{See also}
\helpref{GetSelection}{wxcontrolwithitemsgetselection}
\membersection{wxControlWithItems::IsEmpty}\label{wxcontrolwithitemsisempty}
\constfunc{bool}{IsEmpty}{\void}
Returns {\tt TRUE} if the control is empty or {\tt FALSE} if it has some items.
\wxheading{See also}
\helpref{GetCount}{wxcontrolwithitemsgetcount}
\membersection{wxControlWithItems::Number}\label{wxcontrolwithitemsnumber}
\constfunc{int}{Number}{\void}
{\bf Obsolescence note:} This method is obsolete and was replaced with
\helpref{GetCount}{wxcontrolwithitemsgetcount}, please use the new method in
the new code. This method is only available if wxWindows was compiled with
{\tt WXWIN\_COMPATIBILITY\_2\_2} defined and will disappear completely in
future versions.
\membersection{wxControlWithItems::SetClientData}\label{wxcontrolwithitemssetclientdata}
\func{void}{SetClientData}{\param{int}{ n}, \param{void *}{data}}
Associates the given untyped client data pointer with the given item. Note that
it is an error to call this function if any typed client data pointers had been
associated with the control items before.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\docparam{data}{The client data to associate with the item.}
\membersection{wxControlWithItems::SetClientObject}\label{wxcontrolwithitemssetclientobject}
\func{void}{SetClientObject}{\param{int}{ n}, \param{wxClientData *}{data}}
Associates the given typed client data pointer with the given item: the
{\it data} object will be deleted when the item is deleted (either explicitly
by using \helpref{Deletes}{wxcontrolwithitemsdelete} or implicitly when the
control itself is destroyed).
Note that it is an error to call this function if any untyped client data
pointers had been associated with the control items before.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\docparam{data}{The client data to associate with the item.}
\membersection{wxControlWithItems::SetSelection}\label{wxcontrolwithitemssetselection}
\func{void}{SetSelection}{\param{int}{ n}}
Sets the choice by passing the desired string position. This does not cause
any command events to get emitted.
\wxheading{Parameters}
\docparam{n}{The string position to select, starting from zero.}
\wxheading{See also}
\helpref{SetString}{wxcontrolwithitemssetstring},\rtfsp
\helpref{SetStringSelection}{wxcontrolwithitemssetstringselection}
\membersection{wxControlWithItems::SetString}\label{wxcontrolwithitemssetstring}
\func{void}{SetString}{\param{int}{ n}, \param{const wxString\& }{ string}}
Sets the label for the given item.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\docparam{string}{The label to set.}
\membersection{wxControlWithItems::SetStringSelection}\label{wxcontrolwithitemssetstringselection}
\func{void}{SetStringSelection}{\param{const wxString\& }{ string}}
Selects the item with the specified string in the control. This doesn't cause
any command events being emitted.
\wxheading{Parameters}
\docparam{string}{The string to select.}
\wxheading{See also}
\helpref{SetSelection}{wxcontrolwithitemssetselection}

View File

@@ -1,215 +0,0 @@
\section{\class{wxCursor}}\label{wxcursor}
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
in a different manner. Therefore, separate cursors will be created for the
different environments. Platform-specific methods for creating a {\bf
wxCursor} object are catered for, and this is an occasion where
conditional compilation will probably be required (see \helpref{wxIcon}{wxicon} for
an example).
A single cursor object may be used in many windows (any subwindow type).
The wxWindows 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 \helpref{::wxSetCursor}{wxsetcursor} is also available for MS Windows use.
\wxheading{Derived from}
\helpref{wxBitmap}{wxbitmap}\\
\helpref{wxGDIObject}{wxgdiobject}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cursor.h>
\wxheading{Predefined objects}
Objects:
{\bf wxNullCursor}
Pointers:
{\bf wxSTANDARD\_CURSOR\\
wxHOURGLASS\_CURSOR\\
wxCROSS\_CURSOR}
\wxheading{See also}
\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxWindow::SetCursor}{wxwindowsetcursor},\rtfsp
\helpref{::wxSetCursor}{wxsetcursor}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCursor::wxCursor}\label{wxcursorconstr}
\func{}{wxCursor}{\void}
Default constructor.
\func{}{wxCursor}{\param{const char}{ bits[]}, \param{int }{width},
\param{int }{ height}, \param{int }{hotSpotX=-1}, \param{int }{hotSpotY=-1}, \param{const char }{maskBits[]=NULL}}
Constructs a cursor by passing an array of bits (Motif and Xt only). {\it maskBits} is used only under Motif.
If either {\it hotSpotX} or {\it hotSpotY} is -1, the hotspot will be the centre of the cursor image (Motif only).
\func{}{wxCursor}{\param{const wxString\& }{cursorName}, \param{long }{type}, \param{int }{hotSpotX=0}, \param{int }{hotSpotY=0}}
Constructs a cursor by passing a string resource name or filename.
On MacOS when specifying a string resource name, first the color cursors 'crsr' and then the black/white cursors 'CURS' in the resource chain are scanned through.
{\it hotSpotX} and {\it hotSpotY} are currently only used under Windows when loading from an
icon file, to specify the cursor hotspot relative to the top left of the image.
\func{}{wxCursor}{\param{int}{ cursorId}}
Constructs a cursor using a cursor identifier.
\func{}{wxCursor}{\param{const wxImage\&}{ image}}
Constructs a cursor from a wxImage. The cursor is monochrome, colors with the RGB elements all greater
than 127 will be foreground, colors less than this background. The mask (if any) will be used as transparent.
In MSW the foreground will be white and the background black. The cursor is resized to 32x32
In GTK, the two most frequent colors will be used for foreground and background. The cursor will be displayed
at the size of the image.
On MacOS the cursor is resized to 16x16 and currently only shown as black/white (mask respected).
\func{}{wxCursor}{\param{const wxCursor\&}{ cursor}}
Copy constructor. This uses reference counting so is a cheap operation.
\wxheading{Parameters}
\docparam{bits}{An array of bits.}
\docparam{maskBits}{Bits for a mask bitmap.}
\docparam{width}{Cursor width.}
\docparam{height}{Cursor height.}
\docparam{hotSpotX}{Hotspot x coordinate.}
\docparam{hotSpotY}{Hotspot y coordinate.}
\docparam{type}{Icon type to load. Under Motif, {\it type} defaults to {\bf wxBITMAP\_TYPE\_XBM}. Under Windows,
it defaults to {\bf wxBITMAP\_TYPE\_CUR\_RESOURCE}. Under MacOS, it defaults to {\bf wxBITMAP\_TYPE\_MACCURSOR\_RESOURCE}.
Under X, the permitted cursor types are:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
\end{twocollist}
Under Windows, the permitted types are:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_CUR}}{Load a cursor from a .cur cursor file (only if USE\_RESOURCE\_LOADING\_IN\_MSW
is enabled in setup.h).}
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_CUR\_RESOURCE}}{Load a Windows resource (as specified in the .rc file).}
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_ICO}}{Load a cursor from a .ico icon file (only if USE\_RESOURCE\_LOADING\_IN\_MSW
is enabled in setup.h). Specify {\it hotSpotX} and {\it hotSpotY}.}
\end{twocollist}}
\docparam{cursorId}{A stock cursor identifier. May be one of:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxCURSOR\_ARROW}}{A standard arrow cursor.}
\twocolitem{{\bf wxCURSOR\_RIGHT\_ARROW}}{A standard arrow cursor
pointing to the right.}
\twocolitem{{\bf wxCURSOR\_BLANK}}{Transparent cursor.}
\twocolitem{{\bf wxCURSOR\_BULLSEYE}}{Bullseye cursor.}
\twocolitem{{\bf wxCURSOR\_CHAR}}{Rectangular character cursor.}
\twocolitem{{\bf wxCURSOR\_CROSS}}{A cross cursor.}
\twocolitem{{\bf wxCURSOR\_HAND}}{A hand cursor.}
\twocolitem{{\bf wxCURSOR\_IBEAM}}{An I-beam cursor (vertical line).}
\twocolitem{{\bf wxCURSOR\_LEFT\_BUTTON}}{Represents a mouse with the left button depressed.}
\twocolitem{{\bf wxCURSOR\_MAGNIFIER}}{A magnifier icon.}
\twocolitem{{\bf wxCURSOR\_MIDDLE\_BUTTON}}{Represents a mouse with the middle button depressed.}
\twocolitem{{\bf wxCURSOR\_NO\_ENTRY}}{A no-entry sign cursor.}
\twocolitem{{\bf wxCURSOR\_PAINT\_BRUSH}}{A paintbrush cursor.}
\twocolitem{{\bf wxCURSOR\_PENCIL}}{A pencil cursor.}
\twocolitem{{\bf wxCURSOR\_POINT\_LEFT}}{A cursor that points left.}
\twocolitem{{\bf wxCURSOR\_POINT\_RIGHT}}{A cursor that points right.}
\twocolitem{{\bf wxCURSOR\_QUESTION\_ARROW}}{An arrow and question mark.}
\twocolitem{{\bf wxCURSOR\_RIGHT\_BUTTON}}{Represents a mouse with the right button depressed.}
\twocolitem{{\bf wxCURSOR\_SIZENESW}}{A sizing cursor pointing NE-SW.}
\twocolitem{{\bf wxCURSOR\_SIZENS}}{A sizing cursor pointing N-S.}
\twocolitem{{\bf wxCURSOR\_SIZENWSE}}{A sizing cursor pointing NW-SE.}
\twocolitem{{\bf wxCURSOR\_SIZEWE}}{A sizing cursor pointing W-E.}
\twocolitem{{\bf wxCURSOR\_SIZING}}{A general sizing cursor.}
\twocolitem{{\bf wxCURSOR\_SPRAYCAN}}{A spraycan cursor.}
\twocolitem{{\bf wxCURSOR\_WAIT}}{A wait cursor.}
\twocolitem{{\bf wxCURSOR\_WATCH}}{A watch cursor.}
\twocolitem{{\bf wxCURSOR\_ARROWWAIT}}{A cursor with both an arrow and
an hourglass, (windows.)}
\end{twocollist}\twocolwidtha{5cm}
Note that not all cursors are available on all platforms.}
\docparam{cursor}{Pointer or reference to a cursor to copy.}
\pythonnote{Constructors supported by wxPython are:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf wxCursor(name, flags, hotSpotX=0,
hotSpotY=0)}}{Constructs a cursor from a filename}
\twocolitem{{\bf wxStockCursor(id)}}{Constructs a stock cursor }
\end{twocollist}}
}
\perlnote{Constructors supported by wxPerl are:\par
\begin{itemize}
\item{Wx::Cursor->new( name, type, hotSpotX = 0, hotSpotY = 0 )}
\item{Wx::Cursor->new( id )}
\item{Wx::Cursor->new( image )}
\item{Wx::Cursor->newData( bits, width, height, hotSpotX = -1, hotSpotY = -1, maskBits = 0 )}
\end{itemize}
}
\membersection{wxCursor::\destruct{wxCursor}}
\func{}{\destruct{wxCursor}}{\void}
Destroys the cursor. A cursor can be reused for more
than one window, and does not get destroyed when the window is
destroyed. wxWindows destroys all cursors on application exit, although
it is best to clean them up explicitly.
\membersection{wxCursor::Ok}\label{wxcursorok}
\constfunc{bool}{Ok}{\void}
Returns TRUE if cursor data is present.
\membersection{wxCursor::operator $=$}\label{wxcursorassignment}
\func{wxCursor\&}{operator $=$}{\param{const wxCursor\& }{cursor}}
Assignment operator, using reference counting. Returns a reference
to `this'.
\membersection{wxCursor::operator $==$}\label{wxcursorequals}
\func{bool}{operator $==$}{\param{const wxCursor\& }{cursor}}
Equality operator. Two cursors are equal if they contain pointers
to the same underlying cursor data. It does not compare each attribute,
so two independently-created cursors using the same parameters will
fail the test.
\membersection{wxCursor::operator $!=$}\label{wxcursornotequals}
\func{bool}{operator $!=$}{\param{const wxCursor\& }{cursor}}
Inequality operator. Two cursors are not equal if they contain pointers
to different underlying cursor data. It does not compare each attribute.

View File

@@ -1,107 +0,0 @@
\section{\class{wxCustomDataObject}}\label{wxcustomdataobject}
wxCustomDataObject is a specialization of
\helpref{wxDataObjectSimple}{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 {\tt 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
\helpref{SetData}{wxcustomdataobjectsetdata} or
\helpref{TakeData}{wxcustomdataobjecttakedata} 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.
\wxheading{Virtual functions to override}
This class may be used as is, but if you don't want store the data inside the
object but provide it on demand instead, you should override
\helpref{GetSize}{wxcustomdataobjectgetsize},
\helpref{GetData}{wxcustomdataobjectgetdata} and
\helpref{SetData}{wxcustomdataobjectsetdata} (or may be only the first two or
only the last one if you only allow reading/writing the data)
\wxheading{Derived from}
\helpref{wxDataObjectSimple}{wxdataobjectsimple}\\
\helpref{wxDataObject}{wxdataobject}
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{wxDataObject}{wxdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCustomDataObject::wxCustomDataObject}\label{wxcustomdataobjectwxcustomdataobject}
\func{}{wxCustomDataObject}{\param{const wxDataFormat\& }{format = wxFormatInvalid}}
The constructor accepts a {\it format} argument which specifies the (single)
format supported by this object. If it isn't set here,
\helpref{SetFormat}{wxdataobjectsimplesetformat} should be used.
\membersection{wxCustomDataObject::\destruct{wxCustomDataObject}}\label{wxcustomdataobjectdtor}
\func{}{\destruct{wxCustomDataObject}}{\void}
The destructor will free the data hold by the object. Notice that although it
calls a virtual \helpref{Free()}{wxcustomdataobjectfree} function, the base
class version will always be called (C++ doesn't allow calling virtual
functions from constructors or destructors), so if you override {\tt Free()}, you
should override the destructor in your class as well (which would probably
just call the derived class' version of {\tt Free()}).
\membersection{wxCustomDataObject::Alloc}\label{wxcustomdataobjectalloc}
\func{virtual void *}{Alloc}{\param{size\_t }{size}}
This function is called to allocate {\it size} bytes of memory from SetData().
The default version just uses the operator new.
\membersection{wxCustomDataObject::Free}\label{wxcustomdataobjectfree}
\pythonnote{This method expects a string in wxPython. You can pass
nearly any object by pickling it first.}
\func{virtual void}{Free}{\void}
This function is called when the data is freed, you may override it to anything
you want (or may be nothing at all). The default version calls operator
delete$[]$ on the data.
\membersection{wxCustomDataObject::GetSize}\label{wxcustomdataobjectgetsize}
\constfunc{virtual size\_t}{GetSize}{\void}
Returns the data size in bytes.
\membersection{wxCustomDataObject::GetData}\label{wxcustomdataobjectgetdata}
\constfunc{virtual void *}{GetData}{\void}
Returns a pointer to the data.
\membersection{wxCustomDataObject::SetData}\label{wxcustomdataobjectsetdata}
\func{virtual void}{SetData}{
\param{size\_t }{size}, \param{const void }{*data}}
Set the data. The data object will make an internal copy.
\membersection{wxCustomDataObject::TakeData}\label{wxcustomdataobjecttakedata}
\func{virtual void}{TakeData}{
\param{size\_t }{size}, \param{const void }{*data}}
Like \helpref{SetData}{wxcustomdataobjectsetdata}, but doesn't copy the data -
instead the object takes ownership of the pointer.

View File

@@ -1,283 +0,0 @@
\section{\class{wxDatabase}}\label{wxdatabase}
Every database object represents an ODBC connection.
The connection may be closed and reopened.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/odbc.h>
\wxheading{See also}
\overview{wxDatabase overview}{wxdatabaseoverview}, \helpref{wxRecordSet}{wxrecordset}
A much more robust and feature-rich set of ODBC classes is now
available and recommended for use in place of the wxDatabase class.
See details of these classes in:
\helpref{wxDb}{wxdb}, \helpref{wxDbTable}{wxdbtable}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDatabase::wxDatabase}
\func{}{wxDatabase}{\void}
Constructor. The constructor of the first wxDatabase instance of an
application initializes the ODBC manager.
\membersection{wxDatabase::\destruct{wxDatabase}}
\func{}{\destruct{wxDatabase}}{\void}
Destructor. Resets and destroys any associated wxRecordSet instances.
The destructor of the last wxDatabase instance will deinitialize
the ODBC manager.
\membersection{wxDatabase::BeginTrans}
\func{bool}{BeginTrans}{\void}
Not implemented.
\membersection{wxDatabase::Cancel}
\func{void}{Cancel}{\void}
Not implemented.
\membersection{wxDatabase::CanTransact}
\func{bool}{CanTransact}{\void}
Not implemented.
\membersection{wxDatabase::CanUpdate}
\func{bool}{CanUpdate}{\void}
Not implemented.
\membersection{wxDatabase::Close}
\func{bool}{Close}{\void}
Resets the statement handles of any associated wxRecordSet objects,
and disconnects from the current data source.
\membersection{wxDatabase::CommitTrans}
\func{bool}{CommitTrans}{\void}
Commits previous transactions. Not implemented.
\membersection{wxDatabase::ErrorOccured}
\func{bool}{ErrorOccured}{\void}
Returns TRUE if the last action caused an error.
\membersection{wxDatabase::ErrorSnapshot}
\func{void}{ErrorSnapshot}{\param{HSTMT}{ statement = SQL\_NULL\_HSTMT}}
This function will be called whenever an ODBC error occured. It stores the
error related information returned by ODBC. If a statement handle of the
concerning ODBC action is available it should be passed to the function.
\membersection{wxDatabase::GetDatabaseName}
\func{wxString}{GetDatabaseName}{\void}
Returns the name of the database associated with the current connection.
\membersection{wxDatabase::GetDataSource}
\func{wxString}{GetDataSource}{\void}
Returns the name of the connected data source.
\membersection{wxDatabase::GetErrorClass}
\func{wxString}{GetErrorClass}{\void}
Returns the error class of the last error. The error class consists of
five characters where the first two characters contain the class
and the other three characters contain the subclass of the ODBC error.
See ODBC documentation for further details.
\membersection{wxDatabase::GetErrorCode}
\func{wxRETCODE}{GetErrorCode}{\void}
Returns the error code of the last ODBC function call. This will be one of:
\begin{twocollist}\itemsep=0pt
\twocolitem{SQL\_ERROR}{General error.}
\twocolitem{SQL\_INVALID\_HANDLE}{An invalid handle was passed to an ODBC function.}
\twocolitem{SQL\_NEED\_DATA}{ODBC expected some data.}
\twocolitem{SQL\_NO\_DATA\_FOUND}{No data was found by this ODBC call.}
\twocolitem{SQL\_SUCCESS}{The call was successful.}
\twocolitem{SQL\_SUCCESS\_WITH\_INFO}{The call was successful, but further information can be
obtained from the ODBC manager.}
\end{twocollist}
\membersection{wxDatabase::GetErrorMessage}
\func{wxString}{GetErrorMessage}{\void}
Returns the last error message returned by the ODBC manager.
\membersection{wxDatabase::GetErrorNumber}
\func{long}{GetErrorNumber}{\void}
Returns the last native error. A native error is an ODBC driver dependent
error number.
\membersection{wxDatabase::GetHDBC}
\func{HDBC}{GetHDBC}{\void}
Returns the current ODBC database handle.
\membersection{wxDatabase::GetHENV}
\func{HENV}{GetHENV}{\void}
Returns the ODBC environment handle.
\membersection{wxDatabase::GetInfo}
\func{bool}{GetInfo}{\param{long}{ infoType}, \param{long *}{buf}}
\func{bool}{GetInfo}{\param{long}{ infoType}, \param{const wxString\& }{buf}, \param{int}{ bufSize=-1}}
Returns requested information. The return value is TRUE if successful, FALSE otherwise.
{\it infoType} is an ODBC identifier specifying the type of information to be returned.
{\it buf} is a character or long integer pointer to storage which must be allocated by the
application, and which will contain the information if the function is successful.
{\it bufSize} is the size of the character buffer. A value of -1 indicates that the size
should be computed by the GetInfo function.
\membersection{wxDatabase::GetPassword}
\func{wxString}{GetPassword}{\void}
Returns the password of the current user.
\membersection{wxDatabase::GetUsername}
\func{wxString}{GetUsername}{\void}
Returns the current username.
\membersection{wxDatabase::GetODBCVersionFloat}
\func{float}{GetODBCVersionFloat}{\param{bool}{ implementation=TRUE}}
Returns the version of ODBC in floating point format, e.g. 2.50.
{\it implementation} should be TRUE to get the DLL version, or FALSE to get the
version defined in the {\tt sql.h} header file.
This function can return the value 0.0 if the header version number is not defined (for early
versions of ODBC).
\membersection{wxDatabase::GetODBCVersionString}
\func{wxString}{GetODBCVersionString}{\param{bool}{ implementation=TRUE}}
Returns the version of ODBC in string format, e.g. ``02.50".
{\it implementation} should be TRUE to get the DLL version, or FALSE to get the
version defined in the {\tt sql.h} header file.
This function can return the value ``00.00" if the header version number is not defined (for early
versions of ODBC).
\membersection{wxDatabase::InWaitForDataSource}
\func{bool}{InWaitForDataSource}{\void}
Not implemented.
\membersection{wxDatabase::IsOpen}
\func{bool}{IsOpen}{\void}
Returns TRUE if a connection is open.
\membersection{wxDatabase::Open}\label{wxdatabaseopen}
\func{bool}{Open}{\param{const wxString\& }{datasource}, \param{bool}{ exclusive = FALSE}, \param{bool }{readOnly = TRUE},
\param{const wxString\& }{username = ``ODBC"}, \param{const wxString\& }{password = ``"}}
Connect to a data source. {\it datasource} contains the name of the ODBC data
source. The parameters exclusive and readOnly are not used.
\membersection{wxDatabase::OnSetOptions}
\func{void}{OnSetOptions}{\param{wxRecordSet *}{recordSet}}
Not implemented.
\membersection{wxDatabase::OnWaitForDataSource}
\func{void}{OnWaitForDataSource}{\param{bool}{ stillExecuting}}
Not implemented.
\membersection{wxDatabase::RollbackTrans}
\func{bool}{RollbackTrans}{\void}
Sends a rollback to the ODBC driver. Not implemented.
\membersection{wxDatabase::SetDataSource}
\func{void}{SetDataSource}{\param{const wxString\& }{s}}
Sets the name of the data source. Not implemented.
\membersection{wxDatabase::SetLoginTimeout}
\func{void}{SetLoginTimeout}{\param{long}{ seconds}}
Sets the time to wait for an user login. Not implemented.
\membersection{wxDatabase::SetPassword}
\func{void}{SetPassword}{\param{const wxString\& }{s}}
Sets the password of the current user. Not implemented.
\membersection{wxDatabase::SetSynchronousMode}
\func{void}{SetSynchronousMode}{\param{bool }{synchronous}}
Toggles between synchronous and asynchronous mode. Currently only synchronous
mode is supported, so this function has no effect.
\membersection{wxDatabase::SetQueryTimeout}
\func{void}{SetQueryTimeout}{\param{long}{ seconds}}
Sets the time to wait for a response to a query. Not implemented.
\membersection{wxDatabase::SetUsername}
\func{void}{SetUsername}{\param{const wxString\& }{s}}
Sets the name of the current user. Not implemented.

View File

@@ -1,122 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dataform.tex
%% Purpose: wxDataFormat documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 03.11.99
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDataFormat}}\label{wxdataformat}
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 ({\tt CLIPFORMAT}
under Windows or {\tt Atom} under X11, for example) and the standard formats
are, indeed, just numbers which can be implicitly converted to wxDataFormat.
The standard formats are:
\begin{twocollist}\itemsep=1cm
\twocolitem{wxDF\_INVALID}{An invalid format - used as default argument for
functions taking a wxDataFormat argument sometimes}
\twocolitem{wxDF\_TEXT}{Text format (wxString)}
\twocolitem{wxDF\_BITMAP}{A bitmap (wxBitmap)}
\twocolitem{wxDF\_METAFILE}{A metafile (wxMetafile, Windows only)}
\twocolitem{wxDF\_FILENAME}{A list of filenames}
\twocolitem{wxDF\_HTML}{An HTML string. This is only valid when passed to wxSetClipboardData
when compiled with Visual C++ in non-Unicode mode}
\end{twocollist}
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 {\tt 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 {\it registered}) first, you
shouldn't care about it because it is done automatically the first time the
wxDataFormat object corresponding to a given format name is created. The only
implication of this is that you should avoid having global wxDataFormat objects
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!
\wxheading{Virtual functions to override}
None
\wxheading{Derived from}
None
\wxheading{See also}
\helpref{Clipboard and drag and drop overview}{wxdndoverview},
\helpref{DnD sample}{samplednd},
\helpref{wxDataObject}{wxdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataFormat::wxDataFormat}\label{wxdataformatwxdataformatdef}
\func{}{wxDataFormat}{\param{NativeFormat}{ format = wxDF\_INVALID}}
Constructs a data format object for one of the standard data formats or an
empty data object (use \helpref{SetType}{wxdataformatsettype} or
\helpref{SetId}{wxdataformatsetid} later in this case)
\perlnote{In wxPerl this function is named {\tt newNative}.}
\membersection{wxDataFormat::wxDataFormat}\label{wxdataformatwxdataformat}
\func{}{wxDataFormat}{\param{const wxChar }{*format}}
Constructs a data format object for a custom format identified by its name
{\it format}.
\perlnote{In wxPerl this function is named {\tt newUser}.}
\membersection{wxDataFormat::operator $==$}\label{wxdataformatoperatoreq}
\constfunc{bool}{operator $==$}{\param{const wxDataFormat\&}{ format}}
Returns TRUE if the formats are equal.
\membersection{wxDataFormat::operator $!=$}\label{wxdataformatoperatorneq}
\constfunc{bool}{operator $!=$}{\param{const wxDataFormat\&}{ format}}
Returns TRUE if the formats are different.
\membersection{wxDataFormat::GetId}\label{wxdataformatgetid}
\constfunc{wxString}{GetId}{\void}
Returns the name of a custom format (this function will fail for a standard
format).
\membersection{wxDataFormat::GetType}\label{wxdataformatgettype}
\constfunc{NativeFormat}{GetType}{\void}
Returns the platform-specific number identifying the format.
\membersection{wxDataFormat::SetId}\label{wxdataformatsetid}
\func{void}{SetId}{\param{const wxChar }{*format}}
Sets the format to be the custom format identified by the given name.
\membersection{wxDataFormat::SetType}\label{wxdataformatsettype}
\func{void}{SetType}{\param{NativeFormat}{ format}}
Sets the format to the given value, which should be one of wxDF\_XXX constants.

View File

@@ -1,200 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dataobj.tex
%% Purpose: wxDataObject documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 18.10.99
%% RCS-ID: $Id$
%% Copyright: (c) wxWindows team
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDataObject}}\label{wxdataobject}
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 usual '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
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
\begin{verbatim}
enum Direction
{
Get = 0x01, // format is supported by GetDataHere()
Set = 0x02 // format is supported by SetData()
};
\end{verbatim}
which allows to distinguish between them. See
\helpref{wxDataFormat}{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, wxWindows has two predefined classes
which derive from wxDataObject: \helpref{wxDataObjectSimple}{wxdataobjectsimple} and
\helpref{wxDataObjectComposite}{wxdataobjectcomposite}.
\helpref{wxDataObjectSimple}{wxdataobjectsimple} is
the simplest wxDataObject possible and only holds data in a single format (such
as HTML or text) and \helpref{wxDataObjectComposite}{wxdataobjectcomposite} is
the simplest way to implement wxDataObject which does support multiple formats
because it achievs 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):
\begin{twocollist}\itemsep=1cm
\twocolitem{{\bf 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.}
\twocolitem{{\bf 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).}
\twocolitem{{\bf 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).}
\twocolitem{{\bf 4. Use wxDataObject directly}}{This is the solution for
maximal flexibility and efficiency, but it is also is the most difficult to
implement.}
\end{twocollist}
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
respective formats. Now imagine that you want to paste 200 pages of text in
your proprietary format, as well as Word, RTF, HTML, Unicode and plain text to
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 the clipboard and
drag and drop, nor the 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: \helpref{wxFileDataObject}{wxfiledataobject},
\helpref{wxTextDataObject}{wxtextdataobject} and
\helpref{wxBitmapDataObject}{wxbitmapdataobject} which can be used without
change.
You may also derive your own data object classes from
\helpref{wxCustomDataObject}{wxcustomdataobject} for user-defined types. The
format of user-defined data is given as mime-type string literal, such as
"application/word" or "image/png". These strings are used as they are under
Unix (so far only GTK) to identify a format and are translated into their
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.
\pythonnote{At this time this class is not directly usable from wxPython.
Derive a class from \helpref{wxPyDataObjectSimple}{wxdataobjectsimple}
instead.}
\perlnote{This class is not currently usable from wxPerl; you may
use \helpref{Wx::PlDataObjectSimple}{wxdataobjectsimple} instead.}
\wxheading{Virtual functions to override}
Each class derived directly from wxDataObject must override and implement all
of its functions which are pure virtual in the base class.
The data objects which only render their data or only set it (i.e. work in
only one direction), should return 0 from
\helpref{GetFormatCount}{wxdataobjectgetformatcount}.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{Clipboard and drag and drop overview}{wxdndoverview},
\helpref{DnD sample}{samplednd},
\helpref{wxFileDataObject}{wxfiledataobject},
\helpref{wxTextDataObject}{wxtextdataobject},
\helpref{wxBitmapDataObject}{wxbitmapdataobject},
\helpref{wxCustomDataObject}{wxcustomdataobject},
\helpref{wxDropTarget}{wxdroptarget},
\helpref{wxDropSource}{wxdropsource},
\helpref{wxTextDropTarget}{wxtextdroptarget},
\helpref{wxFileDropTarget}{wxfiledroptarget}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataObject::wxDataObject}\label{wxdataobjectwxdataobject}
\func{}{wxDataObject}{\void}
Constructor.
\membersection{wxDataObject::\destruct{wxDataObject}}\label{wxdataobjectdtor}
\func{}{\destruct{wxDataObject}}{\void}
Destructor.
\membersection{wxDataObject::GetAllFormats}\label{wxdataobjectgetallformats}
\constfunc{virtual void}{GetAllFormats}{ \param{wxDataFormat *}{formats}, \param{Direction}{ dir = Get}}
Copy all supported formats in the given direction to the array pointed to by
{\it formats}. There is enough space for GetFormatCount(dir) formats in it.
\perlnote{In wxPerl this method only takes the {\tt dir} parameter.
In scalar context it returns the first format,
in list context it returns a list containing all the supported formats.}
\membersection{wxDataObject::GetDataHere}\label{wxdataobjectgetdatahere}
\constfunc{virtual bool}{GetDataHere}{\param{const wxDataFormat\&}{ format}, \param{void }{*buf} }
The method will write the data of the format {\it format} in the buffer {\it
buf} and return TRUE on success, FALSE on failure.
\membersection{wxDataObject::GetDataSize}\label{wxdataobjectgetdatasize}
\constfunc{virtual size\_t}{GetDataSize}{\param{const wxDataFormat\&}{ format} }
Returns the data size of the given format {\it format}.
\membersection{wxDataObject::GetFormatCount}\label{wxdataobjectgetformatcount}
\constfunc{virtual size\_t}{GetFormatCount}{\param{Direction}{ dir = Get}}
Returns the number of available formats for rendering or setting the data.
\membersection{wxDataObject::GetPreferredFormat}\label{wxdataobjectgetpreferredformat}
\constfunc{virtual wxDataFormat}{GetPreferredFormat}{\param{Direction}{ dir = Get}}
Returns the preferred format for either rendering the data (if {\it dir} is {\tt Get},
its default value) or for setting it. Usually this will be the
native format of the wxDataObject.
\membersection{wxDataObject::SetData}\label{wxdataobjectsetdata}
\func{virtual bool}{SetData}{ \param{const wxDataFormat\&}{ format}, \param{size\_t}{ len}, \param{const void }{*buf} }
Set the data in the format {\it format} of the length {\it len} provided in the
buffer {\it buf}.
Returns TRUE on success, FALSE on failure.

View File

@@ -1,356 +0,0 @@
\section{\class{wxDate}}\label{wxdate}
A class for manipulating dates.
{\bf NOTE:} this class is retained only for compatibility,
and has been replaced by \helpref{wxDateTime}{wxdatetime}. wxDate
may be withdrawn in future versions of wxWindows.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/date.h>
\wxheading{See also}
\helpref{wxTime}{wxtime}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDate::wxDate}\label{wxdateconstr}
\func{}{wxDate}{\void}
Default constructor.
\func{}{wxDate}{\param{const wxDate\&}{ date}}
Copy constructor.
\func{}{wxDate}{\param{int}{ month}, \param{int}{ day}, \param{int}{ year}}
Constructor taking month, day and year.
\func{}{wxDate}{\param{long}{ julian}}
Constructor taking an integer representing the Julian date. This is the number of days since
1st January 4713 B.C., so to convert from the number of days since 1st January 1901,
construct a date for 1/1/1901, and add the number of days.
\func{}{wxDate}{\param{const wxString\& }{dateString}}
Constructor taking a string representing a date. This must be either the string TODAY, or of the
form {\tt MM/DD/YYYY} or {\tt MM-DD-YYYY}. For example:
\begin{verbatim}
wxDate date("11/26/1966");
\end{verbatim}
\wxheading{Parameters}
\docparam{date}{Date to copy.}
\docparam{month}{Month: a number between 1 and 12.}
\docparam{day}{Day: a number between 1 and 31.}
\docparam{year}{Year, such as 1995, 2005.}
\membersection{wxDate::\destruct{wxDate}}
\func{void}{\destruct{wxDate}}{\void}
Destructor.
\membersection{wxDate::AddMonths}\label{wxdateaddmonths}
\func{wxDate\&}{AddMonths}{\param{int}{ months=1}}
Adds the given number of months to the date, returning a reference to `this'.
\membersection{wxDate::AddWeeks}\label{wxdateaddweeks}
\func{wxDate\&}{AddWeeks}{\param{int}{ weeks=1}}
Adds the given number of weeks to the date, returning a reference to `this'.
\membersection{wxDate::AddYears}\label{wxdateaddyears}
\func{wxDate\&}{AddYears}{\param{int}{ years=1}}
Adds the given number of months to the date, returning a reference to `this'.
\membersection{wxDate::FormatDate}\label{wxdateformatdate}
\constfunc{wxString}{FormatDate}{\param{int}{ type=-1}}
Formats the date according to {\it type} if not -1, or according
to the current display type if -1.
\wxheading{Parameters}
\docparam{type}{-1 or one of:
\begin{twocollist}\itemsep=0pt
\twocolitem{wxDAY}{Format day only.}
\twocolitem{wxMONTH}{Format month only.}
\twocolitem{wxMDY}{Format MONTH, DAY, YEAR.}
\twocolitem{wxFULL}{Format day, month and year in US style: DAYOFWEEK, MONTH, DAY, YEAR.}
\twocolitem{wxEUROPEAN}{Format day, month and year in European style: DAY, MONTH, YEAR.}
\end{twocollist}}
\membersection{wxDate::GetDay}\label{wxdategetday}
\constfunc{int}{GetDay}{\void}
Returns the numeric day (in the range 1 to 31).
\membersection{wxDate::GetDayOfWeek}\label{wxdategetdayofweek}
\constfunc{int}{GetDayOfWeek}{\void}
Returns the integer day of the week (in the range 1 to 7).
\membersection{wxDate::GetDayOfWeekName}\label{wxdategetdayofweekname}
\constfunc{wxString}{GetDayOfWeekName}{\void}
Returns the name of the day of week.
\membersection{wxDate::GetDayOfYear}\label{wxdategetdayofyear}
\constfunc{long}{GetDayOfYear}{\void}
Returns the day of the year (from 1 to 365).
\membersection{wxDate::GetDaysInMonth}\label{wxdategetdaysinmonth}
\constfunc{int}{GetDaysInMonth}{\void}
Returns the number of days in the month (in the range 1 to 31).
\membersection{wxDate::GetFirstDayOfMonth}\label{wxdategetfirstdayofmonth}
\constfunc{int}{GetFirstDayOfMonth}{\void}
Returns the day of week that is first in the month (in the range 1 to 7).
\membersection{wxDate::GetJulianDate}\label{wxdategetjuliandate}
\constfunc{long}{GetJulianDate}{\void}
Returns the Julian date.
\membersection{wxDate::GetMonth}\label{wxdategetmonth}
\constfunc{int}{GetMonth}{\void}
Returns the month number (in the range 1 to 12).
\membersection{wxDate::GetMonthEnd}
\func{wxDate}{GetMonthEnd}{\void}
Returns the date representing the last day of the month.
\membersection{wxDate::GetMonthName}\label{wxdategetmonthname}
\constfunc{wxString}{GetMonthName}{\void}
Returns the name of the month. Do not delete the returned storage.
\membersection{wxDate::GetMonthStart}\label{wxdategetmonthstart}
\constfunc{wxDate}{GetMonthStart}{\void}
Returns the date representing the first day of the month.
\membersection{wxDate::GetWeekOfMonth}\label{wxdategetweekofmonth}
\constfunc{int}{GetWeekOfMonth}{\void}
Returns the week of month (in the range 1 to 6).
\membersection{wxDate::GetWeekOfYear}\label{wxdategetweekofyear}
\constfunc{int}{GetWeekOfYear}{\void}
Returns the week of year (in the range 1 to 52).
\membersection{wxDate::GetYear}\label{wxdategetyear}
\constfunc{int}{GetYear}{\void}
Returns the year as an integer (such as `1995').
\membersection{wxDate::GetYearEnd}\label{wxdategetyearend}
\constfunc{wxDate}{GetYearEnd}{\void}
Returns the date representing the last day of the year.
\membersection{wxDate::GetYearStart}\label{wxdategetyearstart}
\constfunc{wxDate}{GetYearStart}{\void}
Returns the date representing the first day of the year.
\membersection{wxDate::IsLeapYear}\label{wxdateisleapyear}
\constfunc{bool}{IsLeapYear}{\void}
Returns TRUE if the year of this date is a leap year.
\membersection{wxDate::Set}\label{wxdateset}
\func{wxDate\&}{Set}{\void}
Sets the date to current system date, returning a reference to `this'.
\func{wxDate\&}{Set}{\param{long}{ julian}}
Sets the date to the given Julian date, returning a reference to `this'.
\func{wxDate\&}{Set}{\param{int}{ month}, \param{int}{ day}, \param{int}{ year}}
Sets the date to the given date, returning a reference to `this'.
{\it month} is a number from 1 to 12.
{\it day} is a number from 1 to 31.
{\it year} is a year, such as 1995, 2005.
\membersection{wxDate::SetFormat}\label{wxdatesetformat}
\func{void}{SetFormat}{\param{int}{ format}}
Sets the current format type.
\wxheading{Parameters}
\docparam{format}{-1 or one of:
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxDAY}}{Format day only.}
\twocolitem{{\bf wxMONTH}}{Format month only.}
\twocolitem{{\bf wxMDY}}{Format MONTH, DAY, YEAR.}
\twocolitem{{\bf wxFULL}}{Format day, month and year in US style: DAYOFWEEK, MONTH, DAY, YEAR.}
\twocolitem{{\bf wxEUROPEAN}}{Format day, month and year in European style: DAY, MONTH, YEAR.}
\end{twocollist}}
\membersection{wxDate::SetOption}\label{wxdatesetoption}
\func{int}{SetOption}{\param{int}{ option}, \param{const bool}{ enable=TRUE}}
Enables or disables an option for formatting.
\wxheading{Parameters}
\docparam{option}{May be one of:
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxNO\_CENTURY}}{The century is not formatted.}
\twocolitem{{\bf wxDATE\_ABBR}}{Month and day names are abbreviated to 3 characters when formatting.}
\end{twocollist}}
\membersection{wxDate::operator wxString}\label{wxdatewxstring}
\func{}{operator wxString}{\void}
Conversion operator, to convert wxDate to wxString by calling FormatDate.
\membersection{wxDate::operator $+$}\label{wxdateplus}
\func{wxDate}{operator $+$}{\param{long}{ i}}
\func{wxDate}{operator $+$}{\param{int}{ i}}
Adds an integer number of days to the date, returning a date.
\membersection{wxDate::operator $-$}\label{wxdateminus}
\func{wxDate}{operator $-$}{\param{long}{ i}}
\func{wxDate}{operator $-$}{\param{int}{ i}}
Subtracts an integer number of days from the date, returning a date.
\func{long}{operator $-$}{\param{const wxDate\&}{ date}}
Subtracts one date from another, return the number of intervening days.
\membersection{wxDate::operator $+=$}\label{wxdateplusequals}
\func{wxDate\&}{operator $+=$}{\param{long}{ i}}
Postfix operator: adds an integer number of days to the date, returning
a reference to `this' date.
\membersection{wxDate::operator $-=$}\label{wxdateminusequals}
\func{wxDate\&}{operator $-=$}{\param{long}{ i}}
Postfix operator: subtracts an integer number of days from the date, returning
a reference to `this' date.
\membersection{wxDate::operator $++$}\label{wxdateplusplus}
\func{wxDate\&}{operator $++$}{\void}
Increments the date (postfix or prefix).
\membersection{wxDate::operator $--$}\label{wxdateminusminus}
\func{wxDate\&}{operator $--$}{\void}
Decrements the date (postfix or prefix).
\membersection{wxDate::operator $<$}\label{wxdatelessthan}
\func{friend bool}{operator $<$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
Function to compare two dates, returning TRUE if {\it date1} is earlier than {\it date2}.
\membersection{wxDate::operator $<=$}\label{wxdatelessthaneq}
\func{friend bool}{operator $<=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
Function to compare two dates, returning TRUE if {\it date1} is earlier than or equal to {\it date2}.
\membersection{wxDate::operator $>$}\label{wxdategreaterthan}
\func{friend bool}{operator $>$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
Function to compare two dates, returning TRUE if {\it date1} is later than {\it date2}.
\membersection{wxDate::operator $>=$}\label{wxdategreaterthaneq}
\func{friend bool}{operator $>=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
Function to compare two dates, returning TRUE if {\it date1} is later than or equal to {\it date2}.
\membersection{wxDate::operator $==$}\label{wxdateequals}
\func{friend bool}{operator $==$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
Function to compare two dates, returning TRUE if {\it date1} is equal to {\it date2}.
\membersection{wxDate::operator $!=$}\label{wxdatenotequals}
\func{friend bool}{operator $!=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
Function to compare two dates, returning TRUE if {\it date1} is not equal to {\it date2}.
\membersection{wxDate::operator \cinsert}\label{wxdateinsert}
\func{friend ostream\&}{operator \cinsert}{\param{ostream\&}{ os}, \param{const wxDate\&}{ date}}
Function to output a wxDate to an ostream.

View File

@@ -1,323 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: datespan.tex
%% Purpose: wxDateSpan documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 04.04.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDateSpan}}\label{wxdatespan}
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 {\bf 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 \hbox{ month and } 1 \hbox{ day})$ is $2$ months and $2$ days. They can
be added together and with \helpref{wxDateTime}{wxdatetime} or
\helpref{wxTimeSpan}{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*\hbox{weeks} + \hbox{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 {\bf every}
source date. Thus wxDateSpan::Months(1) is not equal to wxDateSpan::Days(30),
because they not 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: \helpref{wxTimeSpan}{wxtimespan} will do the job because there
are no subtleties associated with those (we don't support leap seconds).
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/datetime.h>
\wxheading{See also}
\helpref{Date classes overview}{wxdatetimeoverview},\rtfsp
\helpref{wxDateTime}{wxdatetime}
\latexignore{\rtfignore{\wxheading{Members}}}
% wxDateSpan ctor
\membersection{wxDateSpan::wxDateSpan}\label{wxdatespanwxdatespan}
\func{}{wxDateSpan}{\param{int }{years = $0$}, \param{int }{months = $0$}, \param{int }{weeks = $0$}, \param{int }{days = $0$}}
Constructs the date span object for the given number of years, months, weeks
and days. Note that the weeks and days add together if both are given.
% wxDateSpan::Add
\membersection{wxDateSpan::Add}{wxdatespanadd}
\constfunc{wxDateSpan}{Add}{\param{const wxDateSpan\& }{other}}
\func{wxDateSpan\&}{Add}{\param{const wxDateSpan\& }{other}}
\func{wxDateSpan\&}{operator$+=$}{\param{const wxDateSpan\& }{other}}
Returns the sum of two date spans. The first version returns a new object, the
second and third ones modify this object in place.
% wxDateSpan::Day
\membersection{wxDateSpan::Day}{wxdatespanday}
\func{static wxDateSpan}{Day}{\void}
Returns a date span object corresponding to one day.
\wxheading{See also}
\helpref{Days}{wxdatespandays}
% wxDateSpan::Days
\membersection{wxDateSpan::Days}{wxdatespandays}
\func{static wxDateSpan}{Days}{\param{int }{days}}
Returns a date span object corresponding to the given number of days.
\wxheading{See also}
\helpref{Day}{wxdatespanday}
% wxDateSpan::GetDays
\membersection{wxDateSpan::GetDays}{wxdatespangetdays}
\constfunc{int}{GetDays}{\void}
Returns the number of days (only, that it not counting the weeks component!)
in this date span.
\wxheading{See also}
\helpref{GetTotalDays}{wxdatespangettotaldays}
% wxDateSpan::GetMonths
\membersection{wxDateSpan::GetMonths}{wxdatespangetmonths}
\constfunc{int}{GetMonths}{\void}
Returns the number of the months (not counting the years) in this date span.
% wxDateSpan::GetTotalDays
\membersection{wxDateSpan::GetTotalDays}{wxdatespangettotaldays}
\constfunc{int}{GetTotalDays}{\void}
Returns the combined number of days in this date span, counting both weeks and
days. It still doesn't take neither months nor years into the account.
\wxheading{See also}
\helpref{GetWeeks}{wxdatespangetweeks}, \helpref{GetDays}{wxdatespangetdays}
% wxDateSpan::GetWeeks
\membersection{wxDateSpan::GetWeeks}{wxdatespangetweeks}
\constfunc{int}{GetWeeks}{\void}
Returns the number of weeks in this date span.
\wxheading{See also}
\helpref{GetTotalDays}{wxdatespangettotaldays}
% wxDateSpan::GetYears
\membersection{wxDateSpan::GetYears}{wxdatespangetyears}
\constfunc{int}{GetYears}{\void}
Returns the number of years in this date span.
% wxDateSpan::Month
\membersection{wxDateSpan::Month}{wxdatespanmonth}
\func{static wxDateSpan}{Month}{\void}
Returns a date span object corresponding to one month.
\wxheading{See also}
\helpref{Months}{wxdatespanmonths}
% wxDateSpan::Months
\membersection{wxDateSpan::Months}{wxdatespanmonths}
\func{static wxDateSpan}{Months}{\param{int }{mon}}
Returns a date span object corresponding to the given number of months.
\wxheading{See also}
\helpref{Month}{wxdatespanmonth}
% wxDateSpan::Multiply
\membersection{wxDateSpan::Multiply}{wxdatespanmultiply}
\constfunc{wxDateSpan}{Multiply}{\param{int }{factor}}
\func{wxDateSpan\&}{Multiply}{\param{int }{factor}}
\func{wxDateSpan\&}{operator$*=$}{\param{int }{factor}}
Returns the product of the date span by the specified {\it factor}. The
product is computed by multiplying each of the components by the factor.
The first version returns a new object, the second and third ones modify this
object in place.
% wxDateSpan::Negate
\membersection{wxDateSpan::Negate}{wxdatespannegate}
\constfunc{wxDateSpan}{Negate}{\void}
Returns the date span with the opposite sign.
\wxheading{See also}
\helpref{Neg}{wxdatespanneg}
% wxDateSpan::Neg
\membersection{wxDateSpan::Neg}{wxdatespanneg}
\func{wxDateSpan\&}{Neg}{\void}
\func{wxDateSpan\&}{operator$-$}{\void}
Changes the sign of this date span.
\wxheading{See also}
\helpref{Negate}{wxdatespannegate}
% wxDateSpan::SetDays
\membersection{wxDateSpan::SetDays}{wxdatespansetdays}
\func{wxDateSpan\&}{SetDays}{\param{int }{n}}
Sets the number of days (without modifying any other components) in this date
span.
% wxDateSpan::SetYears
\membersection{wxDateSpan::SetYears}{wxdatespansetyears}
\func{wxDateSpan\&}{SetYears}{\param{int }{n}}
Sets the number of years (without modifying any other components) in this date
span.
% wxDateSpan::SetMonths
\membersection{wxDateSpan::SetMonths}{wxdatespansetmonths}
\func{wxDateSpan\&}{SetMonths}{\param{int }{n}}
Sets the number of months (without modifying any other components) in this
date span.
% wxDateSpan::SetWeeks
\membersection{wxDateSpan::SetWeeks}{wxdatespansetweeks}
\func{wxDateSpan\&}{SetWeeks}{\param{int }{n}}
Sets the number of weeks (without modifying any other components) in this date
span.
% wxDateSpan::Subtract
\membersection{wxDateSpan::Subtract}{wxdatespansubtract}
\constfunc{wxDateSpan}{Subtract}{\param{const wxDateSpan\& }{other}}
\func{wxDateSpan\&}{Subtract}{\param{const wxDateSpan\& }{other}}
\func{wxDateSpan\&}{operator$+=$}{\param{const wxDateSpan\& }{other}}
Returns the difference of two date spans. The first version returns a new
object, the second and third ones modify this object in place.
% wxDateSpan::Week
\membersection{wxDateSpan::Week}{wxdatespanweek}
\func{static wxDateSpan}{Week}{\void}
Returns a date span object corresponding to one week.
\wxheading{See also}
\helpref{Weeks}{wxdatespanweeks}
% wxDateSpan::Weeks
\membersection{wxDateSpan::Weeks}{wxdatespanweeks}
\func{static wxDateSpan}{Weeks}{\param{int }{weeks}}
Returns a date span object corresponding to the given number of weeks.
\wxheading{See also}
\helpref{Week}{wxdatespanweek}
% wxDateSpan::Year
\membersection{wxDateSpan::Year}{wxdatespanyear}
\func{static wxDateSpan}{Year}{\void}
Returns a date span object corresponding to one year.
\wxheading{See also}
\helpref{Years}{wxdatespanyears}
% wxDateSpan::Years
\membersection{wxDateSpan::Years}{wxdatespanyears}
\func{static wxDateSpan}{Years}{\param{int }{years}}
Returns a date span object corresponding to the given number of years.
\wxheading{See also}
\helpref{Year}{wxdatespanyear}
% wxDateSpan::operator==
\membersection{wxDateSpan::operator$==$}{wxdatespanoperatorequal}
\constfunc{bool}{operator$==$}{\param{wxDateSpan\&}{ other}}
Returns {\tt TRUE} if this date span is equal to the other one. Two date spans
are considered equal if and only if they have the same number of years and
months and the same total number of days (counting both days and weeks).
% wxDateSpan::operator!=
\membersection{wxDateSpan::operator$!=$}{wxdatespanoperatornotequal}
\constfunc{bool}{operator$!=$}{\param{wxDateSpan\&}{ other}}
Returns {\tt TRUE} if this date span is different from the other one.
\wxheading{See also}
\helpref{operator==}{wxdatespanoperatorequal}

File diff suppressed because it is too large Load Diff

View File

@@ -1,119 +0,0 @@
\section{\class{wxDataInputStream}}\label{wxdatainputstream}
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
\helpref{wxTextInputStream}{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
and on a typical 32-bit computer, none of these match to the "long" type (wxInt32
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:
\begin{verbatim}
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
\end{verbatim}
See also \helpref{wxDataOutputStream}{wxdataoutputstream}.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/datstrm.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataInputStream::wxDataInputStream}\label{wxdatainputstreamconstr}
\func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}}
\func{}{wxDataInputStream}{\param{wxInputStream\&}{ stream}, \param{wxMBConv\&}{ conv = wxMBConvUTF8}}
Constructs a datastream object from an input stream. Only read methods will
be available. The second form is only available in Unicode build of wxWindows.
\wxheading{Parameters}
\docparam{stream}{The input stream.}
\docparam{conv}{Charset conversion object object used to decode strings in Unicode
mode (see \helpref{wxDataInputStream::ReadString}{wxdatainputstreamreadstring}
documentation for detailed description). Note that you must not destroy
{\it conv} before you destroy this wxDataInputStream instance!}
\membersection{wxDataInputStream::\destruct{wxDataInputStream}}
\func{}{\destruct{wxDataInputStream}}{\void}
Destroys the wxDataInputStream object.
\membersection{wxDataInputStream::BigEndianOrdered}
\func{void}{BigEndianOrdered}{\param{bool}{ be\_order}}
If {\it 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
big-endian order).
\membersection{wxDataInputStream::Read8}
\func{wxUint8}{Read8}{\void}
Reads a single byte from the stream.
\membersection{wxDataInputStream::Read16}
\func{wxUint16}{Read16}{\void}
Reads a 16 bit unsigned integer from the stream.
\membersection{wxDataInputStream::Read32}
\func{wxUint32}{Read32}{\void}
Reads a 32 bit unsigned integer from the stream.
\membersection{wxDataInputStream::Read64}
\func{wxUint64}{Read64}{\void}
Reads a 64 bit unsigned integer from the stream.
\membersection{wxDataInputStream::ReadDouble}
\func{double}{ReadDouble}{\void}
Reads a double (IEEE encoded) from the stream.
\membersection{wxDataInputStream::ReadString}\label{wxdatainputstreamreadstring}
\func{wxString}{ReadString}{\void}
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 wxWindows, the fuction first reads multibyte (char*)
string from the stream and then converts it to Unicode using the {\it conv}
object passed to constructor and returns the result as wxString. You are
responsible for using the same convertor as when writing the stream.
See also \helpref{wxDataOutputStream::WriteString}{wxdataoutputstreamwritestring}.

View File

@@ -1,100 +0,0 @@
\section{\class{wxDataOutputStream}}\label{wxdataoutputstream}
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
\helpref{wxTextOutputStream}{wxtextoutputstream} instead.
The << operator is overloaded and you can use this class like a standard
C++ iostream. See \helpref{wxDataInputStream}{wxdatainputstream} for its
usage and caveats.
See also \helpref{wxDataInputStream}{wxdatainputstream}.
\wxheading{Derived from}
None
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataOutputStream::wxDataOutputStream}\label{wxdataoutputstreamconstr}
\func{}{wxDataOutputStream}{\param{wxOutputStream\&}{ stream}}
\func{}{wxDataOutputStream}{\param{wxOutputStream\&}{ stream}, \param{wxMBConv\&}{ conv = wxMBConvUTF8}}
Constructs a datastream object from an output stream. Only write methods will
be available. The second form is only available in Unicode build of wxWindows.
\wxheading{Parameters}
\docparam{stream}{The output stream.}
\docparam{conv}{Charset conversion object object used to encoding Unicode
strings before writing them to the stream
in Unicode mode (see \helpref{wxDataOutputStream::WriteString}{wxdataoutputstreamwritestring}
documentation for detailed description). Note that you must not destroy
{\it conv} before you destroy this wxDataOutputStream instance! It is
recommended to use default value (UTF-8).}
\membersection{wxDataOutputStream::\destruct{wxDataOutputStream}}
\func{}{\destruct{wxDataOutputStream}}{\void}
Destroys the wxDataOutputStream object.
\membersection{wxDataOutputStream::BigEndianOrdered}
\func{void}{BigEndianOrdered}{\param{bool}{ be\_order}}
If {\it be\_order} is TRUE, all data will be written in big-endian
order, e.g. for reading on a Sparc or from Java-Streams (which
always use big-endian order), otherwise data will be written in
little-endian order.
\membersection{wxDataOutputStream::Write8}
\func{void}{Write8}{{\param wxUint8 }{i8}}
Writes the single byte {\it i8} to the stream.
\membersection{wxDataOutputStream::Write16}
\func{void}{Write16}{{\param wxUint16 }{i16}}
Writes the 16 bit unsigned integer {\it i16} to the stream.
\membersection{wxDataOutputStream::Write32}
\func{void}{Write32}{{\param wxUint32 }{i32}}
Writes the 32 bit unsigned integer {\it i32} to the stream.
\membersection{wxDataOutputStream::Write64}
\func{void}{Write64}{{\param wxUint64 }{i64}}
Writes the 64 bit unsigned integer {\it i64} to the stream.
\membersection{wxDataOutputStream::WriteDouble}
\func{void}{WriteDouble}{{\param double }{f}}
Writes the double {\it f} to the stream using the IEEE format.
\membersection{wxDataOutputStream::WriteString}\label{wxdataoutputstreamwritestring}
\func{void}{WriteString}{{\param const wxString\&}{string}}
Writes {\it string} to the stream. Actually, this method writes the size of
the string before writing {\it string} itself.
In ANSI build of wxWindows, 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 {\it conv} object passed
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.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,71 +0,0 @@
\section{\class{wxDDEClient}}\label{wxddeclient}
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 \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} 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 \helpref{wxTCPClient}{wxtcpclient}.
\wxheading{Derived from}
wxClientBase\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dde.h>
\wxheading{See also}
\helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection},
\helpref{Interprocess communications overview}{ipcoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDDEClient::wxDDEClient}
\func{}{wxDDEClient}{\void}
Constructs a client object.
\membersection{wxDDEClient::MakeConnection}\label{wxddeclientmakeconnection}
\func{wxConnectionBase *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}}
Tries to make a connection with a server specified by the host
(machine name under UNIX, ignored under Windows), service name (must
contain an integer port number under UNIX), and topic string. If the
server allows a connection, a wxDDEConnection object will be returned.
The type of wxDDEConnection returned can be altered by overriding
the \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member to return your own
derived connection object.
\membersection{wxDDEClient::OnMakeConnection}\label{wxddeclientonmakeconnection}
\func{wxConnectionBase *}{OnMakeConnection}{\void}
The type of \helpref{wxDDEConnection}{wxddeconnection} returned from a \helpref{wxDDEClient::MakeConnection}{wxddeclientmakeconnection} call can
be altered by deriving the {\bf OnMakeConnection} member to return your
own derived connection object. By default, a wxDDEConnection
object is returned.
The advantage of deriving your own connection class is that it will
enable you to intercept messages initiated by the server, such
as \helpref{wxDDEConnection::OnAdvise}{wxddeconnectiononadvise}. You may also want to
store application-specific data in instances of the new class.
\membersection{wxDDEClient::ValidHost}
\func{bool}{ValidHost}{\param{const wxString\& }{host}}
Returns TRUE if this is a valid host name, FALSE otherwise. This always
returns TRUE under MS Windows.

View File

@@ -1,201 +0,0 @@
\section{\class{wxDDEConnection}}\label{wxddeconnection}
A wxDDEConnection object represents the connection between a client and a
server. It can be created by making a connection using a\rtfsp
\helpref{wxDDEClient}{wxddeclient} object, or by the acceptance of a connection by a\rtfsp
\helpref{wxDDEServer}{wxddeserver} object. The bulk of a DDE (Dynamic Data Exchange)
conversation is controlled by
calling members in a {\bf 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 \helpref{wxTCPConnection}{wxtcpconnection}.
\wxheading{Derived from}
wxConnectionBase\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dde.h>
\wxheading{Types}
\index{wxIPCFormat}wxIPCFormat is defined as follows:
\begin{verbatim}
enum wxIPCFormat
{
wxIPC_INVALID = 0,
wxIPC_TEXT = 1, /* CF_TEXT */
wxIPC_BITMAP = 2, /* CF_BITMAP */
wxIPC_METAFILE = 3, /* CF_METAFILEPICT */
wxIPC_SYLK = 4,
wxIPC_DIF = 5,
wxIPC_TIFF = 6,
wxIPC_OEMTEXT = 7, /* CF_OEMTEXT */
wxIPC_DIB = 8, /* CF_DIB */
wxIPC_PALETTE = 9,
wxIPC_PENDATA = 10,
wxIPC_RIFF = 11,
wxIPC_WAVE = 12,
wxIPC_UNICODETEXT = 13,
wxIPC_ENHMETAFILE = 14,
wxIPC_FILENAME = 15, /* CF_HDROP */
wxIPC_LOCALE = 16,
wxIPC_PRIVATE = 20
};
\end{verbatim}
\wxheading{See also}
\helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEServer}{wxddeserver}, \helpref{Interprocess communications overview}{ipcoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDDEConnection::wxDDEConnection}
\func{}{wxDDEConnection}{\void}
\func{}{wxDDEConnection}{\param{char* }{buffer}, \param{int}{ size}}
Constructs a connection object. If no user-defined connection object is
to be derived from wxDDEConnection, then the constructor should not be
called directly, since the default connection object will be provided on
requesting (or accepting) a connection. However, if the user defines his
or her own derived connection object, the \helpref{wxDDEServer::OnAcceptConnection}{wxddeserveronacceptconnection}\rtfsp
and/or \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} members should be replaced by
functions which construct the new connection object. If the arguments of
the wxDDEConnection constructor are void, then a default buffer is
associated with the connection. Otherwise, the programmer must provide a
a buffer and size of the buffer for the connection object to use in
transactions.
\membersection{wxDDEConnection::Advise}
\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
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 \helpref{wxDDEConnection::OnAdvise}{wxddeconnectiononadvise}
member to be called. Returns TRUE if successful.
\membersection{wxDDEConnection::Execute}
\func{bool}{Execute}{\param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
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 \helpref{wxDDEConnection::Poke}{wxddeconnectionpoke} in that respect). Causes the
server connection's \helpref{wxDDEConnection::OnExecute}{wxddeconnectiononexecute} member to be
called. Returns TRUE if successful.
\membersection{wxDDEConnection::Disconnect}
\func{bool}{Disconnect}{\void}
Called by the client or server application to disconnect from the other
program; it causes the \helpref{wxDDEConnection::OnDisconnect}{wxddeconnectionondisconnect} message
to be sent to the corresponding connection object in the other
program. The default behaviour of {\bf OnDisconnect} is to delete the
connection, but the calling application must explicitly delete its
side of the connection having called {\bf Disconnect}. Returns TRUE if
successful.
\membersection{wxDDEConnection::OnAdvise}\label{wxddeconnectiononadvise}
\func{virtual bool}{OnAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
Message sent to the client application when the server notifies it of a
change in the data associated with the given item.
\membersection{wxDDEConnection::OnDisconnect}\label{wxddeconnectionondisconnect}
\func{virtual bool}{OnDisconnect}{\void}
Message sent to the client or server application when the other
application notifies it to delete the connection. Default behaviour is
to delete the connection object.
\membersection{wxDDEConnection::OnExecute}\label{wxddeconnectiononexecute}
\func{virtual bool}{OnExecute}{\param{const wxString\& }{topic}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
Message sent to the server application when the client notifies it to
execute the given data. Note that there is no item associated with
this message.
\membersection{wxDDEConnection::OnPoke}\label{wxddeconnectiononpoke}
\func{virtual bool}{OnPoke}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{wxIPCFormat}{ format}}
Message sent to the server application when the client notifies it to
accept the given data.
\membersection{wxDDEConnection::OnRequest}\label{wxddeconnectiononrequest}
\func{virtual char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format}}
Message sent to the server application when the client
calls \helpref{wxDDEConnection::Request}{wxddeconnectionrequest}. The server
should respond by returning a character string from {\bf OnRequest},
or NULL to indicate no data.
\membersection{wxDDEConnection::OnStartAdvise}\label{wxddeconnectiononstartadvise}
\func{virtual bool}{OnStartAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
Message sent to the server application by the client, when the client
wishes to start an `advise loop' for the given topic and item. The
server can refuse to participate by returning FALSE.
\membersection{wxDDEConnection::OnStopAdvise}\label{wxddeconnectiononstopadvise}
\func{virtual bool}{OnStopAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
Message sent to the server application by the client, when the client
wishes to stop an `advise loop' for the given topic and item. The
server can refuse to stop the advise loop by returning FALSE, although
this doesn't have much meaning in practice.
\membersection{wxDDEConnection::Poke}\label{wxddeconnectionpoke}
\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{wxIPCFormat}{ format = wxCF\_TEXT}}
Called by the client application to poke data into the server. Can be
used to transfer arbitrary data to the server. Causes the server
connection's \helpref{wxDDEConnection::OnPoke}{wxddeconnectiononpoke} member
to be called. Returns TRUE if successful.
\membersection{wxDDEConnection::Request}\label{wxddeconnectionrequest}
\func{char*}{Request}{\param{const wxString\& }{item}, \param{int *}{size}, \param{wxIPCFormat}{ format = wxIPC\_TEXT}}
Called by the client application to request data from the server. Causes
the server connection's \helpref{wxDDEConnection::OnRequest}{wxddeconnectiononrequest} member to be called. Returns a
character string (actually a pointer to the connection's buffer) if
successful, NULL otherwise.
\membersection{wxDDEConnection::StartAdvise}\label{wxddeconnectionstartadvise}
\func{bool}{StartAdvise}{\param{const wxString\& }{item}}
Called by the client application to ask if an advise loop can be started
with the server. Causes the server connection's \helpref{wxDDEConnection::OnStartAdvise}{wxddeconnectiononstartadvise}\rtfsp
member to be called. Returns TRUE if the server okays it, FALSE
otherwise.
\membersection{wxDDEConnection::StopAdvise}\label{wxddeconnectionstopadvise}
\func{bool}{StopAdvise}{\param{const wxString\& }{item}}
Called by the client application to ask if an advise loop can be
stopped. Causes the server connection's \helpref{wxDDEConnection::OnStopAdvise}{wxddeconnectiononstopadvise} member
to be called. Returns TRUE if the server okays it, FALSE otherwise.

View File

@@ -1,51 +0,0 @@
\section{\class{wxDDEServer}}\label{wxddeserver}
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 \helpref{wxTCPServer}{wxtcpserver}.
\wxheading{Derived from}
wxServerBase
\wxheading{Include files}
<wx/dde.h>
\wxheading{See also}
\helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEConnection}{wxddeconnection}, \helpref{IPC overview}{ipcoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDDEServer::wxDDEServer}
\func{}{wxDDEServer}{\void}
Constructs a server object.
\membersection{wxDDEServer::Create}
\func{bool}{Create}{\param{const wxString\& }{service}}
Registers the server using the given service name. Under UNIX, the
string must contain an integer id which is used as an Internet port
number. FALSE is returned if the call failed (for example, the port
number is already in use).
\membersection{wxDDEServer::OnAcceptConnection}\label{wxddeserveronacceptconnection}
\func{virtual wxConnectionBase *}{OnAcceptConnection}{\param{const wxString\& }{topic}}
When a client calls {\bf MakeConnection}, the server receives the
message and this member is called. The application should derive a
member to intercept this message and return a connection object of
either the standard wxDDEConnection type, or of a user-derived type. If the
topic is ``STDIO'', the application may wish to refuse the connection.
Under UNIX, when a server is created the OnAcceptConnection message is
always sent for standard input and output, but in the context of DDE
messages it doesn't make a lot of sense.

View File

@@ -1,275 +0,0 @@
\section{\class{wxDebugContext}}\label{wxdebugcontext}
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 wxWindows,
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
\wxheading{Derived from}
No parent class.
\wxheading{Include files}
<wx/memory.h>
\wxheading{See also}
\overview{Overview}{wxdebugcontextoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDebugContext::Check}\label{wxdebugcontextcheck}
\func{int}{Check}{\void}
Checks the memory blocks for errors, starting from the currently set
checkpoint.
\wxheading{Return value}
Returns the number of errors,
so a value of zero represents success. Returns -1 if an error
was detected that prevents further checking.
\membersection{wxDebugContext::Dump}\label{wxdebugcontextdump}
\func{bool}{Dump}{\void}
Performs a memory dump from the currently set checkpoint, writing to the
current debug stream. Calls the {\bf Dump} member function for each wxObject
derived instance.
\wxheading{Return value}
TRUE if the function succeeded, FALSE otherwise.
\membersection{wxDebugContext::GetCheckPrevious}\label{wxdebugcontextgetcheckprevious}
\func{bool}{GetCheckPrevious}{\void}
Returns TRUE if the memory allocator checks all previous memory blocks for errors.
By default, this is FALSE since it slows down execution considerably.
\wxheading{See also}
\helpref{wxDebugContext::SetCheckPrevious}{wxdebugcontextsetcheckprevious}
\membersection{wxDebugContext::GetDebugMode}\label{wxdebugcontextgetdebugmode}
\func{bool}{GetDebugMode}{\void}
Returns TRUE if debug mode is on. If debug mode is on, the wxObject new and delete
operators store or use information about memory allocation. Otherwise,
a straight malloc and free will be performed by these operators.
\wxheading{See also}
\helpref{wxDebugContext::SetDebugMode}{wxdebugcontextsetdebugmode}
\membersection{wxDebugContext::GetLevel}\label{wxdebugcontextgetlevel}
\func{int}{GetLevel}{\void}
Gets the debug level (default 1). The debug level is used by the wxTraceLevel function and
the WXTRACELEVEL macro to specify how detailed the trace information is; setting
a different level will only have an effect if trace statements in the application
specify a value other than one.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{See also}
\helpref{wxDebugContext::SetLevel}{wxdebugcontextsetlevel}
\membersection{wxDebugContext::GetStream}\label{wxdebugcontextgetstream}
\func{ostream\&}{GetStream}{\void}
Returns the output stream associated with the debug context.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{See also}
\helpref{wxDebugContext::SetStream}{wxdebugcontextsetstream}
\membersection{wxDebugContext::GetStreamBuf}\label{wxdebugcontextgetstreambuf}
\func{streambuf*}{GetStreamBuf}{\void}
Returns a pointer to the output stream buffer associated with the debug context.
There may not necessarily be a stream buffer if the stream has been set
by the user.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\membersection{wxDebugContext::HasStream}\label{wxdebugcontexthasstream}
\func{bool}{HasStream}{\void}
Returns TRUE if there is a stream currently associated
with the debug context.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{See also}
\helpref{wxDebugContext::SetStream}{wxdebugcontextsetstream}, \helpref{wxDebugContext::GetStream}{wxdebugcontextgetstream}
\membersection{wxDebugContext::PrintClasses}\label{wxdebugcontextprintclasses}
\func{bool}{PrintClasses}{\void}
Prints a list of the classes declared in this application, giving derivation
and whether instances of this class can be dynamically created.
\wxheading{See also}
\helpref{wxDebugContext::PrintStatistics}{wxdebugcontextprintstatistics}
\membersection{wxDebugContext::PrintStatistics}\label{wxdebugcontextprintstatistics}
\func{bool}{PrintStatistics}{\param{bool}{ detailed = TRUE}}
Performs a statistics analysis from the currently set checkpoint, writing
to the current debug stream. The number of object and non-object
allocations is printed, together with the total size.
\wxheading{Parameters}
\docparam{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.}
\wxheading{See also}
\helpref{wxDebugContext::PrintStatistics}{wxdebugcontextprintstatistics}
\membersection{wxDebugContext::SetCheckpoint}\label{wxdebugcontextsetcheckpoint}
\func{void}{SetCheckpoint}{\param{bool}{ all = FALSE}}
Sets the current checkpoint: Dump and PrintStatistics operations will
be performed from this point on. This allows you to ignore allocations
that have been performed up to this point.
\wxheading{Parameters}
\docparam{all}{If TRUE, the checkpoint is reset to include all
memory allocations since the program started.}
\membersection{wxDebugContext::SetCheckPrevious}\label{wxdebugcontextsetcheckprevious}
\func{void}{SetCheckPrevious}{\param{bool}{ check}}
Tells the memory allocator to check all previous memory blocks for errors.
By default, this is FALSE since it slows down execution considerably.
\wxheading{See also}
\helpref{wxDebugContext::GetCheckPrevious}{wxdebugcontextgetcheckprevious}
\membersection{wxDebugContext::SetDebugMode}\label{wxdebugcontextsetdebugmode}
\func{void}{SetDebugMode}{\param{bool}{ debug}}
Sets the debug mode on or off. If debug mode is on, the wxObject new and delete
operators store or use information about memory allocation. Otherwise,
a straight malloc and free will be performed by these operators.
By default, debug mode is on if \_\_WXDEBUG\_\_ is defined. If the application
uses this function, it should make sure that all object memory allocated
is deallocated with the same value of debug mode. Otherwise, the
delete operator might try to look for memory information that does not
exist.
\wxheading{See also}
\helpref{wxDebugContext::GetDebugMode}{wxdebugcontextgetdebugmode}
\membersection{wxDebugContext::SetFile}\label{wxdebugcontextsetfile}
\func{bool}{SetFile}{\param{const wxString\& }{filename}}
Sets the current debug file and creates a stream. This will delete any existing
stream and stream buffer. By default, the debug context stream
outputs to the debugger (Windows) or standard error (other platforms).
\membersection{wxDebugContext::SetLevel}\label{wxdebugcontextsetlevel}
\func{void}{SetLevel}{\param{int}{ level}}
Sets the debug level (default 1). The debug level is used by the wxTraceLevel function and
the WXTRACELEVEL macro to specify how detailed the trace information is; setting
a different level will only have an effect if trace statements in the application
specify a value other than one.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{See also}
\helpref{wxDebugContext::GetLevel}{wxdebugcontextgetlevel}
\membersection{wxDebugContext::SetStandardError}\label{wxdebugcontextsetstandarderror}
\func{bool}{SetStandardError}{\void}
Sets the debugging stream to be the debugger (Windows) or standard error (other platforms).
This is the default setting. The existing stream will be flushed and deleted.
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\membersection{wxDebugContext::SetStream}\label{wxdebugcontextsetstream}
\func{void}{SetStream}{\param{ostream* }{stream}, \param{streambuf* }{streamBuf = NULL}}
Sets the stream and optionally, stream buffer associated with the debug context.
This operation flushes and deletes the existing stream (and stream buffer if any).
This is obsolete, replaced by \helpref{wxLog}{wxlog} functionality.
\wxheading{Parameters}
\docparam{stream}{Stream to associate with the debug context. Do not set this to NULL.}
\docparam{streamBuf}{Stream buffer to associate with the debug context.}
\wxheading{See also}
\helpref{wxDebugContext::GetStream}{wxdebugcontextgetstream}, \helpref{wxDebugContext::HasStream}{wxdebugcontexthasstream}
\section{\class{wxDebugStreamBuf}}\label{wxdebugstreambuf}
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 \helpref{wxLog}{wxlog} functionality.
\wxheading{Derived from}
streambuf
\wxheading{Include files}
<wx/memory.h>
\wxheading{Example}
\begin{verbatim}
wxDebugStreamBuf streamBuf;
ostream stream(&streamBuf);
stream << "Hello world!" << endl;
\end{verbatim}
\wxheading{See also}
\overview{Overview}{wxdebugcontextoverview}

View File

@@ -1,48 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dialevt.tex
%% Purpose: wxDialUpEvent documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 08.04.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDialUpEvent}}\label{wxdialupevent}
This is the event class for the dialup events sent by
\helpref{wxDialUpManager}{wxdialupmanager}.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dialup.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDialUpEvent::wxDialUpEvent}\label{wxdialupeventwxdialupevent}
\func{}{wxDialUpEvent}{\param{bool }{isConnected}, \param{bool }{isOwnEvent}}
Constructor is only used by \helpref{wxDialUpManager}{wxdialupmanager}.
\membersection{wxDialUpEvent::IsConnectedEvent}\label{wxdialupeventisconnectedevent}
\constfunc{bool}{IsConnectedEvent}{\void}
Is this a {\tt CONNECTED} or {\tt DISCONNECTED} event? In other words, does it
notify about transition from offline to online state or vice versa?
\membersection{wxDialUpEvent::IsOwnEvent}\label{wxdialupeventisownevent}
\constfunc{bool}{IsOwnEvent}{\void}
Does this event come from wxDialUpManager::Dial() or from some extrenal
process (i.e. does it result from our own attempt to establish the
connection)?

View File

@@ -1,421 +0,0 @@
\section{\class{wxDialog}}\label{wxdialog}
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 usually used to allow the user to make some choice or to answer a question.
\wxheading{Derived from}
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dialog.h>
\wxheading{Remarks}
There are two kinds of dialog -- {\it modal}\ and {\it modeless}. A modal dialog
blocks program flow and user input on other windows until it is dismissed,
whereas a modeless dialog behaves more like a frame in that program flow
continues, and input on other windows is still possible. To show a modal dialog
you should use \helpref{ShowModal}{wxdialogshowmodal} method while to show
dialog modelessly you simply use \helpref{Show}{wxdialogshow}, just as with the
frames.
Note that the modal dialogs are one of the very few examples of
wxWindow-derived objects which may be created on the stack and not on the heap.
In other words, although this code snippet
\begin{verbatim}
void AskUser()
{
MyAskDialog *dlg = new MyAskDialog(...);
if ( dlg->ShowModal() == wxID_OK )
...
//else: dialog was cancelled or some another button pressed
dlg->Destroy();
}
\end{verbatim}
works, you can also achieve the same result by using a simpler code fragment
below:
\begin{verbatim}
void AskUser()
{
MyAskDialog dlg(...);
if ( dlg.ShowModal() == wxID_OK )
...
// no need to call Destroy() here
}
\end{verbatim}
A dialog may be loaded from a wxWindows resource file (extension {\tt wxr}),
which may itself be created by Dialog Editor. For details, see
\helpref{The wxWindows resource system}{resourceformats},
\helpref{wxWindows resource functions}{resourcefuncs}
and the resource sample.
An application can define an \helpref{wxCloseEvent}{wxcloseevent} handler for
the dialog to respond to system close events.
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the dialog box.}
\twocolitem{\windowstyle{wxDEFAULT\_DIALOG\_STYLE}}{Equivalent to a combination of wxCAPTION and wxSYSTEM\_MENU (the latter is not used under Unix)}
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Display a resizeable frame around the window.}
\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Display a system menu.}
\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Display a thick frame around the window.}
\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{The dialog stays on top of all other windows (Windows only).}
\twocolitem{\windowstyle{wxNO\_3D}}{Under Windows, specifies that the child controls
should not have 3D borders unless specified in the control.}
\twocolitem{\windowstyle{wxDIALOG\_NO\_PARENT}}{By default, the dialogs created
with {\tt NULL} parent window will be given the
\helpref{applications top level window}{wxappgettopwindow} as parent. Use this
style to prevent this from happening and create a really orphan dialog (note
that this is not recommended for modal dialogs).}
\twocolitem{\windowstyle{wxDIALOG\_EX\_CONTEXTHELP}}{Under Windows, puts a query button on the
caption. When pressed, Windows will go into a context-sensitive help mode and wxWindows will send
a wxEVT\_HELP event if the user clicked on an application window. {\it Note}\ that this is an extended
style and must be set by calling \helpref{SetExtraStyle}{wxwindowsetextrastyle} before Create is called (two-step construction).}
\end{twocollist}
Under Unix or Linux, MWM (the Motif Window Manager) or other window managers
recognizing the MHM hints should be running for any of these styles to have an
effect.
See also \helpref{Generic window styles}{windowstyles}.
\wxheading{See also}
\helpref{wxDialog overview}{wxdialogoverview}, \helpref{wxFrame}{wxframe}, \helpref{Resources}{resources},\rtfsp
\helpref{Validator overview}{validatoroverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDialog::wxDialog}\label{wxdialogconstr}
\func{}{wxDialog}{\void}
Default constructor.
\func{}{wxDialog}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
\param{const wxString\& }{title},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxDEFAULT\_DIALOG\_STYLE},\rtfsp
\param{const wxString\& }{name = ``dialogBox"}}
Constructor.
\wxheading{Parameters}
\docparam{parent}{Can be NULL, a frame or another dialog box.}
\docparam{id}{An identifier for the dialog. A value of -1 is taken to mean a default.}
\docparam{title}{The title of the dialog.}
\docparam{pos}{The dialog position. A value of (-1, -1) indicates a default position, chosen by
either the windowing system or wxWindows, depending on platform.}
\docparam{size}{The dialog size. A value of (-1, -1) indicates a default size, chosen by
either the windowing system or wxWindows, depending on platform.}
\docparam{style}{The window style. See \helpref{wxDialog}{wxdialog}.}
\docparam{name}{Used to associate a name with the window,
allowing the application user to set Motif resource values for
individual dialog boxes.}
\wxheading{See also}
\helpref{wxDialog::Create}{wxdialogcreate}
\membersection{wxDialog::\destruct{wxDialog}}
\func{}{\destruct{wxDialog}}{\void}
Destructor. Deletes any child windows before deleting the physical window.
\membersection{wxDialog::Centre}\label{wxdialogcentre}
\func{void}{Centre}{\param{int}{ direction = wxBOTH}}
Centres the dialog box on the display.
\wxheading{Parameters}
\docparam{direction}{May be {\tt wxHORIZONTAL}, {\tt wxVERTICAL} or {\tt wxBOTH}.}
\membersection{wxDialog::Create}\label{wxdialogcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
\param{const wxString\& }{title},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxDEFAULT\_DIALOG\_STYLE},\rtfsp
\param{const wxString\& }{name = ``dialogBox"}}
Used for two-step dialog box construction. See \helpref{wxDialog::wxDialog}{wxdialogconstr}\rtfsp
for details.
\membersection{wxDialog::EndModal}\label{wxdialogendmodal}
\func{void}{EndModal}{\param{int }{retCode}}
Ends a modal dialog, passing a value to be returned from the \helpref{wxDialog::ShowModal}{wxdialogshowmodal}\rtfsp
invocation.
\wxheading{Parameters}
\docparam{retCode}{The value that should be returned by {\bf ShowModal}.}
\wxheading{See also}
\helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp
\helpref{wxDialog::GetReturnCode}{wxdialoggetreturncode},\rtfsp
\helpref{wxDialog::SetReturnCode}{wxdialogsetreturncode}
\membersection{wxDialog::GetReturnCode}\label{wxdialoggetreturncode}
\func{int}{GetReturnCode}{\void}
Gets the return code for this window.
\wxheading{Remarks}
A return code is normally associated with a modal dialog, where \helpref{wxDialog::ShowModal}{wxdialogshowmodal} returns
a code to the application.
\wxheading{See also}
\helpref{wxDialog::SetReturnCode}{wxdialogsetreturncode}, \helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp
\helpref{wxDialog::EndModal}{wxdialogendmodal}
\membersection{wxDialog::GetTitle}\label{wxdialoggettitle}
\constfunc{wxString}{GetTitle}{\void}
Returns the title of the dialog box.
\membersection{wxDialog::Iconize}\label{wxdialogiconized}
\func{void}{Iconize}{\param{const bool}{ iconize}}
Iconizes or restores the dialog. Windows only.
\wxheading{Parameters}
\docparam{iconize}{If TRUE, iconizes the dialog box; if FALSE, shows and restores it.}
\wxheading{Remarks}
Note that in Windows, iconization has no effect since dialog boxes cannot be
iconized. However, applications may need to explicitly restore dialog
boxes under Motif which have user-iconizable frames, and under Windows
calling {\tt Iconize(FALSE)} will bring the window to the front, as does
\rtfsp{\tt Show(TRUE)}.
\membersection{wxDialog::IsIconized}\label{wxdialogisiconized}
\constfunc{bool}{IsIconized}{\void}
Returns TRUE if the dialog box is iconized. Windows only.
\wxheading{Remarks}
Always returns FALSE under Windows since dialogs cannot be iconized.
\membersection{wxDialog::IsModal}\label{wxdialogismodal}
\constfunc{bool}{IsModal}{\void}
Returns TRUE if the dialog box is modal, FALSE otherwise.
\membersection{wxDialog::OnCharHook}\label{wxdialogoncharhook}
\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}}
This member is called to allow the window to intercept keyboard events
before they are processed by child windows.
%For more information, see \helpref{wxWindow::OnCharHook}{wxwindowoncharhook}
\wxheading{Remarks}
wxDialog implements this handler to fake a cancel command if the escape key has been
pressed. This will dismiss the dialog.
\membersection{wxDialog::OnApply}\label{wxdialogonapply}
\func{void}{OnApply}{\param{wxCommandEvent\& }{event}}
The default handler for the wxID\_APPLY identifier.
\wxheading{Remarks}
This function calls \helpref{wxWindow::Validate}{wxwindowvalidate} and \helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow}.
\wxheading{See also}
\helpref{wxDialog::OnOK}{wxdialogonok}, \helpref{wxDialog::OnCancel}{wxdialogoncancel}
\membersection{wxDialog::OnCancel}\label{wxdialogoncancel}
\func{void}{OnCancel}{\param{wxCommandEvent\& }{event}}
The default handler for the wxID\_CANCEL identifier.
\wxheading{Remarks}
The function either calls {\bf EndModal(wxID\_CANCEL)} if the dialog is modal, or
sets the return value to wxID\_CANCEL and calls {\bf Show(FALSE)} if the dialog is modeless.
\wxheading{See also}
\helpref{wxDialog::OnOK}{wxdialogonok}, \helpref{wxDialog::OnApply}{wxdialogonapply}
\membersection{wxDialog::OnOK}\label{wxdialogonok}
\func{void}{OnOK}{\param{wxCommandEvent\& }{event}}
The default handler for the wxID\_OK identifier.
\wxheading{Remarks}
The function calls
\rtfsp\helpref{wxWindow::Validate}{wxwindowvalidate}, then \helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow}.
If this returns TRUE, the function either calls {\bf EndModal(wxID\_OK)} if the dialog is modal, or
sets the return value to wxID\_OK and calls {\bf Show(FALSE)} if the dialog is modeless.
\wxheading{See also}
\helpref{wxDialog::OnCancel}{wxdialogoncancel}, \helpref{wxDialog::OnApply}{wxdialogonapply}
\membersection{wxDialog::OnSysColourChanged}\label{wxdialogonsyscolourchanged}
\func{void}{OnSysColourChanged}{\param{wxSysColourChangedEvent\& }{event}}
The default handler for wxEVT\_SYS\_COLOUR\_CHANGED.
\wxheading{Parameters}
\docparam{event}{The colour change event.}
\wxheading{Remarks}
Changes the dialog's colour to conform to the current settings (Windows only).
Add an event table entry for your dialog class if you wish the behaviour
to be different (such as keeping a user-defined
background colour). If you do override this function, call wxEvent::Skip to
propagate the notification to child windows and controls.
\wxheading{See also}
\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}
\membersection{wxDialog::SetIcon}\label{wxdialogseticon}
\func{void}{SetIcon}{\param{const wxIcon\& }{icon}}
Sets the icon for this dialog.
\wxheading{Parameters}
\docparam{icon}{The icon to associate with this dialog.}
See also \helpref{wxIcon}{wxicon}.
\membersection{wxDialog::SetIcons}\label{wxdialogseticons}
\func{void}{SetIcons}{\param{const wxIconBundle\& }{icons}}
Sets the icons for this dialog.
\wxheading{Parameters}
\docparam{icons}{The icons to associate with this dialog.}
See also \helpref{wxIconBundle}{wxiconbundle}.
\membersection{wxDialog::SetModal}\label{wxdialogsetmodal}
\func{void}{SetModal}{\param{const bool}{ flag}}
{\bf NB:} This function is deprecated and doesn't work for all ports, just use
\helpref{ShowModal}{wxdialogshowmodal} to show a modal dialog instead.
Allows the programmer to specify whether the dialog box is modal (wxDialog::Show blocks control
until the dialog is hidden) or modeless (control returns immediately).
\wxheading{Parameters}
\docparam{flag}{If TRUE, the dialog will be modal, otherwise it will be modeless.}
\membersection{wxDialog::SetReturnCode}\label{wxdialogsetreturncode}
\func{void}{SetReturnCode}{\param{int }{retCode}}
Sets the return code for this window.
\wxheading{Parameters}
\docparam{retCode}{The integer return code, usually a control identifier.}
\wxheading{Remarks}
A return code is normally associated with a modal dialog, where \helpref{wxDialog::ShowModal}{wxdialogshowmodal} returns
a code to the application. The function \helpref{wxDialog::EndModal}{wxdialogendmodal} calls {\bf SetReturnCode}.
\wxheading{See also}
\helpref{wxDialog::GetReturnCode}{wxdialoggetreturncode}, \helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp
\helpref{wxDialog::EndModal}{wxdialogendmodal}
\membersection{wxDialog::SetTitle}\label{wxdialogsettitle}
\func{void}{SetTitle}{\param{const wxString\& }{ title}}
Sets the title of the dialog box.
\wxheading{Parameters}
\docparam{title}{The dialog box title.}
\membersection{wxDialog::Show}\label{wxdialogshow}
\func{bool}{Show}{\param{const bool}{ show}}
Hides or shows the dialog.
\wxheading{Parameters}
\docparam{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.}
\wxheading{Remarks}
The preferred way of dismissing a modal dialog is to use \helpref{wxDialog::EndModal}{wxdialogendmodal}.
\membersection{wxDialog::ShowModal}\label{wxdialogshowmodal}
\func{int}{ShowModal}{\void}
Shows a modal dialog. Program flow does not return until the dialog has been dismissed with\rtfsp
\helpref{wxDialog::EndModal}{wxdialogendmodal}.
\wxheading{Return value}
The return value is the value set with \helpref{wxDialog::SetReturnCode}{wxdialogsetreturncode}.
\wxheading{See also}
\helpref{wxDialog::EndModal}{wxdialogendmodal},\rtfsp
\helpref{wxDialog:GetReturnCode}{wxdialoggetreturncode},\rtfsp
\helpref{wxDialog::SetReturnCode}{wxdialogsetreturncode}

View File

@@ -1,215 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dialup.tex
%% Purpose: wxDialUpManager documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 08.04.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDialUpManager}}\label{wxdialupmanager}
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 wxWindows classes in that there is at most
one instance of this class in the program accessed via
\helpref{wxDialUpManager::Create()}{wxdialupmanagercreate} and you can't
create the objects of this class directly.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/dialup.h>
\wxheading{Event table macros}
To be notified about the change in the network connection status, use these
event handler macros to direct input to member functions that take a
\helpref{wxDialUpEvent}{wxdialupevent} argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_DIALUP\_CONNECTED(func)}}{A connection with the network was established.}
\twocolitem{{\bf EVT\_DIALUP\_DISCONNECTED(func)}}{The connection with the network was lost.}
\end{twocollist}%
\wxheading{See also}
\helpref{dialup sample}{sampledialup}\\
\helpref{wxDialUpEvent}{wxdialupevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDialUpManager::Create}\label{wxdialupmanagercreate}
\func{wxDialUpManager*}{Create}{\void}
This function should create and return the object of the platform-specific
class derived from wxDialUpManager. You should delete the pointer when you are
done with it.
\membersection{wxDialUpManager::IsOk}\label{wxdialupmanagerisok}
\constfunc{bool}{IsOk}{\void}
Returns {\tt TRUE} if the dialup manager was initialized correctly. If this
function returns {\tt FALSE}, no other functions will work neither, so it is a
good idea to call this function and check its result before calling any other
wxDialUpManager methods
\membersection{wxDialUpManager::\destruct{wxDialUpManager}}\label{wxdialupmanagerdtor}
\func{}{\destruct{wxDialUpManager}}{\void}
Destructor.
\membersection{wxDialUpManager::GetISPNames}\label{wxdialupmanagergetispnames}
\constfunc{size\_t}{GetISPNames}{\param{wxArrayString\& }{names}}
This function is only implemented under Windows.
Fills the array with the names of all possible values for the first
parameter to \helpref{Dial()}{wxdialupmanagerdial} on this machine and returns
their number (may be $0$).
\membersection{wxDialUpManager::Dial}\label{wxdialupmanagerdial}
\func{bool}{Dial}{\param{const wxString\& }{nameOfISP = wxEmptyString}, \param{const wxString\& }{username = wxEmptyString}, \param{const wxString\& }{password = wxEmptyString}, \param{bool }{async = TRUE}}
Dial the given ISP, use {\it username} and {\it password} to authenticate.
The parameters are only used under Windows currently, for Unix you should use
\helpref{SetConnectCommand}{wxdialupmanagersetconnectcommand} to customize this
functions behaviour.
If no {\it nameOfISP} is given, the function will select the default one
(proposing the user to choose among all connections defined on this machine)
and if no username and/or password are given, the function will try to do
without them, but will ask the user if really needed.
If {\it async} parameter is {\tt FALSE}, the function waits until the end of dialing
and returns {\tt TRUE} upon successful completion.
If {\it async} is {\tt TRUE}, the function only initiates the connection and
returns immediately - the result is reported via events (an event is sent
anyhow, but if dialing failed it will be a DISCONNECTED one).
\membersection{wxDialUpManager::IsDialing}\label{wxdialupmanagerisdialing}
\constfunc{bool}{IsDialing}{\void}
Returns TRUE if (async) dialing is in progress.
\wxheading{See also}
\helpref{Dial}{wxdialupmanagerdial}
\membersection{wxDialUpManager::CancelDialing}\label{wxdialupmanagercanceldialing}
\func{bool}{CancelDialing}{\void}
Cancel dialing the number initiated with \helpref{Dial}{wxdialupmanagerdial}
with async parameter equal to {\tt TRUE}.
Note that this won't result in DISCONNECTED event being sent.
\wxheading{See also}
\helpref{IsDialing}{wxdialupmanagerisdialing}
\membersection{wxDialUpManager::HangUp}\label{wxdialupmanagerhangup}
\func{bool}{HangUp}{\void}
Hang up the currently active dial up connection.
\membersection{wxDialUpManager::IsAlwaysOnline}\label{wxdialupmanagerisalwaysonline}
\constfunc{bool}{IsAlwaysOnline}{\void}
Returns {\tt TRUE} if the computer has a permanent network connection (i.e. is
on a LAN) and so there is no need to use Dial() function to go online.
{\bf NB:} this functions tries to guess the result and it is not always
guaranteed to be correct, so it is better to ask user for
confirmation or give him a possibility to override it.
\membersection{wxDialUpManager::IsOnline}\label{wxdialupmanagerisonline}
\constfunc{bool}{IsOnline}{\void}
Returns {\tt 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
\helpref{SetWellKnownHost}{wxdialupmanagersetwellknownhost}) is reachable.
\membersection{wxDialUpManager::SetOnlineStatus}\label{wxdialupmanagersetonlinestatus}
\func{void}{SetOnlineStatus}{\param{bool }{isOnline = TRUE}}
Sometimes the built-in logic for determining the online status may fail,
so, in general, the user should be allowed to override it. This function
allows to forcefully set the online status - whatever our internal
algorithm may think about it.
\wxheading{See also}
\helpref{IsOnline}{wxdialupmanagerisonline}
\membersection{wxDialUpManager::EnableAutoCheckOnlineStatus}\label{wxdialupmanagerenableautocheckonlinestatus}
\func{bool}{EnableAutoCheckOnlineStatus}{\param{size\_t }{nSeconds = 60}}
Enable automatic checks for the connection status and sending of
{\tt 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
notification about the change of connection status is sent by the system and so
we don't do any polling and this parameter is ignored.
Returns {\tt FALSE} if couldn't set up automatic check for online status.
\membersection{wxDialUpManager::DisableAutoCheckOnlineStatus}\label{wxdialupmanagerdisableautocheckonlinestatus}
\func{void}{DisableAutoCheckOnlineStatus}{\void}
Disable automatic check for connection status change - notice that the
{\tt wxEVT\_DIALUP\_XXX} events won't be sent any more neither.
\membersection{wxDialUpManager::SetWellKnownHost}\label{wxdialupmanagersetwellknownhost}
\func{void}{SetWellKnownHost}{\param{const wxString\& }{hostname}, \param{int }{portno = 80}}
This method is for Unix only.
Under Unix, the value of well-known host is used to check whether we're
connected to the internet. It is unused under Windows, but this function
is always safe to call. The default value is {\tt www.yahoo.com:80}.
\membersection{wxDialUpManager::SetConnectCommand}\label{wxdialupmanagersetconnectcommand}
\func{}{SetConnectCommand}{\param{const wxString\& }{commandDial = wxT("/usr/bin/pon")}, \param{const wxString\& }{commandHangup = wxT("/usr/bin/poff")}}
This method is for Unix only.
Sets the commands to start up the network and to hang up again.
\wxheading{See also}
\helpref{Dial}{wxdialupmanagerdial}

View File

@@ -1,180 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dir.tex
%% Purpose: wxDir documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 04.04.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDir}}\label{wxdir}
wxDir is a portable equivalent of Unix {open/read/close}dir functions which
allow enumerating of the files in a directory. wxDir allows enumerate files as
well as directories.
wxDir also provides a flexible way to enumerate files recursively using
\helpref{Traverse}{wxdirtraverse} or a simpler
\helpref{GetAllFiles}{wxdirgetallfiles} function.
Example of use:
\begin{verbatim}
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(&filename, filespec, flags);
while ( cont )
{
printf("%s\n", filename.c_str());
cont = dir.GetNext(&filename);
}
\end{verbatim}
\wxheading{Derived from}
No base class
\wxheading{Constants}
These flags define what kind of filenames is included in the list of files
enumerated by GetFirst/GetNext
{\small
\begin{verbatim}
enum
{
wxDIR_FILES = 0x0001, // include files
wxDIR_DIRS = 0x0002, // include directories
wxDIR_HIDDEN = 0x0004, // include hidden files
wxDIR_DOTDOT = 0x0008, // include '.' and '..'
// by default, enumerate everything except '.' and '..'
wxDIR_DEFAULT = wxDIR_FILES | wxDIR_DIRS | wxDIR_HIDDEN
}
\end{verbatim}
}
\wxheading{Include files}
<wx/dir.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDir::Exists}\label{wxdirexists}
\func{static bool}{Exists}{\param{const wxString\& }{dir}}
Test for existence of a directory with the given name
\membersection{wxDir::wxDir}\label{wxdirwxdir}
\func{}{wxDir}{\void}
Default constructor, use \helpref{Open()}{wxdiropen} afterwards.
\func{}{wxDir}{\param{const wxString\& }{dir}}
Opens the directory for enumeration, use \helpref{IsOpened()}{wxdirisopened}
to test for errors.
\membersection{wxDir::\destruct{wxDir}}\label{wxdirdtor}
\func{}{\destruct{wxDir}}{\void}
Destructor cleans up the associated resources. It is not virtual and so this
class is not meant to be used polymorphically.
\membersection{wxDir::Open}\label{wxdiropen}
\func{bool}{Open}{\param{const wxString\& }{dir}}
Open the directory for enumerating, returns TRUE on success or FALSE if an
error occurred.
\membersection{wxDir::IsOpened}\label{wxdirisopened}
\constfunc{bool}{IsOpened}{\void}
Returns TRUE if the directory was successfully opened by a previous call to
\helpref{Open}{wxdiropen}.
\membersection{wxDir::GetFirst}\label{wxdirgetfirst}
\constfunc{bool}{GetFirst}{\param{wxString* }{filename}, \param{const wxString\& }{filespec = wxEmptyString}, \param{int }{flags = wxDIR\_DEFAULT}}
Start enumerating all files matching {\it filespec} (or all files if it is
empty) and flags, return TRUE on success.
\membersection{wxDir::GetNext}\label{wxdirgetnext}
\constfunc{bool}{GetNext}{\param{wxString* }{filename}}
Continue enumerating files satisfying the criteria specified by the last call
to \helpref{GetFirst}{wxdirgetfirst}.
\membersection{wxDir::HasFiles}\label{wxdirhasfiles}
\func{bool}{HasFiles}{\param{const wxString\& }{filespec = wxEmptyString}}
Returns {\tt TRUE} if the directory contains any files matching the given
{\it filespec}. If {\it filespec} is empty, look for any files at all. In any
case, even hidden files are taken into account.
\membersection{wxDir::HasSubDirs}\label{wxdirhassubdirs}
\func{bool}{HasSubDirs}{\param{const wxString\& }{dirspec = wxEmptyString}}
Returns {\tt TRUE} if the directory contains any subdirectories (if a non
empty {\it filespec} is given, only check for directories matching it).
The hidden subdirectories are taken into account as well.
\membersection{wxDir::Traverse}\label{wxdirtraverse}
\func{size\_t}{Traverse}{\param{wxDirTraverser\& }{sink}, \param{const wxString\& }{filespec = wxEmptyString}, \param{int }{flags = wxDIR\_DEFAULT}}
Enumerate all files and directories under the given directory recursively
calling the element of the provided \helpref{wxDirTraverser}{wxdirtraverser}
object for each of them.
More precisely, the function will really recurse into subdirectories if
{\it flags} contains {\tt wxDIR\_DIRS} flag. It will ignore the files (but
still possibly recurse into subdirectories) if {\tt wxDIR\_FILES} flag is
given.
For each found directory, \helpref{sink.OnDir()}{wxdirtraverserondir} is called
and \helpref{sink.OnFile()}{wxdirtraverseronfile} is called for every file.
Depending on the return value, the enumeration may continue or stop.
The function returns the total number of files found or {\tt (size\_t)-1} on
error.
See also: \helpref{GetAllFiles}{wxdirgetallfiles}
\membersection{wxDir::GetAllFiles}\label{wxdirgetallfiles}
\func{static size\_t}{GetAllFiles}{\param{const wxString\& }{dirname}, \param{wxArrayString *}{files}, \param{const wxString\& }{filespec = wxEmptyString}, \param{int }{flags = wxDIR\_DEFAULT}}
The function appends the names of all the files under directory {\it dirname}
to the array {\it files} (note that its old contents is preserved). Only files
matching the {\it filespec} are taken, with empty spec matching all the files.
The {\it flags} parameter should always include {\tt wxDIR\_FILES} or the array
would be unchanged and should include {\tt wxDIR\_DIRS} flag to recurse into
subdirectories (both flags are included in the value by default).
See also: \helpref{Traverse}{wxdirtraverse}

View File

@@ -1,171 +0,0 @@
\section{\class{wxGenericDirCtrl}}\label{wxgenericdirctrl}
This control can be used to place a directory listing (with optional files) on an arbitrary window.
The control contains a \helpref{wxTreeCtrl}{wxtreectrl} window representing the directory
hierarchy, and optionally, a \helpref{wxChoice}{wxchoice} window containing a list of filters.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dirctrl.h>
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{\indexit{wxDIRCTRL\_DIR\_ONLY}}{Only show directories, and not files.}
\twocolitem{\indexit{wxDIRCTRL\_3D\_INTERNAL}}{Use 3D borders for internal controls.}
\twocolitem{\indexit{wxDIRCTRL\_SELECT\_FIRST}}{When setting the default path, select the first file in the directory.}
\twocolitem{\indexit{wxDIRCTRL\_SHOW\_FILTERS}}{Show the drop-down filter list.}
\twocolitem{\indexit{wxDIRCTRL\_EDIT\_LABELS}}{Allow the folder and file labels to be editable.}
\end{twocollist}
See also \helpref{Generic window styles}{windowstyles}.
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxGenericDirCtrl::wxGenericDirCtrl}\label{wxgenericdirctrlwxgenericdirctrl}
\func{}{wxGenericDirCtrl}{\void}
Default constructor.
\func{}{wxGenericDirCtrl}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id = -1},
\param{const wxString\& }{dir = wxDirDialogDefaultFolderStr}, \param{const wxPoint\& }{pos = wxDefaultPosition},
\param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxDIRCTRL\_3D\_INTERNAL|wxSUNKEN\_BORDER},
\param{const wxString\& }{filter = wxEmptyString},
\param{int }{defaultFilter = 0},
\param{const wxString\& }{name = wxTreeCtrlNameStr}}
Main constructor.
\wxheading{Parameters}
\docparam{parent}{Parent window.}
\docparam{id}{Window identifier.}
\docparam{dir}{Initial folder.}
\docparam{pos}{Position.}
\docparam{size}{Size.}
\docparam{style}{Window style. Please see \helpref{wxGenericDirCtrl}{wxgenericdirctrl} for a list of possible styles.}
\docparam{filter}{A filter string, using the same syntax as that for \helpref{wxFileDialog}{wxfiledialog}. This may be empty if filters
are not being used.
Example: ``All files (*.*)|*.*|JPEG files (*.jpg)|*.jpg"}
\docparam{defaultFilter}{The zero-indexed default filter setting.}
\docparam{name}{The window name.}
\membersection{wxGenericDirCtrl::\destruct{wxGenericDirCtrl}}\label{wxgenericdirctrldtor}
\func{}{\destruct{wxGenericDirCtrl}}{\void}
Destructor.
\membersection{wxGenericDirCtrl::Create}\label{wxgenericdirctrlcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id = -1}, \param{const wxString\& }{dir = wxDirDialogDefaultFolderStr}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxDIRCTRL\_3D\_INTERNAL|wxSUNKEN\_BORDER}, \param{const wxString\& }{filter = wxEmptyString}, \param{int }{defaultFilter = 0}, \param{const wxString\& }{name = wxTreeCtrlNameStr}}
Create function for two-step construction. See \helpref{wxGenericDirCtrl::wxGenericDirCtrl}{wxgenericdirctrlwxgenericdirctrl} for details.
\membersection{wxGenericDirCtrl::Init}\label{wxgenericdirctrlinit}
\func{void}{Init}{\void}
Initializes variables.
\membersection{wxGenericDirCtrl::ExpandPath}\label{wxgenericdirctrlexpandpath}
\func{bool}{ExpandPath}{\param{const wxString\& }{path}}
Tries to expand as much of the given path as possible, so that the filename or directory is visible in the tree control.
\membersection{wxGenericDirCtrl::GetDefaultPath}\label{wxgenericdirctrlgetdefaultpath}
\constfunc{wxString}{GetDefaultPath}{\void}
Gets the default path.
\membersection{wxGenericDirCtrl::GetPath}\label{wxgenericdirctrlgetpath}
\constfunc{wxString}{GetPath}{\void}
Gets the currently-selected directory or filename.
\membersection{wxGenericDirCtrl::GetFilePath}\label{wxgenericdirctrlgetfilepath}
\constfunc{wxString}{GetFilePath}{\void}
Gets selected filename path only (else empty string).
This function doesn't count a directory as a selection.
\membersection{wxGenericDirCtrl::GetFilter}\label{wxgenericdirctrlgetfilter}
\constfunc{wxString}{GetFilter}{\void}
Returns the filter string.
\membersection{wxGenericDirCtrl::GetFilterIndex}\label{wxgenericdirctrlgetfilterindex}
\constfunc{int}{GetFilterIndex}{\void}
Returns the current filter index (zero-based).
\membersection{wxGenericDirCtrl::GetFilterListCtrl}\label{wxgenericdirctrlgetfilterlistctrl}
\constfunc{wxDirFilterListCtrl*}{GetFilterListCtrl}{\void}
Returns a pointer to the filter list control (if present).
\membersection{wxGenericDirCtrl::GetRootId}\label{wxgenericdirctrlgetrootid}
\func{wxTreeItemId}{GetRootId}{\void}
Returns the root id for the tree control.
\membersection{wxGenericDirCtrl::GetTreeCtrl}\label{wxgenericdirctrlgettreectrl}
\constfunc{wxTreeCtrl*}{GetTreeCtrl}{\void}
Returns a pointer to the tree control.
\membersection{wxGenericDirCtrl::SetDefaultPath}\label{wxgenericdirctrlsetdefaultpath}
\func{void}{SetDefaultPath}{\param{const wxString\& }{path}}
Sets the default path.
\membersection{wxGenericDirCtrl::SetFilter}\label{wxgenericdirctrlsetfilter}
\func{void}{SetFilter}{\param{const wxString\& }{filter}}
Sets the filter string.
\membersection{wxGenericDirCtrl::SetFilterIndex}\label{wxgenericdirctrlsetfilterindex}
\func{void}{SetFilterIndex}{\param{int }{n}}
Sets the current filter index (zero-based).
\membersection{wxGenericDirCtrl::SetPath}\label{wxgenericdirctrlsetpath}
\func{void}{SetPath}{\param{const wxString\& }{path}}
Sets the current path.

View File

@@ -1,111 +0,0 @@
\section{\class{wxDirDialog}}\label{wxdirdialog}
This class represents the directory chooser dialog.
\wxheading{Derived from}
\helpref{wxDialog}{wxdialog}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dirdlg.h>
<wx/generic/dirdlgg.h>
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{\indexit{wxDD\_NEW\_DIR\_BUTTON}}{Add "Create new
directory" button and allow directory names to be editable. On
Windows the new directory button is only available with recent
versions of the common dialogs.}
\end{twocollist}
See also \helpref{Generic window styles}{windowstyles}.
\wxheading{See also}
\helpref{wxDirDialog overview}{wxdirdialogoverview}, \helpref{wxFileDialog}{wxfiledialog}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDirDialog::wxDirDialog}\label{wxdirdialogconstr}
\func{}{wxDirDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message = "Choose a directory"},\rtfsp
\param{const wxString\& }{defaultPath = ""}, \param{long }{style = 0},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{const wxString\& }{name = "wxDirCtrl"}}
Constructor. Use \helpref{wxDirDialog::ShowModal}{wxdirdialogshowmodal} to show
the dialog.
\wxheading{Parameters}
\docparam{parent}{Parent window.}
\docparam{message}{Message to show on the dialog.}
\docparam{defaultPath}{The default path, or the empty string.}
\docparam{style}{A dialog style, currently unused.}
\docparam{pos}{Dialog position. Ignored under Windows.}
\docparam{size}{Dialog size. Ignored under Windows.}
\docparam{name}{The dialog name, not used.}
\membersection{wxDirDialog::\destruct{wxDirDialog}}
\func{}{\destruct{wxDirDialog}}{\void}
Destructor.
\membersection{wxDirDialog::GetPath}\label{wxdirdialoggetpath}
\constfunc{wxString}{GetPath}{\void}
Returns the default or user-selected path.
\membersection{wxDirDialog::GetMessage}\label{wxdirdialoggetmessage}
\constfunc{wxString}{GetMessage}{\void}
Returns the message that will be displayed on the dialog.
\membersection{wxDirDialog::GetStyle}\label{wxdirdialoggetstyle}
\constfunc{long}{GetStyle}{\void}
Returns the dialog style.
\membersection{wxDirDialog::SetMessage}\label{wxdirdialogsetmessage}
\func{void}{SetMessage}{\param{const wxString\& }{message}}
Sets the message that will be displayed on the dialog.
\membersection{wxDirDialog::SetPath}\label{wxdirdialogsetpath}
\func{void}{SetPath}{\param{const wxString\& }{path}}
Sets the default path.
\membersection{wxDirDialog::SetStyle}\label{wxdirdialogsetstyle}
\func{void}{SetStyle}{\param{long }{style}}
Sets the dialog style. This is currently unused.
\membersection{wxDirDialog::ShowModal}\label{wxdirdialogshowmodal}
\func{int}{ShowModal}{\void}
Shows the dialog, returning wxID\_OK if the user pressed OK, and wxOK\_CANCEL
otherwise.

View File

@@ -1,91 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dirtrav.tex
%% Purpose: wxDirTraverser documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 14.01.02 (extracted from dir.tex)
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDirTraverser}}\label{wxdirtraverser}
wxDirTraverser is an abstract interface which must be implemented by objects
passed to \helpref{Traverse}{wxdirtraverse} function.
Example of use (this works almost like \helpref{GetAllFiles}{wxdirgetallfiles}):
\begin{verbatim}
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);
\end{verbatim}
\wxheading{Derived from}
No base class
\wxheading{Constants}
The elements of {\tt wxDirTraverseResult} are the possible return values of the
callback functions:
{\small
\begin{verbatim}
enum wxDirTraverseResult
{
wxDIR_IGNORE = -1, // ignore this directory but continue with others
wxDIR_STOP, // stop traversing
wxDIR_CONTINUE // continue into this directory
};
\end{verbatim}
}
\wxheading{Include files}
<wx/dir.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDirTraverser::OnFile}\label{wxdirtraverseronfile}
\func{virtual wxDirTraverseResult}{OnFile}{\param{const wxString\& }{filename}}
This function is called for each file. It may return {\tt wxDIR\_STOP} to abort
traversing (for example, if the file being searched is found) or
{\tt wxDIR\_CONTINUE} to proceed.
\membersection{wxDirTraverser::OnDir}\label{wxdirtraverserondir}
\func{virtual wxDirTraverseResult}{OnDir}{\param{const wxString\& }{dirname}}
This function is called for each directory. It may return {\tt wxSIR\_STOP}
to abort traversing completely, {\tt wxDIR\_IGNORE} to skip this directory but
continue with others or {\tt wxDIR\_CONTINUE} to enumerate all files and
subdirectories in this directory.

View File

@@ -1,147 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dllload.tex
%% Purpose: wxDllLoader documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 02.04.00
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDllLoader}}\label{wxdllloader}
wxDllLoader is a class providing an interface similar to Unix's {\tt
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 \helpref{wxDynamicLibrary}{wxdynamiclibrary} provides
alternative, friendlier interface to wxDllLoader.
The terms {\it DLL} and {\it shared library/object} will both be used in the
documentation to refer to the same thing: a {\tt .dll} file under Windows or
{\tt .so} or {\tt .sl} one under Unix.
Example of using this class to dynamically load the {\tt strlen()} function:
\begin{verbatim}
#if defined(__WXMSW__)
static const wxChar *LIB_NAME = _T("kernel32");
static const wxChar *FUNC_NAME = _T("lstrlenA");
#elif defined(__UNIX__)
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 )
{
... error ...
}
else
{
typedef int (*strlenType)(char *);
strlenType pfnStrlen = (strlenType)wxDllLoader::GetSymbol(dllHandle, FUNC_NAME);
if ( !pfnStrlen )
{
... error ...
}
else
{
if ( pfnStrlen("foo") != 3 )
{
... error ...
}
else
{
... ok! ...
}
}
wxDllLoader::UnloadLibrary(dllHandle);
}
\end{verbatim}
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/dynlib.h>
\wxheading{Data structures}
This header defines a platform-dependent {\tt wxDllType} typedef which stores
a handle to a loaded DLLs on the given platform.
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDllLoader::GetDllExt}\label{wxdllloadergetdllext}
\func{static wxString}{GetDllExt}{\void}
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 {\tt ".dll"} under Windows or (usually)
{\tt ".so"} under Unix.
\membersection{wxDllLoader::GetProgramHandle}\label{wxdllloadergetprogramhandle}
\func{wxDllType}{GetProgramHandle}{\void}
This function returns a valid handle for the main program itself. Notice that
the {\tt NULL} return value is valid for some systems (i.e. doesn't mean that
the function failed).
{\bf NB:} This function is Unix specific. It will always fail under Windows
or OS/2.
\membersection{wxDllLoader::GetSymbol}\label{wxdllloadergetsymbol}
\func{void *}{GetSymbol}{\param{wxDllType }{dllHandle}, \param{const wxString\& }{name}}
This function resolves a symbol in a loaded DLL, such as a variable or
function name.
Returned value will be {\tt NULL} if the symbol was not found in the DLL or if
an error occured.
\wxheading{Parameters}
\docparam{dllHandle}{Valid handle previously returned by
\helpref{LoadLibrary}{wxdllloaderloadlibrary}}
\docparam{name}{Name of the symbol.}
\membersection{wxDllLoader::LoadLibrary}\label{wxdllloaderloadlibrary}
\func{wxDllType}{LoadLibrary}{\param{const wxString \& }{libname}, \param{bool* }{success = NULL}}
This function loads a shared library into memory, with {\it libname} being the
name of the library: it may be either the full name including path and
(platform-dependent) extension, just the basename (no path and no extension)
or a basename with extension. In the last two cases, the library will be
searched in all standard locations.
Returns a handle to the loaded DLL. Use {\it success} parameter to test if it
is valid. If the handle is valid, the library must be unloaded later with
\helpref{UnloadLibrary}{wxdllloaderunloadlibrary}.
\wxheading{Parameters}
\docparam{libname}{Name of the shared object to load.}
\docparam{success}{May point to a bool variable which will be set to TRUE or
FALSE; may also be {\tt NULL}.}
\membersection{wxDllLoader::UnloadLibrary}\label{wxdllloaderunloadlibrary}
\func{void}{UnloadLibrary}{\param{wxDllType }{dllhandle}}
This function unloads the shared library. The handle {\it dllhandle} must have
been returned by \helpref{LoadLibrary}{wxdllloaderloadlibrary} previously.

View File

@@ -1,65 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dobjcomp.tex
%% Purpose: wxDataObjectComposite documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 02.11.99
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDataObjectComposite}}\label{wxdataobjectcomposite}
wxDataObjectComposite is the simplest
\helpref{wxDataObject}{wxdataobject} derivation which may be sued to support
multiple formats. It contains several
\helpref{wxDataObjectSimple}{wxdataobjectsimple} objects and supports any
format supported by at least one of them. Only one of these data objects is
{\it preferred} (the first one if not explicitly changed by using the second
parameter of \helpref{Add}{wxdataobjectcompositeadd}) and its format determines
the preferred format of the composite data object as well.
See \helpref{wxDataObject}{wxdataobject} documentation for the reasons why you
might prefer to use wxDataObject directly instead of wxDataObjectComposite for
efficiency reasons.
\wxheading{Virtual functions to override}
None, this class should be used directly.
\wxheading{Derived from}
\helpref{wxDataObject}{wxdataobject}
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{Clipboard and drag and drop overview}{wxdndoverview},
\helpref{wxDataObject}{wxdataobject},
\helpref{wxDataObjectSimple}{wxdataobjectsimple},
\helpref{wxFileDataObject}{wxfiledataobject},
\helpref{wxTextDataObject}{wxtextdataobject},
\helpref{wxBitmapDataObject}{wxbitmapdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataObjectComposite::wxDataObjectComposite}\label{wxdataobjectcompositewxdataobjectcomposite}
\func{}{wxDataObjectComposite}{\void}
The default constructor.
\membersection{wxDataObjectComposite::Add}\label{wxdataobjectcompositeadd}
\func{void}{Add}{
\param{wxDataObjectSimple }{*dataObject},
\param{bool }{preferred = FALSE}}
Adds the {\it dataObject} to the list of supported objects and it becomes the
preferred object if {\it preferred} is TRUE.

View File

@@ -1,104 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dobjsmpl.tex
%% Purpose: wxDataObjectSimple documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 02.11.99
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDataObjectSimple}}\label{wxdataobjectsimple}
This is the simplest possible implementation of the
\helpref{wxDataObject}{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.
\pythonnote{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.}
\perlnote{In wxPerl, you need to derive your data object class
from Wx::PlDataObjectSimple.}
\wxheading{Virtual functions to override}
The objects supporting rendering the data must override
\helpref{GetDataSize}{wxdataobjectsimplegetdatasize} and
\helpref{GetDataHere}{wxdataobjectsimplegetdatahere} while the objects which
may be set must override \helpref{SetData}{wxdataobjectsimplesetdata}. Of
course, the objects supporting both operations must override all three
methods.
\wxheading{Derived from}
\helpref{wxDataObject}{wxdataobject}
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{Clipboard and drag and drop overview}{wxdndoverview},
\helpref{DnD sample}{samplednd},
\helpref{wxFileDataObject}{wxfiledataobject},
\helpref{wxTextDataObject}{wxtextdataobject},
\helpref{wxBitmapDataObject}{wxbitmapdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataObjectSimple::wxDataObjectSimple}\label{wxdataobjectsimplewxdataobjectsimple}
\func{}{wxDataObjectSimple}{\param{const wxDataFormat\&}{ format = wxFormatInvalid}}
Constructor accepts the supported format (none by default) which may also be
set later with \helpref{SetFormat}{wxdataobjectsimplesetformat}.
\membersection{wxDataObjectSimple::GetFormat}\label{wxdataobjectsimplegetformat}
\constfunc{const wxDataFormat\&}{GetFormat}{\void}
Returns the (one and only one) format supported by this object. It is supposed
that the format is supported in both directions.
\membersection{wxDataObjectSimple::SetFormat}\label{wxdataobjectsimplesetformat}
\func{void}{SetFormat}{\param{const wxDataFormat\&}{ format}}
Sets the supported format.
\membersection{wxDataObjectSimple::GetDataSize}\label{wxdataobjectsimplegetdatasize}
\constfunc{virtual size\_t}{GetDataSize}{\void}
Gets the size of our data. Must be implemented in the derived class if the
object supports rendering its data.
\membersection{wxDataObjectSimple::GetDataHere}\label{wxdataobjectsimplegetdatahere}
\constfunc{virtual bool}{GetDataHere}{\param{void }{*buf}}
Copy the data to the buffer, return TRUE on success. Must be implemented in the
derived class if the object supports rendering its data.
\pythonnote{When implementing this method in wxPython, no additional
parameters are required and the data should be returned from the
method as a string.}
\membersection{wxDataObjectSimple::SetData}\label{wxdataobjectsimplesetdata}
\func{virtual bool}{SetData}{\param{size\_t }{len}, \param{const void }{*buf}}
Copy the data from the buffer, return TRUE on success. Must be implemented in
the derived class if the object supports setting its data.
\pythonnote{When implementing this method in wxPython, the data comes
as a single string parameter rather than the two shown here.}

View File

@@ -1,92 +0,0 @@
\section{\class{wxDocChildFrame}}\label{wxdocchildframe}
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 wxWindows,
and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument},
\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplate}{wxdoctemplate} classes.
See the example application in {\tt samples/docview}.
\wxheading{Derived from}
\helpref{wxFrame}{wxframe}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/docview.h>
\wxheading{See also}
\helpref{Document/view overview}{docviewoverview}, \helpref{wxFrame}{wxframe}
\membersection{wxDocChildFrame::m\_childDocument}
\member{wxDocument*}{m\_childDocument}
The document associated with the frame.
\membersection{wxDocChildFrame::m\_childView}
\member{wxView*}{m\_childView}
The view associated with the frame.
\membersection{wxDocChildFrame::wxDocChildFrame}
\func{}{wxDocChildFrame}{\param{wxDocument* }{doc}, \param{wxView* }{view}, \param{wxFrame* }{parent},
\param{wxWindowID}{ id}, \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
\param{const wxSize\&}{ size = wxDefaultSize},
\param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = ``frame"}}
Constructor.
\membersection{wxDocChildFrame::\destruct{wxDocChildFrame}}
\func{}{\destruct{wxDocChildFrame}}{\void}
Destructor.
\membersection{wxDocChildFrame::GetDocument}
\constfunc{wxDocument*}{GetDocument}{\void}
Returns the document associated with this frame.
\membersection{wxDocChildFrame::GetView}
\constfunc{wxView*}{GetView}{\void}
Returns the view associated with this frame.
\membersection{wxDocChildFrame::OnActivate}
\func{void}{OnActivate}{\param{wxActivateEvent}{ event}}
Sets the currently active view to be the frame's view. You may need
to override (but still call) this function in order to set the keyboard
focus for your subwindow.
\membersection{wxDocChildFrame::OnCloseWindow}
\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
Closes and deletes the current view and document.
\membersection{wxDocChildFrame::SetDocument}
\func{void}{SetDocument}{\param{wxDocument *}{doc}}
Sets the document for this frame.
\membersection{wxDocChildFrame::SetView}
\func{void}{SetView}{\param{wxView *}{view}}
Sets the view for this frame.

View File

@@ -1,424 +0,0 @@
\section{\class{wxDocManager}}\label{wxdocmanager}
The wxDocManager class is part of the document/view framework supported by wxWindows,
and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument}\rtfsp
and \helpref{wxDocTemplate}{wxdoctemplate} classes.
\wxheading{Derived from}
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/docview.h>
\wxheading{See also}
\helpref{wxDocManager overview}{wxdocmanageroverview}, \helpref{wxDocument}{wxdocument},\rtfsp
\helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate}, \helpref{wxFileHistory}{wxfilehistory}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDocManager::m\_currentView}
\member{wxView*}{m\_currentView}
The currently active view.
\membersection{wxDocManager::m\_defaultDocumentNameCounter}
\member{int}{m\_defaultDocumentNameCounter}
Stores the integer to be used for the next default document name.
\membersection{wxDocManager::m\_fileHistory}
\member{wxFileHistory*}{m\_fileHistory}
A pointer to an instance of \helpref{wxFileHistory}{wxfilehistory},
which manages the history of recently-visited files on the File menu.
\membersection{wxDocManager::m\_maxDocsOpen}
\member{int}{m\_maxDocsOpen}
Stores the maximum number of documents that can be opened before
existing documents are closed. By default, this is 10,000.
\membersection{wxDocManager::m\_docs}
\member{wxList}{m\_docs}
A list of all documents.
\membersection{wxDocManager::m\_flags}
\member{long}{m\_flags}
Stores the flags passed to the constructor.
\membersection{wxDocManager::m\_lastDirectory}
The directory last selected by the user when opening a file.
\member{wxFileHistory*}{m\_fileHistory}
\membersection{wxDocManager::m\_templates}
\member{wxList}{mnTemplates}
A list of all document templates.
\membersection{wxDocManager::wxDocManager}
\func{void}{wxDocManager}{\param{long}{ flags = wxDEFAULT\_DOCMAN\_FLAGS}, \param{bool}{ initialize = TRUE}}
Constructor. Create a document manager instance dynamically near the start of your application
before doing any document or view operations.
{\it flags} is currently unused.
If {\it initialize} is TRUE, the \helpref{Initialize}{wxdocmanagerinitialize} function will be called
to create a default history list object. If you derive from wxDocManager, you may wish to call the
base constructor with FALSE, and then call Initialize in your own constructor, to allow
your own Initialize or OnCreateFileHistory functions to be called.
\membersection{wxDocManager::\destruct{wxDocManager}}
\func{void}{\destruct{wxDocManager}}{\void}
Destructor.
\membersection{wxDocManager::ActivateView}
\func{void}{ActivateView}{\param{wxView* }{doc}, \param{bool}{ activate}, \param{bool}{ deleting}}
Sets the current view.
\membersection{wxDocManager::AddDocument}
\func{void}{AddDocument}{\param{wxDocument *}{doc}}
Adds the document to the list of documents.
\membersection{wxDocManager::AddFileToHistory}
\func{void}{AddFileToHistory}{\param{const wxString\& }{filename}}
Adds a file to the file history list, if we have a pointer to an appropriate file menu.
\membersection{wxDocManager::AssociateTemplate}
\func{void}{AssociateTemplate}{\param{wxDocTemplate *}{temp}}
Adds the template to the document manager's template list.
\membersection{wxDocManager::CloseDocuments}
\func{bool}{CloseDocuments}{\param{bool }{force = TRUE}}
Closes all currently opened documents.
\membersection{wxDocManager::CreateDocument}
\func{wxDocument*}{CreateDocument}{\param{const wxString\& }{path}, \param{long}{ flags}}
Creates a new document in a manner determined by the {\it flags} parameter, which can be:
\begin{itemize}\itemsep=0pt
\item wxDOC\_NEW Creates a fresh document.
\item wxDOC\_SILENT Silently loads the given document file.
\end{itemize}
If wxDOC\_NEW is present, a new document will be created and returned, possibly after
asking the user for a template to use if there is more than one document template.
If wxDOC\_SILENT is present, a new document will be created and the given file loaded
into it. If neither of these flags is present, the user will be presented with
a file selector for the file to load, and the template to use will be determined by the
extension (Windows) or by popping up a template choice list (other platforms).
If the maximum number of documents has been reached, this function
will delete the oldest currently loaded document before creating a new one.
\membersection{wxDocManager::CreateView}
\func{wxView*}{CreateView}{\param{wxDocument*}{doc}, \param{long}{ flags}}
Creates a new view for the given document. If more than one view is allowed for the
document (by virtue of multiple templates mentioning the same document type), a choice
of view is presented to the user.
\membersection{wxDocManager::DisassociateTemplate}
\func{void}{DisassociateTemplate}{\param{wxDocTemplate *}{temp}}
Removes the template from the list of templates.
\membersection{wxDocManager::FileHistoryAddFilesToMenu}\label{wxdocmanagerfilehistoryaddfilestomenu}
\func{void}{FileHistoryAddFilesToMenu}{\void}
Appends the files in the history list, to all menus managed by the file history object.
\func{void}{FileHistoryAddFilesToMenu}{\param{wxMenu*}{ menu}}
Appends the files in the history list, to the given menu only.
\membersection{wxDocManager::FileHistoryLoad}\label{wxdocmanagerfilehistoryload}
\func{void}{FileHistoryLoad}{\param{wxConfigBase\& }{config}}
Loads the file history from a config object.
\wxheading{See also}
\helpref{wxConfig}{wxconfigbase}
\membersection{wxDocManager::FileHistoryRemoveMenu}\label{wxdocmanagerfilehistoryremovemenu}
\func{void}{FileHistoryRemoveMenu}{\param{wxMenu*}{ menu}}
Removes the given menu from the list of menus managed by the file history object.
\membersection{wxDocManager::FileHistorySave}\label{wxdocmanagerfilehistorysave}
\func{void}{FileHistorySave}{\param{wxConfigBase\& }{resourceFile}}
Saves the file history into a config object. This must be called
explicitly by the application.
\wxheading{See also}
\helpref{wxConfig}{wxconfigbase}
\membersection{wxDocManager::FileHistoryUseMenu}\label{wxdocmanagerfilehistoryusemenu}
\func{void}{FileHistoryUseMenu}{\param{wxMenu*}{ menu}}
Use this menu for appending recently-visited document filenames, for convenient
access. Calling this function with a valid menu pointer enables the history
list functionality.
Note that you can add multiple menus using this function, to be managed by the
file history object.
\membersection{wxDocManager::FindTemplateForPath}
\func{wxDocTemplate *}{FindTemplateForPath}{\param{const wxString\& }{path}}
Given a path, try to find template that matches the extension. This is only
an approximate method of finding a template for creating a document.
\membersection{wxDocManager::GetCurrentDocument}
\func{wxDocument *}{GetCurrentDocument}{\void}
Returns the document associated with the currently active view (if any).
\membersection{wxDocManager::GetCurrentView}
\func{wxView *}{GetCurrentView}{\void}
Returns the currently active view
\membersection{wxDocManager::GetDocuments}
\func{wxList\&}{GetDocuments}{\void}
Returns a reference to the list of documents.
\membersection{wxDocManager::GetFileHistory}
\func{wxFileHistory *}{GetFileHistory}{\void}
Returns a pointer to file history.
\membersection{wxDocManager::GetLastDirectory}\label{wxdocmanagergetlastdirectory}
\constfunc{wxString}{GetLastDirectory}{\void}
Returns the directory last selected by the user when opening a file. Initially empty.
\membersection{wxDocManager::GetMaxDocsOpen}
\func{int}{GetMaxDocsOpen}{\void}
Returns the number of documents that can be open simultaneously.
\membersection{wxDocManager::GetNoHistoryFiles}
\func{int}{GetNoHistoryFiles}{\void}
Returns the number of files currently stored in the file history.
\membersection{wxDocManager::Initialize}\label{wxdocmanagerinitialize}
\func{bool}{Initialize}{\void}
Initializes data; currently just calls OnCreateFileHistory. Some data cannot
always be initialized in the constructor because the programmer must be given
the opportunity to override functionality. If OnCreateFileHistory was called
from the constructor, an overridden virtual OnCreateFileHistory would not be
called due to C++'s `interesting' constructor semantics. In fact Initialize
\rtfsp{\it is} called from the wxDocManager constructor, but this can be
vetoed by passing FALSE to the second argument, allowing the derived class's
constructor to call Initialize, possibly calling a different OnCreateFileHistory
from the default.
The bottom line: if you're not deriving from Initialize, forget it and
construct wxDocManager with no arguments.
\membersection{wxDocManager::MakeDefaultName}
\func{bool}{MakeDefaultName}{\param{const wxString\& }{buf}}
Copies a suitable default name into {\it buf}. This is implemented by
appending an integer counter to the string {\bf unnamed} and incrementing
the counter.
\membersection{wxDocManager::OnCreateFileHistory}
\func{wxFileHistory *}{OnCreateFileHistory}{\void}
A hook to allow a derived class to create a different type of file history. Called
from \helpref{Initialize}{wxdocmanagerinitialize}.
\membersection{wxDocManager::OnFileClose}
\func{void}{OnFileClose}{\void}
Closes and deletes the currently active document.
\membersection{wxDocManager::OnFileCloseAll}
\func{void}{OnFileCloseAll}{\void}
Closes and deletes all the currently opened documents.
\membersection{wxDocManager::OnFileNew}
\func{void}{OnFileNew}{\void}
Creates a document from a list of templates (if more than one template).
\membersection{wxDocManager::OnFileOpen}
\func{void}{OnFileOpen}{\void}
Creates a new document and reads in the selected file.
\membersection{wxDocManager::OnFileSave}
\func{void}{OnFileSave}{\void}
Saves the current document by calling wxDocument::Save for the current document.
\membersection{wxDocManager::OnFileSaveAs}
\func{void}{OnFileSaveAs}{\void}
Calls wxDocument::SaveAs for the current document.
\membersection{wxDocManager::OnMenuCommand}
\func{void}{OnMenuCommand}{\param{int}{ cmd}}
Processes menu commands routed from child or parent frames. This deals
with the following predefined menu item identifiers:
\begin{itemize}\itemsep=0pt
\item wxID\_OPEN Creates a new document and opens a file into it.
\item wxID\_CLOSE Closes the current document.
\item wxID\_CLOSE\_ALL Closes all documents.
\item wxID\_NEW Creates a new document.
\item wxID\_SAVE Saves the document.
\item wxID\_SAVE\_AS Saves the document into a specified filename.
\end{itemize}
Unrecognized commands are routed to the currently active wxView's OnMenuCommand.
\membersection{wxDocManager::RemoveDocument}
\func{void}{RemoveDocument}{\param{wxDocument *}{doc}}
Removes the document from the list of documents.
\membersection{wxDocManager::SelectDocumentPath}
\func{wxDocTemplate *}{SelectDocumentPath}{\param{wxDocTemplate **}{templates},
\param{int}{ noTemplates}, \param{const wxString\& }{path}, \param{const wxString\& }{bufSize},
\param{long}{ flags}, \param{bool}{ save}}
Under Windows, pops up a file selector with a list of filters corresponding to document templates.
The wxDocTemplate corresponding to the selected file's extension is returned.
On other platforms, if there is more than one document template a choice list is popped up,
followed by a file selector.
This function is used in wxDocManager::CreateDocument.
\perlnote{In wxPerl {\tt templates} is a reference to a list of templates.
If you override this method in your document manager it must return
two values, eg:\par
(doctemplate, path) = My::DocManager->SelectDocumentPath( ... );
}
\membersection{wxDocManager::SelectDocumentType}
\func{wxDocTemplate *}{SelectDocumentType}{\param{wxDocTemplate **}{templates},
\param{int}{ noTemplates}, \param{bool}{ sort=FALSE}}
Returns a document template by asking the user (if there is more than one template).
This function is used in wxDocManager::CreateDocument.
\wxheading{Parameters}
\docparam{templates}{Pointer to an array of templates from which to choose a desired template.}
\docparam{noTemplates}{Number of templates being pointed to by the {\it templates} pointer.}
\docparam{sort}{If more than one template is passed in in {\it 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.}
\perlnote{In wxPerl {\tt templates} is a reference to a list of templates.}
\membersection{wxDocManager::SelectViewType}
\func{wxDocTemplate *}{SelectViewType}{\param{wxDocTemplate **}{templates},
\param{int}{ noTemplates}, \param{bool}{ sort=FALSE}}
Returns a document template by asking the user (if there is more than one template),
displaying a list of valid views. This function is used in wxDocManager::CreateView.
The dialog normally will not appear because the array of templates only contains
those relevant to the document in question, and often there will only be one such.
\wxheading{Parameters}
\docparam{templates}{Pointer to an array of templates from which to choose a desired template.}
\docparam{noTemplates}{Number of templates being pointed to by the {\it templates} pointer.}
\docparam{sort}{If more than one template is passed in in {\it 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.}
\perlnote{In wxPerl {\tt templates} is a reference to a list of templates.}
\membersection{wxDocManager::SetLastDirectory}\label{wxdocmanagersetlastdirectory}
\func{void}{SetLastDirectory}{\param{const wxString\&}{ dir}}
Sets the directory to be displayed to the user when opening a file. Initially this is empty.
\membersection{wxDocManager::SetMaxDocsOpen}
\func{void}{SetMaxDocsOpen}{\param{int}{ n}}
Sets the maximum number of documents that can be open at a time. By default, this
is 10,000. If you set it to 1, existing documents will be saved and deleted
when the user tries to open or create a new one (similar to the behaviour
of Windows Write, for example). Allowing multiple documents gives behaviour
more akin to MS Word and other Multiple Document Interface applications.

View File

@@ -1,93 +0,0 @@
\section{\class{wxDocMDIChildFrame}}\label{wxdocmdichildframe}
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 wxWindows,
and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument},
\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplate}{wxdoctemplate} classes.
See the example application in {\tt samples/docview}.
\wxheading{Derived from}
\helpref{wxMDIChildFrame}{wxmdichildframe}\\
\helpref{wxFrame}{wxframe}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/docmdi.h>
\wxheading{See also}
\helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIChildFrame}{wxmdichildframe}
\membersection{wxDocMDIChildFrame::m\_childDocument}
\member{wxDocument*}{m\_childDocument}
The document associated with the frame.
\membersection{wxDocMDIChildFrame::m\_childView}
\member{wxView*}{m\_childView}
The view associated with the frame.
\membersection{wxDocMDIChildFrame::wxDocMDIChildFrame}
\func{}{wxDocMDIChildFrame}{\param{wxDocument* }{doc}, \param{wxView* }{view}, \param{wxFrame* }{parent},
\param{wxWindowID}{ id}, \param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
\param{const wxSize\&}{ size = wxDefaultSize},
\param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = ``frame"}}
Constructor.
\membersection{wxDocMDIChildFrame::\destruct{wxDocMDIChildFrame}}
\func{}{\destruct{wxDocMDIChildFrame}}{\void}
Destructor.
\membersection{wxDocMDIChildFrame::GetDocument}
\constfunc{wxDocument*}{GetDocument}{\void}
Returns the document associated with this frame.
\membersection{wxDocMDIChildFrame::GetView}
\constfunc{wxView*}{GetView}{\void}
Returns the view associated with this frame.
\membersection{wxDocMDIChildFrame::OnActivate}
\func{void}{OnActivate}{\param{wxActivateEvent}{ event}}
Sets the currently active view to be the frame's view. You may need
to override (but still call) this function in order to set the keyboard
focus for your subwindow.
\membersection{wxDocMDIChildFrame::OnCloseWindow}
\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
Closes and deletes the current view and document.
\membersection{wxDocMDIChildFrame::SetDocument}
\func{void}{SetDocument}{\param{wxDocument *}{doc}}
Sets the document for this frame.
\membersection{wxDocMDIChildFrame::SetView}
\func{void}{SetView}{\param{wxView *}{view}}
Sets the view for this frame.

View File

@@ -1,65 +0,0 @@
\section{\class{wxDocMDIParentFrame}}\label{wxdocmdiparentframe}
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 \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument},
\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplates}{wxdoctemplate} classes.
See the example application in {\tt samples/docview}.
\wxheading{Derived from}
\helpref{wxMDIParentFrame}{wxmdiparentframe}\\
\helpref{wxFrame}{wxframe}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/docmdi.h>
\wxheading{See also}
\helpref{Document/view overview}{docviewoverview}, \helpref{wxMDIParentFrame}{wxmdiparentframe}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDocMDIParentFrame::wxDocMDIParentFrame}
\func{}{wxDocParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
\param{const wxSize\&}{ size = wxDefaultSize},
\param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
Constructor.
\membersection{wxDocMDIParentFrame::\destruct{wxDocMDIParentFrame}}
\func{}{\destruct{wxDocMDIParentFrame}}{\void}
Destructor.
\membersection{wxDocMDIParentFrame::OnCloseWindow}
\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
Deletes all views and documents. If no user input cancelled the
operation, the frame will be destroyed and the application will exit.
Since understanding how document/view clean-up takes place can be difficult,
the implementation of this function is shown below.
\begin{verbatim}
void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
{
if (m_docManager->Clear(!event.CanVeto()))
{
this->Destroy();
}
else
event.Veto();
}
\end{verbatim}

View File

@@ -1,64 +0,0 @@
\section{\class{wxDocParentFrame}}\label{wxdocparentframe}
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 \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument},
\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplates}{wxdoctemplate} classes.
See the example application in {\tt samples/docview}.
\wxheading{Derived from}
\helpref{wxFrame}{wxframe}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/docview.h>
\wxheading{See also}
\helpref{Document/view overview}{docviewoverview}, \helpref{wxFrame}{wxframe}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDocParentFrame::wxDocParentFrame}
\func{}{wxDocParentFrame}{\param{wxDocManager*}{ manager}, \param{wxFrame *}{parent}, \param{wxWindowID}{ id},
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
\param{const wxSize\&}{ size = wxDefaultSize},
\param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = "frame"}}
Constructor.
\membersection{wxDocParentFrame::\destruct{wxDocParentFrame}}
\func{}{\destruct{wxDocParentFrame}}{\void}
Destructor.
\membersection{wxDocParentFrame::OnCloseWindow}
\func{void}{OnCloseWindow}{\param{wxCloseEvent\&}{ event}}
Deletes all views and documents. If no user input cancelled the
operation, the frame will be destroyed and the application will exit.
Since understanding how document/view clean-up takes place can be difficult,
the implementation of this function is shown below.
\begin{verbatim}
void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
{
if (m_docManager->Clear(!event.CanVeto()))
{
this->Destroy();
}
else
event.Veto();
}
\end{verbatim}

View File

@@ -1,254 +0,0 @@
\section{\class{wxDocTemplate}}\label{wxdoctemplate}
The wxDocTemplate class is used to model the relationship between a
document class and a view class.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/docview.h>
\wxheading{See also}
\helpref{wxDocTemplate overview}{wxdoctemplateoverview}, \helpref{wxDocument}{wxdocument}, \helpref{wxView}{wxview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDocTemplate::m\_defaultExt}
\member{wxString}{m\_defaultExt}
The default extension for files of this type.
\membersection{wxDocTemplate::m\_description}
\member{wxString}{m\_description}
A short description of this template.
\membersection{wxDocTemplate::m\_directory}
\member{wxString}{m\_directory}
The default directory for files of this type.
\membersection{wxDocTemplate::m\_docClassInfo}
\member{wxClassInfo* }{m\_docClassInfo}
Run-time class information that allows document instances to be constructed dynamically.
\membersection{wxDocTemplate::m\_docTypeName}
\member{wxString}{m\_docTypeName}
The named type of the document associated with this template.
\membersection{wxDocTemplate::m\_documentManager}
\member{wxDocTemplate*}{m\_documentManager}
A pointer to the document manager for which this template was created.
\membersection{wxDocTemplate::m\_fileFilter}
\member{wxString}{m\_fileFilter}
The file filter (such as {\tt *.txt}) to be used in file selector dialogs.
\membersection{wxDocTemplate::m\_flags}
\member{long}{m\_flags}
The flags passed to the constructor.
\membersection{wxDocTemplate::m\_viewClassInfo}
\member{wxClassInfo*}{m\_viewClassInfo}
Run-time class information that allows view instances to be constructed dynamically.
\membersection{wxDocTemplate::m\_viewTypeName}
\member{wxString}{m\_viewTypeName}
The named type of the view associated with this template.
\membersection{wxDocTemplate::wxDocTemplate}
\func{}{wxDocTemplate}{\param{wxDocManager* }{manager}, \param{const wxString\& }{descr}, \param{const wxString\& }{filter},
\param{const wxString\& }{dir}, \param{const wxString\& }{ext}, \param{const wxString\& }{docTypeName},
\param{const wxString\& }{viewTypeName}, \param{wxClassInfo* }{docClassInfo = NULL},
\param{wxClassInfo* }{viewClassInfo = NULL}, \param{long}{ flags = wxDEFAULT\_TEMPLATE\_FLAGS}}
Constructor. Create instances dynamically near the start of your application after creating
a wxDocManager instance, and before doing any document or view operations.
{\it manager} is the document manager object which manages this template.
{\it descr} is a short description of what the template is for. This string will be displayed in the
file filter list of Windows file selectors.
{\it filter} is an appropriate file filter such as {\tt *.txt}.
{\it dir} is the default directory to use for file selectors.
{\it ext} is the default file extension (such as txt).
{\it docTypeName} is a name that should be unique for a given type of document, used for
gathering a list of views relevant to a particular document.
{\it viewTypeName} is a name that should be unique for a given view.
{\it docClassInfo} is a pointer to the run-time document class information as returned
by the CLASSINFO macro, e.g. CLASSINFO(MyDocumentClass). If this is not supplied,
you will need to derive a new wxDocTemplate class and override the CreateDocument
member to return a new document instance on demand.
{\it viewClassInfo} is a pointer to the run-time view class information as returned
by the CLASSINFO macro, e.g. CLASSINFO(MyViewClass). If this is not supplied,
you will need to derive a new wxDocTemplate class and override the CreateView
member to return a new view instance on demand.
{\it flags} is a bit list of the following:
\begin{itemize}\itemsep=0pt
\item wxTEMPLATE\_VISIBLE The template may be displayed to the user in dialogs.
\item wxTEMPLATE\_INVISIBLE The template may not be displayed to the user in dialogs.
\item wxDEFAULT\_TEMPLATE\_FLAGS Defined as wxTEMPLATE\_VISIBLE.
\end{itemize}
\perlnote{In wxPerl {\tt docClassInfo} and {\tt viewClassInfo} can be
either {\tt Wx::ClassInfo} objects or strings which contain the name
of the perl packages which are to be used as {\tt Wx::Document} and
{\tt Wx::View} classes (they must have a constructor named {\tt
new}):\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Wx::DocTemplate->new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName, docClassInfo, viewClassInfo, flags
)}}{ will construct document and view objects from the class information}
\twocolitem{{\bf Wx::DocTemplate->new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName, docClassName, viewClassName, flags
)}}{ will construct document and view objects from perl packages}
\twocolitem{{\bf Wx::DocTemplate->new( docmgr, descr, filter, dir,
ext, docTypeName, viewTypeName )}}{
{\tt Wx::DocTemplate::CreateDocument()} and
{\tt Wx::DocTemplate::CreateView()} must be overridden}
\end{twocollist}}}
\membersection{wxDocTemplate::\destruct{wxDocTemplate}}
\func{void}{\destruct{wxDocTemplate}}{\void}
Destructor.
\membersection{wxDocTemplate::CreateDocument}
\func{wxDocument *}{CreateDocument}{\param{const wxString\& }{path}, \param{long}{ flags = 0}}
Creates a new instance of the associated document class. If you have not supplied
a wxClassInfo parameter to the template constructor, you will need to override this
function to return an appropriate document instance.
\membersection{wxDocTemplate::CreateView}
\func{wxView *}{CreateView}{\param{wxDocument *}{doc}, \param{long}{ flags = 0}}
Creates a new instance of the associated view class. If you have not supplied
a wxClassInfo parameter to the template constructor, you will need to override this
function to return an appropriate view instance.
\membersection{wxDocTemplate::GetDefaultExtension}
\func{wxString}{GetDefaultExtension}{\void}
Returns the default file extension for the document data, as passed to the document template constructor.
\membersection{wxDocTemplate::GetDescription}
\func{wxString}{GetDescription}{\void}
Returns the text description of this template, as passed to the document template constructor.
\membersection{wxDocTemplate::GetDirectory}
\func{wxString}{GetDirectory}{\void}
Returns the default directory, as passed to the document template constructor.
\membersection{wxDocTemplate::GetDocumentManager}
\func{wxDocManager *}{GetDocumentManager}{\void}
Returns a pointer to the document manager instance for which this template was created.
\membersection{wxDocTemplate::GetDocumentName}
\func{wxString}{GetDocumentName}{\void}
Returns the document type name, as passed to the document template constructor.
\membersection{wxDocTemplate::GetFileFilter}
\func{wxString}{GetFileFilter}{\void}
Returns the file filter, as passed to the document template constructor.
\membersection{wxDocTemplate::GetFlags}
\func{long}{GetFlags}{\void}
Returns the flags, as passed to the document template constructor.
\membersection{wxDocTemplate::GetViewName}
\func{wxString}{GetViewName}{\void}
Returns the view type name, as passed to the document template constructor.
\membersection{wxDocTemplate::IsVisible}
\func{bool}{IsVisible}{\void}
Returns TRUE if the document template can be shown in user dialogs, FALSE otherwise.
\membersection{wxDocTemplate::SetDefaultExtension}
\func{void}{SetDefaultExtension}{\param{const wxString\& }{ext}}
Sets the default file extension.
\membersection{wxDocTemplate::SetDescription}
\func{void}{SetDescription}{\param{const wxString\& }{descr}}
Sets the template description.
\membersection{wxDocTemplate::SetDirectory}
\func{void}{SetDirectory}{\param{const wxString\& }{dir}}
Sets the default directory.
\membersection{wxDocTemplate::SetDocumentManager}
\func{void}{SetDocumentManager}{\param{wxDocManager *}{manager}}
Sets the pointer to the document manager instance for which this template was created.
Should not be called by the application.
\membersection{wxDocTemplate::SetFileFilter}
\func{void}{SetFileFilter}{\param{const wxString\& }{filter}}
Sets the file filter.
\membersection{wxDocTemplate::SetFlags}
\func{void}{SetFlags}{\param{long }{flags}}
Sets the internal document template flags (see the constructor description for more details).

View File

@@ -1,360 +0,0 @@
\section{\class{wxDocument}}\label{wxdocument}
The document class can be used to model an application's file-based
data. It is part of the document/view framework supported by wxWindows,
and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate}\rtfsp
and \helpref{wxDocManager}{wxdocmanager} classes.
\wxheading{Derived from}
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/docview.h>
\wxheading{See also}
\helpref{wxDocument overview}{wxdocumentoverview}, \helpref{wxView}{wxview},\rtfsp
\helpref{wxDocTemplate}{wxdoctemplate}, \helpref{wxDocManager}{wxdocmanager}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDocument::m\_commandProcessor}
\member{wxCommandProcessor*}{m\_commandProcessor}
A pointer to the command processor associated with this document.
\membersection{wxDocument::m\_documentFile}
\member{wxString}{m\_documentFile}
Filename associated with this document (``" if none).
\membersection{wxDocument::m\_documentModified}
\member{bool}{m\_documentModified}
TRUE if the document has been modified, FALSE otherwise.
\membersection{wxDocument::m\_documentTemplate}
\member{wxDocTemplate *}{m\_documentTemplate}
A pointer to the template from which this document was created.
\membersection{wxDocument::m\_documentTitle}
\member{wxString}{m\_documentTitle}
Document title. The document title is used for an associated
frame (if any), and is usually constructed by the framework from
the filename.
\membersection{wxDocument::m\_documentTypeName}\label{documenttypename}
\member{wxString}{m\_documentTypeName}
The document type name given to the wxDocTemplate constructor, copied to this
variable when the document is created. If several document templates are
created that use the same document type, this variable is used in wxDocManager::CreateView
to collate a list of alternative view types that can be used on this kind of
document. Do not change the value of this variable.
\membersection{wxDocument::m\_documentViews}
\member{wxList}{m\_documentViews}
List of wxView instances associated with this document.
\membersection{wxDocument::wxDocument}
\func{}{wxDocument}{\void}
Constructor. Define your own default constructor to initialize application-specific
data.
\membersection{wxDocument::\destruct{wxDocument}}
\func{}{\destruct{wxDocument}}{\void}
Destructor. Removes itself from the document manager.
\membersection{wxDocument::AddView}
\func{virtual bool}{AddView}{\param{wxView *}{view}}
If the view is not already in the list of views, adds the view and calls OnChangedViewList.
\membersection{wxDocument::Close}
\func{virtual bool}{Close}{\void}
Closes the document, by calling OnSaveModified and then (if this returned TRUE) OnCloseDocument.
This does not normally delete the document object: use DeleteAllViews to do this implicitly.
\membersection{wxDocument::DeleteAllViews}
\func{virtual bool}{DeleteAllViews}{\void}
Calls wxView::Close and deletes each view. Deleting the final view will implicitly
delete the document itself, because the wxView destructor calls RemoveView. This
in turns calls wxDocument::OnChangedViewList, whose default implemention is to
save and delete the document if no views exist.
\membersection{wxDocument::GetCommandProcessor}
\constfunc{wxCommandProcessor*}{GetCommandProcessor}{\void}
Returns a pointer to the command processor associated with this document.
See \helpref{wxCommandProcessor}{wxcommandprocessor}.
\membersection{wxDocument::GetDocumentTemplate}
\constfunc{wxDocTemplate*}{GetDocumentTemplate}{\void}
Gets a pointer to the template that created the document.
\membersection{wxDocument::GetDocumentManager}
\constfunc{wxDocManager*}{GetDocumentManager}{\void}
Gets a pointer to the associated document manager.
\membersection{wxDocument::GetDocumentName}
\constfunc{wxString}{GetDocumentName}{\void}
Gets the document type name for this document. See the comment for \helpref{documentTypeName}{documenttypename}.
\membersection{wxDocument::GetDocumentWindow}
\constfunc{wxWindow*}{GetDocumentWindow}{\void}
Intended to return a suitable window for using as a parent for document-related
dialog boxes. By default, uses the frame associated with the first view.
\membersection{wxDocument::GetFilename}
\constfunc{wxString}{GetFilename}{\void}
Gets the filename associated with this document, or "" if none is
associated.
\membersection{wxDocument::GetFirstView}\label{wxdocumentgetfirstview}
\constfunc{wxView *}{GetFirstView}{\void}
A convenience function to get the first view for a document, because
in many cases a document will only have a single view.
See also: \helpref{GetViews}{wxdocumentgetviews}
\membersection{wxDocument::GetPrintableName}
\constfunc{virtual void}{GetPrintableName}{\param{wxString\& }{name}}
Copies a suitable document name into the supplied {\it name} buffer. The default
function uses the title, or if there is no title, uses the filename; or if no
filename, the string {\bf unnamed}.
\membersection{wxDocument::GetTitle}
\constfunc{wxString}{GetTitle}{\void}
Gets the title for this document. The document title is used for an associated
frame (if any), and is usually constructed by the framework from
the filename.
\membersection{wxDocument::GetViews}\label{wxdocumentgetviews}
\constfunc{wxList \&}{GetViews}{\void}
Returns the list whose elements are the views on the document.
See also: \helpref{GetFirstView}{wxdocumentgetfirstview}
\membersection{wxDocument::IsModified}\label{wxdocumentismodified}
\constfunc{virtual bool}{IsModified}{\void}
Returns TRUE if the document has been modified since the last save, FALSE otherwise.
You may need to override this if your document view maintains its own
record of being modified (for example if using wxTextWindow to view and edit the document).
See also \helpref{Modify}{wxdocumentmodify}.
\membersection{wxDocument::LoadObject}
\func{virtual istream\&}{LoadObject}{\param{istream\& }{stream}}
\func{virtual wxInputStream\&}{LoadObject}{\param{wxInputStream\& }{stream}}
Override this function and call it from your own LoadObject before
streaming your own data. LoadObject is called by the framework
automatically when the document contents need to be loaded.
Note that only one of these forms exists, depending on how wxWindows
was configured.
\membersection{wxDocument::Modify}\label{wxdocumentmodify}
\func{virtual void}{Modify}{\param{bool}{ modify}}
Call with TRUE to mark the document as modified since the last save, FALSE otherwise.
You may need to override this if your document view maintains its own
record of being modified (for example if using wxTextWindow to view and edit the document).
See also \helpref{IsModified}{wxdocumentismodified}.
\membersection{wxDocument::OnChangedViewList}
\func{virtual void}{OnChangedViewList}{\void}
Called when a view is added to or deleted from this document. The default
implementation saves and deletes the document if no views exist (the last
one has just been removed).
\membersection{wxDocument::OnCloseDocument}
\func{virtual bool}{OnCloseDocument}{\void}
The default implementation calls DeleteContents (an empty implementation)
sets the modified flag to FALSE. Override this to
supply additional behaviour when the document is closed with Close.
\membersection{wxDocument::OnCreate}
\func{virtual bool}{OnCreate}{\param{const wxString\& }{path}, \param{long}{ flags}}
Called just after the document object is created to give it a chance
to initialize itself. The default implementation uses the
template associated with the document to create an initial view.
If this function returns FALSE, the document is deleted.
\membersection{wxDocument::OnCreateCommandProcessor}
\func{virtual wxCommandProcessor*}{OnCreateCommandProcessor}{\void}
Override this function if you want a different (or no) command processor
to be created when the document is created. By default, it returns
an instance of wxCommandProcessor.
See \helpref{wxCommandProcessor}{wxcommandprocessor}.
\membersection{wxDocument::OnNewDocument}
\func{virtual bool}{OnNewDocument}{\void}
The default implementation calls OnSaveModified and DeleteContents, makes a default title for the
document, and notifies the views that the filename (in fact, the title) has changed.
\membersection{wxDocument::OnOpenDocument}
\func{virtual bool}{OnOpenDocument}{\param{const wxString\& }{filename}}
Constructs an input file stream for the given filename (which must not be empty),
and calls LoadObject. If LoadObject returns TRUE, the document is set to
unmodified; otherwise, an error message box is displayed. The document's
views are notified that the filename has changed, to give windows an opportunity
to update their titles. All of the document's views are then updated.
\membersection{wxDocument::OnSaveDocument}
\func{virtual bool}{OnSaveDocument}{\param{const wxString\& }{filename}}
Constructs an output file stream for the given filename (which must not be empty),
and calls SaveObject. If SaveObject returns TRUE, the document is set to
unmodified; otherwise, an error message box is displayed.
\membersection{wxDocument::OnSaveModified}
\func{virtual bool}{OnSaveModified}{\void}
If the document has been modified, prompts the user to ask if the changes should
be changed. If the user replies Yes, the Save function is called. If No, the
document is marked as unmodified and the function succeeds. If Cancel, the
function fails.
\membersection{wxDocument::RemoveView}
\func{virtual bool}{RemoveView}{\param{wxView* }{view}}
Removes the view from the document's list of views, and calls OnChangedViewList.
\membersection{wxDocument::Save}
\func{virtual bool}{Save}{\void}
Saves the document by calling OnSaveDocument if there is an associated filename,
or SaveAs if there is no filename.
\membersection{wxDocument::SaveAs}
\func{virtual bool}{SaveAs}{\void}
Prompts the user for a file to save to, and then calls OnSaveDocument.
\membersection{wxDocument::SaveObject}
\func{virtual ostream\&}{SaveObject}{\param{ostream\& }{stream}}
\func{virtual wxOutputStream\&}{SaveObject}{\param{wxOutputStream\& }{stream}}
Override this function and call it from your own SaveObject before
streaming your own data. SaveObject is called by the framework
automatically when the document contents need to be saved.
Note that only one of these forms exists, depending on how wxWindows
was configured.
\membersection{wxDocument::SetCommandProcessor}
\func{virtual void}{SetCommandProcessor}{\param{wxCommandProcessor *}{processor}}
Sets the command processor to be used for this document. The document will then be responsible
for its deletion. Normally you should not call this; override OnCreateCommandProcessor
instead.
See \helpref{wxCommandProcessor}{wxcommandprocessor}.
\membersection{wxDocument::SetDocumentName}
\func{void}{SetDocumentName}{\param{const wxString\& }{name}}
Sets the document type name for this document. See the comment for \helpref{documentTypeName}{documenttypename}.
\membersection{wxDocument::SetDocumentTemplate}
\func{void}{SetDocumentTemplate}{\param{wxDocTemplate* }{templ}}
Sets the pointer to the template that created the document. Should only be called by the
framework.
\membersection{wxDocument::SetFilename}
\func{void}{SetFilename}{\param{const wxString\& }{filename}, \param{bool}{ notifyViews = FALSE}}
Sets the filename for this document. Usually called by the framework.
If {\it notifyViews} is TRUE, wxView::OnChangeFilename is called for all views.
\membersection{wxDocument::SetTitle}
\func{void}{SetTitle}{\param{const wxString\& }{title}}
Sets the title for this document. The document title is used for an associated
frame (if any), and is usually constructed by the framework from
the filename.
\membersection{wxDocument::UpdateAllViews}\label{wxdocumentupdateallviews}
\func{void}{UpdateAllViews}{\param{wxView* }{sender = NULL}, \param{wxObject*}{ hint = NULL}}
Updates all views. If {\it sender} is non-NULL, does not update this view.
{\it hint} represents optional information to allow a view to optimize its update.

View File

@@ -1,222 +0,0 @@
\section{\class{wxDragImage}}\label{wxdragimage}
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 do achieve smooth dragging. On other platforms,
wxGenericDragImage is used. Applications may also prefer to use
wxGenericDragImage on Windows, too.
\pythonnote{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.
Call BeginDrag to start, and EndDrag to stop the drag. To move the image,
initially call Show and then Move. If you wish to update the screen contents
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 \helpref{wxDragImage::DoDrawImage}{wxdragimagedodrawimage} and
\helpref{wxDragImage::GetImageRect}{wxdragimagegetimagerect}.
Please see {\tt samples/dragimag} for an example.
%\wxheading{Notes}
%
%Using the native Windows implementation, you must supply an image with a mask, or
%the image will not show when dragged. It is not clear if this is a bug
%in Windows or in the wxDragImage implementation. You can add a mask
%with a call to wxImage::SetMaskColour, passing RGB values not likely
%to be in the image. [CURED by creating the ImageList with ILC_MASK]
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dragimag.h>\\
<wx/generic/dragimgg.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDragImage::wxDragImage}\label{wxdragimageconstr}
\func{}{wxDragImage}{\void}
Default constructor.
\func{}{wxDragImage}{\param{const wxBitmap\& }{image}, \param{const wxCursor\& }{cursor = wxNullCursor},
\param{const wxPoint\& }{cursorHotspot = wxPoint(0, 0)}}
Constructs a drag image from a bitmap and optional cursor.
\func{}{wxDragImage}{\param{const wxIcon\& }{image}, \param{const wxCursor\& }{cursor = wxNullCursor},
\param{const wxPoint\& }{cursorHotspot = wxPoint(0, 0)}}
Constructs a drag image from an icon and optional cursor.
\pythonnote{This constructor is called wxDragIcon in wxPython.}
\func{}{wxDragImage}{\param{const wxString\& }{text}, \param{const wxCursor\& }{cursor = wxNullCursor},
\param{const wxPoint\& }{cursorHotspot = wxPoint(0, 0)}}
Constructs a drag image from a text string and optional cursor.
\pythonnote{This constructor is called wxDragString in wxPython.}
\func{}{wxDragImage}{\param{const wxTreeCtrl\& }{treeCtrl}, \param{wxTreeItemId\& }{id}}
Constructs a drag image from the text in the given tree control item, and optional cursor.
\pythonnote{This constructor is called wxDragTreeItem in wxPython.}
\func{}{wxDragImage}{\param{const wxListCtrl\& }{treeCtrl}, \param{long }{id}}
Constructs a drag image from the text in the given tree control item, and optional cursor.
\pythonnote{This constructor is called wxDragListItem in wxPython.}
\func{}{wxDragImage}{\param{const wxCursor\& }{cursor = wxNullCursor},
\param{const wxPoint\& }{cursorHotspot = wxPoint(0, 0)}}
Constructs a drag image an optional cursor. This constructor is only available for
wxGenericDragImage, and can be used when the application
supplies \helpref{wxDragImage::DoDrawImage}{wxdragimagedodrawimage} and \helpref{wxDragImage::GetImageRect}{wxdragimagegetimagerect}.
\wxheading{Parameters}
\docparam{image}{Icon or bitmap to be used as the drag image. The bitmap can
have a mask.}
\docparam{text}{Text used to construct a drag image.}
\docparam{cursor}{Optional cursor to combine with the image.}
\docparam{hotspot}{This parameter is deprecated.}
\docparam{treeCtrl}{Tree control for constructing a tree drag image.}
\docparam{listCtrl}{List control for constructing a list drag image.}
\docparam{id}{Tree or list control item id.}
\membersection{wxDragImage::BeginDrag}\label{wxdragimagebegindrag}
\func{bool}{BeginDrag}{\param{const wxPoint\& }{hotspot}, \param{wxWindow* }{window}, \param{bool}{ fullScreen = FALSE}, \param{wxRect*}{ rect = NULL}}
Start dragging the image, in a window or full screen.
\func{bool}{BeginDrag}{\param{const wxPoint\& }{hotspot}, \param{wxWindow* }{window}, \param{wxWindow*}{ boundingWindow}}
Start dragging the image, using the first window to capture the mouse and the second
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 \helpref{wxDragImage::Show}{wxdragimageshow}
and \helpref{wxDragImage::Move}{wxdragimagemove} to show the image on the screen.
Call \helpref{wxDragImage::EndDrag}{wxdragimageenddrag} when the drag has finished.
Note that this call automatically calls CaptureMouse.
\wxheading{Parameters}
\docparam{hotspot}{The location of the drag position relative to the upper-left corner
of the image.}
\docparam{window}{The window that captures the mouse, and within which the dragging
is limited unless {\it fullScreen} is TRUE.}
\docparam{boundingWindow}{In the second form of the function, specifies the
area within which the drag occurs.}
\docparam{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 {\it rect}. Note that the mouse will
still be captured in {\it window}.}
\docparam{rect}{If non-NULL, specifies the rectangle (in screen coordinates) that
bounds the dragging operation. Specifying this can make the operation more efficient
by cutting down on the area under consideration, and it can also make a visual difference
since the drag is clipped to this area.}
\membersection{wxDragImage::DoDrawImage}\label{wxdragimagedodrawimage}
\func{virtual bool}{DoDrawImage}{\param{wxDC\&}{ dc}, \param{const wxPoint\&}{ pos}}
Draws the image on the device context with top-left corner at the given position.
This function is only available with wxGenericDragImage, to allow applications to
draw their own image instead of using an actual bitmap. If you override this function,
you must also override \helpref{wxDragImage::GetImageRect}{wxdragimagegetimagerect}.
\membersection{wxDragImage::EndDrag}\label{wxdragimageenddrag}
\func{bool}{EndDrag}{\void}
Call this when the drag has finished.
Note that this call automatically calls ReleaseMouse.
\membersection{wxDragImage::GetImageRect}\label{wxdragimagegetimagerect}
\constfunc{virtual wxRect}{GetImageRect}{\param{const wxPoint\&}{ pos}}
Returns the rectangle enclosing the image, assuming that the image is drawn with its
top-left corner at the given point.
This function is available in wxGenericDragImage only, and may be overridden (together with
\helpref{wxDragImage::DoDrawImage}{wxdragimagedodrawimage}) to provide a virtual drawing capability.
\membersection{wxDragImage::Hide}\label{wxdragimagehide}
\func{bool}{Hide}{\void}
Hides the image. You may wish to call this before updating the window
contents (perhaps highlighting an item). Then call \helpref{wxDragImage::Move}{wxdragimagemove}
and \helpref{wxDragImage::Show}{wxdragimageshow}.
\membersection{wxDragImage::Move}\label{wxdragimagemove}
\func{bool}{Move}{\param{const wxPoint\& }{pt}}
Call this to move the image to a new position. The image will only be shown if
\helpref{wxDragImage::Show}{wxdragimageshow} has been called previously (for example
at the start of the drag).
{\it pt} is the position in client coordinates (relative to the window specified in BeginDrag).
You can move the image either when the image is hidden or shown, but in general dragging
will be smoother if you move the image when it is shown.
\membersection{wxDragImage::Show}\label{wxdragimageshow}
\func{bool}{Show}{\void}
Shows the image. Call this at least once when dragging.
\membersection{wxDragImage::UpdateBackingFromWindow}\label{wxdragimageupdatebackingfromwindow}
\constfunc{bool}{UpdateBackingFromWindow}{\param{wxDC\&}{ windowDC}, \param{wxMemoryDC\&}{ destDC},
\param{const wxRect\&}{ sourceRect}, \param{const wxRect\&}{ destRect}}
Override this if you wish to draw the window contents to the backing bitmap
yourself. This can be desirable if you wish to avoid flicker by not having to
redraw the updated window itself just before dragging, which can cause a flicker just
as the drag starts. Instead, paint the drag image's backing bitmap to show the appropriate
graphic {\it minus the objects to be dragged}, and leave the window itself to be updated
by the drag image. This can provide eerily smooth, flicker-free drag behaviour.
The default implementation copies the window contents to the backing bitmap. A new
implementation will normally copy information from another source, such as from its
own backing bitmap if it has one, or directly from internal data structures.
This function is available in wxGenericDragImage only.

View File

@@ -1,83 +0,0 @@
\section{\class{wxDropFilesEvent}}\label{wxdropfilesevent}
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
\helpref{wxWindow::DragAcceptFiles}{wxwindowdragacceptfiles}.
Important note: this is a separate implementation to the more general
drag and drop implementation documented \helpref{here}{wxdndoverview}. It uses the
older, Windows message-based approach of dropping files.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Event table macros}
To process a drop files event, use these event handler macros to direct input to a member
function that takes a wxDropFilesEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_DROP\_FILES(func)}}{Process a wxEVT\_DROP\_FILES event.}
\end{twocollist}%
\wxheading{See also}
%\helpref{wxWindow::OnDropFiles}{wxwindowondropfiles},
\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDropFilesEvent::wxDropFilesEvent}
\func{}{wxDropFilesEvent}{\param{WXTYPE }{id = 0}, \param{int }{noFiles = 0},\rtfsp
\param{wxString* }{files = NULL}}
Constructor.
\membersection{wxDropFilesEvent::m\_files}
\member{wxString*}{m\_files}
An array of filenames.
\membersection{wxDropFilesEvent::m\_noFiles}
\member{int}{m\_noFiles}
The number of files dropped.
\membersection{wxDropFilesEvent::m\_pos}
\member{wxPoint}{m\_pos}
The point at which the drop took place.
\membersection{wxDropFilesEvent::GetFiles}\label{wxdropfileseventgetfiles}
\constfunc{wxString*}{GetFiles}{\void}
Returns an array of filenames.
\membersection{wxDropFilesEvent::GetNumberOfFiles}\label{wxdropfileseventgetnumberoffiles}
\constfunc{int}{GetNumberOfFiles}{\void}
Returns the number of files dropped.
\membersection{wxDropFilesEvent::GetPosition}\label{wxdropfileseventgetposition}
\constfunc{wxPoint}{GetPosition}{\void}
Returns the position at which the files were dropped.
Returns an array of filenames.

View File

@@ -1,115 +0,0 @@
\section{\class{wxDropSource}}\label{wxdropsource}
This class represents a source for a drag and drop operation.
See \helpref{Drag and drop overview}{wxdndoverview} and \helpref{wxDataObject overview}{wxdataobjectoverview}
for more information.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/dnd.h>
\wxheading{Types}
\index{wxDragResult}wxDragResult is defined as follows:
\begin{verbatim}
enum wxDragResult
{
wxDragError, // error prevented the d&d operation from completing
wxDragNone, // drag target didn't accept the data
wxDragCopy, // the data was successfully copied
wxDragMove, // the data was successfully moved
wxDragCancel // the operation was cancelled by user (not an error)
};
\end{verbatim}
\wxheading{See also}
\helpref{wxDropTarget}{wxdroptarget},
\helpref{wxTextDropTarget}{wxtextdroptarget}, \helpref{wxFileDropTarget}{wxfiledroptarget}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDropSource::wxDropSource}\label{wxdropsourcewxdropsource}
\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}}
\func{}{wxDropSource}{\param{wxDataObject\&}{ data}, \param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}}
The constructors for wxDataObject.
If you use the constructor without {\it data} parameter you must call
\helpref{SetData}{wxdropsourcesetdata} later.
Note that the exact type of {\it iconCopy} and subsequent parameters differs
between wxMSW and wxGTK: these are cursors under Windows but icons for GTK.
You should use the macro \helpref{wxDROP\_ICON}{wxdropicon} in portable
programs instead of directly using either of these types.
\wxheading{Parameters}
\docparam{win}{The window which initiates the drag and drop operation.}
\docparam{iconCopy}{The icon or cursor used for feedback for copy operation.}
\docparam{iconMove}{The icon or cursor used for feedback for move operation.}
\docparam{iconNone}{The icon or cursor used for feedback when operation can't be done.}
{\it win} is the window which initiates the drag and drop operation.
\membersection{wxDropSource::\destruct{wxDropSource}}\label{wxdropsourcedtor}
\func{virtual }{\destruct{wxDropSource}}{\void}
\membersection{wxDropSource::SetData}\label{wxdropsourcesetdata}
\func{void}{SetData}{\param{wxDataObject\&}{ data}}
Sets the data \helpref{wxDataObject}{wxdataobject} associated with the
drop source. This will not delete any previously associated data.
\membersection{wxDropSource::DoDragDrop}\label{wxdropsourcedodragdrop}
\func{virtual wxDragResult}{DoDragDrop}{\param{int }{flags = {\tt wxDrag\_CopyOnly}}}
Do it (call this in response to a mouse button press, for example). This starts
the drag-and-drop operation which will terminate when the user releases the
mouse.
\wxheading{Parameters}
\docparam{flags}{If {\tt wxDrag\_AllowMove} is included in the flags, data may
be moved and not only copied (default). If {\tt wxDrag\_DefaultMove} is
specified (which includes the previous flag), this is even the default
operation}.
\wxheading{Return value}
Returns the operation requested by the user, may be {\tt wxDragCopy}, {\tt
wxDragMove}, {\tt wxDragCancel} or {\tt wxDragNone} if an error occured.
\membersection{wxDropSource::GiveFeedback}\label{wxdropsourcegivefeedback}
\func{virtual bool}{GiveFeedback}{\param{wxDragResult }{effect}, \param{bool }{scrolling}}
Overridable: you may give some custom UI feedback during the drag and drop operation
in this function. It is called on each mouse move, so your implementation must not be too
slow.
\wxheading{Parameters}
\docparam{effect}{The effect to implement. One of wxDragCopy, wxDragMove and wxDragNone. }
\docparam{scrolling}{TRUE if the window is scrolling. MSW only. }
\wxheading{Return value}
Return FALSE if you want default feedback, or TRUE if you implement your own
feedback. The return values is ignored under GTK.

View File

@@ -1,144 +0,0 @@
\section{\class{wxDropTarget}}\label{wxdroptarget}
This class represents a target for a drag and drop operation. A \helpref{wxDataObject}{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
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 accepting data on
the whole window area, but only a small portion of it. The normal sequence of calls is
\helpref{OnEnter}{wxdroptargetonenter}, possibly many times \helpref{OnDragOver}{wxdroptargetondragover},
\helpref{OnDrop}{wxdroptargetondrop} and finally \helpref{OnData}{wxdroptargetondata}.
See \helpref{Drag and drop overview}{wxdndoverview} and \helpref{wxDataObject overview}{wxdataobjectoverview}
for more information.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/dnd.h>
\wxheading{Types}
\index{wxDragResult}wxDragResult is defined as follows:
\begin{verbatim}
enum wxDragResult
{
wxDragError, // error prevented the d&d operation from completing
wxDragNone, // drag target didn't accept the data
wxDragCopy, // the data was successfully copied
wxDragMove, // the data was successfully moved
wxDragCancel // the operation was cancelled by user (not an error)
};
\end{verbatim}
\wxheading{See also}
\helpref{wxDropSource}{wxdropsource},
\helpref{wxTextDropTarget}{wxtextdroptarget}, \helpref{wxFileDropTarget}{wxfiledroptarget},
\helpref{wxDataFormat}{wxdataformat}, \helpref{wxDataObject}{wxdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDropTarget::wxDropTarget}\label{wxdroptargetwxdroptarget}
\func{}{wxDropTarget}{\param{wxDataObject*}{ data = NULL}}
Constructor. {\it data} is the data to be associated with the drop target.
\membersection{wxDropTarget::\destruct{wxDropTarget}}\label{wxdroptargetdtor}
\func{}{\destruct{wxDropTarget}}{\void}
Destructor. Deletes the associated data object, if any.
\membersection{wxDropTarget::GetData}\label{wxdroptargetgetdata}
\func{virtual void}{GetData}{\void}
This method may only be called from within \helpref{OnData}{wxdroptargetondata}.
By default, this method copies the data from the drop source to the
\helpref{wxDataObject}{wxdataobject} associated with this drop target,
calling its \helpref{wxDataObject::SetData}{wxdataobjectsetdata} method.
\membersection{wxDropTarget::OnData}\label{wxdroptargetondata}
\func{virtual wxDragResult}{OnData}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxDragResult}{ def}}
Called after \helpref{OnDrop}{wxdroptargetondrop} returns TRUE. By default this
will usually \helpref{GetData}{wxdroptargetgetdata} and will return the suggested
default value {\it def}.
\membersection{wxDropTarget::OnDrop}\label{wxdroptargetondrop}
\func{virtual bool}{OnDrop}{\param{wxCoord }{x}, \param{wxCoord }{y}}
Called when the user drops a data object on the target. Return FALSE to veto the operation.
\wxheading{Parameters}
\docparam{x}{The x coordinate of the mouse.}
\docparam{y}{The y coordinate of the mouse.}
\wxheading{Return value}
Return TRUE to accept the data, FALSE to veto the operation.
\membersection{wxDropTarget::OnEnter}\label{wxdroptargetonenter}
\func{virtual wxDragResult}{OnEnter}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxDragResult}{ def}}
Called when the mouse enters the drop target. By default, this calls \helpref{OnDragOver}{wxdroptargetondragover}.
\wxheading{Parameters}
\docparam{x}{The x coordinate of the mouse.}
\docparam{y}{The y coordinate of the mouse.}
\docparam{def}{Suggested default for return value. Determined by SHIFT or CONTROL key states.}
\wxheading{Return value}
Returns the desired operation or {\tt wxDragNone}. This is used for optical feedback
from the side of the drop source, typically in form of changing the icon.
\membersection{wxDropTarget::OnDragOver}\label{wxdroptargetondragover}
\func{virtual wxDragResult}{OnDragOver}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxDragResult}{ def}}
Called when the mouse is being dragged over the drop target. By default,
this calls functions return the suggested return value {\it def}.
\wxheading{Parameters}
\docparam{x}{The x coordinate of the mouse.}
\docparam{y}{The y coordinate of the mouse.}
\docparam{def}{Suggested value for return value. Determined by SHIFT or CONTROL key states.}
\wxheading{Return value}
Returns the desired operation or {\tt wxDragNone}. This is used for optical feedback
from the side of the drop source, typically in form of changing the icon.
\membersection{wxDropTarget::OnLeave}\label{wxdroptargetonleave}
\func{virtual void}{OnLeave}{\void}
Called when the mouse leaves the drop target.
\membersection{wxDropTarget::SetDataObject}\label{wxdroptargetsetdataobject}
\func{void}{SetDataObject}{\param{wxDataObject*}{ data}}
Sets the data \helpref{wxDataObject}{wxdataobject} associated with the
drop target and deletes any previously associated data object.

View File

@@ -1,57 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dynlib.tex
%% Purpose: wxDynamicLibrary documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 14.01.02 (extracted from dllload.tex)
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDynamicLibrary}}\label{wxdynamiclibrary}
wxDynamicLibrary is a class representing dynamically loadable library
(Windows DLL, shared library under Unix etc.). It is implemented as a wrapper
to \helpref{wxDllLoader}{wxdllloader}.
\wxheading{See also}
\helpref{wxDllLoader}{wxdllloader}
\membersection{wxDynamicLibrary::wxDynamicLibrary}\label{wxdynamiclibrarywxdynamiclibrary}
\func{}{wxDynamicLibrary}{\void}
\func{}{wxDynamicLibrary}{\param{const wxString\& }{name}}
Constructor. Second form calls \helpref{Load}{wxdynamiclibraryload}.
\membersection{wxDynamicLibrary::IsLoaded}\label{wxdynamiclibraryisloaded}
\constfunc{bool}{IsLoaded}{\void}
Returns TRUE if the library was successfully loaded, FALSE otherwise.
\membersection{wxDynamicLibrary::Load}\label{wxdynamiclibraryload}
\func{bool}{Load}{\param{const wxString\& }{name}}
Loads DLL into memory.
Returns TRUE if the library was successfully loaded, FALSE otherwise.
\membersection{wxDynamicLibrary::Unload}\label{wxdynamiclibraryunload}
\func{void}{Unload}{\void}
Unloads the library from memory.
\membersection{wxDynamicLibrary::GetSymbol}\label{wxdynamiclibrarygetsymbol}
\constfunc{void*}{GetSymbol}{\param{const wxString\& }{name}}
Returns pointer to symbol {\it name} in the library or NULL if the library
contains no such symbol.

View File

@@ -1,165 +0,0 @@
%
% automatically generated by HelpGen from
% encconv.h at 30/Dec/99 18:45:16
%
\section{\class{wxEncodingConverter}}\label{wxencodingconverter}
This class is capable of converting strings between any two
8-bit encodings/charsets. It can also convert from/to Unicode (but only
if you compiled wxWindows with wxUSE\_WCHAR\_T set to 1).
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/encconv.h>
\wxheading{See also}
\helpref{wxFontMapper}{wxfontmapper},
\helpref{wxMBConv}{wxmbconv},
\helpref{Writing non-English applications}{nonenglishoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxEncodingConverter::wxEncodingConverter}\label{wxencodingconverterwxencodingconverter}
\func{}{wxEncodingConverter}{\void}
Constructor.
\membersection{wxEncodingConverter::Init}\label{wxencodingconverterinit}
\func{bool}{Init}{\param{wxFontEncoding }{input\_enc}, \param{wxFontEncoding }{output\_enc}, \param{int }{method = wxCONVERT\_STRICT}}
Initialize conversion. Both output or input encoding may
be wxFONTENCODING\_UNICODE, but only if wxUSE\_ENCODING is set to 1.
All subsequent calls to \helpref{Convert()}{wxencodingconverterconvert}
will interpret its argument
as a string in {\it input\_enc} encoding and will output string in
{\it output\_enc} encoding.
You must call this method before calling Convert. You may call
it more than once in order to switch to another conversion.
{\it Method} affects behaviour of Convert() in case input character
cannot be converted because it does not exist in output encoding:
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxCONVERT\_STRICT}}{follow behaviour of GNU Recode -
just copy unconvertible characters to output and don't change them
(its integer value will stay the same)}
\twocolitem{{\bf wxCONVERT\_SUBSTITUTE}}{try some (lossy) substitutions
- e.g. replace unconvertible latin capitals with acute by ordinary
capitals, replace en-dash or em-dash by '-' etc.}
\end{twocollist}
Both modes guarantee that output string will have same length
as input string.
\wxheading{Return value}
FALSE if given conversion is impossible, TRUE otherwise
(conversion may be impossible either if you try to convert
to Unicode with non-Unicode build of wxWindows or if input
or output encoding is not supported.)
\membersection{wxEncodingConverter::Convert}\label{wxencodingconverterconvert}
\func{void}{Convert}{\param{const char* }{input}, \param{char* }{output}}
\func{void}{Convert}{\param{const wchar\_t* }{input}, \param{wchar\_t* }{output}}
\func{void}{Convert}{\param{const char* }{input}, \param{wchar\_t* }{output}}
\func{void}{Convert}{\param{const wchar\_t* }{input}, \param{char* }{output}}
Convert input string according to settings passed to
\helpref{Init}{wxencodingconverterinit} and writes the result to {\it output}.
\func{void}{Convert}{\param{char* }{str}}
\func{void}{Convert}{\param{wchar\_t* }{str}}
Convert input string according to settings passed to
\helpref{Init}{wxencodingconverterinit} in-place, i.e. write the result to the
same memory area.
\func{wxString}{Convert}{\param{const wxString\& }{input}}
Convert wxString and return new wxString object.
\wxheading{Notes}
You must call \helpref{Init}{wxencodingconverterinit} before using this method!
{\tt wchar\_t} versions of the method are not available if wxWindows was compiled
with {\tt wxUSE\_WCHAR\_T} set to 0.
\membersection{wxEncodingConverter::GetPlatformEquivalents}\label{wxencodingconvertergetplatformequivalents}
\func{static wxFontEncodingArray}{GetPlatformEquivalents}{\param{wxFontEncoding }{enc}, \param{int }{platform = wxPLATFORM\_CURRENT}}
Return equivalents for given font that are used
under given platform. Supported platforms:
\begin{itemize}\itemsep=0pt
\item wxPLATFORM\_UNIX
\item wxPLATFORM\_WINDOWS
\item wxPLATFORM\_OS2
\item wxPLATFORM\_MAC
\item wxPLATFORM\_CURRENT
\end{itemize}
wxPLATFORM\_CURRENT means the platform this binary was compiled for.
Examples:
\begin{verbatim}
current platform enc returned value
----------------------------------------------
unix CP1250 {ISO8859_2}
unix ISO8859_2 {ISO8859_2}
windows ISO8859_2 {CP1250}
unix CP1252 {ISO8859_1,ISO8859_15}
\end{verbatim}
Equivalence is defined in terms of convertibility:
two encodings are equivalent if you can convert text between
then without losing information (it may - and will - happen
that you lose special chars like quotation marks or em-dashes
but you shouldn't lose any diacritics and language-specific
characters when converting between equivalent encodings).
Remember that this function does {\bf NOT} check for presence of
fonts in system. It only tells you what are most suitable
encodings. (It usually returns only one encoding.)
\wxheading{Notes}
\begin{itemize}\itemsep=0pt
\item Note that argument {\it enc} itself may be present in the returned array,
so that you can, as a side-effect, detect whether the
encoding is native for this platform or not.
\item \helpref{Convert}{wxencodingconverterconvert} is not limited to
converting between equivalent encodings, it can convert between two arbitrary
encodings.
\item If {\it enc} is present in the returned array, then it is {\bf always} the first
item of it.
\item Please note that the returned array may contain no items at all.
\end{itemize}
\membersection{wxEncodingConverter::GetAllEquivalents}\label{wxencodingconvertergetallequivalents}
\func{static wxFontEncodingArray}{GetAllEquivalents}{\param{wxFontEncoding }{enc}}
Similar to
\helpref{GetPlatformEquivalents}{wxencodingconvertergetplatformequivalents},
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 {\it enc} is in the array,
it is the very first item in it.

View File

@@ -1,63 +0,0 @@
\section{\class{wxEraseEvent}}\label{wxeraseevent}
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.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Event table macros}
To process an erase event, use this event handler macro to direct input to a member
function that takes a wxEraseEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_ERASE\_BACKGROUND(func)}}{Process a wxEVT\_ERASE\_BACKGROUND event.}
\end{twocollist}%
\wxheading{Remarks}
Use the {\bf m\_DC} device context to draw into, don't create wxPaintDC in
the event handler.
\wxheading{See also}
%\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground},
\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxEraseEvent::wxEraseEvent}
\func{}{wxEraseEvent}{\param{int }{id = 0}, \param{wxDC* }{dc = NULL}}
Constructor.
\membersection{wxEraseEvent::m\_dc}
\member{wxDC*}{m\_dc}
The device context associated with the erase event.
\membersection{wxEraseEvent::GetDC}\label{wxeraseeventgetdc}
\constfunc{wxDC*}{GetDC}{\void}
Returns the device context to draw into.

View File

@@ -1,144 +0,0 @@
\section{\class{wxEvent}}\label{wxevent}
An event is a structure holding information about an event passed to a
callback or member function. {\bf wxEvent} used to be a multipurpose
event object, and is an abstract base class for other event classes (see below).
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{See also}
\helpref{wxCommandEvent}{wxcommandevent},\rtfsp
\helpref{wxMouseEvent}{wxmouseevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxEvent::wxEvent}
\func{}{wxEvent}{\param{int }{id = 0}, \param{wxEventType }{eventType = {\tt wxEVT\_NULL}}}
Constructor. Should not need to be used directly by an application.
\membersection{wxEvent::m\_eventObject}
\member{wxObject*}{m\_eventObject}
The object (usually a window) that the event was generated from,
or should be sent to.
\membersection{wxEvent::m\_eventType}
\member{WXTYPE}{m\_eventType}
The type of the event, such as wxEVENT\_TYPE\_BUTTON\_COMMAND.
\membersection{wxEvent::m\_id}
\member{int}{m\_id}
Identifier for the window.
\membersection{wxEvent::m\_skipped}
\member{bool}{m\_skipped}
Set to TRUE by {\bf Skip} if this event should be skipped.
\membersection{wxEvent::m\_timeStamp}
\member{long}{m\_timeStamp}
Timestamp for this event.
\membersection{wxEvent::Clone}\label{wxeventclone}
\constfunc{virtual wxEvent*}{Clone}{\void}
Returns a copy of the event.
Any event that is posted to the wxWindows event system for later action (via
\helpref{wxEvtHandler::AddPendingEvent}{wxevthandleraddpendingevent} or
\helpref{wxPostEvent}{wxpostevent}) must implement this method. All wxWindows
events fully implement this method, but any derived events implemented by the
user should also implement this method just in case they (or some event
derived from them) are ever posted.
All wxWindows events implement a copy constructor, so the easiest way of
implementing the Clone function is to implement a copy constructor for
a new event (call it MyEvent) and then define the Clone function like this:
\begin{verbatim}
wxEvent *Clone(void) const { return new MyEvent(*this); }
\end{verbatim}
\membersection{wxEvent::GetEventObject}
\func{wxObject*}{GetEventObject}{\void}
Returns the object associated with the
event, if any.
\membersection{wxEvent::GetEventType}
\func{WXTYPE}{GetEventType}{\void}
Returns the identifier of the given event type,
such as wxEVENT\_TYPE\_BUTTON\_COMMAND.
\membersection{wxEvent::GetId}
\func{int}{GetId}{\void}
Returns the identifier associated with this event, such as a button command id.
\membersection{wxEvent::GetSkipped}
\func{bool}{GetSkipped}{\void}
Returns TRUE if the event handler should be skipped, FALSE otherwise.
\membersection{wxEvent::GetTimestamp}
\func{long}{GetTimestamp}{\void}
Gets the timestamp for the event.
\membersection{wxEvent::SetEventObject}
\func{void}{SetEventObject}{\param{wxObject* }{object}}
Sets the originating object.
\membersection{wxEvent::SetEventType}
\func{void}{SetEventType}{\param{WXTYPE }{typ}}
Sets the event type.
\membersection{wxEvent::SetId}
\func{void}{SetId}{\param{int}{ id}}
Sets the identifier associated with this event, such as a button command id.
\membersection{wxEvent::SetTimestamp}
\func{void}{SetTimestamp}{\param{long }{timeStamp}}
Sets the timestamp for the event.
Sets the originating object.
\membersection{wxEvent::Skip}\label{wxeventskip}
\func{void}{Skip}{\param{bool}{ skip = TRUE}}
Called by an event handler to tell the event system that the
event handler should be skipped, and the next valid handler used
instead.

View File

@@ -1,370 +0,0 @@
\section{\class{wxEvtHandler}}\label{wxevthandler}
A class that can handle events from the windowing system.
wxWindow (and therefore all window classes) are derived from
this class.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{See also}
\overview{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxEvtHandler::wxEvtHandler}
\func{}{wxEvtHandler}{\void}
Constructor.
\membersection{wxEvtHandler::\destruct{wxEvtHandler}}
\func{}{\destruct{wxEvtHandler}}{\void}
Destructor. If the handler is part of a chain, the destructor will
unlink itself and restore the previous and next handlers so that they point to
each other.
\membersection{wxEvtHandler::AddPendingEvent}\label{wxevthandleraddpendingevent}
\func{virtual void}{AddPendingEvent}{\param{wxEvent\& }{event}}
This function posts an event to be processed later.
\wxheading{Parameters}
\docparam{event}{Event to add to process queue.}
\wxheading{Remarks}
The difference between sending an event (using the
\helpref{ProcessEvent}{wxevthandlerprocessevent} method) and posting it is
that in the first case the event is processed before the function returns,
while in the second case, the function returns immediately and the event will
be processed sometime later (usually during the next event loop iteration).
A copy of {\it event} is made by the function, so the original can be deleted
as soon as function returns (it is common that the original is created on the
stack). This requires that the \helpref{wxEvent::Clone}{wxeventclone} method
be implemented by {\it event} so that it can be duplicated and stored until
it gets processed.
This is also the method to call for inter-thread communication---it will
post events safely between different threads which means that this method is
thread-safe by using critical sections where needed. In a multi-threaded
program, you often need to inform the main GUI thread about the status of
other working threads and such notification should be done using this method.
This method automatically wakes up idle handling if the underlying window
system is currently idle and thus would not send any idle events. (Waking
up idle handling is done calling \helpref{::wxWakeUpIdle}{wxwakeupidle}.)
\membersection{wxEvtHandler::Connect}\label{wxevthandlerconnect}
\func{void}{Connect}{\param{int}{ id},
\param{wxEventType }{eventType}, \param{wxObjectEventFunction}{ function},
\param{wxObject*}{ userData = NULL}}
\func{void}{Connect}{\param{int}{ id}, \param{int}{ lastId},
\param{wxEventType }{eventType}, \param{wxObjectEventFunction}{ function},
\param{wxObject*}{ userData = NULL}}
Connects the given function dynamically with the event handler, id and event type. This
is an alternative to the use of static event tables. See the 'dynamic' sample for usage.
\wxheading{Parameters}
\docparam{id}{The identifier (or first of the identifier range) to be associated with the event handler function.}
\docparam{lastId}{The second part of the identifier range to be associated with the event handler function.}
\docparam{eventType}{The event type to be associated with this event handler.}
\docparam{function}{The event handler function.}
\docparam{userData}{Data to be associated with the event table entry.}
\wxheading{Example}
\begin{verbatim}
frame->Connect( wxID_EXIT,
wxEVT_COMMAND_MENU_SELECTED,
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) MyFrame::OnQuit );
\end{verbatim}
\membersection{wxEvtHandler::Disconnect}\label{wxevthandlerdisconnect}
\func{bool}{Disconnect}{\param{int}{ id},
\param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL},
\param{wxObject*}{ userData = NULL}}
\func{bool}{Disconnect}{\param{int}{ id}, \param{int}{ lastId = -1},
\param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL},
\param{wxObject*}{ userData = NULL}}
Disconnects the given function dynamically from the event handler, using the specified
parameters as search criteria and returning TRUE if a matching function has been
found and removed. This method can only disconnect functions which have been added
using the \helpref{wxEvtHandler::Connect}{wxevthandlerconnect} method. There is no way
to disconnect functions connected using the (static) event tables.
\wxheading{Parameters}
\docparam{id}{The identifier (or first of the identifier range) associated with the event handler function.}
\docparam{lastId}{The second part of the identifier range associated with the event handler function.}
\docparam{eventType}{The event type associated with this event handler.}
\docparam{function}{The event handler function.}
\docparam{userData}{Data associated with the event table entry.}
\membersection{wxEvtHandler::GetClientData}\label{wxevthandlergetclientdata}
\func{void* }{GetClientData}{\void}
Gets user-supplied client data.
\wxheading{Remarks}
Normally, any extra data the programmer wishes to associate with the object
should be made available by deriving a new class with new data members.
\wxheading{See also}
\helpref{wxEvtHandler::SetClientData}{wxevthandlersetclientdata}
\membersection{wxEvtHandler::GetClientObject}\label{wxevthandlergetclientobject}
\constfunc{wxClientData*}{GetClientObject}{\void}
Get a pointer to the user-supplied client data object.
\wxheading{See also}
\helpref{wxEvtHandler::SetClientObject}{wxevthandlersetclientobject},
\helpref{wxClientData}{wxclientdata}
\membersection{wxEvtHandler::GetEvtHandlerEnabled}\label{wxevthandlergetevthandlerenabled}
\func{bool}{GetEvtHandlerEnabled}{\void}
Returns TRUE if the event handler is enabled, FALSE otherwise.
\wxheading{See also}
\helpref{wxEvtHandler::SetEvtHandlerEnabled}{wxevthandlersetevthandlerenabled}
\membersection{wxEvtHandler::GetNextHandler}\label{wxevthandlergetnexthandler}
\func{wxEvtHandler*}{GetNextHandler}{\void}
Gets the pointer to the next handler in the chain.
\wxheading{See also}
\helpref{wxEvtHandler::SetNextHandler}{wxevthandlersetnexthandler},\rtfsp
\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp
\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp
\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler}
\membersection{wxEvtHandler::GetPreviousHandler}\label{wxevthandlergetprevioushandler}
\func{wxEvtHandler*}{GetPreviousHandler}{\void}
Gets the pointer to the previous handler in the chain.
\wxheading{See also}
\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp
\helpref{wxEvtHandler::GetNextHandler}{wxevthandlergetnexthandler},\rtfsp
\helpref{wxEvtHandler::SetNextHandler}{wxevthandlersetnexthandler},\rtfsp
\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler}
\membersection{wxEvtHandler::ProcessEvent}\label{wxevthandlerprocessevent}
\func{virtual bool}{ProcessEvent}{\param{wxEvent\& }{event}}
Processes an event, searching event tables and calling zero or more suitable event handler function(s).
\wxheading{Parameters}
\docparam{event}{Event to process.}
\wxheading{Return value}
TRUE if a suitable event handler function was found and executed, and the function did not
call \helpref{wxEvent::Skip}{wxeventskip}.
\wxheading{Remarks}
Normally, your application would not call this function: it is called in the wxWindows
implementation to dispatch incoming user interface events to the framework (and application).
However, you might need to call it if implementing new functionality (such as a new control) where
you define new event types, as opposed to allowing the user to override virtual functions.
An instance where you might actually override the {\bf ProcessEvent} function is where you want
to direct event processing to event handlers not normally noticed by wxWindows. For example,
in the document/view architecture, documents and views are potential event handlers.
When an event reaches a frame, {\bf ProcessEvent} will need to be called on the associated
document and view in case event handler functions are associated with these objects.
The property classes library (wxProperty) also overrides {\bf ProcessEvent} for similar reasons.
The normal order of event table searching is as follows:
\begin{enumerate}\itemsep=0pt
\item If the object is disabled (via a call to \helpref{wxEvtHandler::SetEvtHandlerEnabled}{wxevthandlersetevthandlerenabled})
the function skips to step (6).
\item If the object is a wxWindow, {\bf ProcessEvent} is recursively called on the window's\rtfsp
\helpref{wxValidator}{wxvalidator}. If this returns TRUE, the function exits.
\item {\bf SearchEventTable} is called for this event handler. If this fails, the base
class table is tried, and so on until no more tables exist or an appropriate function was found,
in which case the function exits.
\item The search is applied down the entire chain of event handlers (usually the chain has a length
of one). If this succeeds, the function exits.
\item If the object is a wxWindow and the event is a wxCommandEvent, {\bf ProcessEvent} is
recursively applied to the parent window's event handler. If this returns TRUE, the function exits.
\item Finally, {\bf ProcessEvent} is called on the wxApp object.
\end{enumerate}
\wxheading{See also}
\helpref{wxEvtHandler::SearchEventTable}{wxevthandlersearcheventtable}
\membersection{wxEvtHandler::SearchEventTable}\label{wxevthandlersearcheventtable}
\func{bool}{SearchEventTable}{\param{wxEventTable\& }{table}, \param{wxEvent\& }{event}}
Searches the event table, executing an event handler function if an appropriate one
is found.
\wxheading{Parameters}
\docparam{table}{Event table to be searched.}
\docparam{event}{Event to be matched against an event table entry.}
\wxheading{Return value}
TRUE if a suitable event handler function was found and executed, and the function did not
call \helpref{wxEvent::Skip}{wxeventskip}.
\wxheading{Remarks}
This function looks through the object's event table and tries to find an entry
that will match the event.
An entry will match if:
\begin{enumerate}\itemsep=0pt
\item The event type matches, and
\item the identifier or identifier range matches, or the event table entry's identifier is zero.
\end{enumerate}
If a suitable function is called but calls \helpref{wxEvent::Skip}{wxeventskip}, this function will
fail, and searching will continue.
\wxheading{See also}
\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent}
\membersection{wxEvtHandler::SetClientData}\label{wxevthandlersetclientdata}
\func{void}{SetClientData}{\param{void* }{data}}
Sets user-supplied client data.
\wxheading{Parameters}
\docparam{data}{Data to be associated with the event handler.}
\wxheading{Remarks}
Normally, any extra data the programmer wishes to associate with
the object should be made available by deriving a new class
with new data members. You must not call this method and
\helpref{SetClientObject}{wxevthandlersetclientobject} on the
same class - only one of them.
\wxheading{See also}
\helpref{wxEvtHandler::GetClientData}{wxevthandlergetclientdata}
\membersection{wxEvtHandler::SetClientObject}\label{wxevthandlersetclientobject}
\func{void}{SetClientObject}{\param{wxClientData* }{data}}
Set the client data object. Any previous object will be deleted.
\wxheading{See also}
\helpref{wxEvtHandler::GetClientObject}{wxevthandlergetclientobject},
\helpref{wxClientData}{wxclientdata}
\membersection{wxEvtHandler::SetEvtHandlerEnabled}\label{wxevthandlersetevthandlerenabled}
\func{void}{SetEvtHandlerEnabled}{\param{bool }{enabled}}
Enables or disables the event handler.
\wxheading{Parameters}
\docparam{enabled}{TRUE if the event handler is to be enabled, FALSE if it is to be disabled.}
\wxheading{Remarks}
You can use this function to avoid having to remove the event handler from the chain, for example
when implementing a dialog editor and changing from edit to test mode.
\wxheading{See also}
\helpref{wxEvtHandler::GetEvtHandlerEnabled}{wxevthandlergetevthandlerenabled}
\membersection{wxEvtHandler::SetNextHandler}\label{wxevthandlersetnexthandler}
\func{void}{SetNextHandler}{\param{wxEvtHandler* }{handler}}
Sets the pointer to the next handler.
\wxheading{Parameters}
\docparam{handler}{Event handler to be set as the next handler.}
\wxheading{See also}
\helpref{wxEvtHandler::GetNextHandler}{wxevthandlergetnexthandler},\rtfsp
\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp
\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp
\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler}
\membersection{wxEvtHandler::SetPreviousHandler}\label{wxevthandlersetprevioushandler}
\func{void}{SetPreviousHandler}{\param{wxEvtHandler* }{handler}}
Sets the pointer to the previous handler.
\wxheading{Parameters}
\docparam{handler}{Event handler to be set as the previous handler.}
\wxheading{See also}
\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp
\helpref{wxEvtHandler::SetNextHandler}{wxevthandlersetnexthandler},\rtfsp
\helpref{wxEvtHandler::GetNextHandler}{wxevthandlergetnexthandler},\rtfsp
\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler}

View File

@@ -1,496 +0,0 @@
\section{\class{wxExpr}}\label{wxexpr}
The {\bf wxExpr} class is the building brick of expressions similar to Prolog
clauses, or objects. It can represent an expression of type long integer, float, string, word,
or list, and lists can be nested.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/wxexpr.h>
\wxheading{See also}
\helpref{wxExpr overview}{exproverview}, \helpref{wxExprDatabase}{wxexprdatabase}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxExpr::wxExpr}\label{wxexprconstr}
\func{}{wxExpr}{\param{const wxString\&}{functor}}
Construct a new clause with this form, supplying the functor name. A clause is an object
that will appear in the data file, with a list of attribute/value pairs.
\func{}{wxExpr}{\param{wxExprType}{ type}, \param{const wxString\&}{ wordOrString = ``"}}
Construct a new empty list, or a word (will be output with no quotes), or a string, depending on the
value of {\it type}.
{\it type} can be {\bf wxExprList}, {\bf wxExprWord}, or {\bf wxExprString}. If {\it type} is wxExprList,
the value of {\it wordOrString} will be ignored.
\func{}{wxExpr}{\param{long}{ value}}
Construct an integer expression.
\func{}{wxExpr}{\param{float}{ value}}
Construct a floating point expression.
\func{}{wxExpr}{\param{wxList* }{value}}
Construct a list expression. The list's nodes' data should
themselves be {\bf wxExpr}s.
wxExpr no longer uses the {\bf wxList} internally,
so this constructor turns the list into its internal
format (assuming a non-nested list) and then deletes the supplied
list.
\membersection{wxExpr::\destruct{wxExpr}}
\func{}{\destruct{wxExpr}}{\void}
Destructor.
\membersection{wxExpr::AddAttributeValue}\label{wxexpraddattributevalue}
Use these on clauses ONLY. Note that the functions for adding strings
and words must be differentiated by function name which is why
they are missing from this group (see \helpref{wxExpr::AddAttributeValueString}{wxexpraddattributevaluestring} and
\rtfsp\helpref{wxExpr::AddAttributeValueWord}{wxexpraddattributevalueword}).
\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{float }{value}}
Adds an attribute and floating point value pair to the clause.
\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{long }{value}}
Adds an attribute and long integer value pair to the clause.
\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxList* }{value}}
Adds an attribute and list value pair to the clause, converting the list into
internal form and then deleting {\bf value}. Note that the list should not contain
nested lists (except if in internal {\bf wxExpr} form.)
\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxExpr* }{value}}
Adds an attribute and wxExpr value pair to the clause. Do not delete\rtfsp
{\it value} once this function has been called.
\membersection{wxExpr::AddAttributeValueString}\label{wxexpraddattributevaluestring}
\func{void}{AddAttributeValueString}{\param{const wxString\&}{ attribute}, \param{const wxString\&}{ value}}
Adds an attribute and string value pair to the clause.
\membersection{wxExpr::AddAttributeValueStringList}\label{wxexpraddattributevaluestringlist}
\func{void}{AddAttributeValueStringList}{\param{const wxString\&}{ attribute}, \param{wxList* }{value}}
Adds an attribute and string list value pair to the clause.
Note that the list passed to this function is a list of strings, NOT a list
of {\bf wxExpr}s; it gets turned into a list of {\bf wxExpr}s
automatically. This is a convenience function, since lists of strings
are often manipulated in C++.
\membersection{wxExpr::AddAttributeValueWord}\label{wxexpraddattributevalueword}
\func{void}{AddAttributeValueWord}{\param{const wxString\&}{ attribute}, \param{const wxString\&}{ value}}
Adds an attribute and word value pair to the clause.
\membersection{wxExpr::Append}\label{wxexprappend}
\func{void}{Append}{\param{wxExpr*}{ value}}
Append the {\bf value} to the end of the list. `this' must be a list.
\membersection{wxExpr::Arg}\label{wxexprarg}
\constfunc{wxExpr* }{Arg}{\param{wxExprType}{ type}, \param{int}{ n}}
Get nth arg of the given clause (starting from 1). NULL is returned if
the expression is not a clause, or {\it n} is invalid, or the given type
does not match the actual type. See also \helpref{wxExpr::Nth}{wxexprnth}.
\membersection{wxExpr::Insert}\label{wxexprinsert}
\func{void}{Insert}{\param{wxExpr* }{value}}
Insert the {\bf value} at the start of the list. `this' must be a list.
\membersection{wxExpr::GetAttributeValue}\label{wxexprgetattributevalue}
These functions are the easiest way to retrieve attribute values, by
passing a pointer to variable. If the attribute is present, the
variable will be filled with the appropriate value. If not, the
existing value is left alone. This style of retrieving attributes
makes it easy to set variables to default values before calling these
functions; no code is necessary to check whether the attribute is
present or not.
\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxString\&}{ value}}
Retrieve a string (or word) value.
\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{float\& }{value}}
Retrieve a floating point value.
\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{int\& }{value}}
Retrieve an integer value.
\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{long\& }{value}}
Retrieve a long integer value.
\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxExpr**}{ value}}
Retrieve a wxExpr pointer.
\membersection{wxExpr::GetAttributeValueStringList}\label{wxexprgetattributestringlist}
\constfunc{void}{GetAttributeValueStringList}{\param{const wxString\&}{attribute}, \param{wxList* }{value}}
Use this on clauses ONLY. See above for comments on this style of
attribute value retrieval. This function expects to receive a pointer to
a new list (created by the calling application); it will append strings
to the list if the attribute is present in the clause.
\membersection{wxExpr::AttributeValue}\label{wxexprattributevalue}
\constfunc{wxExpr*}{AttributeValue}{\param{const wxString\&}{ word}}
Use this on clauses ONLY. Searches the clause for an attribute
matching {\it word}, and returns the value associated with it.
\membersection{wxExpr::Copy}\label{wxexprcopy}
\constfunc{wxExpr*}{Copy}{\void}
Recursively copies the expression, allocating new storage space.
\membersection{wxExpr::DeleteAttributeValue}\label{wxexprdeletattributevalue}
\func{void}{DeleteAttributeValue}{\param{const wxString\&}{ attribute}}
Use this on clauses only. Deletes the attribute and its value (if any) from the
clause.
\membersection{wxExpr::Functor}\label{wxexprfunctor}
\constfunc{wxString}{Functor}{\void}
Use this on clauses only. Returns the clause's functor (object name).
\membersection{wxExpr::GetClientData}\label{wxexprgetclientdata}
\constfunc{wxObject*}{GetClientData}{\void}
Retrieve arbitrary data stored with this clause. This can be useful when
reading in data for storing a pointer to the C++ object, so when another
clause makes a reference to this clause, its C++ object can be retrieved.
See \helpref{wxExpr::SetClientData}{wxexprsetclientdata}.
\membersection{wxExpr::GetFirst}\label{wxexprgetfirst}
\constfunc{wxExpr*}{GetFirst}{\void}
If this is a list expression (or clause), gets the first element in the list.
See also \helpref{wxExpr::GetLast}{wxexprgetlast}, \helpref{wxExpr::GetNext}{wxexprgetnext}, \helpref{wxExpr::Nth}{wxexprnth}.
\membersection{wxExpr::GetLast}\label{wxexprgetlast}
\constfunc{wxExpr*}{GetLast}{\void}
If this is a list expression (or clause), gets the last element in the list.
See also \helpref{wxExpr::GetFirst}{wxexprgetfirst}, \helpref{wxExpr::GetNext}{wxexprgetnext}, \helpref{wxExpr::Nth}{wxexprnth}.
\membersection{wxExpr::GetNext}\label{wxexprgetnext}
\constfunc{wxExpr*}{GetNext}{\void}
If this is a node in a list (any wxExpr may be a node in a list), gets the
next element in the list.
See also \helpref{wxExpr::GetFirst}{wxexprgetfirst}, \helpref{wxExpr::GetLast}{wxexprgetlast}, \helpref{wxExpr::Nth}{wxexprnth}.
\membersection{wxExpr::IntegerValue}\label{wxexprintegervalue}
\constfunc{long}{IntegerValue}{\void}
Returns the integer value of the expression.
\membersection{wxExpr::Nth}\label{wxexprnth}
\constfunc{wxExpr*}{Nth}{\param{int}{ n}}
Get nth arg of the given list expression (starting from 0). NULL is returned if
the expression is not a list expression, or {\it n} is invalid. See also \helpref{wxExpr::Arg}{wxexprarg}.
Normally, you would use attribute-value pairs to add and retrieve data
from objects (clauses) in a data file. However, if the data gets complex,
you may need to store attribute values as lists, and pick them apart
yourself.
\membersection{wxExpr::RealValue}\label{wxexprrealvalue}
\constfunc{float}{RealValue}{\void}
Returns the floating point value of the expression.
\membersection{wxExpr::SetClientData}\label{wxexprsetclientdata}
\func{void}{SetClientData}{\param{wxObject *}{data}}
Associate arbitrary data with this clause. This can be useful when
reading in data for storing a pointer to the C++ object, so when another
clause makes a reference to this clause, its C++ object can be retrieved.
See \helpref{wxExpr::GetClientData}{wxexprgetclientdata}.
\membersection{wxExpr::StringValue}\label{wxexprstringvalue}
\constfunc{wxString}{StringValue}{\void}
Returns the string value of the expression.
\membersection{wxExpr::Type}\label{wxexprtype}
\constfunc{wxExprType}{Type}{\void}
Returns the type of the expression. {\bf wxExprType} is defined as follows:
\begin{verbatim}
typedef enum {
wxExprNull,
wxExprInteger,
wxExprReal,
wxExprWord,
wxExprString,
wxExprList
} wxExprType;
\end{verbatim}
\membersection{wxExpr::WordValue}\label{wxexprwordvalue}
\constfunc{wxString}{WordValue}{\void}
Returns the word value of the expression.
\membersection{wxExpr::WriteClause}\label{wxexprwriteprologclause}
\func{void}{WriteClause}{\param{FILE *}{ stream}}
Writes the clause to the given stream in Prolog format. Not normally needed, since
the whole {\bf wxExprDatabase} will usually be written at once. The format is:
functor, open parenthesis, list of comma-separated expressions, close parenthesis,
full stop.
\membersection{wxExpr::WriteExpr}\label{wxexprwriteexpr}
\func{void}{WriteExpr}{\param{FILE *}{ stream}}
Writes the expression (not clause) to the given stream in Prolog
format. Not normally needed, since the whole {\bf wxExprDatabase} will
usually be written at once. Lists are written in square bracketed,
comma-delimited format.
\membersection{Functions and macros}
Below are miscellaneous functions and macros associated with wxExpr objects.
\func{bool}{wxExprIsFunctor}{\param{wxExpr *}{expr}, \param{const wxString\&}{ functor}}
Checks that the functor of {\it expr} is {\it functor}.
\func{void}{wxExprCleanUp}{\void}
Cleans up the wxExpr system (YACC/LEX buffers) to avoid memory-checking warnings as the program exits.
\begin{verbatim}
#define wxMakeInteger(x) (new wxExpr((long)x))
#define wxMakeReal(x) (new wxExpr((float)x))
#define wxMakeString(x) (new wxExpr(PrologString, x))
#define wxMakeWord(x) (new wxExpr(PrologWord, x))
#define wxMake(x) (new wxExpr(x))
\end{verbatim}
Macros to help make wxExpr objects.
\section{\class{wxExprDatabase}}\label{wxexprdatabase}
The {\bf wxExprDatabase} class represents a database, or list,
of Prolog-like expressions. Instances of this class are used for reading,
writing and creating data files.
\wxheading{Derived from}
\helpref{wxList}{wxlist}\\
\helpref{wxObject}{wxobject}
\wxheading{See also}
\helpref{wxExpr overview}{exproverview}, \helpref{wxExpr}{wxexpr}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxExprDatabase::wxExprDatabase}\label{wxexprdatabaseconstr}
\func{void}{wxExprDatabase}{\param{proioErrorHandler}{ handler = 0}}
Construct a new, unhashed database, with an optional error handler. The
error handler must be a function returning a bool and taking an integer and a string
argument. When an error occurs when reading or writing a database, this function is
called. The error is given as the first argument (currently one of WXEXPR\_ERROR\_GENERAL,
WXEXPR\_ERROR\_SYNTAX) and an error message is given as the second argument. If FALSE
is returned by the error handler, processing of the wxExpr operation stops.
Another way of handling errors is simply to call \helpref{wxExprDatabase::GetErrorCount}{wxexprdatabasegeterrorcount} after
the operation, to check whether errors have occurred, instead of installing an error handler.
If the error count is more than zero, \helpref{wxExprDatabase::Write}{wxexprdatabasewrite} and
\rtfsp\helpref{wxExprDatabase::Read}{wxexprdatabaseread} will return FALSE to
the application.
For example:
\begin{verbatim}
bool myErrorHandler(int err, chat *msg)
{
if (err == WXEXPR_ERROR_SYNTAX)
{
wxMessageBox(msg, "Syntax error");
}
return FALSE;
}
wxExprDatabase database(myErrorHandler);
\end{verbatim}
\func{}{wxExprDatabase}{\param{wxExprType}{ type}, \param{const wxString\&}{attribute},
\rtfsp\param{int}{ size = 500}, \param{proioErrorHandler}{ handler = 0}}
Construct a new database hashed on a combination of the clause functor and
a named attribute (often an integer identification).
See above for an explanation of the error handler.
\membersection{wxExprDatabase::\destruct{wxExprDatabase}}
\func{}{\destruct{wxExprDatabase}}{\void}
Delete the database and contents.
\membersection{wxExprDatabase::Append}\label{wxexprdatabaseappend}
\func{void}{Append}{\param{wxExpr* }{clause}}
Append a clause to the end of the database. If the database is hashing,
the functor and a user-specified attribute will be hashed upon, giving the
option of random access in addition to linear traversal of the database.
\membersection{wxExprDatabase::BeginFind}\label{wxexprdatabasebeginfind}
\func{void}{BeginFind}{\void}
Reset the current position to the start of the database. Subsequent
\rtfsp\helpref{wxExprDatabase::FindClause}{wxexprdatabasefindclause} calls will move the pointer.
\membersection{wxExprDatabase::ClearDatabase}\label{wxexprdatabasecleardatabase}
\func{void}{ClearDatabase}{\void}
Clears the contents of the database.
\membersection{wxExprDatabase::FindClause}\label{wxexprdatabasefindclause}
Various ways of retrieving clauses from the database. A return
value of NULL indicates no (more) clauses matching the given criteria.
Calling the functions repeatedly retrieves more matching clauses, if any.
\func{wxExpr* }{FindClause}{\param{long}{ id}}
Find a clause based on the special ``id'' attribute.
\func{wxExpr* }{FindClause}{\param{const wxString\&}{ attribute}, \param{const wxString\&}{ value}}
Find a clause which has the given attribute set to the given string or word value.
\func{wxExpr*}{FindClause}{\param{const wxString\&}{ attribute}, \param{long}{ value}}
Find a clause which has the given attribute set to the given integer value.
\func{wxExpr*}{FindClause}{\param{const wxString\&}{ attribute}, \param{float}{ value}}
Find a clause which has the given attribute set to the given floating point value.
\membersection{wxExprDatabase::FindClauseByFunctor}\label{wxexprdatabasefindclausebyfunctor}
\func{wxExpr*}{FindClauseByFunctor}{\param{const wxString\&}{ functor}}
Find the next clause with the specified functor.
\membersection{wxExprDatabase::GetErrorCount}\label{wxexprdatabasegeterrorcount}
\constfunc{int}{GetErrorCount}{\void}
Returns the number of errors encountered during the last read or write operation.
\membersection{wxExprDatabase::HashFind}\label{wxexprdatabasehashfind}
\constfunc{wxExpr*}{HashFind}{\param{const wxString\&}{ functor}, \param{long}{ value}}
Finds the clause with the given functor and with the attribute specified
in the database constructor having the given integer value.
For example,
\begin{verbatim}
// Hash on a combination of functor and integer "id" attribute when reading in
wxExprDatabase db(wxExprInteger, "id");
// Read it in
db.ReadProlog("data");
// Retrieve a clause with specified functor and id
wxExpr *clause = db.HashFind("node", 24);
\end{verbatim}
This would retrieve a clause which is written: {\tt node(id = 24, ..., )}.
\func{wxExpr*}{HashFind}{\param{const wxString\&}{ functor}, \param{const wxString\&}{ value}}
Finds the clause with the given functor and with the attribute specified
in the database constructor having the given string value.
\membersection{wxExprDatabase::Read}\label{wxexprdatabaseread}
\func{bool}{Read}{\param{const wxString\&}{ filename}}
Reads in the given file, returning TRUE if successful.
\membersection{wxExprDatabase::ReadFromString}\label{wxexprdatabasereadfromstring}
\func{bool}{ReadFromString}{\param{const wxString\&}{ buffer}}
Reads a Prolog database from the given string buffer, returning TRUE if
successful.
\membersection{wxExprDatabase::Write}\label{wxexprdatabasewrite}
\func{bool}{Write}{\param{FILE *}{stream}}
\func{bool}{Write}{\param{const wxString\&}{ filename}}
Writes the database as a Prolog-format file.

View File

@@ -1,238 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: fdrepdlg.tex
%% Purpose: wxFindReplaceDialog documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 01.08.01
%% RCS-ID: $Id$
%% Copyright: (c) 2001 Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxFindDialogEvent}}\label{wxfinddialogevent}
wxFindReplaceDialog events
\wxheading{Derived from}
\helpref{wxCommandEvent}{wxcommandevent}
\wxheading{Include files}
<wx/fdrepdlg.h>
\wxheading{Event table macros}
To process a command event from
\helpref{wxFindReplaceDialog}{wxfindreplacedialog}, use these event handler
macros to direct input to member functions that take a wxFindDialogEvent
argument. The {\it id} parameter is the identifier of the find dialog and you
may usually specify $-1$ for it unless you plan to have several find dialogs
sending events to the same owner window simultaneously.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_FIND(id, func)}}{Find button was pressed in the dialog.}
\twocolitem{{\bf EVT\_FIND\_NEXT(id, func)}}{Find next button was pressed in the dialog.}
\twocolitem{{\bf EVT\_FIND\_REPLACE(id, func)}}{Replace button was pressed in the dialog.}
\twocolitem{{\bf EVT\_FIND\_REPLACE\_ALL(id, func)}}{Replace all button was pressed in the dialog.}
\twocolitem{{\bf EVT\_FIND\_CLOSE(id, func)}}{The dialog is being destroyed,
any pointers to it cannot be used any longer.}
\end{twocollist}%
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFindDialogEvent::wxFindDialogEvent}\label{wxfinddialogeventwxfinddialogevent}
\func{}{wxFindDialogEvent}{\param{wxEventType }{commandType = wxEVT\_NULL}, \param{int }{id = 0}}
Constuctor used by wxWindows only.
\membersection{wxFindDialogEvent::GetFlags}\label{wxfinddialogeventgetflags}
\constfunc{int}{GetFlags}{\void}
Get the currently selected flags: this is the combination of {\tt wxFR\_DOWN},
{\tt wxFR\_WHOLEWORD} and {\tt wxFR\_MATCHCASE} flags.
\membersection{wxFindDialogEvent::GetFindString}\label{wxfinddialogeventgetfindstring}
\constfunc{wxString}{GetFindString}{\void}
Return the string to find (never empty).
\membersection{wxFindDialogEvent::GetReplaceString}\label{wxfinddialogeventgetreplacestring}
\constfunc{const wxString\&}{GetReplaceString}{\void}
Return the string to replace the search string with (only for replace and
replace all events).
\membersection{wxFindDialogEvent::GetDialog}\label{wxfinddialogeventgetdialog}
\constfunc{wxFindReplaceDialog*}{GetDialog}{\void}
Return the pointer to the dialog which generated this event.
\section{\class{wxFindReplaceData}}\label{wxfindreplacedata}
wxFindReplaceData holds the data for
\helpref{wxFindReplaceDialog}{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
\helpref{wxFindDialogEvent}{wxfinddialogevent} is generated so instead of
using the wxFindDialogEvent methods you can also directly query this object.
Note that all {\tt SetXXX()} methods may only be called before showing the
dialog and calling them has no effect later.
\wxheading{Include files}
\begin{verbatim}
#include <wx/fdrepdlg.h>
\end{verbatim}
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Data structures}
Flags used by
\helpref{wxFindReplaceData::GetFlags()}{wxfindreplacedatagetflags} and
\helpref{wxFindDialogEvent::GetFlags()}{wxfinddialogeventgetflags}:
\begin{verbatim}
enum wxFindReplaceFlags
{
// downward search/replace selected (otherwise - upwards)
wxFR_DOWN = 1,
// whole word search/replace selected
wxFR_WHOLEWORD = 2,
// case sensitive search/replace selected (otherwise - case insensitive)
wxFR_MATCHCASE = 4
}
\end{verbatim}
These flags can be specified in
\helpref{wxFindReplaceDialog ctor}{wxfindreplacedialogctor} or
\helpref{Create()}{wxfindreplacedialogcreate}:
\begin{verbatim}
enum wxFindReplaceDialogStyles
{
// replace dialog (otherwise find dialog)
wxFR_REPLACEDIALOG = 1,
// don't allow changing the search direction
wxFR_NOUPDOWN = 2,
// don't allow case sensitive searching
wxFR_NOMATCHCASE = 4,
// don't allow whole word searching
wxFR_NOWHOLEWORD = 8
}
\end{verbatim}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFindReplaceData::wxFindReplaceData}\label{wxfindreplacedatactor}
\func{}{wxFindReplaceData}{\param{wxUint32 }{flags = 0}}
Constuctor initializes the flags to default value ($0$).
\membersection{wxFindReplaceData::GetFindString}\label{wxfindreplacedatagetfindstring}
\func{const wxString\&}{GetFindString}{\void}
Get the string to find.
\membersection{wxFindReplaceData::GetReplaceString}\label{wxfindreplacedatagetreplacestring}
\func{const wxString\&}{GetReplaceString}{\void}
Get the replacement string.
\membersection{wxFindReplaceData::GetFlags}\label{wxfindreplacedatagetflags}
\constfunc{int}{GetFlags}{\void}
Get the combination of {\tt wxFindReplaceFlags} values.
\membersection{wxFindReplaceData::SetFlags}\label{wxfindreplacedatasetflags}
\func{void}{SetFlags}{\param{wxUint32 }{flags}}
Set the flags to use to initialize the controls of the dialog.
\membersection{wxFindReplaceData::SetFindString}\label{wxfindreplacedatasetfindstring}
\func{void}{SetFindString}{\param{const wxString\& }{str}}
Set the string to find (used as initial value by the dialog).
\membersection{wxFindReplaceData::SetReplaceString}\label{wxfindreplacedatasetreplacestring}
\func{void}{SetReplaceString}{\param{const wxString\& }{str}}
Set the replacement string (used as initial value by the dialog).
\section{\class{wxFindReplaceDialog}}\label{wxfindreplacedialog}
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
parent of this dialog. Note that it means that unlike for the other standard
dialogs this one {\bf 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.
\wxheading{Include files}
\begin{verbatim}
#include <wx/fdrepdlg.h>
\end{verbatim}
\wxheading{Derived from}
\helpref{wxDialog}{wxdialog}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFindReplaceDialog::wxFindReplaceDialog}\label{wxfindreplacedialogctor}
\func{}{wxFindReplaceDialog}{\void}
\func{}{wxFindReplaceDialog}{\param{wxWindow * }{parent}, \param{wxFindReplaceData* }{data}, \param{const wxString\& }{title}, \param{int }{style = 0}}
After using default constructor \helpref{Create()}{wxfindreplacedialogcreate}
must be called.
The {\it parent} and {\it data} parameters must be non-{\tt NULL}.
\membersection{wxFindReplaceDialog::\destruct{wxFindReplaceDialog}}\label{wxfindreplacedialogdtor}
\func{}{\destruct{wxFindReplaceDialog}}{\void}
Destructor.
\membersection{wxFindReplaceDialog::Create}\label{wxfindreplacedialogcreate}
\func{bool}{Create}{\param{wxWindow * }{parent}, \param{wxFindReplaceData* }{data}, \param{const wxString\& }{title}, \param{int }{style = 0}}
Creates the dialog; use \helpref{Show}{wxwindowshow} to show it on screen.
The {\it parent} and {\it data} parameters must be non-{\tt NULL}.
\membersection{wxFindReplaceDialog::GetData}\label{wxfindreplacedialoggetdata}
\constfunc{const wxFindReplaceData*}{GetData}{\void}
Get the \helpref{wxFindReplaceData}{wxfindreplacedata} object used by this
dialog.

View File

@@ -1,213 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: ffile.tex
%% Purpose: wxFFile documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 14.01.02 (extracted from file.tex)
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxFFile}}\label{wxffile}
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 {\tt FILE *} handle used
by standard C IO library (also known as {\tt stdio}).
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/ffile.h>
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt%
\twocolitem{{\bf wxFromStart}}{Count offset from the start of the file}
\twocolitem{{\bf wxFromCurrent}}{Count offset from the current position of the file pointer}
\twocolitem{{\bf wxFromEnd}}{Count offset from the end of the file (backwards)}
\end{twocollist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFFile::wxFFile}\label{wxffileconstr}
\func{}{wxFFile}{\void}
Default constructor.
\func{}{wxFFile}{\param{const char*}{ filename}, \param{const char*}{ mode = "r"}}
Opens a file with the given mode. As there is no way to return whether the
operation was successful or not from the constructor you should test the
return value of \helpref{IsOpened}{wxffileisopened} to check that it didn't
fail.
\func{}{wxFFile}{\param{FILE*}{ fp}}
Opens a file with the given file pointer, which has already been opened.
\wxheading{Parameters}
\docparam{filename}{The filename.}
\docparam{mode}{The mode in which to open the file using standard C strings.
Note that you should use {\tt "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.}
\docparam{fp}{An existing file descriptor, such as stderr.}
\membersection{wxFFile::\destruct{wxFFile}}
\func{}{\destruct{wxFFile}}{\void}
Destructor will close the file.
NB: it is not virtual so you should {\it not} derive from wxFFile!
\membersection{wxFFile::Attach}\label{wxffileattach}
\func{void}{Attach}{\param{FILE*}{ fp}}
Attaches an existing file pointer to the wxFFile object.
The descriptor should be already opened and it will be closed by wxFFile
object.
\membersection{wxFFile::Close}\label{wxffileclose}
\func{bool}{Close}{\void}
Closes the file and returns TRUE on success.
\membersection{wxFFile::Detach}\label{wxffiledetach}
\func{void}{Detach}{\void}
Get back a file pointer from wxFFile object - the caller is responsible for closing the file if this
descriptor is opened. \helpref{IsOpened()}{wxffileisopened} will return FALSE after call to Detach().
\membersection{wxFFile::fp}\label{wxffilefp}
\constfunc{FILE *}{fp}{\void}
Returns the file pointer associated with the file.
\membersection{wxFFile::Eof}\label{wxffileeof}
\constfunc{bool}{Eof}{\void}
Returns TRUE if the an attempt has been made to read {\it past}
the end of the file.
Note that the behaviour of the file descriptor based class
\helpref{wxFile}{wxfile} is different as \helpref{wxFile::Eof}{wxfileeof}
will return TRUE here as soon as the last byte of the file has been
read.
\membersection{wxFFile::Flush}\label{wxffileflush}
\func{bool}{Flush}{\void}
Flushes the file and returns TRUE on success.
\membersection{wxFFile::IsOpened}\label{wxffileisopened}
\constfunc{bool}{IsOpened}{\void}
Returns TRUE if the file has been opened.
\membersection{wxFFile::Length}\label{wxffilelength}
\constfunc{size\_t}{Length}{\void}
Returns the length of the file.
\membersection{wxFFile::Open}\label{wxffileopen}
\func{bool}{Open}{\param{const char*}{ filename}, \param{const char*}{ mode = "r"}}
Opens the file, returning TRUE if successful.
\wxheading{Parameters}
\docparam{filename}{The filename.}
\docparam{mode}{The mode in which to open the file.}
\membersection{wxFFile::Read}\label{wxffileread}
\func{size\_t}{Read}{\param{void*}{ buffer}, \param{off\_t}{ count}}
Reads the specified number of bytes into a buffer, returning the actual number read.
\wxheading{Parameters}
\docparam{buffer}{A buffer to receive the data.}
\docparam{count}{The number of bytes to read.}
\wxheading{Return value}
The number of bytes read.
\membersection{wxFFile::Seek}\label{wxffileseek}
\func{bool}{Seek}{\param{long }{ofs}, \param{wxSeekMode }{mode = wxFromStart}}
Seeks to the specified position and returns TRUE on success.
\wxheading{Parameters}
\docparam{ofs}{Offset to seek to.}
\docparam{mode}{One of {\bf wxFromStart}, {\bf wxFromEnd}, {\bf wxFromCurrent}.}
\membersection{wxFFile::SeekEnd}\label{wxffileseekend}
\func{bool}{SeekEnd}{\param{long }{ofs = 0}}
Moves the file pointer to the specified number of bytes before the end of the file
and returns TRUE on success.
\wxheading{Parameters}
\docparam{ofs}{Number of bytes before the end of the file.}
\membersection{wxFFile::Tell}\label{wxffiletell}
\constfunc{size\_t}{Tell}{\void}
Returns the current position.
\membersection{wxFFile::Write}\label{wxffilewrite}
\func{size\_t}{Write}{\param{const void*}{ buffer}, \param{size\_t}{ count}}
Writes the specified number of bytes from a buffer.
\wxheading{Parameters}
\docparam{buffer}{A buffer containing the data.}
\docparam{count}{The number of bytes to write.}
\wxheading{Return value}
Number of bytes written.
\membersection{wxFFile::Write}\label{wxffilewrites}
\func{bool}{Write}{\param{const wxString\& }{s}, \param{wxMBConv\&}{ conv = wxConvLibc}}
Writes the contents of the string to the file, returns TRUE on success.
The second argument is only meaningful in Unicode build of wxWindows when
{\it conv} is used to convert {\it s} to multibyte representation.

View File

@@ -1,150 +0,0 @@
% -----------------------------------------------------------------------------
% wxFFileInputStream
% -----------------------------------------------------------------------------
\section{\class{wxFFileInputStream}}\label{wxffileinputstream}
This class represents data read in from a file. There are actually
two such groups of classes: this one is based on \helpref{wxFFile}{wxffile}
whereas \helpref{wxFileInputStream}{wxfileinputstream} is based in
the \helpref{wxFile}{wxfile} class.
Note that \helpref{wxFile}{wxfile} and \helpref{wxFFile}{wxffile} differ
in one aspect, namely when to report that the end of the file has been
reached. This is documented in \helpref{wxFile::Eof}{wxfileeof} and
\helpref{wxFFile::Eof}{wxffileeof} and the behaviour of the stream
classes reflects this difference, i.e. wxFileInputStream will report
wxSTREAM\_EOF after having read the last byte whereas wxFFileInputStream
will report wxSTREAM\_EOF after trying to read {\it past} the last byte.
\wxheading{Derived from}
\helpref{wxInputStream}{wxinputstream}
\wxheading{Include files}
<wx/wfstream.h>
\wxheading{See also}
\helpref{wxBufferedInputStream}{wxbufferedinputstream}, \helpref{wxFFileOutputStream}{wxffileoutputstream}, \helpref{wxFileOutputStream}{wxfileoutputstream}
% ----------
% Members
% ----------
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFFileInputStream::wxFFileInputStream}
\func{}{wxFFileInputStream}{\param{const wxString\&}{ ifileName}}
Opens the specified file using its {\it ifilename} name in read-only mode.
\func{}{wxFFileInputStream}{\param{wxFFile\&}{ file}}
Initializes a file stream in read-only mode using the file I/O object {\it file}.
\func{}{wxFFileInputStream}{\param{FILE *}{ fp}}
Initializes a file stream in read-only mode using the specified file pointer {\it fp}.
\membersection{wxFFileInputStream::\destruct{wxFFileInputStream}}
\func{}{\destruct{wxFFileInputStream}}{\void}
Destructor.
\membersection{wxFFileInputStream::Ok}
\constfunc{bool}{Ok}{\void}
Returns TRUE if the stream is initialized and ready.
% -----------------------------------------------------------------------------
% wxFFileOutputStream
% -----------------------------------------------------------------------------
\section{\class{wxFFileOutputStream}}\label{wxffileoutputstream}
This class represents data written to a file. There are actually
two such groups of classes: this one is based on \helpref{wxFFile}{wxffile}
whereas \helpref{wxFileInputStream}{wxffileinputstream} is based in
the \helpref{wxFile}{wxfile} class.
Note that \helpref{wxFile}{wxfile} and \helpref{wxFFile}{wxffile} differ
in one aspect, namely when to report that the end of the file has been
reached. This is documented in \helpref{wxFile::Eof}{wxfileeof} and
\helpref{wxFFile::Eof}{wxffileeof} and the behaviour of the stream
classes reflects this difference, i.e. wxFileInputStream will report
wxSTREAM\_EOF after having read the last byte whereas wxFFileInputStream
will report wxSTREAM\_EOF after trying to read {\it past} the last byte.
\wxheading{Derived from}
\helpref{wxOutputStream}{wxoutputstream}
\wxheading{Include files}
<wx/wfstream.h>
\wxheading{See also}
\helpref{wxBufferedOutputStream}{wxbufferedoutputstream}, \helpref{wxFFileInputStream}{wxffileinputstream}, \helpref{wxFileInputStream}{wxfileinputstream}
% ----------
% Members
% ----------
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFFileOutputStream::wxFFileOutputStream}
\func{}{wxFFileOutputStream}{\param{const wxString\&}{ ofileName}}
Creates a new file with {\it ofilename} name and initializes the stream in
write-only mode.
\func{}{wxFFileOutputStream}{\param{wxFFile\&}{ file}}
Initializes a file stream in write-only mode using the file I/O object {\it file}.
\func{}{wxFFileOutputStream}{\param{FILE *}{ fp}}
Initializes a file stream in write-only mode using the file descriptor {\it fp}.
\membersection{wxFFileOutputStream::\destruct{wxFFileOutputStream}}
\func{}{\destruct{wxFFileOutputStream}}{\void}
Destructor.
\membersection{wxFFileOutputStream::Ok}
\constfunc{bool}{Ok}{\void}
Returns TRUE if the stream is initialized and ready.
% -----------------------------------------------------------------------------
% wxFFileStream
% -----------------------------------------------------------------------------
\section{\class{wxFFileStream}}
\wxheading{Derived from}
\helpref{wxFFileOutputStream}{wxffileoutputstream}, \helpref{wxFFileInputStream}{wxffileinputstream}
\wxheading{Include files}
<wx/wfstream.h>
\wxheading{See also}
\helpref{wxStreamBuffer}{wxstreambuffer}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFFileStream::wxFFileStream}
\func{}{wxFFileStream}{\param{const wxString\&}{ iofileName}}
Initializes a new file stream in read-write mode using the specified
{\it iofilename} name.

View File

@@ -1,55 +0,0 @@
\section{\class{wxFileDataObject}}\label{wxfiledataobject}
wxFileDataObject is a specialization of \helpref{wxDataObject}{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.
{\bf 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 wxWindows application is not currently
supported.
\wxheading{Virtual functions to override}
None.
\wxheading{Derived from}
\helpref{wxDataObjectSimple}{wxdataobjectsimple}\\
\helpref{wxDataObject}{wxdataobject}
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{See also}
\helpref{wxDataObject}{wxdataobject},
\helpref{wxDataObjectSimple}{wxdataobjectsimple},
\helpref{wxTextDataObject}{wxtextdataobject},
\helpref{wxBitmapDataObject}{wxbitmapdataobject},
\helpref{wxDataObject}{wxdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFileDataObject}\label{wxfiledataobjectwxfiledataobject}
\func{}{wxFileDataObject}{\void}
Constructor.
\membersection{wxFileDataObject::AddFile}\label{wxfiledataobjectaddfile}
\func{virtual void}{AddFile}{\param{const wxString\& }{file}}
{\bf MSW only:} adds a file to the file list represented by this data object.
\membersection{wxFileDataObject::GetFilenames}\label{wxfiledataobjectgetfilenames}
\constfunc{const wxArrayString\& }{GetFilenames}{\void}
Returns the \helpref{array}{wxarraystring} of file names.

View File

@@ -1,55 +0,0 @@
\section{\class{wxFileDropTarget}}\label{wxfiledroptarget}
This is a \helpref{drop target}{wxdroptarget} which accepts files (dragged
from File Manager or Explorer).
\wxheading{Derived from}
\helpref{wxDropTarget}{wxdroptarget}
\wxheading{Include files}
<wx/dnd.h>
\wxheading{See also}
\helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDropSource}{wxdropsource},
\helpref{wxDropTarget}{wxdroptarget}, \helpref{wxTextDropTarget}{wxtextdroptarget}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFileDropTarget::wxFileDropTarget}\label{wxfiledroptargetwxfiledroptarget}
\func{}{wxFileDropTarget}{\void}
Constructor.
\membersection{wxFileDropTarget::OnDrop}\label{wxfiledroptargetondrop}
\func{virtual bool}{OnDrop}{\param{long }{x}, \param{long }{y}, \param{const void }{*data}, \param{size\_t }{size}}
See \helpref{wxDropTarget::OnDrop}{wxdroptargetondrop}. This function is implemented
appropriately for files, and calls \helpref{wxFileDropTarget::OnDropFiles}{wxfiledroptargetondropfiles}.
\membersection{wxFileDropTarget::OnDropFiles}\label{wxfiledroptargetondropfiles}
\func{virtual bool}{OnDropFiles}{\param{wxCoord }{x}, \param{wxCoord }{y}, \param{const wxArrayString\& }{filenames}}
Override this function to receive dropped files.
\wxheading{Parameters}
\docparam{x}{The x coordinate of the mouse.}
\docparam{y}{The y coordinate of the mouse.}
\docparam{filenames}{An array of filenames.}
\wxheading{Return value}
Return TRUE to accept the data, FALSE to veto the operation.
% VZ: this clarification is probably not needed any longer?
%\perlnote{In wxPerl there is just an array reference in place of {\tt nFiles}
%and {\tt files}.}

View File

@@ -1,300 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: file.tex
%% Purpose: wxFile documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 14.01.02 (extracted from file.tex)
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxFile}}\label{wxfile}
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 {\tt file descriptor.} - see also
\helpref{wxFFile}{wxffile} for a wrapper around {\tt FILE} structure.
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/file.h>
\wxheading{Constants}
wx/file.h defines the following constants:
\begin{verbatim}
#define wxS_IRUSR 00400
#define wxS_IWUSR 00200
#define wxS_IXUSR 00100
#define wxS_IRGRP 00040
#define wxS_IWGRP 00020
#define wxS_IXGRP 00010
#define wxS_IROTH 00004
#define wxS_IWOTH 00002
#define wxS_IXOTH 00001
// default mode for the new files: corresponds to umask 022
#define wxS_DEFAULT (wxS_IRUSR | wxS_IWUSR | wxS_IRGRP | wxS_IWGRP | wxS_IROTH | wxS_IWOTH)
\end{verbatim}
These constants define the file access rights and are used with
\helpref{wxFile::Create}{wxfilecreate} and \helpref{wxFile::Open}{wxfileopen}.
The {\it OpenMode} enumeration defines the different modes for opening a file,
it is defined inside wxFile class so its members should be specified with {\it wxFile::} scope
resolution prefix. It is also used with \helpref{wxFile::Access}{wxfileaccess} function.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt%
\twocolitem{{\bf wxFile::read}}{Open file for reading or test if it can be opened for reading with Access()}
\twocolitem{{\bf wxFile::write}}{Open file for writing deleting the contents of the file if it already exists
or test if it can be opened for writing with Access()}
\twocolitem{{\bf wxFile::read\_write}}{Open file for reading and writing; can not be used with Access()}
\twocolitem{{\bf wxFile::write\_append}}{Open file for appending: the file is opened for writing, but the old
contents of the file is not erased and the file pointer is initially placed at the end of the file;
can not be used with Access(). This is the same as {\bf wxFile::write} if the
file doesn't exist.}
\twocolitem{{\bf wxFile::write\_excl}}{Open the file securely for writing (Uses O\_EXCL | O\_CREAT).
Will fail if the file already exists, else create and open it atomically. Useful for opening temporary files without being vulnerable to race exploits.}
\end{twocollist}
Other constants defined elsewhere but used by wxFile functions are wxInvalidOffset which represents an
invalid value of type {\it off\_t} and is returned by functions returning {\it off\_t} on error and the seek
mode constants used with \helpref{Seek()}{wxfileseek}:
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt%
\twocolitem{{\bf wxFromStart}}{Count offset from the start of the file}
\twocolitem{{\bf wxFromCurrent}}{Count offset from the current position of the file pointer}
\twocolitem{{\bf wxFromEnd}}{Count offset from the end of the file (backwards)}
\end{twocollist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFile::wxFile}\label{wxfileconstr}
\func{}{wxFile}{\void}
Default constructor.
\func{}{wxFile}{\param{const char*}{ filename}, \param{wxFile::OpenMode}{ mode = wxFile::read}}
Opens a file with the given mode. As there is no way to return whether the
operation was successful or not from the constructor you should test the
return value of \helpref{IsOpened}{wxfileisopened} to check that it didn't
fail.
\func{}{wxFile}{\param{int}{ fd}}
Associates the file with the given file descriptor, which has already been opened.
\wxheading{Parameters}
\docparam{filename}{The filename.}
\docparam{mode}{The mode in which to open the file. May be one of {\bf wxFile::read}, {\bf wxFile::write} and {\bf wxFile::read\_write}.}
\docparam{fd}{An existing file descriptor (see \helpref{Attach()}{wxfileattach} for the list of predefined descriptors)}
\membersection{wxFile::\destruct{wxFile}}
\func{}{\destruct{wxFile}}{\void}
Destructor will close the file.
{\bf NB:} it is not virtual so you should not use wxFile polymorphically.
\membersection{wxFile::Access}\label{wxfileaccess}
\func{static bool}{Access}{\param{const char *}{ name}, \param{OpenMode}{ mode}}
This function verifies if we may access the given file in specified mode. Only
values of wxFile::read or wxFile::write really make sense here.
\membersection{wxFile::Attach}\label{wxfileattach}
\func{void}{Attach}{\param{int}{ fd}}
Attaches an existing file descriptor to the wxFile object. Example of predefined
file descriptors are 0, 1 and 2 which correspond to stdin, stdout and stderr (and
have symbolic names of {\bf wxFile::fd\_stdin}, {\bf wxFile::fd\_stdout} and {\bf wxFile::fd\_stderr}).
The descriptor should be already opened and it will be closed by wxFile
object.
\membersection{wxFile::Close}\label{wxfileclose}
\func{void}{Close}{\void}
Closes the file.
\membersection{wxFile::Create}\label{wxfilecreate}
\func{bool}{Create}{\param{const char*}{ filename}, \param{bool}{ overwrite = FALSE}, \param{int }{access = wxS\_DEFAULT}}
Creates a file for writing. If the file already exists, setting {\bf overwrite} to TRUE
will ensure it is overwritten.
\membersection{wxFile::Detach}\label{wxfiledetach}
\func{void}{Detach}{\void}
Get back a file descriptor from wxFile object - the caller is responsible for closing the file if this
descriptor is opened. \helpref{IsOpened()}{wxfileisopened} will return FALSE after call to Detach().
\membersection{wxFile::fd}\label{wxfilefd}
\constfunc{int}{fd}{\void}
Returns the file descriptor associated with the file.
\membersection{wxFile::Eof}\label{wxfileeof}
\constfunc{bool}{Eof}{\void}
Returns TRUE if the end of the file has been reached.
Note that the behaviour of the file pointer based class
\helpref{wxFFile}{wxffile} is different as \helpref{wxFFile::Eof}{wxffileeof}
will return TRUE here only if an attempt has been made to read
{\it 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
\helpref{Read}{wxfileread} repeatedly and tests its return condition instead
of using Eof() as this will not work for special files under Unix.
\membersection{wxFile::Exists}\label{wxfileexists}
\func{static bool}{Exists}{\param{const char*}{ filename}}
Returns TRUE if the given name specifies an existing regular file (not a
directory or a link)
\membersection{wxFile::Flush}\label{wxfileflush}
\func{bool}{Flush}{\void}
Flushes the file descriptor.
Note that wxFile::Flush is not implemented on some Windows compilers
due to a missing fsync function, which reduces the usefulness of this function
(it can still be called but it will do nothing on unsupported compilers).
\membersection{wxFile::IsOpened}\label{wxfileisopened}
\constfunc{bool}{IsOpened}{\void}
Returns TRUE if the file has been opened.
\membersection{wxFile::Length}\label{wxfilelength}
\constfunc{off\_t}{Length}{\void}
Returns the length of the file.
\membersection{wxFile::Open}\label{wxfileopen}
\func{bool}{Open}{\param{const char*}{ filename}, \param{wxFile::OpenMode}{ mode = wxFile::read}}
Opens the file, returning TRUE if successful.
\wxheading{Parameters}
\docparam{filename}{The filename.}
\docparam{mode}{The mode in which to open the file. May be one of {\bf wxFile::read}, {\bf wxFile::write} and {\bf wxFile::read\_write}.}
\membersection{wxFile::Read}\label{wxfileread}
\func{off\_t}{Read}{\param{void*}{ buffer}, \param{off\_t}{ count}}
Reads the specified number of bytes into a buffer, returning the actual number read.
\wxheading{Parameters}
\docparam{buffer}{A buffer to receive the data.}
\docparam{count}{The number of bytes to read.}
\wxheading{Return value}
The number of bytes read, or the symbol {\bf wxInvalidOffset} (-1) if there was an error.
\membersection{wxFile::Seek}\label{wxfileseek}
\func{off\_t}{Seek}{\param{off\_t }{ofs}, \param{wxSeekMode }{mode = wxFromStart}}
Seeks to the specified position.
\wxheading{Parameters}
\docparam{ofs}{Offset to seek to.}
\docparam{mode}{One of {\bf wxFromStart}, {\bf wxFromEnd}, {\bf wxFromCurrent}.}
\wxheading{Return value}
The actual offset position achieved, or wxInvalidOffset on failure.
\membersection{wxFile::SeekEnd}\label{wxfileseekend}
\func{off\_t}{SeekEnd}{\param{off\_t }{ofs = 0}}
Moves the file pointer to the specified number of bytes before the end of the file.
\wxheading{Parameters}
\docparam{ofs}{Number of bytes before the end of the file.}
\wxheading{Return value}
The actual offset position achieved, or wxInvalidOffset on failure.
\membersection{wxFile::Tell}\label{wxfiletell}
\constfunc{off\_t}{Tell}{\void}
Returns the current position or wxInvalidOffset if file is not opened or if another
error occurred.
\membersection{wxFile::Write}\label{wxfilewrite}
\func{size\_t}{Write}{\param{const void*}{ buffer}, \param{off\_t}{ count}}
Writes the specified number of bytes from a buffer.
\wxheading{Parameters}
\docparam{buffer}{A buffer containing the data.}
\docparam{count}{The number of bytes to write.}
\wxheading{Return value}
the number of bytes actually written
\membersection{wxFile::Write}\label{wxfilewrites}
\func{bool}{Write}{\param{const wxString\& }{s}, \param{wxMBConv\&}{ conv = wxConvLibc}}
Writes the contents of the string to the file, returns TRUE on success.
The second argument is only meaningful in Unicode build of wxWindows when
{\it conv} is used to convert {\it s} to multibyte representation.

View File

@@ -1,215 +0,0 @@
\section{\class{wxFileDialog}}\label{wxfiledialog}
This class represents the file chooser dialog.
\wxheading{Derived from}
\helpref{wxDialog}{wxdialog}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/filedlg.h>
\wxheading{See also}
\helpref{wxFileDialog overview}{wxfiledialogoverview}, \helpref{wxFileSelector}{wxfileselector}
\wxheading{Remarks}
Pops up a file selector box. In Windows, this is the common file selector
dialog. In X, this is a file selector box with somewhat less functionality.
The path and filename are distinct elements of a full file pathname.
If path is ``", the current directory will be used. If filename is ``",
no default filename will be supplied. The wildcard determines what files
are displayed in the file selector, and file extension supplies a type
extension for the required filename. Flags may be a combination of wxOPEN,
wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, wxFILE\_MUST\_EXIST, wxMULTIPLE or 0.
Both the X 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:
\begin{verbatim}
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
\end{verbatim}
It must be noted that wildcard support in the native Motif file
dialog is quite limited: only one alternative is supported,
and it is displayed without the descriptive test; ``BMP files (*.bmp)|*.bmp''
is displayed as ``*.bmp'', and both
``BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif'' and
``Image files|*.bmp;*.gif'' are errors.
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFileDialog::wxFileDialog}\label{wxfiledialogconstr}
\func{}{wxFileDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message = "Choose a file"},\rtfsp
\param{const wxString\& }{defaultDir = ""}, \param{const wxString\& }{defaultFile = ``"},\rtfsp
\param{const wxString\& }{wildcard = ``*.*"}, \param{long }{style = 0}, \param{const wxPoint\& }{pos = wxDefaultPosition}}
Constructor. Use \helpref{wxFileDialog::ShowModal}{wxfiledialogshowmodal} to show the dialog.
\wxheading{Parameters}
\docparam{parent}{Parent window.}
\docparam{message}{Message to show on the dialog.}
\docparam{defaultDir}{The default directory, or the empty string.}
\docparam{defaultFile}{The default filename, or the empty string.}
\docparam{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.}
\docparam{style}{A dialog style. A bitlist of:
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{{\bf wxOPEN}}{This is an open dialog.}
\twocolitem{{\bf wxSAVE}}{This is a save dialog.}
\twocolitem{{\bf wxHIDE\_READONLY}}{For open dialog only: hide the checkbox allowing to open the file in read-only mode.}
\twocolitem{{\bf wxOVERWRITE\_PROMPT}}{For save dialog only: prompt for a confirmation if a file will be overwritten.}
\twocolitem{{\bf wxMULTIPLE}}{For open dialog only: allows selecting multiple files.}
\twocolitem{{\bf wxCHANGE\_DIR}}{Change the current working directory to the directory where the file(s) chosen by the user are.}
\end{twocollist}%
}
\docparam{pos}{Dialog position. Not implemented.}
{\bf NB:} Previous versions of wxWindows used {\tt wxCHANGE\_DIR} by default
under MS Windows which allowed the program to simply remember the last
directory where user selected the files to open/save. This (desired)
functionality must be implemented in the program itself now (manually remember
the last path used and pass it to the dialog the next time it is called) or
by using this flag.
\membersection{wxFileDialog::\destruct{wxFileDialog}}
\func{}{\destruct{wxFileDialog}}{\void}
Destructor.
\membersection{wxFileDialog::GetDirectory}\label{wxfiledialoggetdirectory}
\constfunc{wxString}{GetDirectory}{\void}
Returns the default directory.
\membersection{wxFileDialog::GetFilename}\label{wxfiledialoggetfilename}
\constfunc{wxString}{GetFilename}{\void}
Returns the default filename.
\membersection{wxFileDialog::GetFilenames}\label{wxfiledialoggetfilenames}
\constfunc{void}{GetFilenames}{\param{wxArrayString\& }{filenames}}
Fills the array {\it filenames} with the names of the files chosen. This
function should only be used with the dialogs which have {\tt wxMULTIPLE} style,
use \helpref{GetFilename}{wxfiledialoggetfilename} for the others.
\membersection{wxFileDialog::GetFilterIndex}\label{wxfiledialoggetfilterindex}
\constfunc{int}{GetFilterIndex}{\void}
Returns the index into the list of filters supplied, optionally, in the wildcard parameter.
Before the dialog is shown, this is the index which will be used when the dialog is first displayed.
After the dialog is shown, this is the index selected by the user.
\membersection{wxFileDialog::GetMessage}\label{wxfiledialoggetmessage}
\constfunc{wxString}{GetMessage}{\void}
Returns the message that will be displayed on the dialog.
\membersection{wxFileDialog::GetPath}\label{wxfiledialoggetpath}
\constfunc{wxString}{GetPath}{\void}
Returns the full path (directory and filename) of the selected file.
\membersection{wxFileDialog::GetPaths}\label{wxfiledialoggetpaths}
\constfunc{void}{GetPaths}{\param{wxArrayString\& }{paths}}
Fills the array {\it paths} with the full paths of the files chosen. This
function should only be used with the dialogs which have {\tt wxMULTIPLE} style,
use \helpref{GetPath}{wxfiledialoggetpath} for the others.
\membersection{wxFileDialog::GetStyle}\label{wxfiledialoggetstyle}
\constfunc{long}{GetStyle}{\void}
Returns the dialog style.
\membersection{wxFileDialog::GetWildcard}\label{wxfiledialoggetwildcard}
\constfunc{wxString}{GetWildcard}{\void}
Returns the file dialog wildcard.
\membersection{wxFileDialog::SetDirectory}\label{wxfiledialogsetdirectory}
\func{void}{SetDirectory}{\param{const wxString\& }{directory}}
Sets the default directory.
\membersection{wxFileDialog::SetFilename}\label{wxfiledialogsetfilename}
\func{void}{SetFilename}{\param{const wxString\& }{setfilename}}
Sets the default filename.
\membersection{wxFileDialog::SetFilterIndex}\label{wxfiledialogsetfilterindex}
\func{void}{SetFilterIndex}{\param{int }{filterIndex}}
Sets the default filter index, starting from zero.
\membersection{wxFileDialog::SetMessage}\label{wxfiledialogsetmessage}
\func{void}{SetMessage}{\param{const wxString\& }{message}}
Sets the message that will be displayed on the dialog.
\membersection{wxFileDialog::SetPath}\label{wxfiledialogsetpath}
\func{void}{SetPath}{\param{const wxString\& }{path}}
Sets the path (the combined directory and filename that will be returned when the dialog is dismissed).
\membersection{wxFileDialog::SetStyle}\label{wxfiledialogsetstyle}
\func{void}{SetStyle}{\param{long }{style}}
Sets the dialog style. See \helpref{wxFileDialog::wxFileDialog}{wxfiledialogconstr} for details.
\membersection{wxFileDialog::SetWildcard}\label{wxfiledialogsetwildcard}
\func{void}{SetWildcard}{\param{const wxString\& }{wildCard}}
Sets the wildcard, which can contain multiple file types, for example:
``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.
\membersection{wxFileDialog::ShowModal}\label{wxfiledialogshowmodal}
\func{int}{ShowModal}{\void}
Shows the dialog, returning wxID\_OK if the user pressed OK, and wxID\_CANCEL
otherwise.

View File

@@ -1,128 +0,0 @@
\section{\class{wxFileHistory}}\label{wxfilehistory}
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.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/docview.h>
\wxheading{See also}
\helpref{wxFileHistory overview}{wxfilehistoryoverview}, \helpref{wxDocManager}{wxdocmanager}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFileHistory::m\_fileHistory}
\member{char**}{m\_fileHistory}
A character array of strings corresponding to the most recently opened
files.
\membersection{wxFileHistory::m\_fileHistoryN}
\member{int}{m\_fileHistoryN}
The number of files stored in the history array.
\membersection{wxFileHistory::m\_fileMaxFiles}
\member{int}{m\_fileMaxFiles}
The maximum number of files to be stored and displayed on the menu.
\membersection{wxFileHistory::m\_fileMenu}
\member{wxMenu*}{m\_fileMenu}
The file menu used to display the file history list (if enabled).
\membersection{wxFileHistory::wxFileHistory}
\func{}{wxFileHistory}{\param{int}{ maxFiles = 9}}
Constructor. Pass the maximum number of files that should be stored and displayed.
\membersection{wxFileHistory::\destruct{wxFileHistory}}
\func{}{\destruct{wxFileHistory}}{\void}
Destructor.
\membersection{wxFileHistory::AddFileToHistory}
\func{void}{AddFileToHistory}{\param{const wxString\& }{filename}}
Adds a file to the file history list, if the object has a pointer to an appropriate file menu.
\membersection{wxFileHistory::AddFilesToMenu}\label{wxfilehistoryaddfilestomenu}
\func{void}{AddFilesToMenu}{\void}
Appends the files in the history list, to all menus managed by the file history object.
\func{void}{AddFilesToMenu}{\param{wxMenu*}{ menu}}
Appends the files in the history list, to the given menu only.
\membersection{wxFileHistory::GetHistoryFile}\label{wxfilehistorygethistoryfile}
\constfunc{wxString}{GetHistoryFile}{\param{int}{ index}}
Returns the file at this index (zero-based).
\membersection{wxFileHistory::GetMaxFiles}
\constfunc{int}{GetMaxFiles}{\void}
Returns the maximum number of files that can be stored.
\membersection{wxFileHistory::GetNoHistoryFiles}
\constfunc{int}{GetNoHistoryFiles}{\void}
Returns the number of files currently stored in the file history.
\membersection{wxFileHistory::Load}
\func{void}{Load}{\param{wxConfigBase\& }{config}}
Loads the file history from the given config object. This function should be called explicitly by the application.
\wxheading{See also}
\helpref{wxConfig}{wxconfigbase}
\membersection{wxFileHistory::RemoveMenu}
\func{void}{RemoveMenu}{\param{wxMenu* }{menu}}
Removes this menu from the list of those managed by this object.
\membersection{wxFileHistory::Save}
\func{void}{Save}{\param{wxConfigBase\& }{config}}
Saves the file history into the given config object. This must be called
explicitly by the application.
\wxheading{See also}
\helpref{wxConfig}{wxconfigbase}
\membersection{wxFileHistory::UseMenu}
\func{void}{UseMenu}{\param{wxMenu* }{menu}}
Adds this menu to the list of those managed by this object.

View File

@@ -1,58 +0,0 @@
\section{\class{wxFileInputStream}}\label{wxfileinputstream}
This class represents data read in from a file. There are actually
two such groups of classes: this one is based on \helpref{wxFile}{wxfile}
whereas \helpref{wxFFileInputStream}{wxffileinputstream} is based in
the \helpref{wxFFile}{wxffile} class.
Note that \helpref{wxFile}{wxfile} and \helpref{wxFFile}{wxffile} differ
in one aspect, namely when to report that the end of the file has been
reached. This is documented in \helpref{wxFile::Eof}{wxfileeof} and
\helpref{wxFFile::Eof}{wxffileeof} and the behaviour of the stream
classes reflects this difference, i.e. wxFileInputStream will report
wxSTREAM\_EOF after having read the last byte whereas wxFFileInputStream
will report wxSTREAM\_EOF after trying to read {\it past} the last byte.
\wxheading{Derived from}
\helpref{wxInputStream}{wxinputstream}
\wxheading{Include files}
<wx/wfstream.h>
\wxheading{See also}
\helpref{wxBufferedInputStream}{wxbufferedinputstream}, \helpref{wxFileOutputStream}{wxfileoutputstream}, \helpref{wxFFileOutputStream}{wxffileoutputstream}
% ----------
% Members
% ----------
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFileInputStream::wxFileInputStream}
\func{}{wxFileInputStream}{\param{const wxString\&}{ ifileName}}
Opens the specified file using its {\it ifilename} name in read-only mode.
\func{}{wxFileInputStream}{\param{wxFile\&}{ file}}
Initializes a file stream in read-only mode using the file I/O object {\it file}.
\func{}{wxFileInputStream}{\param{int}{ fd}}
Initializes a file stream in read-only mode using the specified file descriptor.
\membersection{wxFileInputStream::\destruct{wxFileInputStream}}
\func{}{\destruct{wxFileInputStream}}{\void}
Destructor.
\membersection{wxFileInputStream::Ok}
\constfunc{bool}{Ok}{\void}
Returns TRUE if the stream is initialized and ready.

Some files were not shown because too many files have changed in this diff Show More