Compare commits

...

1 Commits

Author SHA1 Message Date
Bryan Petty
e1c04de272 This commit was manufactured by cvs2svn to create tag
'BEFORE_ON_PAINT_CHANGE'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/BEFORE_ON_PAINT_CHANGE@8362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-09-14 20:10:34 +00:00
4128 changed files with 19102 additions and 912447 deletions

View File

@@ -37,6 +37,7 @@ base
gtk
motif
win32
univ
base-release
gtk-release
motif-release

View File

@@ -32,6 +32,7 @@ include ./src/make.env
srcdir = @srcdir@
VP1 = @top_srcdir@/src/common
VP1_5 = @top_srcdir@/src/univ@PATH_IFS@@top_srcdir@/src/univ/themes
VP2 = @top_srcdir@/src/@TOOLKIT_DIR@
VP3 = @top_srcdir@/src/motif/xmcombo
VP4 = @top_srcdir@/src/generic
@@ -46,7 +47,7 @@ VP11 = @top_srcdir@/src/iodbc
# the comment at the end of the next line is needed because otherwise autoconf
# would remove this line completely - it contains a built-in hack to remove
# any VPATH assignment not containing ':'
VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11) # ':' for autoconf
VPATH = $(VP1)@PATH_IFS@$(VP1_5)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11) # ':' for autoconf
top_srcdir = @top_srcdir@
prefix = @prefix@
@@ -561,7 +562,7 @@ ALL_GUI_DIST: ALL_DIST
mkdir $(DISTDIR)/src/tiff
mkdir $(DISTDIR)/src/iodbc
mkdir $(DISTDIR)/src/unix
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)/@PORT_FILES@
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)
cp $(SRCDIR)/*.in $(DISTDIR)/src
cp $(COMMDIR)/*.cpp $(DISTDIR)/src/common
cp $(COMMDIR)/*.c $(DISTDIR)/src/common
@@ -601,7 +602,7 @@ BASE_DIST: ALL_DIST
mkdir $(DISTDIR)/include/wx/unix
mkdir $(DISTDIR)/src/common
mkdir $(DISTDIR)/src/unix
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)/@PORT_FILES@
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)
cp $(WXDIR)/@RPM_FILES@ $(DISTDIR)/@RPM_FILES@
cp $(WXDIR)/@RPM_SPEC@ $(DISTDIR)/@RPM_SPEC@
cp $(WXDIR)/wxBase.dsp $(DISTDIR)

10
TODO Normal file
View File

@@ -0,0 +1,10 @@
All
* problem with horz scrolling: the focus rect isn't drawn entirely...
* write sample testing all listbox styles/events
MSW
GTK
* check/radio box remains pressed

2623
configure vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +0,0 @@
# Top dir of wxWindows
top_builddir = /gtm/bart/wxGTK
PROGRAM=dbbrowser_gtk
OBJECTS= dbbrowse.o doc.o pgmctrl.o tabpgwin.o\
browsedb.o dbtree.o dbgrid.o dlguser.o
include $(top_builddir)/src/makeprog.env

View File

@@ -1,7 +1,8 @@
# FIXME we'll generate this makefile with configure later, but for now please
# change it manually
TMAKEDIR=/home/zeitlin/build/tmake
TMAKE=$(TMAKEDIR)/bin/tmake
#TMAKEDIR=/home/zeitlin/build/tmake
#TMAKE=$(TMAKEDIR)/bin/tmake
TMAKE=tmake
WXDIR=../../..
MSW_MAKEFILES_DIR=$(WXDIR)/src/msw

View File

@@ -44,6 +44,7 @@
# P Not required for the os2Pm port
# (unfortunately I can't use O since that is
# in use already - and above I can't use P :-( )
# L Low level GUI toolkit file, used by wxUniversal as well
#
# WX Base header
# GTK GTK header
@@ -326,49 +327,49 @@ gsocket.c U B
mimetype.cpp U B
gsockgtk.c R
win_gtk.c R
win_gtk.c R L
accel.cpp R
app.cpp R
bitmap.cpp R
app.cpp R L
bitmap.cpp R L
bmpbuttn.cpp R
brush.cpp R
brush.cpp R L
button.cpp R
checkbox.cpp R
checklst.cpp R
choice.cpp R
clipbrd.cpp R
colour.cpp R
colour.cpp R L
combobox.cpp R
control.cpp R
cursor.cpp R
data.cpp R
cursor.cpp R L
data.cpp R L
dataobj.cpp R
dc.cpp R
dcclient.cpp R
dcmemory.cpp R
dcscreen.cpp R
dialog.cpp R
dc.cpp R L
dcclient.cpp R L
dcmemory.cpp R L
dcscreen.cpp R L
dialog.cpp R L
dnd.cpp R
font.cpp R
font.cpp R L
fontdlg.cpp R
frame.cpp R
frame.cpp R L
gauge.cpp R
gdiobj.cpp R
icon.cpp R
gdiobj.cpp R L
icon.cpp R L
joystick.cpp R
listbox.cpp R
main.cpp R
main.cpp R L
mdi.cpp R
menu.cpp R
minifram.cpp R
notebook.cpp R
palette.cpp R
pen.cpp R
palette.cpp R L
pen.cpp R L
radiobox.cpp R
radiobut.cpp R
region.cpp R
region.cpp R L
scrolbar.cpp R
settings.cpp R
settings.cpp R L
slider.cpp R
spinbutt.cpp R
spinctrl.cpp R
@@ -380,10 +381,10 @@ tbargtk.cpp R
textctrl.cpp R
timer.cpp R
tooltip.cpp R
utilsgtk.cpp R
utilsgtk.cpp R L
utilsres.cpp R
wave.cpp R
window.cpp R
window.cpp R L
gsockmot.c X S
accel.cpp X

View File

@@ -44,7 +44,12 @@
$project{"GTK_SOURCES"} .= "gtk/" . $file . " ";
$project{"GUIOBJS"} .= $fileobj . " ";
$project{"GUIDEPS"} .= $filedep . " "
$project{"GUIDEPS"} .= $filedep . " ";
if ( $wxGTK{$file} =~ /\bL\b/ ) {
$project{"GUI_LOWLEVEL_OBJS"} .= $fileobj . " ";
$project{"GUI_LOWLEVEL_DEPS"} .= $filedep . " ";
}
}
foreach $file (sort keys %wxUNIX) {
@@ -64,7 +69,7 @@
$project{"HTMLOBJS"} .= $fileobj . " ";
$project{"HTMLDEPS"} .= $filedep . " "
}
#! find all our headers
foreach $file (sort keys %wxWXINCLUDE) {
$project{"GTK_HEADERS"} .= $file . " "
@@ -116,6 +121,12 @@ GUIOBJS = \
GUIDEPS = \
#$ ExpandList("GUIDEPS");
GUI_LOWLEVEL_OBJS = \
#$ ExpandList("GUI_LOWLEVEL_OBJS");
GUI_LOWLEVEL_DEPS = \
#$ ExpandList("GUI_LOWLEVEL_DEPS");
UNIXOBJS = \
#$ ExpandList("UNIXOBJS");

View File

@@ -1,13 +0,0 @@
WX.GID
WX.HLP
wx.ref
wx.cnt
Wx.rtf
Wx.con
minimald.hpj
minimald.ref
minimald.con
MINIMALD.HLP
minimald.GID
minimald.cnt
minimald.rtf

View File

@@ -1,202 +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.}
\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,60 +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
\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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -1,518 +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.
% VZ: there is no such feature so far...
% The argument is a language identifier; this is an experimental
% feature and will be expanded and documented in future versions.
\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::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}
\membersection{wxApp::GetTopWindow}\label{wxappgettopwindow}
\constfunc{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.
\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::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.
\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::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}
\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
caling \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}.
Return TRUE to continue processing, FALSE to exit the application.
\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{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
\helpref{wxCloseEvent}{wxcloseevent},\rtfsp
\helpref{wxApp::OnEndSession}{wxapponendsession}
\membersection{wxApp::ProcessMessage}\label{wxappprocessmessage}
\func{bool}{ProcessMessage}{\param{MSG *}{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-existance 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(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}
\helpref{wxApp::OnIdle}{wxapponidle}, \helpref{wxWindow::OnIdle}{wxwindowonidle}, \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.}
\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::GetStdIcon}\label{wxappgetstdicon}
\func{virtual wxIcon}{GetStdIcon}{\param{int }{which}} const
Returns the icons used by wxWindows internally, e.g. the ones used for
message boxes. This function is used internally and
can be overridden by the user to change the default icons.
\wxheading{Parameters}
\docparam{which}{One of the wxICON\_XXX specifies which icon to return.}
See \helpref{wxMessageBox}{wxmessagebox} for a list of icon identifiers.
\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
appications 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.}

View File

@@ -1,596 +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 linkin 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\_SORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DEFINE\_SORTED\_EXPORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DECLARE\_EXPORTED\_OBJARRAY}{wxdeclareobjarray}\\
\helpref{WX\_DEFINE\_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 unallocate 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}}
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 DLL
under Windows and array needs to be visible outside the 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}}
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 DLL
under Windows and array needs to be visible outside the 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}}
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 DLL
under Windows and array needs to be visible outside the 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}}
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.
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}}
\func{void}{Add}{\param{T *}{item}}
\func{void}{Add}{\param{T \&}{item}}
Appends a new element to the array (where {\it T} is the type of the array
elements.)
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.
You may also use \helpref{WX\_APPEND\_ARRAY}{wxappendarray} macro to append all
elements of one array to another one.
\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}}
\func{void}{Insert}{\param{T *}{item}, \param{size\_t }{n}}
\func{void}{Insert}{\param{T \&}{item}, \param{size\_t }{n}}
Insert a new item into the array before the 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}}
Removes an element from the array by index. 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 varian 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 (insteadf 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 (basicly, 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}}
Appends a new item to the array and return the index of th 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}}
Insert a 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() + 1} 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}}
Removes the item at given position.
\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,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 succesfully 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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 978 B

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,739 +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 files}
<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.
\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{{\bf \indexit{wxBITMAP\_TYPE\_BMP}}}{Load a Windows bitmap file.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP\_RESOURCE}}}{Load a Windows bitmap from the resource database.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_GIF}}}{Load a GIF bitmap file.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XBM}}}{Load an X bitmap file.}
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XPM}}}{Load an XPM bitmap file.}
\twocolitem{{\bf \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. }
\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 wxBitmapFromData(data, type, width, height, depth=1)}}{Creates
a bitmap from the given data, which can be of arbitrary type.}
\twocolitem{{\bf wxNoRefBitmap(name, flag)}}{This one won't own the
reference, so Python won't call the destructor, this is good for toolbars
and such where the parent will manage the bitmap.}
\twocolitem{{\bf wxEmptyBitmap(width, height, depth = -1)}}{Creates an
empty bitmap with the given specifications}
\end{twocollist}}
}
\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::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}
\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.
\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,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,800 +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 MS Windows (16-bit, Windows 95 and Windows NT), Unix with GTK+, Unix with Motif,
and Mac. 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 1993.
Version 2 is a vastly improved version written and maintained by
Julian Smart, Robert Roebling, Vadim Zeitlin and many others.
This manual discusses wxWindows in the context of multi-platform
development.\helpignore{For more detail on the wxWindows version 2.0 API
(Application Programming Interface) please refer to the separate
wxWindows reference manual.}
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}
\section{Changes from version 1.xx}\label{versionchanges}
These are a few of the major differences between versions 1.xx and 2.0.
Removals:
\begin{itemize}\itemsep=0pt
\item XView is no longer supported;
\item all controls (panel items) no longer have labels attached to them;
\item wxForm has been removed;
\item wxCanvasDC, wxPanelDC removed (replaced by wxClientDC, wxWindowDC, wxPaintDC which
can be used for any window);
\item wxMultiText, wxTextWindow, wxText removed and replaced by wxTextCtrl;
\item classes no longer divided into generic and platform-specific parts, for efficiency.
\end{itemize}
Additions and changes:
\begin{itemize}\itemsep=0pt
\item class hierarchy changed, and restrictions about subwindow nesting lifted;
\item header files reorganized to conform to normal C++ standards;
\item classes less dependent on each another, to reduce executable size;
\item wxString used instead of char* wherever possible;
\item the number of separate but mandatory utilities reduced;
\item the event system has been overhauled, with
virtual functions and callbacks being replaced with MFC-like event tables;
\item new controls, such as wxTreeCtrl, wxListCtrl, wxSpinButton;
\item less inconsistency about what events can be handled, so for example
mouse clicks or key presses on controls can now be intercepted;
\item the status bar is now a separate class, wxStatusBar, and is
implemented in generic wxWindows code;
\item some renaming of controls for greater consistency;
\item wxBitmap has the notion of bitmap handlers to allow for extension to new formats
without ifdefing;
\item new dialogs: wxPageSetupDialog, wxFileDialog, wxDirDialog,
wxMessageDialog, wxSingleChoiceDialog, wxTextEntryDialog;
\item GDI objects are reference-counted and are now passed to most functions
by reference, making memory management far easier;
\item wxSystemSettings class allows querying for various system-wide properties
such as dialog font, colours, user interface element sizes, and so on;
\item better platform look and feel conformance;
\item toolbar functionality now separated out into a family of classes with the
same API;
\item device contexts are no longer accessed using wxWindow::GetDC - they are created
temporarily with the window as an argument;
\item events from sliders and scrollbars can be handled more flexibly;
\item the handling of window close events has been changed in line with the new
event system;
\item the concept of {\it validator} has been added to allow much easier coding of
the relationship between controls and application data;
\item the documentation has been revised, with more cross-referencing.
\end{itemize}
Platform-specific changes:
\begin{itemize}\itemsep=0pt
\item The Windows header file (windows.h) is no longer included by wxWindows headers;
\item wx.dll supported under Visual C++;
\item the full range of Windows 95 window decorations are supported, such as modal frame
borders;
\item MDI classes brought out of wxFrame into separate classes, and made more flexible.
\end{itemize}
\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}
\section{wxWindows requirements}\label{requirements}
To make use of wxWindows, you currently need one or both of the
following setups.
(a) PC:
\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, Motif 1.2 or higher, Lesstif.
\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://www.remstar.com/pub/wxwin and/or http://www.wxwindows.org.}
\winhelpignore{wxWindows is available by anonymous FTP and World Wide Web
from \urlref{ftp://www.remstar.com/pub/wxwin}{ftp://www.remstar.com/pub/wxwin}
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, or by contacting:
Julian Smart\\
12 North Street West\\
Uppingham\\
Rutland\\
LE15 9SG\\
julian.smart@ukonline.co.uk
\section{Acknowledgments}
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{Macros}{macros} 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.
\begin{comment}
\chapter{Utilities supplied with wxWindows}\label{utilities}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
A number of `extras' are supplied with wxWindows, to complement
the GUI functionality in the main class library. These are found
below the utils directory and usually have their own source, library
and documentation directories. For other user-contributed packages,
see the directory ftp://www.remstar.com/pub/wxwin/contrib, which is
more easily accessed via the Contributions page on the Web site.
\section{wxHelp}\label{wxhelp}
wxHelp is a stand-alone program, written using wxWindows,
for displaying hypertext help. It is necessary since not all target
systems (notably X) supply an adequate
standard for on-line help. wxHelp is modeled on the MS Windows help
system, with contents, search and browse buttons, but does not reformat
text to suit the size of window, as WinHelp does, and its input files
are uncompressed ASCII with some embedded font commands and an .xlp
extension. Most wxWindows documentation (user manuals and class
references) is supplied in wxHelp format, and also in Windows Help
format. The wxWindows 2.0 project will presently use an HTML widget
in a new and improved wxHelp implementation, under X.
Note that an application can be programmed to use Windows Help under
MS Windows, and wxHelp under X. An alternative help viewer under X is
Mosaic, a World Wide Web viewer that uses HTML as its native hypertext
format. However, this is not currently integrated with wxWindows
applications.
wxHelp works in two modes---edit and end-user. In edit mode, an ASCII
file may be marked up with different fonts and colours, and divided into
sections. In end-user mode, no editing is possible, and the user browses
principally by clicking on highlighted blocks.
When an application invokes wxHelp, subsequent sections, blocks or
files may be viewed using the same instance of wxHelp since the two
programs are linked using wxWindows interprocess communication
facilities. When the application exits, that application's instance of
wxHelp may be made to exit also. See the {\bf wxHelpControllerBase} entry in the
reference section for how an application controls wxHelp.
\section{Tex2RTF}\label{textortf}
Supplied with wxWindows is a utility called Tex2RTF for converting\rtfsp
\LaTeX\ manuals to the following formats:
\begin{description}
\item[wxHelp]
wxWindows help system format (XLP).
\item[Linear RTF]
Rich Text Format suitable for importing into a word processor.
\item[Windows Help RTF]
Rich Text Format suitable for compiling into a WinHelp HLP file with the
help compiler.
\item[HTML]
HTML is the native format for Mosaic, the main hypertext viewer for
the World Wide Web. Since it is freely available it is a good candidate
for being the wxWindows help system under X, as an alternative to wxHelp.
\end{description}
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.
\section{wxTreeLayout}
This is a simple class library for drawing trees in a reasonably pretty
fashion. It provides only minimal default drawing capabilities, since
the algorithm is meant to be used for implementing custom tree-based
tools.
Directed graphs may also be drawn using this library, if cycles are
removed before the nodes and arcs are passed to the algorithm.
Tree displays are used in many applications: directory browsers,
hypertext systems, class browsers, and decision trees are a few
possibilities.
See the separate manual and the directory utils/wxtree.
\section{wxGraphLayout}
The wxGraphLayout class is based on a tool called `graphplace' by Dr.
Jos T.J. van Eijndhoven of Eindhoven University of Technology. Given a
(possibly cyclic) directed graph, it does its best to lay out the nodes
in a sensible manner. There are many applications (such as diagramming)
where it is required to display a graph with no human intervention. Even
if manual repositioning is later required, this algorithm can make a good
first attempt.
See the separate manual and the directory utils/wxgraph.
\section{Colours}\label{coloursampler}
A colour sampler for viewing colours and their names on each
platform.
%
\chapter{Tutorial}\label{tutorial}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
To be written.
\end{comment}
\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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -1,120 +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 geomerty, typically in a row or a column or several hierachies of either.
As an example, we will construct a dialog that will contain a text field at the top and
two buttons at the bottom. This can be seen as a top-hierarchy column with the text at
the top and buttons at the bottom and a low-hierchary row with an OK button to the left
and a Cancel button to the right. In many cases (particulary dialogs under Unix and
normal frames) the main window will be resizable by the user and this change of size
will have to get propagated to its children. In our case, we want the text area to grow
with the dialog, whereas the button shall have a fixed size. In addition, there will be
a thin border around all controls to make the dialog look nice and - to make matter worse -
the buttons shall be centred as the width of the dialog changes.
It is the unique feature of a box sizer, that it can grow in both directions (height and
width) but can distribute its growth in the main direction (horizontal for a row) {\it unevenly}
among its children. In our example case, the vertical sizer is supposed to propagate all its
height changes to only the text area, not to the button area. This is determined by the {\it option} parameter
when adding a window (or another sizer) to a sizer. It is interpreted
as a weight factor, i.e. it can be zero, indicating that the window may not be resized
at all, or above zero. If several windows have a value above zero, the value is interpreted
relative to the sum of all weight factors of the sizer, so when adding two windows with
a value of 1, they will both get resized equally much and each half as much as the sizer
owning them. Then what do we do when a column sizer changes its width? This behaviour is
controlled by {\it flags} (the second parameter of the Add() function): Zero or no flag
indicates that the window will preserve it is original size, wxGROW flag (same as wxEXPAND)
forces the window to grow with the sizer, and wxSHAPED flag tells the window to change it is
size proportionally, preserving original aspect ratio. When wxGROW flag is not used,
the item can be aligned within available space. wxALIGN\_LEFT, wxALIGN\_TOP, wxALIGN\_RIGHT,
wxALIGN\_BOTTOM, wxALIGN\_CENTER\_HORIZONTAL and wxALIGN\_CENTER\_VERTICAL do what they say.
wxALIGN\_CENTRE (same as wxALIGN\_CENTER) is defined as (wxALIGN\_CENTER\_HORIZONTAL |
wxALIGN\_CENTER\_VERTICAL). Default alignment is wxALIGN\_LEFT | wxALIGN\_TOP.
As mentioned above, any window belonging to a sizer may have border, and it can be specified
which of the four sides may have this border, using the wxTOP, wxLEFT, wxRIGHT and wxBOTTOM
constants or wxALL for all directions (and you may also use wxNORTH, wxWEST etc instead). These
flags can be used in combination with the alignment flags above as the second parameter of the
Add() method using the binary or operator |. The sizer of the border also must be made known,
and it is the third parameter in the Add() method. This means, that the entire behaviour of
a sizer and its children can be controlled by the three parameters of the Add() method.
\begin{verbatim}
// we want to get a dialog that is stretchable because it
// has a text ctrl at the top and two buttons at the bottom
MyDialog::MyDialog(wxFrame *parent, wxWindowID id, const wxString &title ) :
wxDialog( parent, id, title, wxDefaultPosition, wxDefaultSize, wxDIALOG_STYLE | wxRESIZE_BORDER )
{
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
// create text ctrl with minimal size 100x60
topsizer->Add(
new wxTextCtrl( this, -1, "My text.", wxDefaultPosition, wxSize(100,60), wxTE_MULTILINE),
1, // make vertically stretchable
wxEXPAND | // make horizontally stretchable
wxALL, // and make border all around
10 ); // set border width to 10
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add(
new wxButton( this, wxID_OK, "OK" ),
0, // make horizontally unstretchable
wxALL, // make border all around (implicit top alignment)
10 ); // set border width to 10
button_sizer->Add(
new wxButton( this, wxID_CANCEL, "Cancel" ),
0, // make horizontally unstretchable
wxALL, // make border all around (implicit top alignment)
10 ); // set border width to 10
topsizer->Add(
button_sizer,
0, // make vertically unstretchable
wxALIGN_CENTER ); // no border and centre horizontally
SetAutoLayout( TRUE ); // tell dialog to use sizer
SetSizer( topsizer ); // actually set the sizer
topsizer->Fit( this ); // set size to minimum size as calculated by the sizer
topsizer->SetSizeHints( this ); // set size hints to honour mininum size
}
\end{verbatim}
\wxheading{Derived from}
\helpref{wxSizer}{wxsizer}\\
\helpref{wxObject}{wxobject}
\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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

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,34 +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.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/busyinfo.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBusyInfo::wxBusyInfo}
\func{}{wxBusyInfo}{\param{const wxString\&}{ msg}}
Constructs a busy info object, displays {\it msg}.

View File

@@ -1,152 +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.}
\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,448 +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 reckognized as oen 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}
\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 clickedi n 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 chaneg 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 foregound 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:
{\small \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,147 +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).
\membersection{wxCaret::GetSize}\label{wxcaretgetsize}
\constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}}
\constfunc{wxSize}{GetSize}{\void}
Get the caret size.
\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,517 +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.
\twocolwidtha{5cm}
{\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.
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDialog}{wxdialog}}{Dialog box}
\twocolitem{\helpref{wxFrame}{wxframe}}{Normal frame}
\twocolitem{\helpref{wxMDIParentFrame}{wxmdiparentframe}}{MDI parent frame}
\twocolitem{\helpref{wxMDIChildFrame}{wxmdichildframe}}{MDI child frame}
\twocolitem{\helpref{wxMiniFrame}{wxminiframe}}{A frame with a small title bar}
\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog.}
\twocolitem{\helpref{wxTabbedDialog}{wxtabbeddialog}}{Tabbed dialog
(deprecated, use wxNotebook instead)}
\end{twocollist}
See also {\bf Common dialogs}.
{\large {\bf Miscellaneous windows}}
The following are a variety of classes that are derived from wxWindow.
\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.
\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{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.
\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{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{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{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}}
\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 layouting 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 allows for more detailed layouts.
These are the classes relevant to the sizer-based layout.
\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 surrounding static box}
\twocolitem{\helpref{wxNotebookSizer}{wxnotebooksizer}}{Sizer to use with the wxNotebook control.}
\end{twocollist}
\overview{Overview}{constraintsoverview} over the constraints-based layout.
These are the classes relevant to constraints-based window layout.
\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.
\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.
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxColour}{wxcolour}}{Represents the red, blue and green elements of a colour}
\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.
\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{wxFocusEvent}{wxfocusevent}}{A window focus event}
\twocolitem{\helpref{wxKeyEvent}{wxkeyevent}}{A keypress 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{wxMenuEvent}{wxmenuevent}}{A menu 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.
\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.
\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{wxHashTable}{wxhashtable}}{A simple hash table implementation}
% \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{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.
\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{Macros}{macros}}{Macros for manipulating run-time information}
\end{twocollist}
{\large {\bf Debugging features}}
\overview{Overview}{debuggingoverview}
wxWindows supports some aspects of debugging an application through
classes, functions and macros.
\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{wxLog}{wxlog}}{Logging facility}
\twocolitem{\helpref{Log functions}{logfunctions}}{Error and warning logging functions}
\twocolitem{\helpref{Debugging macros}{debugmacros}}{Debug macros for assertion and checking}
%\twocolitem{\helpref{wxTrace}{wxtrace}}{Tracing facility}
%\twocolitem{\helpref{wxTraceLevel}{wxtracelevel}}{Tracing facility with levels}
\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.
\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 a simple interprocess communications facilities
based on DDE.
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDDEClient}{wxddeclient}}{Represents a client}
\twocolitem{\helpref{wxDDEConnection}{wxddeconnection}}{Represents the connection between a client and a server}
\twocolitem{\helpref{wxDDEServer}{wxddeserver}}{Represents a server}
\twocolitem{\helpref{wxTCPClient}{wxtcpclient}}{Represents a client}
\twocolitem{\helpref{wxTCPConnection}{wxtcpconnection}}{Represents the connection between a client and a server}
\twocolitem{\helpref{wxTCPServer}{wxtcpserver}}{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.
\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.
\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}
\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.
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDir}{wxdir}}{Class for enumerating 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.
\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.
\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}
\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.
\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.
\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 Miscellaneous}}
\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{wxHelpController}{wxhelpcontroller}}{Family of classes for controlling help windows}
\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}
\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}}
\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 is documented in a separate manual.
The older classes are as follows:
\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}

View File

@@ -1,109 +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 TRUE if it is checked, 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 TRUE, the check is on, otherwise it is off.}

View File

@@ -1,107 +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.}
\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.
\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,245 +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{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.}
\membersection{wxChoice::\destruct{wxChoice}}
\func{}{\destruct{wxChoice}}{\void}
Destructor, destroying the choice item.
\membersection{wxChoice::Append}\label{wxchoiceappend}
\func{void}{Append}{\param{const wxString\& }{ item}}
Adds the item to the end of the choice control.
\func{void}{Append}{\param{const wxString\& }{ item}, \param{void* }{clientData}}
Adds the item to the end of the combobox, associating the given data
with the item.
\wxheading{Parameters}
\docparam{item}{String to add.}
\docparam{clientData}{Client data to associate with the item.}
\membersection{wxChoice::Clear}\label{wxchoiceclear}
\func{void}{Clear}{\void}
Clears the strings from 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::FindString}\label{wxchoicefindstring}
\constfunc{int}{FindString}{\param{const wxString\& }{string}}
Finds a choice matching the given string.
\wxheading{Parameters}
\docparam{string}{String to find.}
\wxheading{Return value}
Returns the position if found, or -1 if not found.
\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.
\membersection{wxChoice::GetClientData}\label{wxchoicegetclientdata}
\constfunc{void*}{GetClientData}{\param{int}{ n}}
Returns a pointer to the client data associated with the given item (if any).
\wxheading{Parameters}
\docparam{n}{An item, starting from zero.}
\wxheading{Return value}
A pointer to the client data, or NULL if the item was not found.
\membersection{wxChoice::GetSelection}\label{wxchoicegetselection}
\constfunc{int}{GetSelection}{\void}
Gets the id (position) of the selected string, or -1 if there is no selection.
\membersection{wxChoice::GetString}\label{wxchoicegetstring}
\constfunc{wxString}{GetString}{\param{int}{ n}}
Returns the string at the given position.
\wxheading{Parameters}
\docparam{n}{The zero-based position.}
\wxheading{Return value}
The string at the given position, or the empty string if {\it n} is invalid.
\membersection{wxChoice::GetStringSelection}\label{wxchoicegetstringselection}
\constfunc{wxString}{GetStringSelection}{\void}
Gets the selected string, or the empty string if no string is selected.
\membersection{wxChoice::Number}\label{wxchoicenumber}
\constfunc{int}{Number}{\void}
Returns the number of strings in the choice control.
\membersection{wxChoice::SetClientData}\label{wxchoicesetclientdata}
\func{void}{SetClientData}{\param{int}{ n}, \param{void* }{data}}
Associates the given client data pointer with the given item.
\wxheading{Parameters}
\docparam{n}{The zero-based item.}
\docparam{data}{The client data.}
\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.
\membersection{wxChoice::SetSelection}\label{wxchoicesetselection}
\func{void}{SetSelection}{\param{int}{ n}}
Sets the choice by passing the desired string position. This does not cause
a wxEVT\_COMMAND\_CHOICE\_SELECTED event to get emitted.
\wxheading{Parameters}
\docparam{n}{The string position to select, starting from zero.}
\wxheading{See also}
\helpref{wxChoice::SetStringSelection}{wxchoicesetstringselection}
\membersection{wxChoice::SetStringSelection}\label{wxchoicesetstringselection}
\func{void}{SetStringSelection}{\param{const wxString\& }{ string}}
Sets the choice by passing the desired string. This does not cause
a wxEVT\_COMMAND\_CHOICE\_SELECTED event to get emitted.
\wxheading{Parameters}
\docparam{string}{The string to select.}
\wxheading{See also}
\helpref{wxChoice::SetSelection}{wxchoicesetselection}

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,314 +0,0 @@
\chapter{Alphabetical class reference}\label{classref}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
\input accel.tex
\input activevt.tex
\input app.tex
\input array.tex
\input arrstrng.tex
\input autoobj.tex
\input bitmap.tex
\input bbutton.tex
\input bmpdatob.tex
\input propbfva.tex
\input propblva.tex
\input boxsizer.tex
\input brush.tex
\input busycurs.tex
\input busyinfo.tex
\input button.tex
\input strmbfrd.tex
\input calclevt.tex
\input calctrl.tex
\input caret.tex
\input checkbox.tex
\input checklst.tex
\input choice.tex
\input clasinfo.tex
\input clientdc.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 control.tex
\input countstr.tex
\input critsect.tex
\input crtslock.tex
\input csconv.tex
\input custdobj.tex
\input cursor.tex
\input database.tex
\input dataform.tex
\input dataobj.tex
\input db.tex
\input dobjcomp.tex
\input dobjsmpl.tex
\input datstrm.tex
\input date.tex
\input datespan.tex
\input datetime.tex
\input dc.tex
\input ddeclint.tex
\input ddeconn.tex
\input ddeservr.tex
\input debugcxt.tex
\input dialog.tex
\input dialevt.tex
\input dialup.tex
\input dir.tex
\input dirdlg.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 encconv.tex
\input eraseevt.tex
\input event.tex
\input evthand.tex
\input expr.tex
\input file.tex
\input fildatob.tex
\input filedlg.tex
\input fildrptg.tex
\input filehist.tex
\input strmfile.tex
\input propflva.tex
\input filesys.tex
\input filesysh.tex
\input filetype.tex
\input flexsizr.tex
\input fltinstr.tex
\input fltoutst.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 glcanvas.tex
\input valgen.tex
\input grid.tex
\input gridattr.tex
\input gridedit.tex
\input gridrend.tex
\input gridtbl.tex
\input gridsizr.tex
\input hash.tex
\input helpinst.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 idleevt.tex
\input icon.tex
\input image.tex
\input imaglist.tex
\input ilayout.tex
\input indlgevt.tex
\input inputstr.tex
\input propifva.tex
\input propilva.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 proplosv.tex
\input locale.tex
\input log.tex
\input longlong.tex
\input mask.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 menuitem.tex
\input menuevt.tex
\input msgdlg.tex
\input metafile.tex
\input mimetype.tex
\input minifram.tex
\input module.tex
\input mouseevt.tex
\input moveevt.tex
\input mltchdlg.tex
\input mutex.tex
\input mutexlck.tex
\input nbsizer.tex
\input node.tex
\input notebook.tex
\input noteevt.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 pantabv.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 progdlg.tex
\input procevt.tex
\input property.tex
\input propford.tex
\input propforf.tex
\input propforp.tex
\input propforv.tex
\input propfovi.tex
\input proplisd.tex
\input proplisf.tex
\input proplisp.tex
\input propliva.tex
\input proplstv.tex
\input propsht.tex
\input propvald.tex
\input propregv.tex
\input propval.tex
\input propview.tex
\input protocol.tex
\input query.tex
\input qylayevt.tex
\input radiobox.tex
\input radiobut.tex
\input proprfva.tex
\input proprlva.tex
\input realpoin.tex
\input rect.tex
\input recrdset.tex
\input region.tex
\input sashevt.tex
\input sashlayw.tex
\input sashwin.tex
\input screendc.tex
\input scrolbar.tex
\input scrlwevt.tex
\input scrolevt.tex
\input scrolwin.tex
\input sngchdlg.tex
\input size.tex
\input sizeevt.tex
\input sizer.tex
\input slider.tex
\input sckaddr.tex
\input socket.tex
\input strmsock.tex
\input spinbutt.tex
\input spinctrl.tex
\input spinevt.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 wxstring.tex
\input propstfv.tex
\input strlist.tex
\input propslv.tex
\input tokenizr.tex
\input sysclevt.tex
\input settings.tex
\input tab.tex
\input tabctrl.tex
\input tabevent.tex
\input taskbar.tex
\input tcpclint.tex
\input tcpconn.tex
\input tcpservr.tex
\input tempfile.tex
\input text.tex
\input txtdatob.tex
\input txtstrm.tex
\input textdlg.tex
\input txtdrptg.tex
\input timespan.tex
\input valtext.tex
\input table.tex
\input textfile.tex
\input thread.tex
\input time.tex
\input timer.tex
\input tipprov.tex
\input toolbar.tex
\input tooltip.tex
\input treectrl.tex
\input treeevt.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 zipstrm.tex
\input strmzlib.tex
\input function.tex
\input keycode.tex

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,147 +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::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,99 +0,0 @@
\section{\class{wxCloseEvent}}\label{wxcloseevent}
This event class contains information about window and session close events.
\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::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
\helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession},\rtfsp
\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,199 +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\_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\_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{char*}{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{char*}{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{char*}{ string}}
Sets the {\bf m\_commandString} member.

View File

@@ -1,451 +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}
\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}
\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 acccept 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 desiredoptions 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} or
\helpref{SetCmdLinelater.}{wxcmdlineparsersetcmdlinestr} 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::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}
\membersection{wxCmdLineParser::DisableLongOptions}\label{wxcmdlineparserdisablelongoptions}
\func{void}{DisableLongOptions}{\void}
Ientical to \helpref{EnableLongOptions(FALSE)}{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}{\void}
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.
\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,110 +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/docview.h>
\wxheading{See also}
\helpref{wxCommandProcessor overview}{wxcommandprocessoroverview}, \helpref{wxCommand}{wxcommand}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCommandProcessor::wxCommandProcessor}
\func{}{wxCommandProcessor}{\param{int}{ maxCommands = 100}}
Constructor.
{\it maxCommands} defaults to a rather arbitrary 100, but can be set from 1 to any integer.
If your wxCommand classes store a lot of data, you may wish the limit the number of
commands stored to a smaller number.
\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::Do}
\func{virtual bool}{Do}{\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::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::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,58 +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}
\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}}
Assingment 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,330 +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{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{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.}
\membersection{wxComboBox::\destruct{wxComboBox}}
\func{}{\destruct{wxComboBox}}{\void}
Destructor, destroying the combobox.
\membersection{wxComboBox::Append}\label{wxcomboboxappend}
\func{void}{Append}{\param{const wxString\& }{item}}
Adds the item to the end of the combobox.
\func{void}{Append}{\param{const wxString\& }{ item}, \param{void* }{clientData}}
Adds the item to the end of the combobox, associating the given data
with the item.
\wxheading{Parameters}
\docparam{item}{The string to add.}
\docparam{clientData}{Client data to associate with the item.}
\membersection{wxComboBox::Clear}\label{wxcomboboxclear}
\func{void}{Clear}{\void}
Clears all strings from 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::Delete}\label{wxcomboboxdelete}
\func{void}{Delete}{\param{int}{ n}}
Deletes an item from the combobox.
\wxheading{Parameters}
\docparam{n}{The item to delete, starting from zero.}
\membersection{wxComboBox::FindString}\label{wxcomboboxfindstring}
\func{int}{FindString}{\param{const wxString\& }{string}}
Finds a choice matching the given string.
\wxheading{Parameters}
\docparam{string}{The item to find.}
\wxheading{Return value}
The position if found, or -1 if not found.
\membersection{wxComboBox::GetClientData}\label{wxcomboboxgetclientdata}
\constfunc{void*}{GetClientData}{\param{int}{ n}}
Returns a pointer to the client data associated with the given item (if any).
\wxheading{Parameters}
\docparam{n}{An item, starting from zero.}
\wxheading{Return value}
A pointer to the client data, or NULL if the item was not found.
\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::GetSelection}\label{wxcomboboxgetselection}
\constfunc{int}{GetSelection}{\void}
Gets the position of the selected string, or -1 if there is no selection.
\membersection{wxComboBox::GetString}\label{wxcomboboxgetstring}
\constfunc{wxString}{GetString}{\param{int}{ n}}
Returns the string at position {\it n}.
\wxheading{Parameters}
\docparam{n}{The item position, starting from zero.}
\wxheading{Return value}
The string if the item is found, otherwise the empty string.
\membersection{wxComboBox::GetStringSelection}\label{wxcomboboxgetstringselection}
\constfunc{wxString}{GetStringSelection}{\void}
Gets the selected string.
\membersection{wxComboBox::GetValue}\label{wxcomboboxgetvalue}
\constfunc{wxString}{GetValue}{\void}
Returns the current value in the combobox text field.
\membersection{wxComboBox::Number}\label{wxcomboboxnumber}
\constfunc{int}{Number}{\void}
Returns the number of items in the combobox list.
%TODO: make this GetNumber or GetCount?
\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::SetClientData}\label{wxcomboboxsetclientdata}
\func{void}{SetClientData}{\param{int}{ n}, \param{void* }{data}}
Associates the given client data pointer with the given item.
\wxheading{Parameters}
\docparam{n}{The zero-based item.}
\docparam{data}{The client data.}
\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{int}{ n}}
Selects the given item in the combobox list. This does not cause a
wxEVT\_COMMAND\_COMBOBOX\_SELECTED event to get emitted.
\func{void}{SetSelection}{\param{long}{ from}, \param{long}{ to}}
Selects the text between the two positions, in the combobox text field.
\wxheading{Parameters}
\docparam{n}{The zero-based item to select.}
\docparam{from}{The first position.}
\docparam{to}{The second position.}
\pythonnote{The second form of this method is called {\tt SetMark} in
wxPython.}
\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/docview.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-dependant).
{\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,74 +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).
Once the thread(s) are signaled, the condition then resets to the not
signaled state, ready to fire again.
\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}{\void}
Default constructor.
\membersection{wxCondition::\destruct{wxCondition}}
\func{}{\destruct{wxCondition}}{\void}
Destroys the wxCondition object.
\membersection{wxCondition::Broadcast}\label{wxconditionbroadcast}
\func{void}{Broadcast}{\void}
Broadcasts to all waiting objects.
\membersection{wxCondition::Signal}\label{wxconditionsignal}
\func{void}{Signal}{\void}
Signals the object.
\membersection{wxCondition::Wait}\label{wxconditionwait}
\func{void}{Wait}{\void}
Waits indefinitely.
\func{bool}{Wait}{\param{unsigned long}{ sec}, \param{unsigned long}{ nsec}}
Waits until a signal is raised or the timeout has elapsed.
\wxheading{Parameters}
\docparam{sec}{Timeout in seconds}
\docparam{nsec}{Timeout nanoseconds component (added to {\it sec}).}
\wxheading{Return value}
The second form returns if the signal was raised, or FALSE if there was a timeout.

View File

@@ -1,722 +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", -1);
...
...
...
// 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. Of
course, you should delete it on the program termination (otherwise, not only a
memory leak will result, but even more importantly the changes won't be
written back!).
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 surprizes 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 \verb$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}
the call to \verb$config->Read("UserData")$ will return something like
\verb$"/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 logicaly or'ing it to either of the \_FILE options to tell wxFileConfig to
use relative instead of absolute paths. }
\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{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.}
\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.}
\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.}
\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.}
\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}}
}
\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{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 written back to the config file.
If on (default is off) all default values 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}}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

View File

@@ -1,58 +0,0 @@
\section{\class{wxCriticalSection}}\label{wxcriticalsection}
A critical section object is used for the same exactly 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 ressources.
\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 SetFoo()
{
// 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}
Destuctor 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,189 +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.
{\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 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 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\_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.}
\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}}
}
\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{wxTable}{wxtable}
\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,116 +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}
\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)
\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}.
\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,193 +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 surprizingly, 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.}
\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.
\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,15 +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}
The documentation for this section has not yet been written.

File diff suppressed because it is too large Load Diff

View File

@@ -1,184 +0,0 @@
% ----------------------------------------------------------------------------
% wxDataInputStream
% ----------------------------------------------------------------------------
\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 litte-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}}
Constructs a datastream object from an input stream. Only read methods will
be available.
\wxheading{Parameters}
\docparam{stream}{The input stream.}
\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 integer from the stream.
\membersection{wxDataInputStream::Read32}
\func{wxUint32}{Read32}{\void}
Reads a 32 bit integer from the stream.
\membersection{wxDataInputStream::ReadDouble}
\func{double}{ReadDouble}{\void}
Reads a double (IEEE encoded) from the stream.
\membersection{wxDataInputStream::ReadString}
\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.
% ----------------------------------------------------------------------------
% wxDataOutputStream
% ----------------------------------------------------------------------------
\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 litte-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}}
Constructs a datastream object from an output stream. Only write methods will
be available.
\wxheading{Parameters}
\docparam{stream}{The output stream.}
\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 integer {\it i16} to the stream.
\membersection{wxDataOutputStream::Write32}
\func{void}{Write32}{{\param wxUint32 }{i32}}
Writes the 32 bit integer {\it i32} 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}
\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.

File diff suppressed because it is too large Load Diff

View File

@@ -1,834 +0,0 @@
\section{\class{wxDC}}\label{wxdc}
A wxDC is a {\it device context} onto which graphics and text can be drawn.
It is intended to represent a number of output devices in a generic way,
so a window can have a device context associated with it, and a printer also has a device context.
In this way, the same piece of code may write to a number of different devices,
if the device context is used as a parameter.
Derived types of wxDC have documentation for specific features
only, so refer to this section for most device context information.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dc.h>
\wxheading{See also}
\helpref{Overview}{dcoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDC::wxDC}
\func{}{wxDC}{\void}
Constructor.
\membersection{wxDC::\destruct{wxDC}}
\func{}{\destruct{wxDC}}{\void}
Destructor.
\membersection{wxDC::BeginDrawing}\label{wxdcbegindrawing}
\func{void}{BeginDrawing}{\void}
Allows optimization of drawing code under MS Windows. Enclose
drawing primitives between {\bf BeginDrawing} and {\bf EndDrawing}\rtfsp
calls.
Drawing to a wxDialog panel device context outside of a
system-generated OnPaint event {\it requires} this pair of calls to
enclose drawing code. This is because a Windows dialog box does not have
a retained device context associated with it, and selections such as pen
and brush settings would be lost if the device context were obtained and
released for each drawing operation.
\membersection{wxDC::Blit}\label{wxdcblit}
\func{bool}{Blit}{\param{wxCoord}{ xdest}, \param{wxCoord}{ ydest}, \param{wxCoord}{ width}, \param{wxCoord}{ height},
\param{wxDC* }{source}, \param{wxCoord}{ xsrc}, \param{wxCoord}{ ysrc}, \param{int}{ logicalFunc = wxCOPY},
\param{bool }{useMask = FALSE}}
Copy from a source DC to this DC, specifying the destination
coordinates, size of area to copy, source DC, source coordinates, and
logical function.
\wxheading{Parameters}
\docparam{xdest}{Destination device context x position.}
\docparam{ydest}{Destination device context y position.}
\docparam{width}{Width of source area to be copied.}
\docparam{height}{Height of source area to be copied.}
\docparam{source}{Source device context.}
\docparam{xsrc}{Source device context x position.}
\docparam{ysrc}{Source device context y position.}
\docparam{logicalFunc}{Logical function to use: see \helpref{wxDC::SetLogicalFunction}{wxdcsetlogicalfunction}.}
\docparam{useMask}{If TRUE, Blit does a transparent blit using the mask that is associated with the bitmap
selected into the source device context. The Windows implementation does the following:
\begin{enumerate}
\item Creates a temporary bitmap and copies the destination area into it.
\item Copies the source area into the temporary bitmap using the specified logical function.
\item Sets the masked area in the temporary bitmap to BLACK by ANDing the
mask bitmap with the temp bitmap with the foreground colour set to WHITE
and the bg colour set to BLACK.
\item Sets the unmasked area in the destination area to BLACK by ANDing the
mask bitmap with the destination area with the foreground colour set to BLACK
and the background colour set to WHITE.
\item ORs the temporary bitmap with the destination area.
\item Deletes the temporary bitmap.
\end{enumerate}
This sequence of operations ensures that the source's transparent area need not be black,
and logical functions are supported.
}
\wxheading{Remarks}
There is partial support for Blit in wxPostScriptDC, under X.
See \helpref{wxMemoryDC}{wxmemorydc} for typical usage.
\wxheading{See also}
\helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxBitmap}{wxbitmap}, \helpref{wxMask}{wxmask}
\membersection{wxDC::CalcBoundingBox}\label{wxdccalcboundingbox}
\func{void}{CalcBoundingBox}{\param{wxCoord }{x}, \param{wxCoord }{y}}
Adds the specified point to the bounding box which can be retrieved with
\helpref{MinX}{wxdcminx}, \helpref{MaxX}{wxdcmaxx} and
\helpref{MinY}{wxdcminy}, \helpref{MaxY}{wxdcmaxy} functions.
\wxheading{See also}
\helpref{ResetBoundingBox}{wxdcresetboundingbox}
\membersection{wxDC::Clear}\label{wxdcclear}
\func{void}{Clear}{\void}
Clears the device context using the current background brush.
\membersection{wxDC::CrossHair}\label{wxdccrosshair}
\func{void}{CrossHair}{\param{wxCoord}{ x}, \param{wxCoord}{ y}}
Displays a cross hair using the current pen. This is a vertical
and horizontal line the height and width of the window, centred
on the given point.
\membersection{wxDC::DestroyClippingRegion}\label{wxdcdestroyclippingregion}
\func{void}{DestroyClippingRegion}{\void}
Destroys the current clipping region so that none of the DC is clipped.
See also \helpref{wxDC::SetClippingRegion}{wxdcsetclippingregion}.
\membersection{wxDC::DeviceToLogicalX}\label{wxdcdevicetologicalx}
\func{wxCoord}{DeviceToLogicalX}{\param{wxCoord}{ x}}
Convert device X coordinate to logical coordinate, using the current
mapping mode.
\membersection{wxDC::DeviceToLogicalXRel}\label{wxdcdevicetologicalxrel}
\func{wxCoord}{DeviceToLogicalXRel}{\param{wxCoord}{ x}}
Convert device X coordinate to relative logical coordinate, using the current
mapping mode. Use this function for converting a width, for example.
\membersection{wxDC::DeviceToLogicalY}\label{wxdcdevicetologicaly}
\func{wxCoord}{DeviceToLogicalY}{\param{wxCoord}{ y}}
Converts device Y coordinate to logical coordinate, using the current
mapping mode.
\membersection{wxDC::DeviceToLogicalYRel}\label{wxdcdevicetologicalyrel}
\func{wxCoord}{DeviceToLogicalYRel}{\param{wxCoord}{ y}}
Convert device Y coordinate to relative logical coordinate, using the current
mapping mode. Use this function for converting a height, for example.
\membersection{wxDC::DrawArc}\label{wxdcdrawarc}
\func{void}{DrawArc}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}, \param{double}{ xc}, \param{double}{ yc}}
Draws an arc of a circle, centred on ({\it xc, yc}), with starting point ({\it x1, y1})
and ending at ({\it x2, y2}). The current pen is used for the outline
and the current brush for filling the shape.
The arc is drawn in an anticlockwise direction from the start point to the end point.
\membersection{wxDC::DrawBitmap}\label{wxdcdrawbitmap}
\func{void}{DrawBitmap}{\param{const wxBitmap\&}{ bitmap}, \param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{bool}{ transparent}}
Draw a bitmap on the device context at the specified point. If {\it transparent} is TRUE and the bitmap has
a transparency mask, the bitmap will be drawn transparently.
When drawing a mono-bitmap, the current text foreground colour will be used to draw the foreground
of the bitmap (all bits set to 1), and the current text background colour to draw the background
(all bits set to 0). See also \helpref{SetTextForeground}{wxdcsettextforeground},
\helpref{SetTextBackground}{wxdcsettextbackground} and \helpref{wxMemoryDC}{wxmemorydc}.
\membersection{wxDC::DrawCheckMark}\label{wxdcdrawcheckmark}
\func{void}{DrawCheckMark}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}}
\func{void}{DrawCheckMark}{\param{const wxRect \&}{rect}}
Draws a check mark inside the given rectangle.
\membersection{wxDC::DrawEllipse}\label{wxdcdrawellipse}
\func{void}{DrawEllipse}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}}
Draws an ellipse contained in the rectangle with the given top left corner, and with the
given size. The current pen is used for the outline and the current brush for
filling the shape.
\membersection{wxDC::DrawEllipticArc}\label{wxdcdrawellipticarc}
\func{void}{DrawEllipticArc}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height},
\param{double}{ start}, \param{double}{ end}}
Draws an arc of an ellipse. The current pen is used for drawing the arc and
the current brush is used for drawing the pie. This function is currently only available for
X window and PostScript device contexts.
{\it x} and {\it y} specify the x and y coordinates of the upper-left corner of the rectangle that contains
the ellipse.
{\it width} and {\it height} specify the width and height of the rectangle that contains
the ellipse.
{\it start} and {\it end} specify the start and end of the arc relative to the three-o'clock
position from the center of the rectangle. Angles are specified
in degrees (360 is a complete circle). Positive values mean
counter-clockwise motion. If {\it start} is equal to {\it end}, a
complete ellipse will be drawn.
\membersection{wxDC::DrawIcon}\label{wxdcdrawicon}
\func{void}{DrawIcon}{\param{const wxIcon\&}{ icon}, \param{wxCoord}{ x}, \param{wxCoord}{ y}}
Draw an icon on the display (does nothing if the device context is PostScript).
This can be the simplest way of drawing bitmaps on a window.
\membersection{wxDC::DrawLine}\label{wxdcdrawline}
\func{void}{DrawLine}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}}
Draws a line from the first point to the second. The current pen is used
for drawing the line.
\membersection{wxDC::DrawLines}\label{wxdcdrawlines}
\func{void}{DrawLines}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0}}
\func{void}{DrawLines}{\param{wxList *}{points}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0}}
Draws lines using an array of {\it points} of size {\it n}, or list of
pointers to points, adding the optional offset coordinate. The current
pen is used for drawing the lines. The programmer is responsible for
deleting the list of points.
\pythonnote{The wxPython version of this method accepts a Python list
of wxPoint objects.}
\membersection{wxDC::DrawPolygon}\label{wxdcdrawpolygon}
\func{void}{DrawPolygon}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0},\\
\param{int }{fill\_style = wxODDEVEN\_RULE}}
\func{void}{DrawPolygon}{\param{wxList *}{points}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0},\\
\param{int }{fill\_style = wxODDEVEN\_RULE}}
Draws a filled polygon using an array of {\it points} of size {\it n},
or list of pointers to points, adding the optional offset coordinate.
The last argument specifies the fill rule: {\bf wxODDEVEN\_RULE} (the
default) or {\bf wxWINDING\_RULE}.
The current pen is used for drawing the outline, and the current brush
for filling the shape. Using a transparent brush suppresses filling.
The programmer is responsible for deleting the list of points.
Note that wxWindows automatically closes the first and last points.
\pythonnote{The wxPython version of this method accepts a Python list
of wxPoint objects.}
\membersection{wxDC::DrawPoint}\label{wxdcdrawpoint}
\func{void}{DrawPoint}{\param{wxCoord}{ x}, \param{wxCoord}{ y}}
Draws a point using the current pen.
\membersection{wxDC::DrawRectangle}\label{wxdcdrawrectangle}
\func{void}{DrawRectangle}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}}
Draws a rectangle with the given top left corner, and with the given
size. The current pen is used for the outline and the current brush
for filling the shape.
\membersection{wxDC::DrawRotatedText}\label{wxdcdrawrotatedtext}
\func{void}{DrawRotatedText}{\param{const wxString\& }{text}, \param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{double}{ angle}}
Draws the text rotated by {\it angle} degrees.
\wxheading{See also}
\helpref{DrawText}{wxdcdrawtext}
\membersection{wxDC::DrawRoundedRectangle}\label{wxdcdrawroundedrectangle}
\func{void}{DrawRoundedRectangle}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}, \param{double}{ radius = 20}}
Draws a rectangle with the given top left corner, and with the given
size. The corners are quarter-circles using the given radius. The
current pen is used for the outline and the current brush for filling
the shape.
If {\it radius} is positive, the value is assumed to be the
radius of the rounded corner. If {\it radius} is negative,
the absolute value is assumed to be the {\it proportion} of the smallest
dimension of the rectangle. This means that the corner can be
a sensible size relative to the size of the rectangle, and also avoids
the strange effects X produces when the corners are too big for
the rectangle.
\membersection{wxDC::DrawSpline}\label{wxdcdrawspline}
\func{void}{DrawSpline}{\param{wxList *}{points}}
Draws a spline between all given control points, using the current
pen. Doesn't delete the wxList and contents. The spline is drawn
using a series of lines, using an algorithm taken from the X drawing
program `XFIG'.
\func{void}{DrawSpline}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}, \param{wxCoord}{ x3}, \param{wxCoord}{ y3}}
Draws a three-point spline using the current pen.
\pythonnote{The wxPython version of this method accepts a Python list
of wxPoint objects.}
\membersection{wxDC::DrawText}\label{wxdcdrawtext}
\func{void}{DrawText}{\param{const wxString\& }{text}, \param{wxCoord}{ x}, \param{wxCoord}{ y}}
Draws a text string at the specified point, using the current text font,
and the current text foreground and background colours.
The coordinates refer to the top-left corner of the rectangle bounding
the string. See \helpref{wxDC::GetTextExtent}{wxdcgettextextent} for how
to get the dimensions of a text string, which can be used to position the
text more precisely.
{\bf NB:} under wxGTK the current
\helpref{logical function}{wxdcgetlogicalfunction} is used by this function
but it is ignored by wxMSW. Thus, you should avoid using logical functions
with this function in portable programs.
\membersection{wxDC::EndDoc}\label{wxdcenddoc}
\func{void}{EndDoc}{\void}
Ends a document (only relevant when outputting to a printer).
\membersection{wxDC::EndDrawing}\label{wxdcenddrawing}
\func{void}{EndDrawing}{\void}
Allows optimization of drawing code under MS Windows. Enclose
drawing primitives between {\bf BeginDrawing} and {\bf EndDrawing}\rtfsp
calls.
\membersection{wxDC::EndPage}\label{wxdcendpage}
\func{void}{EndPage}{\void}
Ends a document page (only relevant when outputting to a printer).
\membersection{wxDC::FloodFill}\label{wxdcfloodfill}
\func{void}{FloodFill}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{const wxColour\&}{ colour}, \param{int}{ style=wxFLOOD\_SURFACE}}
Flood fills the device context starting from the given point, in the given colour,
and using a style:
\begin{itemize}\itemsep=0pt
\item wxFLOOD\_SURFACE: the flooding occurs until a colour other than the given colour is encountered.
\item wxFLOOD\_BORDER: the area to be flooded is bounded by the given colour.
\end{itemize}
{\it Note:} this function is available in MS Windows only.
\membersection{wxDC::GetBackground}\label{wxdcgetbackground}
\func{wxBrush\&}{GetBackground}{\void}
\constfunc{const wxBrush\&}{GetBackground}{\void}
Gets the brush used for painting the background (see \helpref{wxDC::SetBackground}{wxdcsetbackground}).
\membersection{wxDC::GetBackgroundMode}\label{wxdcgetbackgroundmode}
\constfunc{int}{GetBackgroundMode}{\void}
Returns the current background mode: {\tt wxSOLID} or {\tt wxTRANSPARENT}.
\wxheading{See also}
\helpref{SetBackgroundMode}{wxdcsetbackgroundmode}
\membersection{wxDC::GetBrush}\label{wxdcgetbrush}
\func{wxBrush\&}{GetBrush}{\void}
\constfunc{const wxBrush\&}{GetBrush}{\void}
Gets the current brush (see \helpref{wxDC::SetBrush}{wxdcsetbrush}).
\membersection{wxDC::GetCharHeight}\label{wxdcgetcharheight}
\func{wxCoord}{GetCharHeight}{\void}
Gets the character height of the currently set font.
\membersection{wxDC::GetCharWidth}\label{wxdcgetcharwidth}
\func{wxCoord}{GetCharWidth}{\void}
Gets the average character width of the currently set font.
\membersection{wxDC::GetClippingBox}\label{wxdcgetclippingbox}
\func{void}{GetClippingBox}{\param{wxCoord}{ *x}, \param{wxCoord}{ *y}, \param{wxCoord}{ *width}, \param{wxCoord}{ *height}}
Gets the rectangle surrounding the current clipping region.
\pythonnote{No arguments are required and the four values defining the
rectangle are returned as a tuple.}
\membersection{wxDC::GetFont}\label{wxdcgetfont}
\func{wxFont\&}{GetFont}{\void}
\constfunc{const wxFont\&}{GetFont}{\void}
Gets the current font (see \helpref{wxDC::SetFont}{wxdcsetfont}).
\membersection{wxDC::GetLogicalFunction}\label{wxdcgetlogicalfunction}
\func{int}{GetLogicalFunction}{\void}
Gets the current logical function (see \helpref{wxDC::SetLogicalFunction}{wxdcsetlogicalfunction}).
\membersection{wxDC::GetMapMode}\label{wxdcgetmapmode}
\func{int}{GetMapMode}{\void}
Gets the {\it mapping mode} for the device context (see \helpref{wxDC::SetMapMode}{wxdcsetmapmode}).
\membersection{wxDC::GetOptimization}\label{wxdcgetoptimization}
\func{bool}{GetOptimization}{\void}
Returns TRUE if device context optimization is on.
See \helpref{wxDC::SetOptimization}{wxsetoptimization} for details.
\membersection{wxDC::GetPen}\label{wxdcgetpen}
\func{wxPen\&}{GetPen}{\void}
\constfunc{const wxPen\&}{GetPen}{\void}
Gets the current pen (see \helpref{wxDC::SetPen}{wxdcsetpen}).
\membersection{wxDC::GetPixel}\label{wxdcgetpixel}
\func{bool}{GetPixel}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxColour *}{colour}}
Sets {\it colour} to the colour at the specified location. Windows only; an X implementation
is being worked on. Not available for wxPostScriptDC or wxMetafileDC.
\pythonnote{For wxPython the wxColour value is returned and is not
required as a parameter.}
\membersection{wxDC::GetSize}\label{wxdcgetsize}
\func{void}{GetSize}{\param{wxCoord *}{width}, \param{wxCoord *}{height}}
For a PostScript device context, this gets the maximum size of graphics
drawn so far on the device context.
For a Windows printer device context, this gets the horizontal and vertical
resolution. It can be used to scale graphics to fit the page when using
a Windows printer device context. For example, if {\it maxX} and {\it maxY}\rtfsp
represent the maximum horizontal and vertical `pixel' values used in your
application, the following code will scale the graphic to fit on the
printer page:
\begin{verbatim}
wxCoord w, h;
dc.GetSize(&w, &h);
double scaleX=(double)(maxX/w);
double scaleY=(double)(maxY/h);
dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY));
\end{verbatim}
\pythonnote{In place of a single overloaded method name, wxPython
implements the following methods:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetSize()}}{Returns a wxSize}
\twocolitem{{\bf GetSizeTuple()}}{Returns a 2-tuple (width, height)}
\end{twocollist}}
}
\membersection{wxDC::GetTextBackground}\label{wxdcgettextbackground}
\func{wxColour\&}{GetTextBackground}{\void}
\constfunc{const wxColour\&}{GetTextBackground}{\void}
Gets the current text background colour (see \helpref{wxDC::SetTextBackground}{wxdcsettextbackground}).
\membersection{wxDC::GetTextExtent}\label{wxdcgettextextent}
\func{void}{GetTextExtent}{\param{const wxString\& }{string}, \param{wxCoord *}{w}, \param{wxCoord *}{h},\\
\param{wxCoord *}{descent = NULL}, \param{wxCoord *}{externalLeading = NULL}, \param{wxFont *}{font = NULL}}
Gets the dimensions of the string using the currently selected font.
\rtfsp{\it string} is the text string to measure, {\it w} and {\it h} are
the total width and height respectively, {\it descent} is the
dimension from the baseline of the font to the bottom of the
descender, and {\it externalLeading} is any extra vertical space added
to the font by the font designer (usually is zero).
The optional parameter {\it font} specifies an alternative
to the currently selected font: but note that this does not
yet work under Windows, so you need to set a font for
the device context first.
See also \helpref{wxFont}{wxfont}, \helpref{wxDC::SetFont}{wxdcsetfont}.
\pythonnote{The following methods are implemented in wxPython:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetTextExtent(string)}}{Returns a 2-tuple, (width, height)}
\twocolitem{{\bf GetFullTextExtent(string, font=NULL)}}{Returns a
4-tuple, (width, height, descent, externalLeading) }
\end{twocollist}}
}
\membersection{wxDC::GetTextForeground}\label{wxdcgettextforeground}
\func{wxColour\&}{GetTextForeground}{\void}
\constfunc{const wxColour\&}{GetTextForeground}{\void}
Gets the current text foreground colour (see \helpref{wxDC::SetTextForeground}{wxdcsettextforeground}).
\membersection{wxDC::GetUserScale}\label{wxdcgetuserscale}
\func{void}{GetUserScale}{\param{double}{ *x}, \param{double}{ *y}}
Gets the current user scale factor (set by \helpref{SetUserScale}{wxdcsetuserscale}).
\membersection{wxDC::LogicalToDeviceX}\label{wxdclogicaltodevicex}
\func{wxCoord}{LogicalToDeviceX}{\param{wxCoord}{ x}}
Converts logical X coordinate to device coordinate, using the current
mapping mode.
\membersection{wxDC::LogicalToDeviceXRel}\label{wxdclogicaltodevicexrel}
\func{wxCoord}{LogicalToDeviceXRel}{\param{wxCoord}{ x}}
Converts logical X coordinate to relative device coordinate, using the current
mapping mode. Use this for converting a width, for example.
\membersection{wxDC::LogicalToDeviceY}\label{wxdclogicaltodevicey}
\func{wxCoord}{LogicalToDeviceY}{\param{wxCoord}{ y}}
Converts logical Y coordinate to device coordinate, using the current
mapping mode.
\membersection{wxDC::LogicalToDeviceYRel}\label{wxdclogicaltodeviceyrel}
\func{wxCoord}{LogicalToDeviceYRel}{\param{wxCoord}{ y}}
Converts logical Y coordinate to relative device coordinate, using the current
mapping mode. Use this for converting a height, for example.
\membersection{wxDC::MaxX}\label{wxdcmaxx}
\func{wxCoord}{MaxX}{\void}
Gets the maximum horizontal extent used in drawing commands so far.
\membersection{wxDC::MaxY}\label{wxdcmaxy}
\func{wxCoord}{MaxY}{\void}
Gets the maximum vertical extent used in drawing commands so far.
\membersection{wxDC::MinX}\label{wxdcminx}
\func{wxCoord}{MinX}{\void}
Gets the minimum horizontal extent used in drawing commands so far.
\membersection{wxDC::MinY}\label{wxdcminy}
\func{wxCoord}{MinY}{\void}
Gets the minimum vertical extent used in drawing commands so far.
\membersection{wxDC::Ok}\label{wxdcok}
\func{bool}{Ok}{\void}
Returns TRUE if the DC is ok to use.
\membersection{wxDC::ResetBoundingBox}\label{wxdcresetboundingbox}
\func{void}{ResetBoundingBox}{\void}
Resets the bounding box: after a call to this function, the bounding box
doesn't contain anything.
\wxheading{See also}
\helpref{CalcBoundingBox}{wxdccalcboundingbox}
\membersection{wxDC::SetDeviceOrigin}\label{wxdcsetdeviceorigin}
\func{void}{SetDeviceOrigin}{\param{wxCoord}{ x}, \param{wxCoord}{ y}}
Sets the device origin (i.e., the origin in pixels after scaling has been
applied).
This function may be useful in Windows printing
operations for placing a graphic on a page.
\membersection{wxDC::SetBackground}\label{wxdcsetbackground}
\func{void}{SetBackground}{\param{const wxBrush\& }{brush}}
Sets the current background brush for the DC.
\membersection{wxDC::SetBackgroundMode}\label{wxdcsetbackgroundmode}
\func{void}{SetBackgroundMode}{\param{int}{ mode}}
{\it mode} may be one of wxSOLID and wxTRANSPARENT. This setting determines
whether text will be drawn with a background colour or not.
\membersection{wxDC::SetClippingRegion}\label{wxdcsetclippingregion}
\func{void}{SetClippingRegion}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}}
\func{void}{SetClippingRegion}{\param{const wxRegion\&}{ region}}
Sets the clipping region for the DC. The clipping region is an area
to which drawing is restricted. Possible uses for the clipping region are for clipping text
or for speeding up window redraws when only a known area of the screen is damaged.
\wxheading{See also}
\helpref{wxDC::DestroyClippingRegion}{wxdcdestroyclippingregion}, \helpref{wxRegion}{wxregion}
\membersection{wxDC::SetPalette}\label{wxdcsetpalette}
\func{void}{SetPalette}{\param{const wxPalette\& }{palette}}
If this is a window DC or memory DC, assigns the given palette to the window
or bitmap associated with the DC. If the argument is wxNullPalette, the current
palette is selected out of the device context, and the original palette
restored.
See \helpref{wxPalette}{wxpalette} for further details.
\membersection{wxDC::SetBrush}\label{wxdcsetbrush}
\func{void}{SetBrush}{\param{const wxBrush\& }{brush}}
Sets the current brush for the DC.
If the argument is wxNullBrush, the current brush is selected out of the device
context, and the original brush restored, allowing the current brush to
be destroyed safely.
See also \helpref{wxBrush}{wxbrush}.
See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
when drawing into a monochrome bitmap.
\membersection{wxDC::SetFont}\label{wxdcsetfont}
\func{void}{SetFont}{\param{const wxFont\& }{font}}
Sets the current font for the DC.
If the argument is wxNullFont, the current font is selected out of the device
context, and the original font restored, allowing the current font to
be destroyed safely.
See also \helpref{wxFont}{wxfont}.
\membersection{wxDC::SetLogicalFunction}\label{wxdcsetlogicalfunction}
\func{void}{SetLogicalFunction}{\param{int}{ function}}
Sets the current logical function for the device context. This determines how
a source pixel (from a pen or brush colour, or source device context if
using \helpref{wxDC::Blit}{wxdcblit}) combines with a destination pixel in the
current device context.
The possible values
and their meaning in terms of source and destination pixel values are
as follows:
\begin{verbatim}
wxAND src AND dst
wxAND_INVERT (NOT src) AND dst
wxAND_REVERSE src AND (NOT dst)
wxCLEAR 0
wxCOPY src
wxEQUIV (NOT src) XOR dst
wxINVERT NOT dst
wxNAND (NOT src) OR (NOT dst)
wxNOR (NOT src) AND (NOT dst)
wxNO_OP dst
wxOR src OR dst
wxOR_INVERT (NOT src) OR dst
wxOR_REVERSE src OR (NOT dst)
wxSET 1
wxSRC_INVERT NOT src
wxXOR src XOR dst
\end{verbatim}
The default is wxCOPY, which simply draws with the current colour.
The others combine the current colour and the background using a
logical operation. wxINVERT is commonly used for drawing rubber bands or
moving outlines, since drawing twice reverts to the original colour.
\membersection{wxDC::SetMapMode}\label{wxdcsetmapmode}
\func{void}{SetMapMode}{\param{int}{ int}}
The {\it mapping mode} of the device context defines the unit of
measurement used to convert logical units to device units. Note that
in X, text drawing isn't handled consistently with the mapping mode; a
font is always specified in point size. However, setting the {\it
user scale} (see \helpref{wxDC::SetUserScale}{wxdcsetuserscale}) scales the text appropriately. In
Windows, scaleable TrueType fonts are always used; in X, results depend
on availability of fonts, but usually a reasonable match is found.
Note that the coordinate origin should ideally be selectable, but for
now is always at the top left of the screen/printer.
Drawing to a Windows printer device context under UNIX
uses the current mapping mode, but mapping mode is currently ignored for
PostScript output.
The mapping mode can be one of the following:
\begin{twocollist}\itemsep=0pt
\twocolitem{wxMM\_TWIPS}{Each logical unit is 1/20 of a point, or 1/1440 of
an inch.}
\twocolitem{wxMM\_POINTS}{Each logical unit is a point, or 1/72 of an inch.}
\twocolitem{wxMM\_METRIC}{Each logical unit is 1 mm.}
\twocolitem{wxMM\_LOMETRIC}{Each logical unit is 1/10 of a mm.}
\twocolitem{wxMM\_TEXT}{Each logical unit is 1 pixel.}
\end{twocollist}
\membersection{wxDC::SetOptimization}\label{wxsetoptimization}
\func{void}{SetOptimization}{\param{bool }{optimize}}
If {\it optimize} is TRUE (the default), this function sets optimization mode on.
This currently means that under X, the device context will not try to set a pen or brush
property if it is known to be set already. This approach can fall down
if non-wxWindows code is using the same device context or window, for example
when the window is a panel on which the windowing system draws panel items.
The wxWindows device context 'memory' will now be out of step with reality.
Setting optimization off, drawing, then setting it back on again, is a trick
that must occasionally be employed.
\membersection{wxDC::SetPen}\label{wxdcsetpen}
\func{void}{SetPen}{\param{const wxPen\& }{pen}}
Sets the current pen for the DC.
If the argument is wxNullPen, the current pen is selected out of the device
context, and the original pen restored.
See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
when drawing into a monochrome bitmap.
\membersection{wxDC::SetTextBackground}\label{wxdcsettextbackground}
\func{void}{SetTextBackground}{\param{const wxColour\& }{colour}}
Sets the current text background colour for the DC.
\membersection{wxDC::SetTextForeground}\label{wxdcsettextforeground}
\func{void}{SetTextForeground}{\param{const wxColour\& }{colour}}
Sets the current text foreground colour for the DC.
See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
when drawing into a monochrome bitmap.
\membersection{wxDC::SetUserScale}\label{wxdcsetuserscale}
\func{void}{SetUserScale}{\param{double}{ xScale}, \param{double}{ yScale}}
Sets the user scaling factor, useful for applications which require
`zooming'.
\membersection{wxDC::StartDoc}\label{wxdcstartdoc}
\func{bool}{StartDoc}{\param{const wxString\& }{message}}
Starts a document (only relevant when outputting to a printer).
Message is a message to show whilst printing.
\membersection{wxDC::StartPage}\label{wxdcstartpage}
\func{bool}{StartPage}{\void}
Starts a document page (only relevant when outputting to a printer).

View File

@@ -1,72 +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,202 +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,52 +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}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

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,358 +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.
\wxheading{Derived from}
\helpref{wxPanel}{wxpanel}\\
\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.
You specify the type of dialog with the {\bf wxDIALOG\_MODAL} and {\bf wxDIALOG\_MODELESS} window
styles.
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{OnCloseWindow}{wxwindowonclosewindow} handler for the
dialog to respond to system close events.
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxDIALOG\_MODAL}}{Specifies that the dialog box will be modal.}
\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the dialog box.}
\twocolitem{\windowstyle{wxDEFAULT\_DIALOG\_STYLE}}{Equivalent to a combination of wxCAPTION, wxSYSTEM\_MENU and wxTHICK\_FRAME}
\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.}
\end{twocollist}
Under Unix or Linux, MWM (the Motif Window Manager) or other window managers reckognizing
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 \helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged} to
propagate the notification to child windows and controls.
\wxheading{See also}
\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}
\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 veryfying 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 authentificate.
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 automatical 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,119 +0,0 @@
%
% automatically generated by HelpGen from
% include\wx\dir.h at 11/Dec/99 00:55:30
%
\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.
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 ressources. 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}.

View File

@@ -1,90 +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>
\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}, \param{const wxPoint\& }{pos = wxDefaultPosition}}
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. Not implemented.}
\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,145 +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.
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 {\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 platfrom-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) extenesion, just the basename (no path and no extension)
or a basename with extentsion. 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,101 +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.}
\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 threee
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,383 +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::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::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\_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.
\membersection{wxDocManager::SelectDocumentType}
\func{wxDocTemplate *}{SelectDocumentType}{\param{wxDocTemplate **}{templates},
\param{int}{ noTemplates}}
Returns a document template by asking the user (if there is more than one template).
This function is used in wxDocManager::CreateDocument.
\membersection{wxDocManager::SelectViewType}
\func{wxDocTemplate *}{SelectViewType}{\param{wxDocTemplate **}{templates},
\param{int}{ noTemplates}}
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 won't appear because the array of templates only contains
those relevant to the document in question, and often there will only be one such.
\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,236 +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 \verb$*.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 \verb$*.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}
\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,358 +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}}
Updates all views. If {\it sender} is non-NULL, does not update this view.

View File

@@ -1,215 +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{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& }{hotspot = 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& }{hotspot = 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& }{hotspot = 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& }{hotspot = 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}{Position of the hotspot within the new image.}
\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 window coordinates (or screen coordinates if no
window was specified to 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,80 +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.
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.

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