removed latex sources of wxDocs; wxWidgets now uses Doxygen on the 'interface' headers to create its documentation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-03-29 19:03:36 +00:00
parent 29901843fd
commit 0eb0cdef7c
667 changed files with 0 additions and 159416 deletions

View File

@@ -1,28 +0,0 @@
FIGS_GIF = \
sizer00.gif sizer01.gif sizer02.gif sizer03.gif sizer04.gif \
sizer05.gif sizer06.gif sizer07.gif sizer08.gif sizer09.gif \
sizer10.gif sizer11.gif
FIGS_EPS = $(FIGS_GIF:.gif=.eps)
LATEX = hugelatex
MAKEINDEX = makeindex
DVIPS = dvips
all: manual.ps
manual.ps: manual.dvi
$(DVIPS) $< -o $@
manual.dvi: manual.tex $(FIGS_EPS)
$(LATEX) manual.tex
$(MAKEINDEX) -s manual.ist manual
$(LATEX) manual.tex
$(MAKEINDEX) -s manual.ist manual
$(LATEX) manual.tex
$(FIGS_EPS): %.eps : %.gif
giftopnm $< | pnmtops -noturn > $@
clean:
-rm -f *.dvi *.aux *.idx *.ilg *.ind *.log *.toc $(FIGS_EPS) *~

View File

@@ -1,228 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: aboutdlginfo.tex
%% Purpose: wxAboutDialogInfo documentation
%% Author: Vadim Zeitlin
%% Created: 2006-10-08
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxAboutDialogInfo}}\label{wxaboutdialoginfo}
wxAboutDialogInfo contains information shown in the standard \textit{About}
dialog displayed by the \helpref{wxAboutBox()}{wxaboutbox} function.
This class contains the general information about the program, such as its
name, version, copyright and so on, as well as lists of the program developers,
documentation writers, artists and translators. The simple properties from the
former group are represented as a string with the exception of the program icon
and the program web site, while the lists from the latter group are stored as
\helpref{wxArrayString}{wxarraystring} and can be either set entirely at once
using \helpref{SetDevelopers}{wxaboutdialoginfosetdevelopers} and similar
functions or built one by one using \helpref{AddDeveloper}{wxaboutdialoginfoadddeveloper}
etc.
Please also notice that while all the main platforms have the native
implementation of the about dialog, they are often more limited than the
generic version provided by wxWidgets and so the generic version is used if
wxAboutDialogInfo has any fields not supported by the native version. Currently
GTK+ version supports all the possible fields natively but MSW and Mac versions
don't support URLs, licence text nor custom icons in the about dialog and if
either of those is used, \helpref{wxAboutBox()}{wxaboutbox} will automatically
use the generic version so you should avoid specifying these fields to achieve
more native look and feel.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/aboutdlg.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAboutDialogInfo::wxAboutDialogInfo}\label{wxaboutdialoginfowxaboutdialoginfo}
\func{}{wxAboutDialogInfo}{\void}
Default constructor leaves all fields are initially uninitialized, in general
you should call at least \helpref{SetVersion}{wxaboutdialoginfosetversion},
\helpref{SetCopyright}{wxaboutdialoginfosetcopyright} and
\helpref{SetDescription}{wxaboutdialoginfosetdescription}.
\membersection{wxAboutDialogInfo::AddArtist}\label{wxaboutdialoginfoaddartist}
\func{void}{AddArtist}{\param{const wxString\& }{artist}}
Adds an artist name to be shown in the program credits.
\wxheading{See also}
\helpref{SetArtists}{wxaboutdialoginfosetartists}
\membersection{wxAboutDialogInfo::AddDeveloper}\label{wxaboutdialoginfoadddeveloper}
\func{void}{AddDeveloper}{\param{const wxString\& }{developer}}
Adds a developer name to be shown in the program credits.
\wxheading{See also}
\helpref{SetDevelopers}{wxaboutdialoginfosetdevelopers}
\membersection{wxAboutDialogInfo::AddDocWriter}\label{wxaboutdialoginfoadddocwriter}
\func{void}{AddDocWriter}{\param{const wxString\& }{docwriter}}
Adds a documentation writer name to be shown in the program credits.
\wxheading{See also}
\helpref{SetDocWriters}{wxaboutdialoginfosetdocwriters}
\membersection{wxAboutDialogInfo::AddTranslator}\label{wxaboutdialoginfoaddtranslator}
\func{void}{AddTranslator}{\param{const wxString\& }{translator}}
Adds a translator name to be shown in the program credits. Notice that if no
translator names are specified explicitely, \helpref{wxAboutBox()}{wxaboutbox}
will try to use the translation of the string \texttt{translator-credits} from
the currently used message catalog -- this can be used to show just the name of
the translator of the program in the current language.
\wxheading{See also}
\helpref{SetTranslators}{wxaboutdialoginfosettranslators}
\membersection{wxAboutDialogInfo::SetArtists}\label{wxaboutdialoginfosetartists}
\func{void}{SetArtists}{\param{const wxArrayString\& }{artists}}
Sets the the list of artists to be shown in the program credits.
\wxheading{See also}
\helpref{AddArtist}{wxaboutdialoginfoaddartist}
\membersection{wxAboutDialogInfo::SetCopyright}\label{wxaboutdialoginfosetcopyright}
\func{void}{SetCopyright}{\param{const wxString\& }{copyright}}
Set the short string containing the program copyright information. Notice that
any occurrences of \texttt{"(C)"} in \arg{copyright} will be replaced by the
copyright symbol (circled C) automatically, which means that you can avoid
using this symbol in the program source code which can be problematic,
\membersection{wxAboutDialogInfo::SetDescription}\label{wxaboutdialoginfosetdescription}
\func{void}{SetDescription}{\param{const wxString\& }{desc}}
Set brief, but possibly multiline, description of the program.
\membersection{wxAboutDialogInfo::SetDevelopers}\label{wxaboutdialoginfosetdevelopers}
\func{void}{SetDevelopers}{\param{const wxArrayString\& }{developers}}
Set the list of developers of the program.
\wxheading{See also}
\helpref{AddDeveloper}{wxaboutdialoginfoadddeveloper}
\membersection{wxAboutDialogInfo::SetDocWriters}\label{wxaboutdialoginfosetdocwriters}
\func{void}{SetDocWriters}{\param{const wxArrayString\& }{docwriters}}
Set the list of documentation writers.
\wxheading{See also}
\helpref{AddDocWriter}{wxaboutdialoginfoadddocwriter}
\membersection{wxAboutDialogInfo::SetIcon}\label{wxaboutdialoginfoseticon}
\func{void}{SetIcon}{\param{const wxIcon\& }{icon}}
Set the icon to be shown in the dialog. By default the icon of the main frame
will be shown if the native about dialog supports custom icons. If it doesn't
but a valid icon is specified using this method, the generic about dialog is
used instead so you should avoid calling this function for maximally native
look and feel.
\membersection{wxAboutDialogInfo::SetLicence}\label{wxaboutdialoginfosetlicence}
\func{void}{SetLicence}{\param{const wxString\& }{licence}}
Set the long, multiline string containing the text of the program licence.
Only GTK+ version supports showing the licence text in the native about dialog
currently so the generic version will be used under all the other platforms if
this method is called. To preserve the native look and feel it is advised that
you do not call this method but provide a separate menu item in the
\texttt{"Help"} menu for displaying the text of your program licence.
\membersection{wxAboutDialogInfo::SetLicense}\label{wxaboutdialoginfosetlicense}
\func{void}{SetLicense}{\param{const wxString\& }{licence}}
This is the same as \helpref{SetLicence}{wxaboutdialoginfosetlicence}.
\membersection{wxAboutDialogInfo::SetName}\label{wxaboutdialoginfosetname}
\func{void}{SetName}{\param{const wxString\& }{name}}
Set the name of the program. If this method is not called, the string returned
by \helpref{wxApp::GetAppName()}{wxappgetappname} will be shown in the dialog.
\membersection{wxAboutDialogInfo::SetTranslators}\label{wxaboutdialoginfosettranslators}
\func{void}{SetTranslators}{\param{const wxArrayString\& }{translators}}
Set the list of translators. Please see
\helpref{AddTranslator}{wxaboutdialoginfoaddtranslator} for additional
discussion.
\membersection{wxAboutDialogInfo::SetVersion}\label{wxaboutdialoginfosetversion}
\func{void}{SetVersion}{\param{const wxString\& }{version}}
Set the version of the program. The version is in free format, i.e. not
necessarily in the \texttt{x.y.z} form but it shouldn't contain the "version"
word.
\membersection{wxAboutDialogInfo::SetWebSite}\label{wxaboutdialoginfosetwebsite}
\func{void}{SetWebSite}{\param{const wxString\& }{url}, \param{const wxString\& }{desc = wxEmptyString}}
Set the web site for the program and its description (which defaults to URL
itself if empty).
Please notice that only GTK+ version currently supports showing the link in the
native about dialog so if this method is called, the generic version will be
used under all the other platforms.

View File

@@ -1,188 +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{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxAcceleratorTable}{wxacceleratortable}, \helpref{wxWindow::SetAcceleratorTable}{wxwindowsetacceleratortable}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAcceleratorEntry::wxAcceleratorEntry}\label{wxacceleratorentryctor}
\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 and Mac OS X, 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{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Predefined objects}
Objects:
{\bf wxNullAcceleratorTable}
\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{wxacceleratortablector}
\func{}{wxAcceleratorTable}{\void}
Default constructor.
\func{}{wxAcceleratorTable}{\param{const wxAcceleratorTable\& }{bitmap}}
Copy constructor, uses \helpref{reference counting}{trefcount}.
\func{}{wxAcceleratorTable}{\param{int}{ n}, \param{wxAcceleratorEntry}{ entries[]}}
Creates from an array of \helpref{wxAcceleratorEntry}{wxacceleratorentry} objects.
\func{}{wxAcceleratorTable}{\param{const wxString\&}{ resource}}
Loads the accelerator table from a Windows resource (Windows only).
\wxheading{Parameters}
\docparam{n}{Number of accelerator entries.}
\docparam{entries}{The array of entries.}
\docparam{resource}{Name of a Windows accelerator.}
\pythonnote{The wxPython constructor accepts a list of
wxAcceleratorEntry objects, or 3-tuples consisting of flags, keyCode,
and cmd values like you would construct wxAcceleratorEntry objects with.}
\perlnote{The wxPerl constructor accepts a list of either
Wx::AcceleratorEntry objects or references to 3-element arrays
( flags, keyCode, cmd ), like the parameters of Wx::AcceleratorEntry::new.}
\membersection{wxAcceleratorTable::\destruct{wxAcceleratorTable}}\label{wxacceleratortabledtor}
\func{}{\destruct{wxAcceleratorTable}}{\void}
Destroys the wxAcceleratorTable object.
See \helpref{reference-counted object destruction}{refcountdestruct} for more info.
\membersection{wxAcceleratorTable::IsOk}\label{wxacceleratortableisok}
\constfunc{bool}{IsOk}{\void}
Returns true if the accelerator table is valid.
\membersection{wxAcceleratorTable::operator $=$}\label{wxacceleratortableassign}
\func{wxAcceleratorTable\& }{operator $=$}{\param{const wxAcceleratorTable\& }{accel}}
Assignment operator, using \helpref{reference counting}{trefcount}.
\wxheading{Parameters}
\docparam{accel}{Accelerator table to assign.}
\wxheading{Return value}
Returns a reference to this object.

View File

@@ -1,449 +0,0 @@
%
% automatically generated by HelpGen $Revision$ from
% access.h at 11/Apr/03 12:31:15
%
\section{\class{wxAccessible}}\label{wxaccessible}
The wxAccessible class allows wxWidgets applications, and
wxWidgets itself, to return extended information about user interface elements
to client applications such as screen readers. This is the
main way in which wxWidgets implements accessibility features.
At present, only Microsoft Active Accessibility is supported
by this class.
To use this class, derive from wxAccessible, implement appropriate
functions, and associate an object of the class with a
window using \helpref{wxWindow::SetAccessible}{wxwindowsetaccessible}.
All functions return an indication of success, failure, or not implemented
using values of the wxAccStatus enum type.
If you return wxACC\_NOT\_IMPLEMENTED from any function, the system will try to
implement the appropriate functionality. However this will not work with
all functions.
Most functions work with an {\it object id}, which can be zero to refer to
'this' UI element, or greater than zero to refer to the nth child element.
This allows you to specify elements that don't have a corresponding wxWindow or
wxAccessible; for example, the sash of a splitter window.
For details on the semantics of functions and types, please refer to the
Microsoft Active Accessibility 1.2 documentation.
This class is compiled into wxWidgets only if the wxUSE\_ACCESSIBILITY setup
symbol is set to 1.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/access.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Data structures}
Functions return a wxAccStatus error code, which
may be one of the following:
{\small
\begin{verbatim}
typedef enum
{
wxACC_FAIL, // The function failed
wxACC_FALSE, // The function returned false
wxACC_OK, // The function completed successfully
wxACC_NOT_IMPLEMENTED, // The function is not implemented
wxACC_NOT_SUPPORTED // The function is not supported
} wxAccStatus
\end{verbatim}
}
Directions of navigation are represented by
the following:
{\small
\begin{verbatim}
typedef enum
{
wxNAVDIR_DOWN,
wxNAVDIR_FIRSTCHILD,
wxNAVDIR_LASTCHILD,
wxNAVDIR_LEFT,
wxNAVDIR_NEXT,
wxNAVDIR_PREVIOUS,
wxNAVDIR_RIGHT,
wxNAVDIR_UP
} wxNavDir
\end{verbatim}
}
The role of a user interface element is represented
by the following type:
{\small
\begin{verbatim}
typedef enum {
wxROLE_NONE,
wxROLE_SYSTEM_ALERT,
wxROLE_SYSTEM_ANIMATION,
wxROLE_SYSTEM_APPLICATION,
wxROLE_SYSTEM_BORDER,
wxROLE_SYSTEM_BUTTONDROPDOWN,
wxROLE_SYSTEM_BUTTONDROPDOWNGRID,
wxROLE_SYSTEM_BUTTONMENU,
wxROLE_SYSTEM_CARET,
wxROLE_SYSTEM_CELL,
wxROLE_SYSTEM_CHARACTER,
wxROLE_SYSTEM_CHART,
wxROLE_SYSTEM_CHECKBUTTON,
wxROLE_SYSTEM_CLIENT,
wxROLE_SYSTEM_CLOCK,
wxROLE_SYSTEM_COLUMN,
wxROLE_SYSTEM_COLUMNHEADER,
wxROLE_SYSTEM_COMBOBOX,
wxROLE_SYSTEM_CURSOR,
wxROLE_SYSTEM_DIAGRAM,
wxROLE_SYSTEM_DIAL,
wxROLE_SYSTEM_DIALOG,
wxROLE_SYSTEM_DOCUMENT,
wxROLE_SYSTEM_DROPLIST,
wxROLE_SYSTEM_EQUATION,
wxROLE_SYSTEM_GRAPHIC,
wxROLE_SYSTEM_GRIP,
wxROLE_SYSTEM_GROUPING,
wxROLE_SYSTEM_HELPBALLOON,
wxROLE_SYSTEM_HOTKEYFIELD,
wxROLE_SYSTEM_INDICATOR,
wxROLE_SYSTEM_LINK,
wxROLE_SYSTEM_LIST,
wxROLE_SYSTEM_LISTITEM,
wxROLE_SYSTEM_MENUBAR,
wxROLE_SYSTEM_MENUITEM,
wxROLE_SYSTEM_MENUPOPUP,
wxROLE_SYSTEM_OUTLINE,
wxROLE_SYSTEM_OUTLINEITEM,
wxROLE_SYSTEM_PAGETAB,
wxROLE_SYSTEM_PAGETABLIST,
wxROLE_SYSTEM_PANE,
wxROLE_SYSTEM_PROGRESSBAR,
wxROLE_SYSTEM_PROPERTYPAGE,
wxROLE_SYSTEM_PUSHBUTTON,
wxROLE_SYSTEM_RADIOBUTTON,
wxROLE_SYSTEM_ROW,
wxROLE_SYSTEM_ROWHEADER,
wxROLE_SYSTEM_SCROLLBAR,
wxROLE_SYSTEM_SEPARATOR,
wxROLE_SYSTEM_SLIDER,
wxROLE_SYSTEM_SOUND,
wxROLE_SYSTEM_SPINBUTTON,
wxROLE_SYSTEM_STATICTEXT,
wxROLE_SYSTEM_STATUSBAR,
wxROLE_SYSTEM_TABLE,
wxROLE_SYSTEM_TEXT,
wxROLE_SYSTEM_TITLEBAR,
wxROLE_SYSTEM_TOOLBAR,
wxROLE_SYSTEM_TOOLTIP,
wxROLE_SYSTEM_WHITESPACE,
wxROLE_SYSTEM_WINDOW
} wxAccRole
\end{verbatim}
}
Objects are represented by the following type:
{\small
\begin{verbatim}
typedef enum {
wxOBJID_WINDOW = 0x00000000,
wxOBJID_SYSMENU = 0xFFFFFFFF,
wxOBJID_TITLEBAR = 0xFFFFFFFE,
wxOBJID_MENU = 0xFFFFFFFD,
wxOBJID_CLIENT = 0xFFFFFFFC,
wxOBJID_VSCROLL = 0xFFFFFFFB,
wxOBJID_HSCROLL = 0xFFFFFFFA,
wxOBJID_SIZEGRIP = 0xFFFFFFF9,
wxOBJID_CARET = 0xFFFFFFF8,
wxOBJID_CURSOR = 0xFFFFFFF7,
wxOBJID_ALERT = 0xFFFFFFF6,
wxOBJID_SOUND = 0xFFFFFFF5
} wxAccObject
\end{verbatim}
}
Selection actions are identified by
this type:
{\small
\begin{verbatim}
typedef enum
{
wxACC_SEL_NONE = 0,
wxACC_SEL_TAKEFOCUS = 1,
wxACC_SEL_TAKESELECTION = 2,
wxACC_SEL_EXTENDSELECTION = 4,
wxACC_SEL_ADDSELECTION = 8,
wxACC_SEL_REMOVESELECTION = 16
} wxAccSelectionFlags
\end{verbatim}
}
States are represented by the following:
{\small
\begin{verbatim}
#define wxACC_STATE_SYSTEM_ALERT_HIGH 0x00000001
#define wxACC_STATE_SYSTEM_ALERT_MEDIUM 0x00000002
#define wxACC_STATE_SYSTEM_ALERT_LOW 0x00000004
#define wxACC_STATE_SYSTEM_ANIMATED 0x00000008
#define wxACC_STATE_SYSTEM_BUSY 0x00000010
#define wxACC_STATE_SYSTEM_CHECKED 0x00000020
#define wxACC_STATE_SYSTEM_COLLAPSED 0x00000040
#define wxACC_STATE_SYSTEM_DEFAULT 0x00000080
#define wxACC_STATE_SYSTEM_EXPANDED 0x00000100
#define wxACC_STATE_SYSTEM_EXTSELECTABLE 0x00000200
#define wxACC_STATE_SYSTEM_FLOATING 0x00000400
#define wxACC_STATE_SYSTEM_FOCUSABLE 0x00000800
#define wxACC_STATE_SYSTEM_FOCUSED 0x00001000
#define wxACC_STATE_SYSTEM_HOTTRACKED 0x00002000
#define wxACC_STATE_SYSTEM_INVISIBLE 0x00004000
#define wxACC_STATE_SYSTEM_MARQUEED 0x00008000
#define wxACC_STATE_SYSTEM_MIXED 0x00010000
#define wxACC_STATE_SYSTEM_MULTISELECTABLE 0x00020000
#define wxACC_STATE_SYSTEM_OFFSCREEN 0x00040000
#define wxACC_STATE_SYSTEM_PRESSED 0x00080000
#define wxACC_STATE_SYSTEM_PROTECTED 0x00100000
#define wxACC_STATE_SYSTEM_READONLY 0x00200000
#define wxACC_STATE_SYSTEM_SELECTABLE 0x00400000
#define wxACC_STATE_SYSTEM_SELECTED 0x00800000
#define wxACC_STATE_SYSTEM_SELFVOICING 0x01000000
#define wxACC_STATE_SYSTEM_UNAVAILABLE 0x02000000
\end{verbatim}
}
Event identifiers that can be sent via \helpref{wxAccessible::NotifyEvent}{wxaccessiblenotifyevent} are
as follows:
{\small
\begin{verbatim}
#define wxACC_EVENT_SYSTEM_SOUND 0x0001
#define wxACC_EVENT_SYSTEM_ALERT 0x0002
#define wxACC_EVENT_SYSTEM_FOREGROUND 0x0003
#define wxACC_EVENT_SYSTEM_MENUSTART 0x0004
#define wxACC_EVENT_SYSTEM_MENUEND 0x0005
#define wxACC_EVENT_SYSTEM_MENUPOPUPSTART 0x0006
#define wxACC_EVENT_SYSTEM_MENUPOPUPEND 0x0007
#define wxACC_EVENT_SYSTEM_CAPTURESTART 0x0008
#define wxACC_EVENT_SYSTEM_CAPTUREEND 0x0009
#define wxACC_EVENT_SYSTEM_MOVESIZESTART 0x000A
#define wxACC_EVENT_SYSTEM_MOVESIZEEND 0x000B
#define wxACC_EVENT_SYSTEM_CONTEXTHELPSTART 0x000C
#define wxACC_EVENT_SYSTEM_CONTEXTHELPEND 0x000D
#define wxACC_EVENT_SYSTEM_DRAGDROPSTART 0x000E
#define wxACC_EVENT_SYSTEM_DRAGDROPEND 0x000F
#define wxACC_EVENT_SYSTEM_DIALOGSTART 0x0010
#define wxACC_EVENT_SYSTEM_DIALOGEND 0x0011
#define wxACC_EVENT_SYSTEM_SCROLLINGSTART 0x0012
#define wxACC_EVENT_SYSTEM_SCROLLINGEND 0x0013
#define wxACC_EVENT_SYSTEM_SWITCHSTART 0x0014
#define wxACC_EVENT_SYSTEM_SWITCHEND 0x0015
#define wxACC_EVENT_SYSTEM_MINIMIZESTART 0x0016
#define wxACC_EVENT_SYSTEM_MINIMIZEEND 0x0017
#define wxACC_EVENT_OBJECT_CREATE 0x8000
#define wxACC_EVENT_OBJECT_DESTROY 0x8001
#define wxACC_EVENT_OBJECT_SHOW 0x8002
#define wxACC_EVENT_OBJECT_HIDE 0x8003
#define wxACC_EVENT_OBJECT_REORDER 0x8004
#define wxACC_EVENT_OBJECT_FOCUS 0x8005
#define wxACC_EVENT_OBJECT_SELECTION 0x8006
#define wxACC_EVENT_OBJECT_SELECTIONADD 0x8007
#define wxACC_EVENT_OBJECT_SELECTIONREMOVE 0x8008
#define wxACC_EVENT_OBJECT_SELECTIONWITHIN 0x8009
#define wxACC_EVENT_OBJECT_STATECHANGE 0x800A
#define wxACC_EVENT_OBJECT_LOCATIONCHANGE 0x800B
#define wxACC_EVENT_OBJECT_NAMECHANGE 0x800C
#define wxACC_EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D
#define wxACC_EVENT_OBJECT_VALUECHANGE 0x800E
#define wxACC_EVENT_OBJECT_PARENTCHANGE 0x800F
#define wxACC_EVENT_OBJECT_HELPCHANGE 0x8010
#define wxACC_EVENT_OBJECT_DEFACTIONCHANGE 0x8011
#define wxACC_EVENT_OBJECT_ACCELERATORCHANGE 0x8012
\end{verbatim}
}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAccessible::wxAccessible}\label{wxaccessiblewxaccessible}
\func{}{wxAccessible}{\param{wxWindow* }{win = NULL}}
Constructor, taking an optional window. The object can be associated with
a window later.
\membersection{wxAccessible::\destruct{wxAccessible}}\label{wxaccessibledtor}
\func{}{\destruct{wxAccessible}}{\void}
Destructor.
\membersection{wxAccessible::DoDefaultAction}\label{wxaccessibledodefaultaction}
\func{virtual wxAccStatus}{DoDefaultAction}{\param{int }{childId}}
Performs the default action for the object. {\it childId} is 0 (the action for this object)
or greater than 0 (the action for a child). Return wxACC\_NOT\_SUPPORTED if there
is no default action for this window (e.g. an edit control).
\membersection{wxAccessible::GetChild}\label{wxaccessiblegetchild}
\func{virtual wxAccStatus}{GetChild}{\param{int }{childId}, \param{wxAccessible** }{child}}
Gets the specified child (starting from 1). If {\it child} is NULL and the return value is wxACC\_OK,
this means that the child is a simple element and not an accessible object.
\membersection{wxAccessible::GetChildCount}\label{wxaccessiblegetchildcount}
\func{virtual wxAccStatus}{GetChildCount}{\param{int* }{childCount}}
Returns the number of children in {\it childCount}.
\membersection{wxAccessible::GetDefaultAction}\label{wxaccessiblegetdefaultaction}
\func{virtual wxAccStatus}{GetDefaultAction}{\param{int }{childId}, \param{wxString* }{actionName}}
Gets the default action for this object (0) or a child (greater than 0).
Return wxACC\_OK even if there is no action. {\it actionName} is the action, or the empty
string if there is no action. The retrieved string describes the action that is performed on an object,
not what the object does as a result. For example, a toolbar button that prints
a document has a default action of "Press" rather than "Prints the current document."
\membersection{wxAccessible::GetDescription}\label{wxaccessiblegetdescription}
\func{virtual wxAccStatus}{GetDescription}{\param{int }{childId}, \param{wxString* }{description}}
Returns the description for this object or a child.
\membersection{wxAccessible::GetFocus}\label{wxaccessiblegetfocus}
\func{virtual wxAccStatus}{GetFocus}{\param{int* }{childId}, \param{wxAccessible** }{child}}
Gets the window with the keyboard focus. If childId is 0 and child is NULL, no object in
this subhierarchy has the focus. If this object has the focus, child should be 'this'.
\membersection{wxAccessible::GetHelpText}\label{wxaccessiblegethelptext}
\func{virtual wxAccStatus}{GetHelpText}{\param{int }{childId}, \param{wxString* }{helpText}}
Returns help text for this object or a child, similar to tooltip text.
\membersection{wxAccessible::GetKeyboardShortcut}\label{wxaccessiblegetkeyboardshortcut}
\func{virtual wxAccStatus}{GetKeyboardShortcut}{\param{int }{childId}, \param{wxString* }{shortcut}}
Returns the keyboard shortcut for this object or child.
Return e.g. ALT+K.
\membersection{wxAccessible::GetLocation}\label{wxaccessiblegetlocation}
\func{virtual wxAccStatus}{GetLocation}{\param{wxRect\& }{rect}, \param{int }{elementId}}
Returns the rectangle for this object (id is 0) or a child element (id is greater than 0).
{\it rect} is in screen coordinates.
\membersection{wxAccessible::GetName}\label{wxaccessiblegetname}
\func{virtual wxAccStatus}{GetName}{\param{int }{childId}, \param{wxString* }{name}}
Gets the name of the specified object.
\membersection{wxAccessible::GetParent}\label{wxaccessiblegetparent}
\func{virtual wxAccStatus}{GetParent}{\param{wxAccessible** }{parent}}
Returns the parent of this object, or NULL.
\membersection{wxAccessible::GetRole}\label{wxaccessiblegetrole}
\func{virtual wxAccStatus}{GetRole}{\param{int }{childId}, \param{wxAccRole* }{role}}
Returns a role constant describing this object. See \helpref{wxAccessible}{wxaccessible} for a list
of these roles.
\membersection{wxAccessible::GetSelections}\label{wxaccessiblegetselections}
\func{virtual wxAccStatus}{GetSelections}{\param{wxVariant* }{selections}}
Gets a variant representing the selected children
of this object.
Acceptable values are:
\begin{itemize}
\item a null variant (IsNull() returns TRUE)
\item a list variant (GetType() == wxT("list"))
\item an integer representing the selected child element,
or 0 if this object is selected (GetType() == wxT("long"))
\item a "void*" pointer to a wxAccessible child object
\end{itemize}
\membersection{wxAccessible::GetState}\label{wxaccessiblegetstate}
\func{virtual wxAccStatus}{GetState}{\param{int }{childId}, \param{long* }{state}}
Returns a state constant. See \helpref{wxAccessible}{wxaccessible} for a list
of these states.
\membersection{wxAccessible::GetValue}\label{wxaccessiblegetvalue}
\func{virtual wxAccStatus}{GetValue}{\param{int }{childId}, \param{wxString* }{strValue}}
Returns a localized string representing the value for the object
or child.
\membersection{wxAccessible::GetWindow}\label{wxaccessiblegetwindow}
\func{wxWindow*}{GetWindow}{\void}
Returns the window associated with this object.
\membersection{wxAccessible::HitTest}\label{wxaccessiblehittest}
\func{virtual wxAccStatus}{HitTest}{\param{const wxPoint\& }{pt}, \param{int* }{childId}, \param{wxAccessible** }{childObject}}
Returns a status value and object id to indicate whether the given point was on this or
a child object. Can return either a child object, or an integer
representing the child element, starting from 1.
{\it pt} is in screen coordinates.
\membersection{wxAccessible::Navigate}\label{wxaccessiblenavigate}
\func{virtual wxAccStatus}{Navigate}{\param{wxNavDir }{navDir}, \param{int }{fromId}, \param{int* }{toId}, \param{wxAccessible** }{toObject}}
Navigates from {\it fromId} to {\it toId}/{\it toObject}.
\membersection{wxAccessible::NotifyEvent}\label{wxaccessiblenotifyevent}
\func{virtual static void}{NotifyEvent}{\param{int}{ eventType}, \param{wxWindow* }{window}, \param{wxAccObject }{objectType}, \param{int }{objectType}}
Allows the application to send an event when something changes in an accessible object.
\membersection{wxAccessible::Select}\label{wxaccessibleselect}
\func{virtual wxAccStatus}{Select}{\param{int }{childId}, \param{wxAccSelectionFlags }{selectFlags}}
Selects the object or child. See \helpref{wxAccessible}{wxaccessible} for a list
of the selection actions.
\membersection{wxAccessible::SetWindow}\label{wxaccessiblesetwindow}
\func{void}{SetWindow}{\param{wxWindow* }{window}}
Sets the window associated with this object.

View File

@@ -1,64 +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{Library}
\helpref{wxCore}{librarieslist}
\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.}
\twocolitem{{\bf EVT\_HIBERNATE(func)}}{Process a hibernate event, supplying the member function.
This event applies to wxApp only, and only on Windows SmartPhone and PocketPC. It is generated when the
system is low on memory; the application should free up as much memory as possible, and restore
full working state when it receives a wxEVT\_ACTIVATE or wxEVT\_ACTIVATE\_APP event.}
\end{twocollist}%
\wxheading{Remarks}
A top-level window (a dialog or frame) receives an activate event when it 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 inactivated resulting in all application frames being inactive.
Please note that usually you should call \helpref{event.Skip()}{wxeventskip} in
your handlers for these events as not doing so can result in strange effects.
\wxheading{See also}
\helpref{Event handling overview}{eventhandlingoverview},\rtfsp
\helpref{wxApp::IsActive}{wxappisactive}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxActivateEvent::wxActivateEvent}\label{wxactivateeventctor}
\func{}{wxActivateEvent}{\param{WXTYPE }{eventType = 0}, \param{bool}{ active = true}, \param{int }{id = 0}}
Constructor.
\membersection{wxActivateEvent::GetActive}\label{wxactivateeventgetactive}
\constfunc{bool}{GetActive}{\void}
Returns true if the application or window is being activated, false otherwise.

View File

@@ -1,239 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: activexcontainer.tex
%% Purpose: wxActiveXContainer docs
%% Author: Ryan Norton <wxprojects@comcast.net>
%% Modified by:
%% Created: 01/30/2005
%% RCS-ID: $Id$
%% Copyright: (c) Ryan Norton
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxActiveXContainer}}\label{wxactivexcontainer}
wxActiveXContainer is a host for an activex control on Windows (and
as such is a platform-specific class). Note that the HWND that the class
contains is the actual HWND of the activex control so using dynamic events
and connecting to wxEVT\_SIZE, for example, will recieve the actual size
message sent to the control.
It is somewhat similar to the ATL class CAxWindow in operation.
The size of the activex control's content is generally gauranteed to be that
of the client size of the parent of this wxActiveXContainer.
You can also process activex events through wxEVT\_ACTIVEX or the
corresponding message map macro EVT\_ACTIVEX.
\wxheading{See also}
\helpref{wxActiveXEvent}{wxactivexevent}
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/msw/ole/activex.h>
\wxheading{Example}
This is an example of how to use the Adobe Acrobat Reader ActiveX control to read PDF files
(requires Acrobat Reader 4 and up). Controls like this are typically found and dumped from
OLEVIEW.exe that is distributed with Microsoft Visual C++. This example also demonstrates
how to create a backend for \helpref{wxMediaCtrl}{wxmediactrl}.
\begin{verbatim}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// wxPDFMediaBackend
//
// http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/iac/IACOverview.pdf
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#include "wx/mediactrl.h" // wxMediaBackendCommonBase
#include "wx/msw/ole/activex.h" // wxActiveXContainer
#include "wx/msw/ole/automtn.h" // wxAutomationObject
const IID DIID__DPdf = {0xCA8A9781,0x280D,0x11CF,{0xA2,0x4D,0x44,0x45,0x53,0x54,0x00,0x00}};
const IID DIID__DPdfEvents = {0xCA8A9782,0x280D,0x11CF,{0xA2,0x4D,0x44,0x45,0x53,0x54,0x00,0x00}};
const CLSID CLSID_Pdf = {0xCA8A9780,0x280D,0x11CF,{0xA2,0x4D,0x44,0x45,0x53,0x54,0x00,0x00}};
class WXDLLIMPEXP_MEDIA wxPDFMediaBackend : public wxMediaBackendCommonBase
{
public:
wxPDFMediaBackend() : m_pAX(NULL) {}
virtual ~wxPDFMediaBackend()
{
if(m_pAX)
{
m_pAX->DissociateHandle();
delete m_pAX;
}
}
virtual bool CreateControl(wxControl* ctrl, wxWindow* parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name)
{
IDispatch* pDispatch;
if( ::CoCreateInstance(CLSID_Pdf, NULL,
CLSCTX_INPROC_SERVER,
DIID__DPdf, (void**)&pDispatch) != 0 )
return false;
m_PDF.SetDispatchPtr(pDispatch); // wxAutomationObject will release itself
if ( !ctrl->wxControl::Create(parent, id, pos, size,
(style & ~wxBORDER_MASK) | wxBORDER_NONE,
validator, name) )
return false;
m_ctrl = wxStaticCast(ctrl, wxMediaCtrl);
m_pAX = new wxActiveXContainer(ctrl,
DIID__DPdf,
pDispatch);
wxPDFMediaBackend::ShowPlayerControls(wxMEDIACTRLPLAYERCONTROLS_NONE);
return true;
}
virtual bool Play()
{
return true;
}
virtual bool Pause()
{
return true;
}
virtual bool Stop()
{
return true;
}
virtual bool Load(const wxString& fileName)
{
if(m_PDF.CallMethod(wxT("LoadFile"), fileName).GetBool())
{
m_PDF.CallMethod(wxT("setCurrentPage"), wxVariant((long)0));
NotifyMovieLoaded(); // initial refresh
wxSizeEvent event;
m_pAX->OnSize(event);
return true;
}
return false;
}
virtual bool Load(const wxURI& location)
{
return m_PDF.CallMethod(wxT("LoadFile"), location.BuildUnescapedURI()).GetBool();
}
virtual bool Load(const wxURI& WXUNUSED(location),
const wxURI& WXUNUSED(proxy))
{
return false;
}
virtual wxMediaState GetState()
{
return wxMEDIASTATE_STOPPED;
}
virtual bool SetPosition(wxLongLong where)
{
m_PDF.CallMethod(wxT("setCurrentPage"), wxVariant((long)where.GetValue()));
return true;
}
virtual wxLongLong GetPosition()
{
return 0;
}
virtual wxLongLong GetDuration()
{
return 0;
}
virtual void Move(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(w), int WXUNUSED(h))
{
}
wxSize GetVideoSize() const
{
return wxDefaultSize;
}
virtual double GetPlaybackRate()
{
return 0;
}
virtual bool SetPlaybackRate(double)
{
return false;
}
virtual double GetVolume()
{
return 0;
}
virtual bool SetVolume(double)
{
return false;
}
virtual bool ShowPlayerControls(wxMediaCtrlPlayerControls flags)
{
if(flags)
{
m_PDF.CallMethod(wxT("setShowToolbar"), true);
m_PDF.CallMethod(wxT("setShowScrollbars"), true);
}
else
{
m_PDF.CallMethod(wxT("setShowToolbar"), false);
m_PDF.CallMethod(wxT("setShowScrollbars"), false);
}
return true;
}
wxActiveXContainer* m_pAX;
wxAutomationObject m_PDF;
DECLARE_DYNAMIC_CLASS(wxPDFMediaBackend)
};
IMPLEMENT_DYNAMIC_CLASS(wxPDFMediaBackend, wxMediaBackend);
\end{verbatim}
Put this in one of your existant source files and then create a wxMediaCtrl with
\begin{verbatim}
//[this] is the parent window, "myfile.pdf" is the PDF file to open
wxMediaCtrl* mymediactrl = new wxMediaCtrl(this, wxT("myfile.pdf"), wxID_ANY,
wxDefaultPosition, wxSize(300,300),
0, wxT("wxPDFMediaBackend"));
\end{verbatim}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxActiveXContainer::wxActiveXContainer}\label{wxactivexcontainerwxactivexcontainer}
\func{}{wxActiveXContainer}{
\param{wxWindow* }{parent},
\param{REFIID }{iid},
\param{IUnknown* }{pUnk},
}
Creates this activex container.
\docparam{parent}{parent of this control. Must not be NULL.}
\docparam{iid}{COM IID of pUnk to query. Must be a valid interface to an activex control.}
\docparam{pUnk}{Interface of activex control}

View File

@@ -1,77 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: activexevt.tex
%% Purpose: wxActiveXEvent docs
%% Author: Ryan Norton <wxprojects@comcast.net>
%% Modified by:
%% Created: 01/30/2005
%% RCS-ID: $Id$
%% Copyright: (c) Ryan Norton
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxActiveXEvent}}\label{wxactivexevent}
An event class for handling activex events passed from
\helpref{wxActiveXContainer}{wxactivexcontainer}. ActiveX events are basically
a function call with the parameters passed through an array of wxVariants along
with a return value that is a wxVariant itself. What type the parameters or
return value are depends on the context (i.e. what the .idl specifies).
Note that unlike the third party wxActiveX function names are not supported.
\wxheading{Derived from}
\helpref{wxCommandEvent}{wxcommandevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/msw/ole/activex.h>
\wxheading{Event table macros}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_ACTIVEX(func)}}{
Sent when the activex control hosted by \helpref{wxActiveXContainer}{wxactivexcontainer}
recieves an activex event.}
\end{twocollist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxActiveXEvent::ParamCount}\label{wxactivexeventparamcount}
\constfunc{size\_t}{ParamCount}{\void}
Obtains the number of parameters passed through the activex event.
\membersection{wxActiveXEvent::ParamType}\label{wxactivexeventparamtype}
\constfunc{wxString}{ParamType}{\param{size\_t }{idx}}
Obtains the param type of the param number idx specifies as a string.
\membersection{wxActiveXEvent::ParamName}\label{wxactivexeventparamname}
\constfunc{wxString}{ParamName}{\param{size\_t }{idx}}
Obtains the param name of the param number idx specifies as a string.
\membersection{wxActiveXEvent::operator[]}\label{wxactivexeventoparray}
\func{wxVariant&}{operator[]}{\param{size\_t }{idx}}
Obtains the actual parameter value specified by idx.
\membersection{wxActiveXEvent::GetDispatchId}\label{wxactivexeventgetdispatchid}
\constfunc{DISPID}{GetDispatchId}{\param{int }{idx}}
Returns the dispatch id of this activex event. This is the numeric value from
the .idl file specified by the id().

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -1,190 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: animatctrl.tex
%% Purpose: wxAnimationCtrl documentation
%% Author: Francesco Montorsi
%% Created: 24-9-2006
%% RCS-ID: $Id$
%% Copyright: (c) 2006 Francesco Montorsi
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxAnimationCtrl}}\label{wxanimationctrl}
This is a static control which displays an animation.
wxAnimationCtrl API is simple as possible and won't give you full control on the
animation; if you need it then use \helpref{wxMediaCtrl}{wxmediactrl}.
This control is useful to display a (small) animation while doing a long task
(e.g. a "throbber").
It is only available if \texttt{wxUSE\_ANIMATIONCTRL} is set to $1$ (the default).
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/animate.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\wxheading{Window styles}
\twocolwidtha{5cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxAC\_DEFAULT\_STYLE}}{The default style: wxBORDER\_NONE.}
\twocolitem{\windowstyle{wxAC\_NO\_AUTORESIZE}}{By default, the control will adjust
its size to exactly fit to the size of the animation when \helpref{SetAnimation}{wxanimationctrlsetanimation}
is called. If this style flag is given, the control will not change its size}
\end{twocollist}
%\wxheading{Event handling}
%
%\twocolwidtha{7cm}%
%\begin{twocollist}\itemsep=0pt
%\twocolitem{{\bf EVT\_ANIMATION\_END(id, func)}}{}
%\end{twocollist}
\wxheading{See also}
\helpref{wxAnimation}{wxanimation}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAnimationCtrl::wxAnimationCtrl}\label{wxanimationctrlctor}
\func{}{wxAnimationCtrl}{\param{wxWindow *}{parent},\rtfsp
\param{wxWindowID}{ id},\rtfsp
\param{const wxAnimation\& }{anim},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxAC\_DEFAULT\_STYLE},\rtfsp
\param{const wxString\& }{name = ``animationctrl"}}
Initializes the object and calls \helpref{Create}{wxanimationctrlcreate} with
all the parameters.
\membersection{wxAnimationCtrl::Create}\label{wxanimationctrlcreate}
\func{bool}{Create}{\param{wxWindow *}{parent},\rtfsp
\param{wxWindowID}{ id},\rtfsp
\param{const wxAnimation\& }{anim},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxAC\_DEFAULT\_STYLE},\rtfsp
\param{const wxString\& }{name = ``animationctrl"}}
After control creation you must explicitely call \helpref{Play}{wxanimationctrlplay}
to start to play the animation. Until that function won't be called, the first frame
of the animation is displayed.
\wxheading{Parameters}
\docparam{parent}{Parent window, must be non-\NULL.}
\docparam{id}{The identifier for the control.}
\docparam{anim}{The initial animation shown in the control.}
\docparam{pos}{Initial position.}
\docparam{size}{Initial size.}
\docparam{style}{The window style, see {\tt wxAC\_*} flags.}
\docparam{name}{Control name.}
\wxheading{Return value}
\true if the control was successfully created or \false if creation failed.
\membersection{wxAnimationCtrl::GetAnimation}\label{wxanimationctrlgetanimation}
\constfunc{wxAnimation}{GetAnimation}{\void}
Returns the animation associated with this control.
\membersection{wxAnimationCtrl::GetInactiveBitmap}\label{wxanimationctrlgetinactivebitmap}
\constfunc{wxBitmap}{GetInactiveBitmap}{\void}
Returns the inactive bitmap shown in this control when the;
see \helpref{SetInactiveBitmap}{wxanimationctrlsetinactivebitmap} for more info.
\membersection{wxAnimationCtrl::IsPlaying}\label{wxanimationctrlisplaying}
\constfunc{bool}{IsPlaying}{\void}
Returns \true if the animation is being played.
\membersection{wxAnimationCtrl::LoadFile}\label{wxanimationctrlloadfile}
\func{bool}{LoadFile}{\param{const wxString \&}{ file}, \param{wxAnimationType }{ animType = wxANIMATION\_TYPE\_ANY}}
Loads the animation from the given file and calls \helpref{SetAnimation}{wxanimationctrlsetanimation}.
See \helpref{wxAnimation::LoadFile}{wxanimationloadfile} for more info.
\membersection{wxAnimationCtrl::Play}\label{wxanimationctrlplay}
\func{bool}{Play}{\void}
Starts playing the animation.
The animation is always played in loop mode (unless the last frame of the animation
has an infinite delay time) and always start from the first frame
(even if you \helpref{stopped}{wxanimationctrlstop} it while some other frame was
displayed).
\membersection{wxAnimationCtrl::SetAnimation}\label{wxanimationctrlsetanimation}
\func{void}{SetAnimation}{\param{const wxAnimation \&}{ anim}}
Sets the animation to play in this control.
If the previous animation is being played, it's \helpref{Stopped}{wxanimationctrlstop}.
Until \helpref{Play}{wxanimationctrlplay} isn't called, a static image, the first
frame of the given animation or the background colour will be shown
(see \helpref{SetInactiveBitmap}{wxanimationctrlsetinactivebitmap} for more info).
\membersection{wxAnimationCtrl::SetInactiveBitmap}\label{wxanimationctrlsetinactivebitmap}
\func{void}{SetInactiveBitmap}{\param{const wxBitmap\& }{bmp}}
Sets the bitmap to show on the control when it's not playing an animation.
If you set as inactive bitmap {\tt wxNullBitmap} (which is the default), then the
first frame of the animation is instead shown when the control is inactive; in this case,
if there's no valid animation associated with the control (see \helpref{SetAnimation}{wxanimationctrlsetanimation}),
then the background colour of the window is shown.
If the control is not playing the animation, the given bitmap will be immediately
shown, otherwise it will be shown as soon as \helpref{Stop}{wxanimationctrlstop}
is called.
Note that the inactive bitmap, if smaller than the control's size, will be centered in
the control; if bigger, it will be stretched to fit it.
\membersection{wxAnimationCtrl::Stop}\label{wxanimationctrlstop}
\func{void}{Stop}{\void}
Stops playing the animation.
The control will show the first frame of the animation, a custom static image or
the window's background colour as specified by the
last \helpref{SetInactiveBitmap}{wxanimationctrlsetinactivebitmap} call.

View File

@@ -1,163 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: animation.tex
%% Purpose: wxAnimation documentation
%% Author: Francesco Montorsi
%% Created: 24-9-2006
%% RCS-ID: $Id$
%% Copyright: (c) 2006 Francesco Montorsi
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxAnimation}}\label{wxanimation}
This class encapsulates the concept of a platform-dependent animation.
An animation is a sequence of frames of the same size.
Sound is not supported by wxAnimation.
\wxheading{Derived from}
\helpref{wxGDIObject}{wxgdiobject}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/animate.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\wxheading{Predefined objects}
Objects:
{\bf wxNullAnimation}
\wxheading{See also}
\helpref{wxAnimationCtrl}{wxanimationctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAnimation::wxAnimation}\label{wxanimationctor}
\func{}{wxAnimation}{\void}
Default constructor.
\func{}{wxAnimation}{\param{const wxAnimation\& }{anim}}
Copy constructor, uses \helpref{reference counting}{trefcount}.
\func{}{wxAnimation}{\param{const wxString\& }{name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
Loads an animation from a file.
\wxheading{Parameters}
\docparam{name}{The name of the file to load.}
\docparam{type}{See \helpref{LoadFile}{wxanimationloadfile} for more info.}
\membersection{wxAnimation::\destruct{wxAnimation}}\label{wxanimationdtor}
\func{}{\destruct{wxAnimation}}{\void}
Destructor.
See \helpref{reference-counted object destruction}{refcountdestruct} for more info.
\membersection{wxAnimation::GetDelay}\label{wxanimationgetdelay}
\constfunc{int}{GetDelay}{\param{unsigned int }{i}}
Returns the delay for the i-th frame in milliseconds.
If {\tt -1} is returned the frame is to be displayed forever.
\membersection{wxAnimation::GetFrameCount}\label{wxanimationgetframecount}
\constfunc{unsigned int}{GetFrameCount}{\void}
Returns the number of frames for this animation.
\membersection{wxAnimation::GetFrame}\label{wxanimationgetframe}
\constfunc{wxImage}{GetFrame}{\param{unsigned int }{i}}
Returns the i-th frame as a \helpref{wxImage}{wximage}.
\membersection{wxAnimation::GetSize}\label{wxanimationgetsize}
\constfunc{wxSize}{GetSize}{\void}
Returns the size of the animation.
\membersection{wxAnimation::IsOk}\label{wxanimationisok}
\constfunc{bool}{IsOk}{\void}
Returns \true if animation data is present.
\membersection{wxAnimation::Load}\label{wxanimationload}
\func{bool}{Load}{\param{wxInputStream\&}{ stream}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
Loads an animation from the given stream.
\wxheading{Parameters}
\docparam{stream}{The stream to use to load the animation.}
\docparam{type}{One of the following values:
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{\indexit{wxANIMATION\_TYPE\_GIF}}{Load an animated GIF file.}
\twocolitem{\indexit{wxANIMATION\_TYPE\_ANI}}{Load an ANI file.}
\twocolitem{\indexit{wxANIMATION\_TYPE\_ANY}}{Try to autodetect the filetype.}
\end{twocollist}
}
\wxheading{Return value}
\true if the operation succeeded, \false otherwise.
\membersection{wxAnimation::LoadFile}\label{wxanimationloadfile}
\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{wxAnimationType}{ type = wxANIMATION\_TYPE\_ANY}}
Loads an animation from a file.
\wxheading{Parameters}
\docparam{name}{A filename.}
\docparam{type}{One of the following values:
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{\indexit{wxANIMATION\_TYPE\_GIF}}{Load an animated GIF file.}
\twocolitem{\indexit{wxANIMATION\_TYPE\_ANI}}{Load an ANI file.}
\twocolitem{\indexit{wxANIMATION\_TYPE\_ANY}}{Try to autodetect the filetype.}
\end{twocollist}
}
\wxheading{Return value}
\true if the operation succeeded, \false otherwise.
\membersection{wxAnimation::operator $=$}\label{wxanimationassignment}
\func{wxAnimation\&}{operator $=$}{\param{const wxAnimation\& }{brush}}
Assignment operator, using \helpref{reference counting}{trefcount}.

View File

@@ -1,850 +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 wxWidgets how to create an instance of your application class.
Use DECLARE\_APP(appClass) in a header file if you want the wxGetApp function (which returns
a reference to your application object) to be visible to other files.
\wxheading{Derived from}
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/app.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{wxApp overview}{wxappoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxApp::wxApp}\label{wxappctor}
\func{}{wxApp}{\void}
Constructor. Called implicitly with a definition of a wxApp object.
\membersection{wxApp::\destruct{wxApp}}\label{wxappdtor}
\func{virtual}{\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{wxChar **}{argv}
Command line arguments (after environment-specific processing).
Under Windows and Linux/Unix, you should parse the command line
arguments and check for files to be opened when starting your
application. Under OS X, you need to override \helpref{MacOpenFile}{wxappmacopenfile}
since command line arguments are used differently there.
You may use the \helpref{wxCmdLineParser}{wxcmdlineparser} to
parse command line arguments.
\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::CreateTraits}\label{wxappcreatetraits}
\func{virtual wxAppTraits *}{CreateTraits}{\void}
Creates the \helpref{wxAppTraits}{wxapptraits} object when \helpref{GetTraits}{wxappgettraits}
needs it for the first time.
\wxheading{See also}
\helpref{wxAppTraits}{wxapptraits}
\membersection{wxApp::Dispatch}\label{wxappdispatch}
\func{virtual 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::ExitMainLoop}\label{wxappexitmainloop}
\func{virtual 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::FilterEvent}\label{wxappfilterevent}
\func{int}{FilterEvent}{\param{wxEvent\& }{event}}
This function is called before processing any event and allows the application
to preempt the processing of some events. If this method returns $-1$ the event
is processed normally, otherwise either {\tt true} or {\tt false} should be
returned and the event processing stops immediately considering that the event
had been already processed (for the former return value) or that it is not
going to be processed at all (for the latter one).
\membersection{wxApp::GetAppDisplayName}\label{wxappgetappdisplayname}
\constfunc{wxString}{GetAppDisplayName}{\void}
Returns the user-readable application name. The difference between this string
and the one returned by \helpref{GetAppName}{wxappgetappname} is that this one
is meant to be shown to the user and so should be used for the window titles,
page headers and so on while the other one should be only used internally, e.g.
for the file names or configuration file keys.
By default, returns the same string as \helpref{GetAppName}{wxappgetappname}.
\newsince{2.9.0}
\membersection{wxApp::GetAppName}\label{wxappgetappname}
\constfunc{wxString}{GetAppName}{\void}
Returns the application name.
\wxheading{Remarks}
wxWidgets sets this to a reasonable default before
calling \helpref{wxApp::OnInit}{wxapponinit}, but the application can reset it at will.
\wxheading{See also}
\helpref{GetAppDisplayName}{wxappgetappdisplayname}
\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}{GetExitOnFrameDelete}{\void}
Returns true if the application will exit when the top-level window is deleted, false
otherwise.
\wxheading{See also}
\helpref{wxApp::SetExitOnFrameDelete}{wxappsetexitonframedelete},\\
\helpref{wxApp shutdown overview}{wxappshutdownoverview}
\membersection{wxApp::GetInstance}\label{wxappgetinstance}
\func{static wxAppConsole *}{GetInstance}{\void}
Returns the one and only global application object.
Usually \texttt{wxTheApp} is usead instead.
\wxheading{See also}
\helpref{wxApp::SetInstance}{wxappsetinstance}
\membersection{wxApp::GetTopWindow}\label{wxappgettopwindow}
\constfunc{virtual wxWindow *}{GetTopWindow}{\void}
Returns a pointer to the top window.
\wxheading{Remarks}
If the top window hasn't been set using \helpref{wxApp::SetTopWindow}{wxappsettopwindow}, this
function will find the first top-level window (frame or dialog) and return that.
\wxheading{See also}
\helpref{SetTopWindow}{wxappsettopwindow}
\membersection{wxApp::GetTraits}\label{wxappgettraits}
\func{wxAppTraits *}{GetTraits}{\void}
Returns a pointer to the \helpref{wxAppTraits}{wxapptraits} object for the application.
If you want to customize the \helpref{wxAppTraits}{wxapptraits} object, you must override the
\helpref{CreateTraits}{wxappcreatetraits} function.
\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::GetVendorDisplayName}\label{wxappgetvendordisplayname}
\constfunc{wxString}{GetVendorDisplayName}{\void}
Returns the user-readable vendor name. The difference between this string
and the one returned by \helpref{GetVendorName}{wxappgetvendorname} is that this one
is meant to be shown to the user and so should be used for the window titles,
page headers and so on while the other one should be only used internally, e.g.
for the file names or configuration file keys.
By default, returns the same string as \helpref{GetVendorName}{wxappgetvendorname}.
\newsince{2.9.0}
\membersection{wxApp::GetVendorName}\label{wxappgetvendorname}
\constfunc{wxString}{GetVendorName}{\void}
Returns the application's vendor name.
\membersection{wxApp::IsActive}\label{wxappisactive}
\constfunc{bool}{IsActive}{\void}
Returns \true if the application is active, i.e. if one of its windows is
currently in the foreground. If this function returns \false and you need to
attract users attention to the application, you may use
\helpref{wxTopLevelWindow::RequestUserAttention}{wxtoplevelwindowrequestuserattention}
to do it.
\membersection{wxApp::IsMainLoopRunning}\label{wxappismainlooprunning}
\func{static bool}{IsMainLoopRunning}{\void}
Returns \true if the main event loop is currently running, i.e. if the
application is inside \helpref{OnRun}{wxapponrun}.
This can be useful to test whether events can be dispatched. For example,
if this function returns \false, non-blocking sockets cannot be used because
the events from them would never be processed.
\membersection{wxApp::MacNewFile}\label{wxappmacnewfile}
\func{void}{MacNewFile}{\void}
Mac specific. Called in response of an "open-application" Apple event.
Override this to create a new document in your app.
\membersection{wxApp::MacOpenFile}\label{wxappmacopenfile}
\func{void}{MacOpenFile}{\param{const wxString\& }{fileName}}
Mac specific. Called in response of an "open-document" Apple event. You need to
override this method in order to open a document file after the
user double clicked on it or if the document file was dropped
on either the running application or the application icon in
Finder.
\membersection{wxApp::MacOpenURL}\label{wxappmacopenurl}
\func{void}{MacOpenURL}{\param{const wxString\& }{url}}
Mac specific. Called in response of a "get-url" Apple event.
\membersection{wxApp::MacPrintFile}\label{wxappmacprintfile}
\func{void}{MacPrintFile}{\param{const wxString\& }{fileName}}
Mac specific. Called in response of a "print-document" Apple event.
\membersection{wxApp::MacReopenApp}\label{wxappmacreopenapp}
\func{void}{MacReopenApp}{\void}
Mac specific. Called in response of a "reopen-application" Apple event.
\membersection{wxApp::MainLoop}\label{wxappmainloop}
\func{virtual int}{MainLoop}{\void}
Called by wxWidgets on creation of the application. Override this if you wish
to provide your own (environment-dependent) main loop.
\wxheading{Return value}
Returns 0 under X, and the wParam of the WM\_QUIT message under Windows.
%% VZ: OnXXX() functions should *not* be documented
%%
%%\membersection{wxApp::OnActivate}\label{wxapponactivate}
%%
%%\func{void}{OnActivate}{\param{wxActivateEvent\& }{event}}
%%
%%Provide this member function to know whether the application is being
%%activated or deactivated (Windows only).
%%
%%\wxheading{See also}
%%
%%\helpref{wxWindow::OnActivate}{wxwindowonactivate}, \helpref{wxActivateEvent}{wxactivateevent}
%%
%%\membersection{wxApp::OnCharHook}\label{wxapponcharhook}
%%
%%\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}}
%%
%%This event handler function is called (under Windows only) to allow the window to intercept keyboard events
%%before they are processed by child windows.
%%
%%\wxheading{Parameters}
%%
%%\docparam{event}{The keypress event.}
%%
%%\wxheading{Remarks}
%%
%%Use the wxEVT\_CHAR\_HOOK macro in your event table.
%%
%%If you use this member, you can selectively consume keypress events by calling\rtfsp
%%\helpref{wxEvent::Skip}{wxeventskip} for characters the application is not interested in.
%%
%%\wxheading{See also}
%%
%%\helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnChar}{wxwindowonchar},\rtfsp
%%\helpref{wxWindow::OnCharHook}{wxwindowoncharhook}, \helpref{wxDialog::OnCharHook}{wxdialogoncharhook}
\membersection{wxApp::OnAssertFailure}\label{wxapponassertfailure}
\func{void}{OnAssertFailure}{\param{const wxChar }{*file}, \param{int }{line}, \param{const wxChar }{*func}, \param{const wxChar }{*cond}, \param{const wxChar }{*msg}}
This function is called when an assert failure occurs, i.e. the condition
specified in \helpref{wxASSERT}{wxassert} macro evaluated to {\tt false}.
It is only called in debug mode (when {\tt \_\_WXDEBUG\_\_} is defined) as
asserts are not left in the release code at all.
The base class version shows the default assert failure dialog box proposing to
the user to stop the program, continue or ignore all subsequent asserts.
\wxheading{Parameters}
\docparam{file}{the name of the source file where the assert occurred}
\docparam{line}{the line number in this file where the assert occurred}
\docparam{func}{the name of the function where the assert occurred, may be
empty if the compiler doesn't support C99 \texttt{\_\_FUNCTION\_\_}}
\docparam{cond}{the condition of the failed assert in text form}
\docparam{msg}{the message specified as argument to
\helpref{wxASSERT\_MSG}{wxassertmsg} or \helpref{wxFAIL\_MSG}{wxfailmsg}, will
be {\tt NULL} if just \helpref{wxASSERT}{wxassert} or \helpref{wxFAIL}{wxfail}
was used}
\membersection{wxApp::OnCmdLineError}\label{wxapponcmdlineerror}
\func{bool}{OnCmdLineError}{\param{wxCmdLineParser\& }{parser}}
Called when command line parsing fails (i.e. an incorrect command line option
was specified by the user). The default behaviour is to show the program usage
text and abort the program.
Return {\tt true} to continue normal execution or {\tt false} to return
{\tt false} from \helpref{OnInit}{wxapponinit} thus terminating the program.
\wxheading{See also}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
\membersection{wxApp::OnCmdLineHelp}\label{wxapponcmdlinehelp}
\func{bool}{OnCmdLineHelp}{\param{wxCmdLineParser\& }{parser}}
Called when the help option ({\tt --help}) was specified on the command line.
The default behaviour is to show the program usage text and abort the program.
Return {\tt true} to continue normal execution or {\tt false} to return
{\tt false} from \helpref{OnInit}{wxapponinit} thus terminating the program.
\wxheading{See also}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
\membersection{wxApp::OnCmdLineParsed}\label{wxapponcmdlineparsed}
\func{bool}{OnCmdLineParsed}{\param{wxCmdLineParser\& }{parser}}
Called after the command line had been successfully parsed. You may override
this method to test for the values of the various parameters which could be
set from the command line.
Don't forget to call the base class version unless you want to suppress
processing of the standard command line options.
Return {\tt true} to continue normal execution or {\tt false} to return
{\tt false} from \helpref{OnInit}{wxapponinit} thus terminating the program.
\wxheading{See also}
\helpref{OnInitCmdLine}{wxapponinitcmdline}
\membersection{wxApp::OnExceptionInMainLoop}\label{wxapponexceptioninmainloop}
\func{virtual bool}{OnExceptionInMainLoop}{\void}
This function is called if an unhandled exception occurs inside the main
application event loop. It can return \true to ignore the exception and to
continue running the loop or \false to exit the loop and terminate the
program. In the latter case it can also use C++ \texttt{throw} keyword to
rethrow the current exception.
The default behaviour of this function is the latter in all ports except under
Windows where a dialog is shown to the user which allows him to choose between
the different options. You may override this function in your class to do
something more appropriate.
Finally note that if the exception is rethrown from here, it can be caught in
\helpref{OnUnhandledException}{wxapponunhandledexception}.
\membersection{wxApp::OnExit}\label{wxapponexit}
\func{virtual int}{OnExit}{\void}
Override this member function for any processing which needs to be
done as the application is about to exit. OnExit is called after
destroying all application windows and controls, but before
wxWidgets cleanup. Note that it is not called at all if
\helpref{OnInit}{wxapponinit} failed.
The return value of this function is currently ignored, return the same value
as returned by the base class method if you override it.
\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{wxHandleFatalExceptions}{wxhandlefatalexceptions}
%% VZ: the wxApp event handler are private and should not be documented here!
%%
%%\membersection{wxApp::OnIdle}\label{wxapponidle}
%%
%%\func{void}{OnIdle}{\param{wxIdleEvent\& }{event}}
%%
%%Override this member function for any processing which needs to be done
%%when the application is idle. You should call wxApp::OnIdle from your own function,
%%since this forwards OnIdle events to windows and also performs garbage collection for
%%windows whose destruction has been delayed.
%%
%%wxWidgets' strategy for OnIdle processing is as follows. After pending user interface events for an
%%application have all been processed, wxWidgets sends an OnIdle event to the application object. wxApp::OnIdle itself
%%sends an OnIdle event to each application window, allowing windows to do idle processing such as updating
%%their appearance. If either wxApp::OnIdle or a window OnIdle function requested more time, by
%%calling \helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}, wxWidgets 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
\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}. You may use
\helpref{OnExit}{wxapponexit} to clean up anything initialized here, provided
that the function returns \true.
Notice that if you want to to use the command line processing provided by
wxWidgets you have to call the base class version in the derived class
OnInit().
Return \true to continue processing, \false to exit the application
immediately.
\membersection{wxApp::OnInitCmdLine}\label{wxapponinitcmdline}
\func{void}{OnInitCmdLine}{\param{wxCmdLineParser\& }{parser}}
Called from \helpref{OnInit}{wxapponinit} and may be used to initialize the
parser with the command line options for this application. The base class
versions adds support for a few standard options only.
\membersection{wxApp::OnRun}\label{wxapponrun}
\func{virtual int}{OnRun}{\void}
This virtual function is where the execution of a program written in wxWidgets
starts. The default implementation just enters the main loop and starts
handling the events until it terminates, either because
\helpref{ExitMainLoop}{wxappexitmainloop} has been explicitly called or because
the last frame has been deleted and
\helpref{GetExitOnFrameDelete}{wxappgetexitonframedelete} flag is \true (this
is the default).
The return value of this function becomes the exit code of the program, so it
should return $0$ in case of successful termination.
\membersection{wxApp::OnUnhandledException}\label{wxapponunhandledexception}
\func{virtual void}{OnUnhandledException}{\void}
This function is called when an unhandled C++ exception occurs inside
\helpref{OnRun()}{wxapponrun} (the exceptions which occur during the program
startup and shutdown might not be caught at all). Notice that by now the main
event loop has been terminated and the program will exit, if you want to
prevent this from happening (i.e. continue running after catching an exception)
you need to override \helpref{OnExceptionInMainLoop}{wxapponexceptioninmainloop}.
The default implementation shows information about the exception in debug build
but does nothing in the release build.
\membersection{wxApp::ProcessMessage}\label{wxappprocessmessage}
\func{bool}{ProcessMessage}{\param{WXMSG *}{msg}}
Windows-only function for processing a message. This function
is called from the main message loop, checking for windows that
may wish to process it. The function returns true if the message
was processed, false otherwise. If you use wxWidgets with another class
library with its own message loop, you should make sure that this
function is called to allow wxWidgets to receive messages. For example,
to allow co-existence with the Microsoft Foundation Classes, override
the PreTranslateMessage function:
\begin{verbatim}
// Provide wxWidgets message loop compatibility
BOOL CTheApp::PreTranslateMessage(MSG *msg)
{
if (wxTheApp && wxTheApp->ProcessMessage((WXMSW *)msg))
return true;
else
return CWinApp::PreTranslateMessage(msg);
}
\end{verbatim}
\membersection{wxApp::Pending}\label{wxapppending}
\func{virtual 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}{\param{wxWindow*}{ win}, \param{wxIdleEvent\& }{event}}
Sends idle events to a window and its children.
Please note that this function is internal to wxWidgets and shouldn't be used
by user code.
\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{wxIdleEvent}{wxidleevent}
\membersection{wxApp::SetAppDisplayName}\label{wxappsetappdisplayname}
\func{void}{SetAppDisplayName}{\param{const wxString\& }{name}}
Set the application name to be used in the user-visible places such as window
titles. See \helpref{GetAppDisplayName}{wxappgetappdisplayname} for more about
the differences between the display name and name.
\membersection{wxApp::SetAppName}\label{wxappsetappname}
\func{void}{SetAppName}{\param{const wxString\& }{name}}
Sets the name of the application. This name should be used for file names,
configuration file entries and other internal strings. For the user-visible
strings, such as the window titles, the application display name set by
\helpref{SetAppDisplayName}{wxappsetappdisplayname} is used instead.
By default the application name is set to the name of its executable file.
\wxheading{See also}
\helpref{wxApp::GetAppName}{wxappgetappname}
\membersection{wxApp::SetClassName}\label{wxappsetclassname}
\func{void}{SetClassName}{\param{const wxString\& }{name}}
Sets the class name of the application. This may be used in a platform specific
manner to refer to the application.
\wxheading{See also}
\helpref{wxApp::GetClassName}{wxappgetclassname}
\membersection{wxApp::SetExitOnFrameDelete}\label{wxappsetexitonframedelete}
\func{void}{SetExitOnFrameDelete}{\param{bool}{ flag}}
Allows the programmer to specify whether the application will exit when the
top-level frame is deleted.
\wxheading{Parameters}
\docparam{flag}{If true (the default), the application will exit when the top-level frame is
deleted. If false, the application will continue to run.}
\wxheading{See also}
\helpref{wxApp::GetExitOnFrameDelete}{wxappgetexitonframedelete},\\
\helpref{wxApp shutdown overview}{wxappshutdownoverview}
\membersection{wxApp::SetInstance}\label{wxappsetinstance}
\func{static void}{SetInstance}{\param{wxAppConsole* }{app}}
Allows external code to modify global \texttt{wxTheApp}, but you should really
know what you're doing if you call it.
\wxheading{Parameters}
\docparam{app}{Replacement for the global application object.}
\wxheading{See also}
\helpref{wxApp::GetInstance}{wxappgetinstance}
\membersection{wxApp::SetNativeTheme}\label{wxappsetnativetheme}
\func{bool}{SetNativeTheme}{\param{const}{wxString\&}{theme}}
Allows runtime switching of the UI environment theme. Currently implemented for wxGTK2-only.
Return \true if theme was successfully changed.
\wxheading{Parameters}
\docparam{theme}{The name of the new theme or an absolute path to a gtkrc-theme-file}
\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 wxWidgets 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,
wxWidgets 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::SetVendorDisplayName}\label{wxappsetvendordisplayname}
\func{void}{SetVendorDisplayName}{\param{const wxString\& }{name}}
Set the vendor name to be used in the user-visible places. See
\helpref{GetVendorDisplayName}{wxappgetvendordisplayname} for more about
the differences between the display name and name.
\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
wxWidgets.
\wxheading{See also}
\helpref{wxApp::GetVendorName}{wxappgetvendorname}
\membersection{wxApp::SetUseBestVisual}\label{wxappsetusebestvisual}
\func{void}{SetUseBestVisual}{\param{bool}{ flag}, \param{bool}{ forceTrueColour = false}}
Allows the programmer to specify whether the application will use the best visual
on systems that support several visual on the same display. This is typically the
case under Solaris and IRIX, where the default visual is only 8-bit whereas certain
applications are supposed to run in TrueColour mode.
If \arg{forceTrueColour} is true then the application will try to force
using a TrueColour visual and abort the app if none is found.
Note that this function has to be called in the constructor of the {\tt wxApp}
instance and won't have any effect when called later on.
This function currently only has effect under GTK.
\wxheading{Parameters}
\docparam{flag}{If true, the app will use the best visual.}
\membersection{wxApp::HandleEvent}\label{wxapphandleevent}
\constfunc{virtual void}{HandleEvent}{\param{wxEvtHandler}{ *handler}, \param{wxEventFunction}{ func}, \param{wxEvent\& }{event}}
This function simply invokes the given method \arg{func} of the specified
event handler \arg{handler} with the \arg{event} as parameter. It exists solely
to allow to catch the C++ exceptions which could be thrown by all event
handlers in the application in one place: if you want to do this, override this
function in your wxApp-derived class and add try/catch clause(s) to it.
\membersection{wxApp::Yield}\label{wxappyield}
\func{bool}{Yield}{\param{bool}{ onlyIfNeeded = false}}
Yields control to pending messages in the windowing system. This can be useful, for example, when a
time-consuming process writes to a text window. Without an occasional
yield, the text window will not be updated properly, and on systems with
cooperative multitasking, such as Windows 3.1 other processes will not respond.
Caution should be exercised, however, since yielding may allow the
user to perform actions which are not compatible with the current task.
Disabling menu items or whole menus during processing can avoid unwanted
reentrance of code: see \helpref{::wxSafeYield}{wxsafeyield} for a better
function.
Note that Yield() will not flush the message logs. This is intentional as
calling Yield() is usually done to quickly update the screen and popping up a
message box dialog may be undesirable. If you do wish to flush the log
messages immediately (otherwise it will be done during the next idle loop
iteration), call \helpref{wxLog::FlushActive}{wxlogflushactive}.
Calling Yield() recursively is normally an error and an assert failure is
raised in debug build if such situation is detected. However if the
{\it onlyIfNeeded} parameter is {\tt true}, the method will just silently
return {\tt false} instead.

View File

@@ -1,144 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: apptraits.tex
%% Purpose: wxAppTraits
%% Author: Francesco Montorsi
%% Modified by:
%% Created: 5-7-2006
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets Team
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxAppTraits}}\label{wxapptraits}
The {\bf wxAppTraits} class defines various configurable aspects of a \helpref{wxApp}{wxapp}.
You can access it using \helpref{wxApp::GetTraits}{wxappgettraits} function and you can
create your own \helpref{wxAppTraits}{wxapptraits} overriding the
\helpref{wxApp::CreateTraits}{wxappcreatetraits} function.
By default, wxWidgets creates a {\tt wxConsoleAppTraits} object for console applications
(i.e. those applications linked against wxBase library only - see the
\helpref{Libraries list}{librarieslist} page) and a {\tt wxGUIAppTraits} object for GUI
applications.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/apptrait.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{wxApp overview}{wxappoverview}, \helpref{wxApp}{wxapp}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAppTraits::CreateConfig}\label{wxapptraitscreateconfig}
\func{virtual wxConfigBase *}{CreateConfig}{\void}
Called by wxWidgets to create the default configuration object for the
application. The default version creates a registry-based
\helpref{wxRegConfig}{wxconfigbase} class under MSW and
\helpref{wxFileConfig}{wxfileconfig} under all other platforms. The
\helpref{wxApp}{wxapp} \helpref{GetAppName()}{wxappgetappname} and
\helpref{GetVendorName()}{wxappgetvendorname} methods are used to determine the
registry key or file name.
\membersection{wxAppTraits::CreateFontMapper}\label{wxapptraitscreatefontmapper}
\func{virtual wxFontMapper *}{CreateFontMapper}{\void}
Creates the global font mapper object used for encodings/charset mapping.
\membersection{wxAppTraits::CreateLogTarget}\label{wxapptraitscreatelogtarget}
\func{virtual wxLog *}{CreateLogTarget}{\void}
Creates the default log target for the application.
\membersection{wxAppTraits::CreateMessageOutput}\label{wxapptraitscreatemessageoutput}
\func{virtual wxMessageOutput *}{CreateMessageOutput}{\void}
Creates the global object used for printing out messages.
\membersection{wxAppTraits::CreateRenderer}\label{wxapptraitscreaterenderer}
\func{virtual wxRendererNative *}{CreateRenderer}{\void}
Returns the renderer to use for drawing the generic controls (return value may be \NULL
in which case the default renderer for the current platform is used);
this is used in GUI mode only and always returns \NULL in console.
NOTE: returned pointer will be deleted by the caller.
\membersection{wxAppTraits::GetDesktopEnvironment}\label{wxapptraitsgetdesktopenvironment}
\constfunc{virtual wxString}{GetDesktopEnvironment}{\void}
This method returns the name of the desktop environment currently
running in a Unix desktop. Currently only "KDE" or "GNOME" are
supported and the code uses the X11 session protocol vendor name
to figure out, which desktop environment is running. The method
returns an empty string otherwise and on all other platforms.
\membersection{wxAppTraits::GetStandardPaths}\label{wxapptraitsgetstandardpaths}
\func{virtual wxStandardPaths \&}{GetStandardPaths}{\void}
Returns the wxStandardPaths object for the application.
It's normally the same for wxBase and wxGUI except in the case of wxMac and wxCocoa.
\membersection{wxAppTraits::GetToolkitVersion}\label{wxapptraitsgettoolkitversion}
\func{virtual wxPortId}{GetToolkitVersion}{\param{int *}{major = NULL}, \param{int *}{minor = NULL}}
Returns the wxWidgets port ID used by the running program and eventually
fills the given pointers with the values of the major and minor digits
of the native toolkit currently used.
The version numbers returned are thus detected at run-time and not compile-time
(except when this is not possible e.g. wxMotif).
E.g. if your program is using wxGTK port this function will return wxPORT\_GTK and
put in given pointers the versions of the GTK library in use.
See \helpref{wxPlatformInfo}{wxplatforminfo} for more details.
\membersection{wxAppTraits::HasStderr}\label{wxapptraitshasstderr}
\func{virtual bool}{HasStderr}{\void}
Returns \true if {\tt fprintf(stderr)} goes somewhere, \false otherwise.
\membersection{wxAppTraits::IsUsingUniversalWidgets}\label{wxapptraitsisusinguniversalwidgets}
\constfunc{bool}{IsUsingUniversalWidgets}{\void}
Returns \true if the library was built as wxUniversal. Always returns
\false for wxBase-only apps.
\membersection{wxAppTraits::ShowAssertDialog}\label{wxapptraitsshowassertdialog}
\func{virtual bool}{ShowAssertDialog}{\param{const wxString \&}{ msg}}
Shows the assert dialog with the specified message in GUI mode or just prints
the string to stderr in console mode.
Returns \true to suppress subsequent asserts, \false to continue as before.

View File

@@ -1,472 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: arc.tex
%% Purpose: Overview of the archive classes
%% Author: M.J.Wetherell
%% RCS-ID: $Id$
%% Copyright: 2004 M.J.Wetherell
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Archive formats such as zip}\label{wxarc}
The archive classes handle archive formats such as zip, tar, rar and cab.
Currently \helpref{wxZip}{wxzipinputstream}
and \helpref{wxTar}{wxtarinputstream} classes are included.
For each archive type, there are the following classes (using zip here
as an example):
\begin{twocollist}\twocolwidtha{4cm}
\twocolitem{\helpref{wxZipInputStream}{wxzipinputstream}}{Input stream}
\twocolitem{\helpref{wxZipOutputStream}{wxzipoutputstream}}{Output stream}
\twocolitem{\helpref{wxZipEntry}{wxzipentry}}{Holds the meta-data for an
entry (e.g. filename, timestamp, etc.)}
\end{twocollist}
There are also abstract wxArchive classes that can be used to write code
that can handle any of the archive types,
see '\helpref{Generic archive programming}{wxarcgeneric}'.
Also see \helpref{wxFileSystem}{fs} for a higher level interface that
can handle archive files in a generic way.
The classes are designed to handle archives on both seekable streams such
as disk files, or non-seekable streams such as pipes and sockets
(see '\helpref{Archives on non-seekable streams}{wxarcnoseek}').
\wxheading{See also}
\helpref{wxFileSystem}{fs}
\subsection{Creating an archive}\label{wxarccreate}
\helpref{Archive formats such as zip}{wxarc}
Call \helpref{PutNextEntry()}{wxarchiveoutputstreamputnextentry} to
create each new entry in the archive, then write the entry's data.
Another call to PutNextEntry() closes the current entry and begins the next.
For example:
\begin{verbatim}
wxFFileOutputStream out(_T("test.zip"));
wxZipOutputStream zip(out);
wxTextOutputStream txt(zip);
wxString sep(wxFileName::GetPathSeparator());
zip.PutNextEntry(_T("entry1.txt"));
txt << _T("Some text for entry1.txt\n");
zip.PutNextEntry(_T("subdir") + sep + _T("entry2.txt"));
txt << _T("Some text for subdir/entry2.txt\n");
\end{verbatim}
The name of each entry can be a full path, which makes it possible to
store entries in subdirectories.
\subsection{Extracting an archive}\label{wxarcextract}
\helpref{Archive formats such as zip}{wxarc}
\helpref{GetNextEntry()}{wxarchiveinputstreamgetnextentry} returns a pointer
to entry object containing the meta-data for the next entry in the archive
(and gives away ownership). Reading from the input stream then returns the
entry's data. Eof() becomes true after an attempt has been made to read past
the end of the entry's data.
When there are no more entries, GetNextEntry() returns NULL and sets Eof().
\begin{verbatim}
auto_ptr<wxZipEntry> entry;
wxFFileInputStream in(_T("test.zip"));
wxZipInputStream zip(in);
while (entry.reset(zip.GetNextEntry()), entry.get() != NULL)
{
// access meta-data
wxString name = entry->GetName();
// read 'zip' to access the entry's data
}
\end{verbatim}
\subsection{Modifying an archive}\label{wxarcmodify}
\helpref{Archive formats such as zip}{wxarc}
To modify an existing archive, write a new copy of the archive to a new file,
making any necessary changes along the way and transferring any unchanged
entries using \helpref{CopyEntry()}{wxarchiveoutputstreamcopyentry}.
For archive types which compress entry data, CopyEntry() is likely to be
much more efficient than transferring the data using Read() and Write()
since it will copy them without decompressing and recompressing them.
In general modifications are not possible without rewriting the archive,
though it may be possible in some limited cases. Even then, rewriting the
archive is usually a better choice since a failure can be handled without
losing the whole
archive. \helpref{wxTempFileOutputStream}{wxtempfileoutputstream} can
be helpful to do this.
For example to delete all entries matching the pattern "*.txt":
\begin{verbatim}
auto_ptr<wxFFileInputStream> in(new wxFFileInputStream(_T("test.zip")));
wxTempFileOutputStream out(_T("test.zip"));
wxZipInputStream inzip(*in);
wxZipOutputStream outzip(out);
auto_ptr<wxZipEntry> entry;
// transfer any meta-data for the archive as a whole (the zip comment
// in the case of zip)
outzip.CopyArchiveMetaData(inzip);
// call CopyEntry for each entry except those matching the pattern
while (entry.reset(inzip.GetNextEntry()), entry.get() != NULL)
if (!entry->GetName().Matches(_T("*.txt")))
if (!outzip.CopyEntry(entry.release(), inzip))
break;
// close the input stream by releasing the pointer to it, do this
// before closing the output stream so that the file can be replaced
in.reset();
// you can check for success as follows
bool success = inzip.Eof() && outzip.Close() && out.Commit();
\end{verbatim}
\subsection{Looking up an archive entry by name}\label{wxarcbyname}
\helpref{Archive formats such as zip}{wxarc}
Also see \helpref{wxFileSystem}{fs} for a higher level interface that is
more convenient for accessing archive entries by name.
To open just one entry in an archive, the most efficient way is
to simply search for it linearly by calling
\helpref{GetNextEntry()}{wxarchiveinputstreamgetnextentry} until the
required entry is found. This works both for archives on seekable and
non-seekable streams.
The format of filenames in the archive is likely to be different
from the local filename format. For example zips and tars use
unix style names, with forward slashes as the path separator,
and absolute paths are not allowed. So if on Windows the file
"C:$\backslash$MYDIR$\backslash$MYFILE.TXT" is stored, then when reading
the entry back \helpref{GetName()}{wxarchiveentryname} will return
"MYDIR$\backslash$MYFILE.TXT". The conversion into the internal format
and back has lost some information.
So to avoid ambiguity when searching for an entry matching a local name,
it is better to convert the local name to the archive's internal format
and search for that:
\begin{verbatim}
auto_ptr<wxZipEntry> entry;
// convert the local name we are looking for into the internal format
wxString name = wxZipEntry::GetInternalName(localname);
// open the zip
wxFFileInputStream in(_T("test.zip"));
wxZipInputStream zip(in);
// call GetNextEntry() until the required internal name is found
do {
entry.reset(zip.GetNextEntry());
}
while (entry.get() != NULL && entry->GetInternalName() != name);
if (entry.get() != NULL) {
// read the entry's data...
}
\end{verbatim}
To access several entries randomly, it is most efficient to transfer the
entire catalogue of entries to a container such as a std::map or a
\helpref{wxHashMap}{wxhashmap} then entries looked up by name can be
opened using the \helpref{OpenEntry()}{wxarchiveinputstreamopenentry} method.
\begin{verbatim}
WX_DECLARE_STRING_HASH_MAP(wxZipEntry*, ZipCatalog);
ZipCatalog::iterator it;
wxZipEntry *entry;
ZipCatalog cat;
// open the zip
wxFFileInputStream in(_T("test.zip"));
wxZipInputStream zip(in);
// load the zip catalog
while ((entry = zip.GetNextEntry()) != NULL) {
wxZipEntry*& current = cat[entry->GetInternalName()];
// some archive formats can have multiple entries with the same name
// (e.g. tar) though it is an error in the case of zip
delete current;
current = entry;
}
// open an entry by name
if ((it = cat.find(wxZipEntry::GetInternalName(localname))) != cat.end()) {
zip.OpenEntry(*it->second);
// ... now read entry's data
}
\end{verbatim}
To open more than one entry simultaneously you need more than one
underlying stream on the same archive:
\begin{verbatim}
// opening another entry without closing the first requires another
// input stream for the same file
wxFFileInputStream in2(_T("test.zip"));
wxZipInputStream zip2(in2);
if ((it = cat.find(wxZipEntry::GetInternalName(local2))) != cat.end())
zip2.OpenEntry(*it->second);
\end{verbatim}
\subsection{Generic archive programming}\label{wxarcgeneric}
\helpref{Archive formats such as zip}{wxarc}
Also see \helpref{wxFileSystem}{fs} for a higher level interface that
can handle archive files in a generic way.
The specific archive classes, such as the wxZip classes, inherit from
the following abstract classes which can be used to write code that can
handle any of the archive types:
\begin{twocollist}\twocolwidtha{5cm}
\twocolitem{\helpref{wxArchiveInputStream}{wxarchiveinputstream}}{Input stream}
\twocolitem{\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}}{Output stream}
\twocolitem{\helpref{wxArchiveEntry}{wxarchiveentry}}{Holds the meta-data for an
entry (e.g. filename)}
\end{twocollist}
In order to able to write generic code it's necessary to be able to create
instances of the classes without knowing which archive type is being used.
To allow this there is a class factory for each archive type, derived from
\helpref{wxArchiveClassFactory}{wxarchiveclassfactory}, that can create
the other classes.
For example, given {\it wxArchiveClassFactory* factory}, streams and
entries can be created like this:
\begin{verbatim}
// create streams without knowing their type
auto_ptr<wxArchiveInputStream> inarc(factory->NewStream(in));
auto_ptr<wxArchiveOutputStream> outarc(factory->NewStream(out));
// create an empty entry object
auto_ptr<wxArchiveEntry> entry(factory->NewEntry());
\end{verbatim}
For the factory itself, the static member
\helpref{wxArchiveClassFactory::Find()}{wxarchiveclassfactoryfind}.
can be used to find a class factory that can handle a given file
extension or mime type. For example, given {\it filename}:
\begin{verbatim}
const wxArchiveClassFactory *factory;
factory = wxArchiveClassFactory::Find(filename, wxSTREAM_FILEEXT);
if (factory)
stream = factory->NewStream(new wxFFileInputStream(filename));
\end{verbatim}
{\it Find} does not give away ownership of the returned pointer, so it
does not need to be deleted.
There are similar class factories for the filter streams that handle the
compression and decompression of a single stream, such as wxGzipInputStream.
These can be found using
\helpref{wxFilterClassFactory::Find()}{wxfilterclassfactoryfind}.
For example, to list the contents of archive {\it filename}:
\begin{verbatim}
auto_ptr<wxInputStream> in(new wxFFileInputStream(filename));
if (in->IsOk())
{
// look for a filter handler, e.g. for '.gz'
const wxFilterClassFactory *fcf;
fcf = wxFilterClassFactory::Find(filename, wxSTREAM_FILEEXT);
if (fcf) {
in.reset(fcf->NewStream(in.release()));
// pop the extension, so if it was '.tar.gz' it is now just '.tar'
filename = fcf->PopExtension(filename);
}
// look for a archive handler, e.g. for '.zip' or '.tar'
const wxArchiveClassFactory *acf;
acf = wxArchiveClassFactory::Find(filename, wxSTREAM_FILEEXT);
if (acf) {
auto_ptr<wxArchiveInputStream> arc(acf->NewStream(in.release()));
auto_ptr<wxArchiveEntry> entry;
// list the contents of the archive
while ((entry.reset(arc->GetNextEntry())), entry.get() != NULL)
std::wcout << entry->GetName().c_str() << "\n";
}
else {
wxLogError(_T("can't handle '%s'"), filename.c_str());
}
}
\end{verbatim}
\subsection{Archives on non-seekable streams}\label{wxarcnoseek}
\helpref{Archive formats such as zip}{wxarc}
In general, handling archives on non-seekable streams is done in the same
way as for seekable streams, with a few caveats.
The main limitation is that accessing entries randomly using
\helpref{OpenEntry()}{wxarchiveinputstreamopenentry}
is not possible, the entries can only be accessed sequentially in the order
they are stored within the archive.
For each archive type, there will also be other limitations which will
depend on the order the entries' meta-data is stored within the archive.
These are not too difficult to deal with, and are outlined below.
\wxheading{PutNextEntry and the entry size}
When writing archives, some archive formats store the entry size before
the entry's data (tar has this limitation, zip doesn't). In this case
the entry's size must be passed to
\helpref{PutNextEntry()}{wxarchiveoutputstreamputnextentry} or an error
occurs.
This is only an issue on non-seekable streams, since otherwise the archive
output stream can seek back and fix up the header once the size of the
entry is known.
For generic programming, one way to handle this is to supply the size
whenever it is known, and rely on the error message from the output
stream when the operation is not supported.
\wxheading{GetNextEntry and the weak reference mechanism}
Some archive formats do not store all an entry's meta-data before the
entry's data (zip is an example). In this case, when reading from a
non-seekable stream, \helpref{GetNextEntry()}{wxarchiveinputstreamgetnextentry}
can only return a partially populated \helpref{wxArchiveEntry}{wxarchiveentry}
object - not all the fields are set.
The input stream then keeps a weak reference to the entry object and
updates it when more meta-data becomes available. A weak reference being
one that does not prevent you from deleting the wxArchiveEntry object - the
input stream only attempts to update it if it is still around.
The documentation for each archive entry type gives the details
of what meta-data becomes available and when. For generic programming,
when the worst case must be assumed, you can rely on all the fields
of wxArchiveEntry being fully populated when GetNextEntry() returns,
with the the following exceptions:
\begin{twocollist}\twocolwidtha{3cm}
\twocolitem{\helpref{GetSize()}{wxarchiveentrysize}}{Guaranteed to be
available after the entry has been read to \helpref{Eof()}{wxinputstreameof},
or \helpref{CloseEntry()}{wxarchiveinputstreamcloseentry} has been called}
\twocolitem{\helpref{IsReadOnly()}{wxarchiveentryisreadonly}}{Guaranteed to
be available after the end of the archive has been reached, i.e. after
GetNextEntry() returns NULL and Eof() is true}
\end{twocollist}
This mechanism allows \helpref{CopyEntry()}{wxarchiveoutputstreamcopyentry}
to always fully preserve entries' meta-data. No matter what order order
the meta-data occurs within the archive, the input stream will always
have read it before the output stream must write it.
\wxheading{wxArchiveNotifier}
Notifier objects can be used to get a notification whenever an input
stream updates a \helpref{wxArchiveEntry}{wxarchiveentry} object's data
via the weak reference mechanism.
Consider the following code which renames an entry in an archive.
This is the usual way to modify an entry's meta-data, simply set the
required field before writing it with
\helpref{CopyEntry()}{wxarchiveoutputstreamcopyentry}:
\begin{verbatim}
auto_ptr<wxArchiveInputStream> arc(factory->NewStream(in));
auto_ptr<wxArchiveOutputStream> outarc(factory->NewStream(out));
auto_ptr<wxArchiveEntry> entry;
outarc->CopyArchiveMetaData(*arc);
while (entry.reset(arc->GetNextEntry()), entry.get() != NULL) {
if (entry->GetName() == from)
entry->SetName(to);
if (!outarc->CopyEntry(entry.release(), *arc))
break;
}
bool success = arc->Eof() && outarc->Close();
\end{verbatim}
However, for non-seekable streams, this technique cannot be used for
fields such as \helpref{IsReadOnly()}{wxarchiveentryisreadonly},
which are not necessarily set when
\helpref{GetNextEntry()}{wxarchiveinputstreamgetnextentry} returns. In
this case a \helpref{wxArchiveNotifier}{wxarchivenotifier} can be used:
\begin{verbatim}
class MyNotifier : public wxArchiveNotifier
{
public:
void OnEntryUpdated(wxArchiveEntry& entry) { entry.SetIsReadOnly(false); }
};
\end{verbatim}
The meta-data changes are done in your notifier's
\helpref{OnEntryUpdated()}{wxarchivenotifieronentryupdated} method,
then \helpref{SetNotifier()}{wxarchiveentrynotifier} is called before
CopyEntry():
\begin{verbatim}
auto_ptr<wxArchiveInputStream> arc(factory->NewStream(in));
auto_ptr<wxArchiveOutputStream> outarc(factory->NewStream(out));
auto_ptr<wxArchiveEntry> entry;
MyNotifier notifier;
outarc->CopyArchiveMetaData(*arc);
while (entry.reset(arc->GetNextEntry()), entry.get() != NULL) {
entry->SetNotifier(notifier);
if (!outarc->CopyEntry(entry.release(), *arc))
break;
}
bool success = arc->Eof() && outarc->Close();
\end{verbatim}
SetNotifier() calls OnEntryUpdated() immediately, then the input
stream calls it again whenever it sets more fields in the entry. Since
OnEntryUpdated() will be called at least once, this technique always
works even when it is not strictly necessary to use it. For example,
changing the entry name can be done this way too and it works on seekable
streams as well as non-seekable.

View File

@@ -1,806 +0,0 @@
%
% automatically generated by HelpGen $Revision$ from
% wx/archive.h at 16/Sep/04 12:19:29
%
\section{\class{wxArchiveClassFactory}}\label{wxarchiveclassfactory}
Allows the creation of streams to handle archive formats such
as zip and tar.
For example, given a filename you can search for a factory that will
handle it and create a stream to read it:
\begin{verbatim}
factory = wxArchiveClassFactory::Find(filename, wxSTREAM_FILEEXT);
if (factory)
stream = factory->NewStream(new wxFFileInputStream(filename));
\end{verbatim}
\helpref{Find()}{wxarchiveclassfactoryfind} can also search
for a factory by MIME type or wxFileSystem protocol.
The available factories can be enumerated
using \helpref{GetFirst() and GetNext()}{wxarchiveclassfactorygetfirst}.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/archive.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{Data structures}
\begin{verbatim}
enum wxStreamProtocolType
{
wxSTREAM_PROTOCOL, // wxFileSystem protocol (should be only one)
wxSTREAM_MIMETYPE, // MIME types the stream handles
wxSTREAM_ENCODING, // Not used for archives
wxSTREAM_FILEEXT // File extensions the stream handles
};
\end{verbatim}
\wxheading{See also}
\helpref{Archive formats such as zip}{wxarc}\\
\helpref{Generic archive programming}{wxarcgeneric}\\
\helpref{wxArchiveEntry}{wxarchiveentry}\\
\helpref{wxArchiveInputStream}{wxarchiveinputstream}\\
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}\\
\helpref{wxFilterClassFactory}{wxfilterclassfactory}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArchiveClassFactory::Get/SetConv}\label{wxarchiveclassfactoryconv}
\constfunc{wxMBConv\&}{GetConv}{\void}
\func{void}{SetConv}{\param{wxMBConv\& }{conv}}
The \helpref{wxMBConv}{wxmbconv} object that the created streams
will use when translating meta-data. The initial default, set by the
constructor, is wxConvLocal.
\membersection{wxArchiveClassFactory::CanHandle}\label{wxarchiveclassfactorycanhandle}
\constfunc{bool}{CanHandle}{\param{const wxChar* }{protocol}, \param{wxStreamProtocolType }{type = wxSTREAM\_PROTOCOL}}
Returns true if this factory can handle the given protocol, MIME type
or file extension.
When using wxSTREAM\_FILEEXT for the second parameter, the first parameter
can be a complete filename rather than just an extension.
\membersection{wxArchiveClassFactory::Find}\label{wxarchiveclassfactoryfind}
\func{static const wxArchiveClassFactory*}{Find}{\param{const wxChar* }{protocol}, \param{wxStreamProtocolType }{type = wxSTREAM\_PROTOCOL}}
A static member that finds a factory that can handle a given protocol, MIME
type or file extension. Returns a pointer to the class factory if found, or
NULL otherwise. It does not give away ownership of the factory.
When using wxSTREAM\_FILEEXT for the second parameter, the first parameter
can be a complete filename rather than just an extension.
\membersection{wxArchiveClassFactory::GetFirst/GetNext}\label{wxarchiveclassfactorygetfirst}
\func{static const wxArchiveClassFactory*}{GetFirst}{\void}
\constfunc{const wxArchiveClassFactory*}{GetNext}{\void}
GetFirst and GetNext can be used to enumerate the available factories.
For example, to list them:
\begin{verbatim}
wxString list;
const wxArchiveClassFactory *factory = wxArchiveClassFactory::GetFirst();
while (factory) {
list << factory->GetProtocol() << _T("\n");
factory = factory->GetNext();
}
\end{verbatim}
GetFirst()/GetNext() return a pointer to a factory or NULL if no more
are available. They do not give away ownership of the factory.
\membersection{wxArchiveClassFactory::GetInternalName}\label{wxarchiveclassfactorygetinternalname}
\constfunc{wxString}{GetInternalName}{\param{const wxString\& }{name}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
Calls the static GetInternalName() function for the archive entry type,
for example
\helpref{wxZipEntry::GetInternalName()}{wxzipentrygetinternalname}.
\membersection{wxArchiveClassFactory::GetProtocol}\label{wxarchiveclassfactorygetprotocol}
\constfunc{wxString}{GetProtocol}{\void}
Returns the wxFileSystem protocol supported by this factory. Equivalent
to wxString(*GetProtcols()).
\membersection{wxArchiveClassFactory::GetProtocols}\label{wxarchiveclassfactorygetprotocols}
\constfunc{const wxChar * const*}{GetProtocols}{\param{wxStreamProtocolType }{type = wxSTREAM\_PROTOCOL}}
Returns the protocols, MIME types or file extensions supported by this
factory, as an array of null terminated strings. It does not give away
ownership of the array or strings.
For example, to list the file extensions a factory supports:
\begin{verbatim}
wxString list;
const wxChar *const *p;
for (p = factory->GetProtocols(wxSTREAM_FILEEXT); *p; p++)
list << *p << _T("\n");
\end{verbatim}
\membersection{wxArchiveClassFactory::NewEntry}\label{wxarchiveclassfactorynewentry}
\constfunc{wxArchiveEntry*}{NewEntry}{\void}
Create a new \helpref{wxArchiveEntry}{wxarchiveentry} object of the
appropriate type.
\membersection{wxArchiveClassFactory::NewStream}\label{wxarchiveclassfactorynewstream}
\constfunc{wxArchiveInputStream*}{NewStream}{\param{wxInputStream\& }{stream}}
\constfunc{wxArchiveOutputStream*}{NewStream}{\param{wxOutputStream\& }{stream}}
\constfunc{wxArchiveInputStream*}{NewStream}{\param{wxInputStream* }{stream}}
\constfunc{wxArchiveOutputStream*}{NewStream}{\param{wxOutputStream* }{stream}}
Create a new input or output stream to read or write an archive.
If the parent stream is passed as a pointer then the new archive stream
takes ownership of it. If it is passed by reference then it does not.
\membersection{wxArchiveClassFactory::PushFront}\label{wxarchiveclassfactorypushfront}
\func{void}{PushFront}{\void}
Adds this class factory to the list returned
by \helpref{GetFirst()/GetNext()}{wxarchiveclassfactorygetfirst}.
It is not necessary to do this to use the archive streams. It is usually
used when implementing streams, typically the implementation will
add a static instance of its factory class.
It can also be used to change the order of a factory already in the list,
bringing it to the front. This isn't a thread safe operation
so can't be done when other threads are running that will be using the list.
The list does not take ownership of the factory.
\membersection{wxArchiveClassFactory::Remove}\label{wxarchiveclassfactoryremove}
\func{void}{Remove}{\void}
Removes this class factory from the list returned
by \helpref{GetFirst()/GetNext()}{wxarchiveclassfactorygetfirst}.
Removing from the list isn't a thread safe operation
so can't be done when other threads are running that will be using the list.
The list does not own the factories, so removing a factory does not delete it.
%
% automatically generated by HelpGen $Revision$ from
% wx/archive.h at 16/Sep/04 12:19:29
%
\section{\class{wxArchiveEntry}}\label{wxarchiveentry}
An abstract base class which serves as a common interface to
archive entry classes such as \helpref{wxZipEntry}{wxzipentry}.
These hold the meta-data (filename, timestamp, etc.), for entries
in archive files such as zips and tars.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/archive.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{Archive formats such as zip}{wxarc}\\
\helpref{Generic archive programming}{wxarcgeneric}\\
\helpref{wxArchiveInputStream}{wxarchiveinputstream}\\
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}\\
\helpref{wxArchiveNotifier}{wxarchivenotifier}
\wxheading{Non-seekable streams}
This information applies only when reading archives from non-seekable
streams. When the stream is
seekable \helpref{GetNextEntry()}{wxarchiveinputstreamgetnextentry}
returns a fully populated \helpref{wxArchiveEntry}{wxarchiveentry}.
See '\helpref{Archives on non-seekable streams}{wxarcnoseek}' for
more information.
For generic programming, when the worst case must be assumed, you can
rely on all the fields of wxArchiveEntry being fully populated when
GetNextEntry() returns, with the the following exceptions:
\begin{twocollist}\twocolwidtha{3cm}
\twocolitem{\helpref{GetSize()}{wxarchiveentrysize}}{Guaranteed to be
available after the entry has been read to \helpref{Eof()}{wxinputstreameof},
or \helpref{CloseEntry()}{wxarchiveinputstreamcloseentry} has been called}
\twocolitem{\helpref{IsReadOnly()}{wxarchiveentryisreadonly}}{Guaranteed to
be available after the end of the archive has been reached, i.e. after
GetNextEntry() returns NULL and Eof() is true}
\end{twocollist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArchiveEntry::Clone}\label{wxarchiveentryclone}
\constfunc{wxArchiveEntry*}{Clone}{\void}
Returns a copy of this entry object.
\membersection{wxArchiveEntry::Get/SetDateTime}\label{wxarchiveentrydatetime}
\constfunc{wxDateTime}{GetDateTime}{\void}
\func{void}{SetDateTime}{\param{const wxDateTime\& }{dt}}
The entry's timestamp.
\membersection{wxArchiveEntry::GetInternalFormat}\label{wxarchiveentrygetinternalformat}
\constfunc{wxPathFormat}{GetInternalFormat}{\void}
Returns the path format used internally within the archive to store
filenames.
\membersection{wxArchiveEntry::GetInternalName}\label{wxarchiveentrygetinternalname}
\constfunc{wxString}{GetInternalName}{\void}
Returns the entry's filename in the internal format used within the
archive. The name can include directory components, i.e. it can be a
full path.
The names of directory entries are returned without any trailing path
separator. This gives a canonical name that can be used in comparisons.
\wxheading{See also}
\helpref{Looking up an archive entry by name}{wxarcbyname}
\membersection{wxArchiveEntry::Get/SetName}\label{wxarchiveentryname}
\constfunc{wxString}{GetName}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}
\func{void}{SetName}{\param{const wxString\& }{name}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}
The entry's name, by default in the native format. The name can include
directory components, i.e. it can be a full path.
If this is a directory entry, (i.e. if \helpref{IsDir()}{wxarchiveentryisdir}
is true) then GetName() returns the name with a trailing path separator.
Similarly, setting a name with a trailing path separator sets IsDir().
\membersection{wxArchiveEntry::GetOffset}\label{wxarchiveentrygetoffset}
\constfunc{off\_t}{GetOffset}{\void}
Returns a numeric value unique to the entry within the archive.
\membersection{wxArchiveEntry::Get/SetSize}\label{wxarchiveentrysize}
\constfunc{off\_t}{GetSize}{\void}
\func{void}{SetSize}{\param{off\_t }{size}}
The size of the entry's data in bytes.
\membersection{wxArchiveEntry::IsDir/SetIsDir}\label{wxarchiveentryisdir}
\constfunc{bool}{IsDir}{\void}
\func{void}{SetIsDir}{\param{bool }{isDir = true}}
True if this is a directory entry.
Directory entries are entries with no data, which are used to store
the meta-data of directories. They also make it possible for completely
empty directories to be stored.
The names of entries within an archive can be complete paths, and
unarchivers typically create whatever directories are necessary as they
restore files, even if the archive contains no explicit directory entries.
\membersection{wxArchiveEntry::IsReadOnly/SetIsReadOnly}\label{wxarchiveentryisreadonly}
\constfunc{bool}{IsReadOnly}{\void}
\func{void}{SetIsReadOnly}{\param{bool }{isReadOnly = true}}
True if the entry is a read-only file.
\membersection{wxArchiveEntry::Set/UnsetNotifier}\label{wxarchiveentrynotifier}
\func{void}{SetNotifier}{\param{wxArchiveNotifier\& }{notifier}}
\func{void}{UnsetNotifier}{\void}
Sets the \helpref{notifier}{wxarchivenotifier} for this entry.
Whenever the \helpref{wxArchiveInputStream}{wxarchiveinputstream} updates
this entry, it will then invoke the associated
notifier's \helpref{OnEntryUpdated}{wxarchivenotifieronentryupdated}
method.
Setting a notifier is not usually necessary. It is used to handle
certain cases when modifying an archive in a pipeline (i.e. between
non-seekable streams).
\wxheading{See also}
\helpref{Archives on non-seekable streams}{wxarcnoseek}\\
\helpref{wxArchiveNotifier}{wxarchivenotifier}
%
% automatically generated by HelpGen $Revision$ from
% wx/archive.h at 16/Sep/04 12:19:29
%
\section{\class{wxArchiveInputStream}}\label{wxarchiveinputstream}
An abstract base class which serves as a common interface to
archive input streams such as \helpref{wxZipInputStream}{wxzipinputstream}.
\helpref{GetNextEntry()}{wxarchiveinputstreamgetnextentry} returns an
\helpref{wxArchiveEntry}{wxarchiveentry} object containing the meta-data
for the next entry in the archive (and gives away ownership). Reading from
the wxArchiveInputStream then returns the entry's data. Eof() becomes true
after an attempt has been made to read past the end of the entry's data.
When there are no more entries, GetNextEntry() returns NULL and sets Eof().
\wxheading{Derived from}
\helpref{wxFilterInputStream}{wxfilterinputstream}\\
\helpref{wxInputStream}{wxinputstream}\\
\helpref{wxStreamBase}{wxstreambase}
\wxheading{Include files}
<wx/archive.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{Data structures}
\begin{verbatim}
typedef wxArchiveEntry entry_type
\end{verbatim}
\wxheading{See also}
\helpref{Archive formats such as zip}{wxarc}\\
\helpref{wxArchiveEntry}{wxarchiveentry}\\
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArchiveInputStream::CloseEntry}\label{wxarchiveinputstreamcloseentry}
\func{bool}{CloseEntry}{\void}
Closes the current entry. On a non-seekable stream reads to the end of
the current entry first.
\membersection{wxArchiveInputStream::GetNextEntry}\label{wxarchiveinputstreamgetnextentry}
\func{wxArchiveEntry*}{GetNextEntry}{\void}
Closes the current entry if one is open, then reads the meta-data for
the next entry and returns it in a \helpref{wxArchiveEntry}{wxarchiveentry}
object, giving away ownership. Reading this wxArchiveInputStream then
returns the entry's data.
\membersection{wxArchiveInputStream::OpenEntry}\label{wxarchiveinputstreamopenentry}
\func{bool}{OpenEntry}{\param{wxArchiveEntry\& }{entry}}
Closes the current entry if one is open, then opens the entry specified
by the \helpref{wxArchiveEntry}{wxarchiveentry} object.
{\it entry} must be from the same archive file that this
wxArchiveInputStream is reading, and it must be reading it from a
seekable stream.
\wxheading{See also}
\helpref{Looking up an archive entry by name}{wxarcbyname}
%
% automatically generated by HelpGen $Revision$ from
% wx/archive.h at 16/Sep/04 12:19:29
%
\section{\class{wxArchiveIterator}}\label{wxarchiveiterator}
An input iterator template class that can be used to transfer an archive's
catalogue to a container. It is only available if wxUSE\_STL is set to 1
in setup.h, and the uses for it outlined below require a compiler which
supports member templates.
\begin{verbatim}
template <class Arc, class T = typename Arc::entry_type*>
class wxArchiveIterator
{
// this constructor creates an 'end of sequence' object
wxArchiveIterator();
// template parameter 'Arc' should be the type of an archive input stream
wxArchiveIterator(Arc& arc) {
// ...
}
};
\end{verbatim}
The first template parameter should be the type of archive input stream
(e.g. \helpref{wxArchiveInputStream}{wxarchiveinputstream}) and the
second can either be a pointer to an entry
(e.g. \helpref{wxArchiveEntry}{wxarchiveentry}*), or a string/pointer pair
(e.g. std::pair<wxString, wxArchiveEntry*>).
The {\tt <wx/archive.h>} header defines the following typedefs:
\begin{verbatim}
typedef wxArchiveIterator<wxArchiveInputStream> wxArchiveIter;
typedef wxArchiveIterator<wxArchiveInputStream,
std::pair<wxString, wxArchiveEntry*> > wxArchivePairIter;
\end{verbatim}
The header for any implementation of this interface should define similar
typedefs for its types, for example in {\tt <wx/zipstrm.h>} there is:
\begin{verbatim}
typedef wxArchiveIterator<wxZipInputStream> wxZipIter;
typedef wxArchiveIterator<wxZipInputStream,
std::pair<wxString, wxZipEntry*> > wxZipPairIter;
\end{verbatim}
Transferring the catalogue of an archive {\it arc} to a vector {\it cat},
can then be done something like this:
\begin{verbatim}
std::vector<wxArchiveEntry*> cat((wxArchiveIter)arc, wxArchiveIter());
\end{verbatim}
When the iterator is dereferenced, it gives away ownership of an entry
object. So in the above example, when you have finished with {\it cat}
you must delete the pointers it contains.
If you have smart pointers with normal copy semantics (i.e. not auto\_ptr
or \helpref{wxScopedPtr}{wxscopedptr}), then you can create an iterator
which uses them instead. For example, with a smart pointer class for
zip entries {\it ZipEntryPtr}:
\begin{verbatim}
typedef std::vector<ZipEntryPtr> ZipCatalog;
typedef wxArchiveIterator<wxZipInputStream, ZipEntryPtr> ZipIter;
ZipCatalog cat((ZipIter)zip, ZipIter());
\end{verbatim}
Iterators that return std::pair objects can be used to
populate a std::multimap, to allow entries to be looked
up by name. The string is initialised using the wxArchiveEntry object's
\helpref{GetInternalName()}{wxarchiveentrygetinternalname} function.
\begin{verbatim}
typedef std::multimap<wxString, wxZipEntry*> ZipCatalog;
ZipCatalog cat((wxZipPairIter)zip, wxZipPairIter());
\end{verbatim}
Note that this iterator also gives away ownership of an entry
object each time it is dereferenced. So in the above example, when
you have finished with {\it cat} you must delete the pointers it contains.
Or if you have them, a pair containing a smart pointer can be used
(again {\it ZipEntryPtr}), no worries about ownership:
\begin{verbatim}
typedef std::multimap<wxString, ZipEntryPtr> ZipCatalog;
typedef wxArchiveIterator<wxZipInputStream,
std::pair<wxString, ZipEntryPtr> > ZipPairIter;
ZipCatalog cat((ZipPairIter)zip, ZipPairIter());
\end{verbatim}
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/archive.h>
\wxheading{See also}
\helpref{wxArchiveEntry}{wxarchiveentry}\\
\helpref{wxArchiveInputStream}{wxarchiveinputstream}\\
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}
\wxheading{Data structures}
\begin{verbatim}
typedef std::input_iterator_tag iterator_category
typedef T value_type
typedef ptrdiff_t difference_type
typedef T* pointer
typedef T& reference
\end{verbatim}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArchiveIterator::wxArchiveIterator}\label{wxarchiveiteratorwxarchiveiterator}
\func{}{wxArchiveIterator}{\void}
Construct an 'end of sequence' instance.
\func{}{wxArchiveIterator}{\param{Arc\& }{arc}}
Construct iterator that returns all the entries in the archive input
stream {\it arc}.
\membersection{wxArchiveIterator::operator*}\label{wxarchiveiteratoroperatorstar}
\constfunc{const T\&}{operator*}{\void}
Returns an entry object from the archive input stream, giving away
ownership.
\membersection{wxArchiveIterator::operator++}\label{wxarchiveiteratoroperatorincrement}
\func{wxArchiveIterator\&}{operator++}{\void}
\func{wxArchiveIterator\&}{operator++}{\param{int}{}}
Position the input iterator at the next entry in the archive input stream.
%
% automatically generated by HelpGen $Revision$ from
% wx/archive.h at 16/Sep/04 12:19:29
%
\section{\class{wxArchiveNotifier}}\label{wxarchivenotifier}
If you need to know when a
\helpref{wxArchiveInputStream}{wxarchiveinputstream} updates a
\helpref{wxArchiveEntry}{wxarchiveentry} object, you can create
a notifier by deriving from this abstract base class, overriding
\helpref{OnEntryUpdated()}{wxarchivenotifieronentryupdated}. An instance
of your notifier class can then be assigned to the wxArchiveEntry object
using \helpref{wxArchiveEntry::SetNotifier()}{wxarchiveentrynotifier}.
Your OnEntryUpdated() method will then be invoked whenever the input
stream updates the entry.
Setting a notifier is not usually necessary. It is used to handle
certain cases when modifying an archive in a pipeline (i.e. between
non-seekable streams).
See \helpref{Archives on non-seekable streams}{wxarcnoseek}.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/archive.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{Archives on non-seekable streams}{wxarcnoseek}\\
\helpref{wxArchiveEntry}{wxarchiveentry}\\
\helpref{wxArchiveInputStream}{wxarchiveinputstream}\\
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArchiveNotifier::OnEntryUpdated}\label{wxarchivenotifieronentryupdated}
\func{void}{OnEntryUpdated}{\param{class wxArchiveEntry\& }{entry}}
This method must be overridden in your derived class.
%
% automatically generated by HelpGen $Revision$ from
% wx/archive.h at 16/Sep/04 12:19:29
%
\section{\class{wxArchiveOutputStream}}\label{wxarchiveoutputstream}
An abstract base class which serves as a common interface to
archive output streams such as \helpref{wxZipOutputStream}{wxzipoutputstream}.
\helpref{PutNextEntry()}{wxarchiveoutputstreamputnextentry} is used
to create a new entry in the output archive, then the entry's data is
written to the wxArchiveOutputStream. Another call to PutNextEntry()
closes the current entry and begins the next.
\wxheading{Derived from}
\helpref{wxFilterOutputStream}{wxfilteroutputstream}\\
\helpref{wxOutputStream}{wxoutputstream}\\
\helpref{wxStreamBase}{wxstreambase}
\wxheading{Include files}
<wx/archive.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{Archive formats such as zip}{wxarc}\\
\helpref{wxArchiveEntry}{wxarchiveentry}\\
\helpref{wxArchiveInputStream}{wxarchiveinputstream}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArchiveOutputStream::\destruct{wxArchiveOutputStream}}\label{wxarchiveoutputstreamdtor}
\func{}{\destruct{wxArchiveOutputStream}}{\void}
Calls \helpref{Close()}{wxarchiveoutputstreamclose} if it has not already
been called.
\membersection{wxArchiveOutputStream::Close}\label{wxarchiveoutputstreamclose}
\func{bool}{Close}{\void}
Closes the archive, returning true if it was successfully written.
Called by the destructor if not called explicitly.
\membersection{wxArchiveOutputStream::CloseEntry}\label{wxarchiveoutputstreamcloseentry}
\func{bool}{CloseEntry}{\void}
Close the current entry. It is called implicitly whenever another new
entry is created with \helpref{CopyEntry()}{wxarchiveoutputstreamcopyentry}
or \helpref{PutNextEntry()}{wxarchiveoutputstreamputnextentry}, or
when the archive is closed.
\membersection{wxArchiveOutputStream::CopyArchiveMetaData}\label{wxarchiveoutputstreamcopyarchivemetadata}
\func{bool}{CopyArchiveMetaData}{\param{wxArchiveInputStream\& }{stream}}
Some archive formats have additional meta-data that applies to the archive
as a whole. For example in the case of zip there is a comment, which
is stored at the end of the zip file. CopyArchiveMetaData() can be used
to transfer such information when writing a modified copy of an archive.
Since the position of the meta-data can vary between the various archive
formats, it is best to call CopyArchiveMetaData() before transferring
the entries. The \helpref{wxArchiveOutputStream}{wxarchiveoutputstream}
will then hold on to the meta-data and write it at the correct point in
the output file.
When the input archive is being read from a non-seekable stream, the
meta-data may not be available when CopyArchiveMetaData() is called,
in which case the two streams set up a link and transfer the data
when it becomes available.
\membersection{wxArchiveOutputStream::CopyEntry}\label{wxarchiveoutputstreamcopyentry}
\func{bool}{CopyEntry}{\param{wxArchiveEntry* }{entry}, \param{wxArchiveInputStream\& }{stream}}
Takes ownership of {\it entry} and uses it to create a new entry in the
archive. {\it entry} is then opened in the input stream {\it stream}
and its contents copied to this stream.
For archive types which compress entry data, CopyEntry() is likely to be
much more efficient than transferring the data using Read() and Write()
since it will copy them without decompressing and recompressing them.
{\it entry} must be from the same archive file that {\it stream} is
accessing. For non-seekable streams, {\it entry} must also be the last
thing read from {\it stream}.
\membersection{wxArchiveOutputStream::PutNextDirEntry}\label{wxarchiveoutputstreamputnextdirentry}
\func{bool}{PutNextDirEntry}{\param{const wxString\& }{name}, \param{const wxDateTime\& }{dt = wxDateTime::Now()}}
Create a new directory entry
(see \helpref{wxArchiveEntry::IsDir()}{wxarchiveentryisdir})
with the given name and timestamp.
\helpref{PutNextEntry()}{wxarchiveoutputstreamputnextentry} can
also be used to create directory entries, by supplying a name with
a trailing path separator.
\membersection{wxArchiveOutputStream::PutNextEntry}\label{wxarchiveoutputstreamputnextentry}
\func{bool}{PutNextEntry}{\param{wxArchiveEntry* }{entry}}
Takes ownership of {\it entry} and uses it to create a new entry in
the archive. The entry's data can then be written by writing to this
wxArchiveOutputStream.
\func{bool}{PutNextEntry}{\param{const wxString\& }{name}, \param{const wxDateTime\& }{dt = wxDateTime::Now()}, \param{off\_t }{size = wxInvalidOffset}}
Create a new entry with the given name, timestamp and size. The entry's
data can then be written by writing to this wxArchiveOutputStream.

View File

@@ -1,735 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: array.tex
%% Purpose: wxArray
%% Author: wxWidgets Team
%% Modified by:
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets Team
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxArray<T>}}\label{wxarray}
This section describes the so called {\it dynamic arrays}. This is a C
array-like type safe 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}.
wxWidgets has three different kinds of array. All of them derive from
wxBaseArray class which works with untyped data and can not be used directly.
The standard macros WX\_DEFINE\_ARRAY(), WX\_DEFINE\_SORTED\_ARRAY() and
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 wxWidgets 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.
wxSortedArray is a wxArray variant which should be used when searching in the
array is a frequently used operation. It requires you to define an additional
function for comparing two elements of the array element type and always stores
its items in the sorted order (according to this function). Thus, it is
\helpref{Index()}{wxarrayindex} function execution time is $O(log(N))$ instead of
$O(N)$ for the usual arrays but the \helpref{Add()}{wxarrayadd} method is
slower: it is $O(log(N))$ instead of constant time (neglecting time spent in
memory allocation routine). However, in a usual situation elements are added to
an array much less often than searched inside it, so wxSortedArray may lead to
huge performance improvements compared to wxArray. Finally, it should be
noticed that, as wxArray, wxSortedArray can be only used for storing integral
types or pointers.
wxObjArray class treats its elements like "objects". It may delete them when
they are removed from the array (invoking the correct destructor) and copies
them using the objects copy constructor. In order to implement this behaviour
the definition of the wxObjArray arrays is split in two parts: first, you should
declare the new wxObjArray class using WX\_DECLARE\_OBJARRAY() macro and then
you must include the file defining the implementation of template type:
<wx/arrimpl.cpp> and define the array class with WX\_DEFINE\_OBJARRAY() macro
from a point where the full (as opposed to `forward') declaration of the array
elements class is in scope. As it probably sounds very complicated here is an
example:
\begin{verbatim}
#include <wx/dynarray.h>
// we must forward declare the array because it is used inside the class
// declaration
class MyDirectory;
class MyFile;
// this defines two new types: ArrayOfDirectories and ArrayOfFiles which can be
// now used as shown below
WX_DECLARE_OBJARRAY(MyDirectory, ArrayOfDirectories);
WX_DECLARE_OBJARRAY(MyFile, ArrayOfFiles);
class MyDirectory
{
...
ArrayOfDirectories m_subdirectories; // all subdirectories
ArrayOfFiles m_files; // all files in this directory
};
...
// now that we have MyDirectory declaration in scope we may finish the
// definition of ArrayOfDirectories -- note that this expands into some C++
// code and so should only be compiled once (i.e., don't put this in the
// header, but into a source file or you will get linking errors)
#include <wx/arrimpl.cpp> // this is a magic incantation which must be done!
WX_DEFINE_OBJARRAY(ArrayOfDirectories);
// that's all!
\end{verbatim}
It is not as elegant as writing
\begin{verbatim}
typedef std::vector<MyDirectory> ArrayOfDirectories;
\end{verbatim}
but is not that complicated and allows the code to be compiled with any, however
dumb, C++ compiler in the world.
Remember to #include <wx/arrimpl.cpp> just before each WX\_DEFINE\_OBJARRAY
ocurrence in your code, even if you have several in the same file.
Things are much simpler for wxArray and wxSortedArray however: it is enough
just to write
\begin{verbatim}
WX_DEFINE_ARRAY_INT(int, ArrayOfInts);
WX_DEFINE_SORTED_ARRAY_INT(int, ArrayOfSortedInts);
\end{verbatim}
i.e. there is only one {\tt DEFINE} macro and no need for separate
{\tt DECLARE} one. For the arrays of the primitive types, the macros
{\tt WX\_DEFINE\_ARRAY\_CHAR/SHORT/INT/SIZE\_T/LONG/DOUBLE} should be used
depending on the sizeof of the values (notice that storing values of smaller
type, e.g. shorts, in an array of larger one, e.g. {\tt ARRAY\_INT}, does
\emph{not} work on all architectures!).
\wxheading{See also}
\helpref{Container classes overview}{wxcontaineroverview},
\helpref{wxList<T>}{wxlist},
\helpref{wxVector<T>}{wxvector}
\wxheading{Include files}
<wx/dynarray.h> for wxArray and wxSortedArray and additionally <wx/arrimpl.cpp>
for wxObjArray.
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\latexignore{\rtfignore{\wxheading{Function groups}}}
\membersection{Macros for template array definition}\label{arraymacros}
To use an array you must first define the array class. This is done with the
help of the macros in this section. The class of array elements must be (at
least) forward declared for WX\_DEFINE\_ARRAY, WX\_DEFINE\_SORTED\_ARRAY and
WX\_DECLARE\_OBJARRAY macros and must be fully declared before you use
WX\_DEFINE\_OBJARRAY macro.
\helpref{WX\_DEFINE\_ARRAY}{wxdefinearray}\\
\helpref{WX\_DEFINE\_EXPORTED\_ARRAY}{wxdefinearray}\\
\helpref{WX\_DEFINE\_USER\_EXPORTED\_ARRAY}{wxdefinearray}\\
\helpref{WX\_DEFINE\_SORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DEFINE\_SORTED\_EXPORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DEFINE\_SORTED\_USER\_EXPORTED\_ARRAY}{wxdefinesortedarray}\\
\helpref{WX\_DECLARE\_EXPORTED\_OBJARRAY}{wxdeclareobjarray}\\
\helpref{WX\_DECLARE\_USER\_EXPORTED\_OBJARRAY}{wxdeclareobjarray}\\
\helpref{WX\_DEFINE\_OBJARRAY}{wxdefineobjarray}\\
\helpref{WX\_DEFINE\_EXPORTED\_OBJARRAY}{wxdefineobjarray}\\
\helpref{WX\_DEFINE\_USER\_EXPORTED\_OBJARRAY}{wxdefineobjarray}
To slightly complicate the matters even further, the operator $->$ defined by
default for the array iterators by these macros only makes sense if the array
element type is not a pointer itself and, although it still works, this
provokes warnings from some compilers and to avoid them you should use the
{\tt \_PTR} versions of the macros above. For example, to define an array of
pointers to {\tt double} you should use:
\begin{verbatim}
WX_DEFINE_ARRAY_PTR(double *, MyArrayOfDoublePointers);
\end{verbatim}
Note that the above macros are generally only useful for
wxObject types. There are separate macros for declaring an array of a simple type,
such as an int.
The following simple types are supported:\\
int\\
long\\
size\_t\\
double
To create an array of a simple type, simply append the type you want in CAPS to
the array definition.
For example, for an integer array, you'd use one of the following variants:
\helpref{WX\_DEFINE\_ARRAY\_INT}{wxdefinearray}\\
\helpref{WX\_DEFINE\_EXPORTED\_ARRAY\_INT}{wxdefinearray}\\
\helpref{WX\_DEFINE\_USER\_EXPORTED\_ARRAY\_INT}{wxdefinearray}\\
\helpref{WX\_DEFINE\_SORTED\_ARRAY\_INT}{wxdefinesortedarray}\\
\helpref{WX\_DEFINE\_SORTED\_EXPORTED\_ARRAY\_INT}{wxdefinesortedarray}\\
\helpref{WX\_DEFINE\_SORTED\_USER\_EXPORTED\_ARRAY\_INT}{wxdefinesortedarray}\\
\membersection{Constructors and destructors}\label{arrayconstructorsdestructors}
Array classes are 100\% C++ objects and as such they have the appropriate copy
constructors and assignment operators. Copying wxArray just copies the elements
but copying wxObjArray copies the arrays items. However, for memory-efficiency
sake, neither of these classes has virtual destructor. It is not very important
for wxArray which has trivial destructor anyhow, but it does mean that you
should avoid deleting wxObjArray through a wxBaseArray pointer (as you would
never use wxBaseArray anyhow it shouldn't be a problem) and that you should not
derive your own classes from the array classes.
\helpref{wxArray default constructor}{wxarrayctordef}\\
\helpref{wxArray copy constructors and assignment operators}{wxarrayctorcopy}\\
\helpref{\destruct{wxArray}}{wxarraydtor}
\membersection{Memory management}\label{wxarraymemorymanagement}
Automatic array memory management is quite trivial: the array starts by
preallocating some minimal amount of memory (defined by
WX\_ARRAY\_DEFAULT\_INITIAL\_SIZE) and when further new items exhaust already
allocated memory it reallocates it adding 50\% of the currently allocated
amount, but no more than some maximal number which is defined by
ARRAY\_MAXSIZE\_INCREMENT constant. Of course, this may lead to some memory
being wasted (ARRAY\_MAXSIZE\_INCREMENT in the worst case, i.e. 4Kb in the
current implementation), so the \helpref{Shrink()}{wxarrayshrink} function is
provided to deallocate the extra memory. The \helpref{Alloc()}{wxarrayalloc}
function can also be quite useful if you know in advance how many items you are
going to put in the array and will prevent the array code from reallocating the
memory more times than needed.
\helpref{Alloc}{wxarrayalloc}\\
\helpref{Shrink}{wxarrayshrink}
\membersection{Number of elements and simple item access}\label{arrayelementsaccess}
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{GetCount}{wxarraygetcount}\\
\helpref{IsEmpty}{wxarrayisempty}\\
\helpref{Item}{wxarrayitem}\\
\helpref{Last}{wxarraylast}
\membersection{Adding items}\label{arrayadding}
\helpref{Add}{wxarrayadd}\\
\helpref{AddAt}{wxarrayaddat}\\
\helpref{Insert}{wxarrayinsert}\\
\helpref{SetCount}{wxarraysetcount}\\
\helpref{WX\_APPEND\_ARRAY}{wxappendarray}\\
\helpref{WX\_PREPEND\_ARRAY}{wxprependarray}
\membersection{Removing items}\label{arrayremoving}
\helpref{WX\_CLEAR\_ARRAY}{wxcleararray}\\
\helpref{Empty}{wxarrayempty}\\
\helpref{Clear}{wxarrayclear}\\
\helpref{RemoveAt}{wxarrayremoveat}\\
\helpref{Remove}{wxarrayremove}
\membersection{Searching and sorting}\label{arraysearchingandsorting}
\helpref{Index}{wxarrayindex}\\
\helpref{IndexForInsert}{wxarrayindexforinsert}\\
\helpref{Sort}{wxarraysort}
%%%%% MEMBERS HERE %%%%%
\helponly{\insertatlevel{2}{
\wxheading{Members}
}}
\membersection{WX\_DEFINE\_ARRAY}\label{wxdefinearray}
\func{}{WX\_DEFINE\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_USER\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}, \param{}{exportspec}}
This macro defines a new array class named {\it name} and containing the
elements of type {\it T}. The second form is used when compiling wxWidgets as
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
\begin{verbatim}
WX_DEFINE_ARRAY_INT(int, MyArrayInt);
class MyClass;
WX_DEFINE_ARRAY(MyClass *, ArrayOfMyClass);
\end{verbatim}
Note that wxWidgets predefines the following standard array classes: {\bf wxArrayInt},
{\bf wxArrayLong}, {\bf wxArrayShort}, {\bf wxArrayDouble}, {\bf wxArrayPtrVoid}.
\membersection{WX\_DEFINE\_SORTED\_ARRAY}\label{wxdefinesortedarray}
\func{}{WX\_DEFINE\_SORTED\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_SORTED\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DEFINE\_SORTED\_USER\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}}
This macro defines a new sorted array class named {\it name} and containing
the elements of type {\it T}. The second form is used when compiling wxWidgets as
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
\begin{verbatim}
WX_DEFINE_SORTED_ARRAY_INT(int, MySortedArrayInt);
class MyClass;
WX_DEFINE_SORTED_ARRAY(MyClass *, ArrayOfMyClass);
\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;
}
MySortedArrayInt sorted(CompareInts);
int CompareMyClassObjects(MyClass *item1, MyClass *item2)
{
// sort the items by their address...
return Stricmp(item1->GetAddress(), item2->GetAddress());
}
ArrayOfMyClass another(CompareMyClassObjects);
\end{verbatim}
\membersection{WX\_DECLARE\_OBJARRAY}\label{wxdeclareobjarray}
\func{}{WX\_DECLARE\_OBJARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DECLARE\_EXPORTED\_OBJARRAY}{\param{}{T}, \param{}{name}}
\func{}{WX\_DECLARE\_USER\_EXPORTED\_OBJARRAY}{\param{}{T}, \param{}{name}}
This macro declares a new object array class named {\it name} and containing
the elements of type {\it T}. The second form is used when compiling wxWidgets as
a DLL under Windows and array needs to be visible outside the DLL. The third is
needed for exporting an array from a user DLL.
Example:
\begin{verbatim}
class MyClass;
WX_DECLARE_OBJARRAY(MyClass, wxArrayOfMyClass); // note: not "MyClass *"!
\end{verbatim}
You must use \helpref{WX\_DEFINE\_OBJARRAY()}{wxdefineobjarray} macro to define
the array class - otherwise you would get link errors.
\membersection{WX\_DEFINE\_OBJARRAY}\label{wxdefineobjarray}
\func{}{WX\_DEFINE\_OBJARRAY}{\param{}{name}}
\func{}{WX\_DEFINE\_EXPORTED\_OBJARRAY}{\param{}{name}}
\func{}{WX\_DEFINE\_USER\_EXPORTED\_OBJARRAY}{\param{}{name}}
This macro defines the methods of the array class {\it name} not defined by the
\helpref{WX\_DECLARE\_OBJARRAY()}{wxdeclareobjarray} macro. You must include the
file <wx/arrimpl.cpp> before using this macro and you must have the full
declaration of the class of array elements in scope! If you forget to do the
first, the error will be caught by the compiler, but, unfortunately, many
compilers will not give any warnings if you forget to do the second - but the
objects of the class will not be copied correctly and their real destructor will
not be called. The latter two forms are merely aliases of the first to satisfy
some people's sense of symmetry when using the exported declarations.
Example of usage:
\begin{verbatim}
// first declare the class!
class MyClass
{
public:
MyClass(const MyClass&);
...
virtual ~MyClass();
};
#include <wx/arrimpl.cpp>
WX_DEFINE_OBJARRAY(wxArrayOfMyClass);
\end{verbatim}
\membersection{WX\_APPEND\_ARRAY}\label{wxappendarray}
\func{void}{WX\_APPEND\_ARRAY}{\param{wxArray\& }{array}, \param{wxArray\& }{other}}
This macro may be used to append all elements of the {\it other} array to the
{\it array}. The two arrays must be of the same type.
\membersection{WX\_PREPEND\_ARRAY}\label{wxprependarray}
\func{void}{WX\_PREPEND\_ARRAY}{\param{wxArray\& }{array}, \param{wxArray\& }{other}}
This macro may be used to prepend all elements of the {\it other} array to the
{\it array}. The two arrays must be of the same type.
\membersection{WX\_CLEAR\_ARRAY}\label{wxcleararray}
\func{void}{WX\_CLEAR\_ARRAY}{\param{wxArray\& }{array}}
This macro may be used to delete all elements of the array before emptying it.
It can not be used with wxObjArrays - but they will delete their elements anyhow
when you call Empty().
\membersection{Default constructors}\label{wxarrayctordef}
\func{}{wxArray}{\void}
\func{}{wxObjArray}{\void}
Default constructor initializes an empty array object.
\func{}{wxSortedArray}{\param{int (*)(T first, T second)}{compareFunction}}
There is no default constructor for wxSortedArray classes - you must initialize it
with a function to use for item comparison. It is a function which is passed
two arguments of type {\it T} where {\it T} is the array element type and which
should return a negative, zero or positive value according to whether the first
element passed to it is less than, equal to or greater than the second one.
\membersection{wxArray copy constructor and assignment operator}\label{wxarrayctorcopy}
\func{}{wxArray}{\param{const wxArray\& }{array}}
\func{}{wxSortedArray}{\param{const wxSortedArray\& }{array}}
\func{}{wxObjArray}{\param{const wxObjArray\& }{array}}
\func{wxArray\&}{operator$=$}{\param{const wxArray\& }{array}}
\func{wxSortedArray\&}{operator$=$}{\param{const wxSortedArray\& }{array}}
\func{wxObjArray\&}{operator$=$}{\param{const wxObjArray\& }{array}}
The copy constructors and assignment operators perform a shallow array copy
(i.e. they don't copy the objects pointed to even if the source array contains
the items of pointer type) for wxArray and wxSortedArray and a deep copy (i.e.
the array element are copied too) for wxObjArray.
\membersection{wxArray::\destruct{wxArray}}\label{wxarraydtor}
\func{}{\destruct{wxArray}}{\void}
\func{}{\destruct{wxSortedArray}}{\void}
\func{}{\destruct{wxObjArray}}{\void}
The wxObjArray destructor deletes all the items owned by the array. This is not
done by wxArray and wxSortedArray versions - you may use
\helpref{WX\_CLEAR\_ARRAY}{wxcleararray} macro for this.
\membersection{wxArray::Add}\label{wxarrayadd}
\func{void}{Add}{\param{T }{item}, \param{size\_t}{ copies = $1$}}
\func{size\_t}{Add}{\param{T }{item}}
\func{void}{Add}{\param{T *}{item}}
\func{void}{Add}{\param{T \&}{item}, \param{size\_t}{ copies = $1$}}
Appends the given number of {\it copies} of the {\it item} to the array
consisting of the elements of type {\it T}.
The first version is used with wxArray. The second is used with wxSortedArray,
returning the index where {\it item} is stored. The third and the
fourth ones are used with wxObjArray. There is an important difference between
them: if you give a pointer to the array, it will take ownership of it, i.e.
will delete it when the item is deleted from the array. If you give a reference
to the array, however, the array will make a copy of the item and will not take
ownership of the original item. Once again, it only makes sense for wxObjArrays
because the other array types never take ownership of their elements. Also note
that you cannot append more than one pointer as reusing it would lead to
deleting it twice (or more) and hence to a crash.
You may also use \helpref{WX\_APPEND\_ARRAY}{wxappendarray} macro to append all
elements of one array to another one but it is more efficient to use
{\it copies} parameter and modify the elements in place later if you plan to
append a lot of items.
\membersection{wxSortedArray::AddAt}\label{wxarrayaddat}
\func{void}{AddAt}{\param{T }{item}, \param{size\_t}{ index}}
Inserts the given {\it item} into the array in the specified {\it index}
position.
Be aware that you will set out the order of the array if you give a wrong
position.
This function is useful in conjunction with
\helpref{IndexForInsert}{wxarrayindexforinsert} for a common operation
of "insert only if not found".
\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. In any case,
the existing contents of the array is not modified.
\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{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}
\constfunc{int}{Index}{\param{T\& }{item}, \param{bool }{searchFromEnd = false}}
\constfunc{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. {\tt 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{wxSortedArray::IndexForInsert}\label{wxarrayindexforinsert}
\constfunc{size\_t}{IndexForInsert}{\param{T }{item}}
Search for a place to insert {\it item} into the sorted array (binary search).
The index returned is just before the first existing item that is greater or equal
(according to the compare function) to the given {\it item}.
You have to do extra work to know if the {\it item} already exists in array.
This function is useful in conjunction with
\helpref{AddAt}{wxarrayaddat} for a common operation
of "insert only if not found".
\membersection{wxArray::Insert}\label{wxarrayinsert}
\func{void}{Insert}{\param{T }{item}, \param{size\_t }{n}, \param{size\_t }{copies = $1$}}
\func{void}{Insert}{\param{T *}{item}, \param{size\_t }{n}}
\func{void}{Insert}{\param{T \&}{item}, \param{size\_t }{n}, \param{size\_t }{copies = $1$}}
Insert the given number of {\it copies} of the {\it item} into the array before
the existing item {\it n} - thus, {\it Insert(something, 0u)} will insert an
item in such way that it will become the first array element.
wxSortedArray doesn't have this function because inserting in wrong place
would break its sorted condition.
Please see \helpref{Add()}{wxarrayadd} for explanation of the differences
between the overloaded versions of this function.
\membersection{wxArray::IsEmpty}\label{wxarrayisempty}
\constfunc{bool}{IsEmpty}{\void}
Returns true if the array is empty, false otherwise.
\membersection{wxArray::Item}\label{wxarrayitem}
\constfunc{T\&}{Item}{\param{size\_t }{index}}
Returns the item at the given position in the array. If {\it index} is out of
bounds, an assert failure is raised in the debug builds but nothing special is
done in the release build.
The returned value is of type "reference to the array element type" for all of
the array classes.
\membersection{wxArray::Last}\label{wxarraylast}
\constfunc{T\&}{Last}{\void}
Returns the last element in the array, i.e. is the same as Item(GetCount() - 1).
An assert failure is raised in the debug mode if the array is empty.
The returned value is of type "reference to the array element type" for all of
the array classes.
\membersection{wxArray::Remove}\label{wxarrayremove}
\func{\void}{Remove}{\param{T }{item}}
Removes an element from the array by value: the first item of the
array equal to {\it item} is removed, an assert failure will result from an
attempt to remove an item which doesn't exist in the array.
When an element is removed from wxObjArray it is deleted by the array - use
\helpref{Detach()}{wxobjarraydetach} if you don't want this to happen. On the
other hand, when an object is removed from a wxArray nothing happens - you
should delete it manually if required:
\begin{verbatim}
T *item = array[n];
delete item;
array.Remove(n)
\end{verbatim}
See also \helpref{WX\_CLEAR\_ARRAY}{wxcleararray} macro which deletes all
elements of a wxArray (supposed to contain pointers).
\membersection{wxArray::RemoveAt}\label{wxarrayremoveat}
\func{\void}{RemoveAt}{\param{size\_t }{index}, \param{size\_t }{count = $1$}}
Removes {\it count} elements starting at {\it index} from the array. When an
element is removed from wxObjArray it is deleted by the array - use
\helpref{Detach()}{wxobjarraydetach} if you don't want this to happen. On
the other hand, when an object is removed from a wxArray nothing happens -
you should delete it manually if required:
\begin{verbatim}
T *item = array[n];
delete item;
array.RemoveAt(n)
\end{verbatim}
See also \helpref{WX\_CLEAR\_ARRAY}{wxcleararray} macro which deletes all
elements of a wxArray (supposed to contain pointers).
\membersection{wxArray::SetCount}\label{wxarraysetcount}
\func{void}{SetCount}{\param{size\_t }{count}, \param{T }{defval = T($0$)}}
This function ensures that the number of array elements is at least
{\it count}. If the array has already {\it count} or more items, nothing is
done. Otherwise, {\tt count - GetCount()} elements are added and initialized to
the value {\it defval}.
\wxheading{See also}
\helpref{GetCount}{wxarraygetcount}
\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,296 +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 wxChar *}
pointer the memory it was using can be freed immediately after this). In
general, there is no need to worry about string memory deallocation when using
this class - it will always free the memory it uses itself.
The references returned by \helpref{Item}{wxarraystringitem},
\helpref{Last}{wxarraystringlast} or
\helpref{operator[]}{wxarraystringoperatorindex} are not constant, so the
array elements may be modified in place like this
\begin{verbatim}
array.Last().MakeUpper();
\end{verbatim}
There is also a variant of wxArrayString called wxSortedArrayString which has
exactly the same methods as wxArrayString, but which always keeps the string
in it in (alphabetical) order. wxSortedArrayString uses binary search in its
\helpref{Index}{wxarraystringindex} function (instead of linear search for
wxArrayString::Index) which makes it much more efficient if you add strings to
the array rarely (because, of course, you have to pay for Index() efficiency
by having Add() be slower) but search for them often. Several methods should
not be used with sorted array (basically, all which break the order of items)
which is mentioned in their description.
Final word: none of the methods of wxArrayString is virtual including its
destructor, so this class should not be used as a base class.
\wxheading{Derived from}
Although this is not true strictly speaking, this class may be considered as a
specialization of \helpref{wxArray}{wxarray} class for the wxString member
data: it is not implemented like this, but it does have all of the wxArray
functions.
\wxheading{Include files}
<wx/arrstr.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\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}
Default constructor.
\func{}{wxArrayString}{\param{const wxArrayString\&}{ array}}
Copy constructor. Note that when an array is assigned to a sorted array, its contents is
automatically sorted during construction.
\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const char**}{ arr}}
\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const wchar\_t**}{ arr}}
Constructor from a C string array. Pass a size {\it sz} and array {\it arr}.
\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const wxString*}{ arr}}
Constructor from a wxString array. Pass a size {\it sz} and array {\it arr}.
\membersection{wxArrayString::\destruct{wxArrayString}}\label{wxarraystringdtor}
\func{}{\destruct{wxArrayString}}{}
Destructor frees memory occupied by the array strings. For the performance
reasons it is not virtual, so this class should not be derived from.
\membersection{wxArrayString::operator=}\label{wxarraystringoperatorassign}
\func{wxArrayString \&}{operator $=$}{\param{const wxArrayString\&}{ array}}
Assignment operator.
\membersection{wxArrayString::operator==}\label{wxarraystringoperatorequal}
\constfunc{bool}{operator $==$}{\param{const wxArrayString\&}{ array}}
Compares 2 arrays respecting the case. Returns true only if the arrays have
the same number of elements and the same strings in the same order.
\membersection{wxArrayString::operator!=}\label{wxarraystringoperatornotequal}
\constfunc{bool}{operator $!=$}{\param{const wxArrayString\&}{ array}}
Compares 2 arrays respecting the case. Returns true if the arrays have
different number of elements or if the elements don't match pairwise.
\membersection{wxArrayString::operator[]}\label{wxarraystringoperatorindex}
\func{wxString\&}{operator[]}{\param{size\_t }{nIndex}}
Return the array element at position {\it nIndex}. An assert failure will
result from an attempt to access an element beyond the end of array in debug
mode, but no check is done in release mode.
This is the operator version of \helpref{Item}{wxarraystringitem} method.
\membersection{wxArrayString::Add}\label{wxarraystringadd}
\func{size\_t}{Add}{\param{const wxString\& }{str}, \param{size\_t}{ copies = $1$}}
Appends the given number of {\it copies} of the new item {\it str} to the
array and returns the index of the first new item in the array.
{\bf Warning:} For sorted arrays, the index of the inserted item will not be,
in general, equal to \helpref{GetCount()}{wxarraystringgetcount} - 1 because
the item is inserted at the correct position to keep the array sorted and not
appended.
See also: \helpref{Insert}{wxarraystringinsert}
\membersection{wxArrayString::Alloc}\label{wxarraystringalloc}
\func{void}{Alloc}{\param{size\_t }{nCount}}
Preallocates enough memory to store {\it nCount} items. This function may be
used to improve array class performance before adding a known number of items
consecutively.
See also: \helpref{Dynamic array memory management}{wxarraymemorymanagement}
\membersection{wxArrayString::Clear}\label{wxarraystringclear}
\func{void}{Clear}{\void}
Clears the array contents and frees memory.
See also: \helpref{Empty}{wxarraystringempty}
\membersection{wxArrayString::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 wxString\& }{ 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 {\tt wxNOT\_FOUND} if there is no match.
\membersection{wxArrayString::Insert}\label{wxarraystringinsert}
\func{void}{Insert}{\param{const wxString\& }{str}, \param{size\_t}{ nIndex}, \param{size\_t }{copies = $1$}}
Insert the given number of {\it copies} of the new element in the array before the position {\it nIndex}. Thus, for
example, to insert the string in the beginning of the array you would write
\begin{verbatim}
Insert("foo", 0);
\end{verbatim}
If {\it nIndex} is equal to {\it GetCount()} this function behaves as
\helpref{Add}{wxarraystringadd}.
{\bf Warning:} this function should not be used with sorted arrays because it
could break the order of items and, for example, subsequent calls to
\helpref{Index()}{wxarraystringindex} would then not work!
\membersection{wxArrayString::IsEmpty}\label{wxarraystringisempty}
\func{bool}{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{wxString&}{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 wxString\&}{ 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}
\membersection{wxArrayString::RemoveAt}\label{wxarraystringremoveat}
\func{void}{RemoveAt}{\param{size\_t }{nIndex}, \param{size\_t }{count = $1$}}
Removes {\it count} items starting at position {\it nIndex} from the array.
\membersection{wxArrayString::Shrink}\label{wxarraystringshrink}
\func{void}{Shrink}{\void}
Releases the extra memory allocated by the array. This function is useful to
minimize the array memory consumption.
See also: \helpref{Alloc}{wxarraystringalloc}, \helpref{Dynamic array memory management}{wxarraymemorymanagement}
\membersection{wxArrayString::Sort}\label{wxarraystringsort}
\func{void}{Sort}{\param{bool}{ reverseOrder = false}}
Sorts the array in alphabetical order or in reverse alphabetical order if
{\it reverseOrder} is true. The sort is case-sensitive.
{\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,307 +0,0 @@
%
% automatically generated by HelpGen $Revision$ from
% artprov.h at 08/Apr/02 17:44:57
%
\section{\class{wxArtProvider}}\label{wxartprovider}
wxArtProvider class is used to customize the look of wxWidgets application.
When wxWidgets needs to display an icon or a bitmap (e.g. in the standard file
dialog), it does not use a hard-coded resource but asks wxArtProvider for it
instead. This way users can plug in their own wxArtProvider class and easily
replace standard art with their own version. All
that is needed is to derive a class from wxArtProvider, override either its
\helpref{CreateBitmap}{wxartprovidercreatebitmap} and/or its
\helpref{CreateIconBundle}{wxartprovidercreateiconbundle} methods
and register the provider with
\helpref{wxArtProvider::Push}{wxartproviderpush}:
\begin{verbatim}
class MyProvider : public wxArtProvider
{
protected:
wxBitmap CreateBitmap(const wxArtID& id,
const wxArtClient& client,
const wxSize size)
// optionally override this one as well
wxIconBundle CreateIconBundle(const wxArtID& id,
const wxArtClient& client)
{ ... }
};
...
wxArtProvider::Push(new MyProvider);
\end{verbatim}
If you need bitmap images (of the same artwork) that should be displayed at different sizes
you should probably consider overriding \helpref{CreateIconBundle()}{wxartprovidercreateiconbundle}
and supplying icon bundles that contain different bitmap sizes.
There's another way of taking advantage of this class: you can use it in your code and use
platform native icons as provided by \helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap} or
\helpref{wxArtProvider::GetIcon}{wxartprovidergeticon} (NB: this is not yet really
possible as of wxWidgets 2.3.3, the set of wxArtProvider bitmaps is too
small).
\membersection{Identifying art resources}\label{artprovideridentifying}
Every bitmap and icon bundle are known to wxArtProvider under an unique ID that is used when
requesting a resource from it. The ID is represented by wxArtID type and can
have one of these predefined values (you can see bitmaps represented by these
constants in the \helpref{artprov}{sampleartprovider} sample):
\begin{itemize}\itemsep=0pt
\item wxART\_ERROR
\item wxART\_QUESTION
\item wxART\_WARNING
\item wxART\_INFORMATION
\item wxART\_ADD\_BOOKMARK
\item wxART\_DEL\_BOOKMARK
\item wxART\_HELP\_SIDE\_PANEL
\item wxART\_HELP\_SETTINGS
\item wxART\_HELP\_BOOK
\item wxART\_HELP\_FOLDER
\item wxART\_HELP\_PAGE
\item wxART\_GO\_BACK
\item wxART\_GO\_FORWARD
\item wxART\_GO\_UP
\item wxART\_GO\_DOWN
\item wxART\_GO\_TO\_PARENT
\item wxART\_GO\_HOME
\item wxART\_PRINT
\item wxART\_HELP
\item wxART\_TIP
\item wxART\_REPORT\_VIEW
\item wxART\_LIST\_VIEW
\item wxART\_NEW\_DIR
\item wxART\_FOLDER
\item wxART\_FOLDER\_OPEN
\item wxART\_GO\_DIR\_UP
\item wxART\_EXECUTABLE\_FILE
\item wxART\_NORMAL\_FILE
\item wxART\_TICK\_MARK
\item wxART\_CROSS\_MARK
\item wxART\_MISSING\_IMAGE
\item wxART\_NEW
\item wxART\_FILE\_OPEN
\item wxART\_FILE\_SAVE
\item wxART\_FILE\_SAVE\_AS
\item wxART\_DELETE
\item wxART\_COPY
\item wxART\_CUT
\item wxART\_PASTE
\item wxART\_UNDO
\item wxART\_REDO
\item wxART\_QUIT
\item wxART\_FIND
\item wxART\_FIND\_AND\_REPLACE
\item wxART\_HARDDISK
\item wxART\_FLOPPY
\item wxART\_CDROM
\item wxART\_REMOVABLE
\end{itemize}
Additionally, any string recognized by custom art providers registered using
\helpref{Push}{wxartproviderpush} may be used.
\wxheading{GTK+ Note}
When running under GTK+ 2, GTK+ stock item IDs (e.g. {\tt "gtk-cdrom"}) may
be used as well. Additionally, if wxGTK was compiled against GTK+ >= 2.4, then
it is also possible to load icons from current icon theme by specifying their
name (without extension and directory components). Icon themes recognized
by GTK+ follow the
\urlref{freedesktop.org Icon Themes specification}{http://freedesktop.org/Standards/icon-theme-spec}. Note that themes are not guaranteed to contain all
icons, so wxArtProvider may return {\tt wxNullBitmap} or {\tt wxNullIcon}.
Default theme is typically installed in {\tt /usr/share/icons/hicolor}.
\membersection{Clients}\label{artproviderclients}
Client is the entity that calls wxArtProvider's GetBitmap or GetIcon
function. It is represented by wxClientID type and can have one of these
values:
\begin{itemize}\itemsep=0pt
\item wxART\_TOOLBAR
\item wxART\_MENU
\item wxART\_BUTTON
\item wxART\_FRAME\_ICON
\item wxART\_CMN\_DIALOG
\item wxART\_HELP\_BROWSER
\item wxART\_MESSAGE\_BOX
\item wxART\_OTHER (used for all requests that don't fit into any of the categories above)
\end{itemize}
Client ID servers as a hint to wxArtProvider that is supposed to help it to
choose the best looking bitmap. For example it is often desirable to use
slightly different icons in menus and toolbars even though they represent the
same action (e.g. {\tt wx\_ART\_FILE\_OPEN}). Remember that this is really
only a hint for wxArtProvider -- it is common that
\helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap}
returns identical bitmap for different {\it client} values!
\wxheading{See also}
See the \helpref{artprov}{sampleartprovider} sample for an example of wxArtProvider usage.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/artprov.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxArtProvider::\destruct{wxArtProvider}}\label{wxartproviderdtor}
\func{}{\destruct{wxArtProvider}}{\void}
The destructor automatically removes the provider from the provider stack used
by \helpref{GetBitmap}{wxartprovidergetbitmap}.
\membersection{wxArtProvider::CreateBitmap}\label{wxartprovidercreatebitmap}
\func{wxBitmap}{CreateBitmap}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client}, \param{const wxSize\& }{size}}
Derived art provider classes must override this method to create requested art
resource. Note that returned bitmaps are cached by wxArtProvider and it is
therefore not necessary to optimize CreateBitmap() for speed (e.g. you may
create wxBitmap objects from XPMs here).
\wxheading{Parameters}
\docparam{id}{wxArtID unique identifier of the bitmap.}
\docparam{client}{wxArtClient identifier of the client (i.e. who is asking for the bitmap).
This only servers as a hint.}
\docparam{size}{Preferred size of the bitmap. The function may return a bitmap of different
dimensions, it will be automatically rescaled to meet client's request.}
\wxheading{Note}
This is {\bf not} part of wxArtProvider's public API, use
\helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap} or
\helpref{wxArtProvider::GetIconBundle}{wxartprovidergeticonbundle} or
\helpref{wxArtProvider::GetIcon}{wxartprovidergeticon}
to query wxArtProvider for a resource.
\wxheading{See also}
\helpref{CreateIconBundle}{wxartprovidercreateiconbundle}
\membersection{wxArtProvider::CreateIconBundle}\label{wxartprovidercreateiconbundle}
\func{wxIconBundle}{CreateIconBundle}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client}}
This method is similar to \helpref{CreateBitmap}{wxartprovidercreatebitmap} but
can be used when a bitmap (or an icon) exists in several sizes.
\membersection{wxArtProvider::Delete}\label{wxartproviderdelete}
\func{static bool}{Delete}{\param{wxArtProvider* }{provider}}
Delete the given \arg{provider}.
\membersection{wxArtProvider::GetBitmap}\label{wxartprovidergetbitmap}
\func{static wxBitmap}{GetBitmap}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client = wxART\_OTHER}, \param{const wxSize\& }{size = wxDefaultSize}}
Query registered providers for bitmap with given ID.
\wxheading{Parameters}
\docparam{id}{wxArtID unique identifier of the bitmap.}
\docparam{client}{wxArtClient identifier of the client (i.e. who is asking for the bitmap).}
\docparam{size}{Size of the returned bitmap or {\tt wxDefaultSize} if size doesn't matter.}
\wxheading{Return value}
The bitmap if one of registered providers recognizes the ID or wxNullBitmap otherwise.
\membersection{wxArtProvider::GetIconBundle}\label{wxartprovidergeticonbundle}
\func{static wxIconBundle}{GetIconBundle}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client = wxART\_OTHER}}
Query registered providers for icon bundle with given ID.
\wxheading{Parameters}
\docparam{id}{wxArtID unique identifier of the icon bundle.}
\docparam{client}{wxArtClient identifier of the client (i.e. who is asking for the icon bundle).}
\wxheading{Return value}
The icon bundle if one of registered providers recognizes the ID or wxNullIconBundle otherwise.
\membersection{wxArtProvider::GetIcon}\label{wxartprovidergeticon}
\func{static wxIcon}{GetIcon}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client = wxART\_OTHER}, \param{const wxSize\& }{size = wxDefaultSize}}
Same as \helpref{wxArtProvider::GetBitmap}{wxartprovidergetbitmap}, but
return a wxIcon object (or wxNullIcon on failure).
\func{static wxSize}{GetSizeHint}{\param{const wxArtClient\& }{client}, \param{bool }{platform\_default = false}}
Returns a suitable size hint for the given {\it wxArtClient}. If
{\it platform\_default} is \true, return a size based on the current platform,
otherwise return the size from the topmost wxArtProvider. {\it wxDefaultSize} may be
returned if the client doesn't have a specified size, like wxART\_OTHER for example.
\membersection{wxArtProvider::Insert}\label{wxartproviderinsert}
\func{static void}{Insert}{\param{wxArtProvider* }{provider}}
Register new art provider and add it to the bottom of providers stack (i.e.
it will be queried as the last one).
\wxheading{See also}
\helpref{Push}{wxartproviderpush}
\membersection{wxArtProvider::Pop}\label{wxartproviderctor}
\func{static bool}{Pop}{\void}
Remove latest added provider and delete it.
\membersection{wxArtProvider::Push}\label{wxartproviderpush}
\func{static void}{Push}{\param{wxArtProvider* }{provider}}
Register new art provider and add it to the top of providers stack (i.e. it
will be queried as the first provider).
\wxheading{See also}
\helpref{Insert}{wxartproviderinsert}
\membersection{wxArtProvider::Remove}\label{wxartproviderremove}
\func{static bool}{Remove}{\param{wxArtProvider* }{provider}}
Remove a provider from the stack if it is on it. The provider is {\emph not}
deleted, unlike when using \helpref{Delete()}{wxartproviderdelete}.

View File

@@ -1,214 +0,0 @@
%
% automatically generated by HelpGen $Revision$ from
% dockart.h at 04/Nov/06 21:54:42
%
\section{\class{wxAuiDockArt}}\label{wxauidockart}
wxAuiDockArt is part of the wxAUI class framework.
See also \helpref{wxAUI overview}{wxauioverview}.
Dock art provider code - a dock provider provides all drawing
functionality to the wxAui dock manager. This allows the dock
manager to have a plugable look-and-feel.
By default, a \helpref{wxAuiManager}{wxauimanager} uses an
instance of this class called {\bf wxAuiDefaultDockArt} which
provides bitmap art and a colour scheme that is adapted to
the major platforms' look. You can either derive from that
class to alter its behaviour or write a completely new dock
art class. Call \helpref{wxAuiManager::SetArtProvider}{wxauimanagersetartprovider}
to make use this new dock art.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/aui/dockart.h>
\wxheading{Library}
\helpref{wxAui}{librarieslist}
\wxheading{See also}
\helpref{wxAuiManager}{wxauimanager},
\helpref{wxAuiPaneInfo}{wxauipaneinfo}
\wxheading{Data structures}
\begin{verbatim}
enum wxAuiPaneDockArtSetting
{
wxAUI_DOCKART_SASH_SIZE = 0,
wxAUI_DOCKART_CAPTION_SIZE = 1,
wxAUI_DOCKART_GRIPPER_SIZE = 2,
wxAUI_DOCKART_PANE_BORDER_SIZE = 3,
wxAUI_DOCKART_PANE_BUTTON_SIZE = 4,
wxAUI_DOCKART_BACKGROUND_COLOUR = 5,
wxAUI_DOCKART_SASH_COLOUR = 6,
wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR = 7,
wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR = 8,
wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR = 9,
wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR = 10,
wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR = 11,
wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR = 12,
wxAUI_DOCKART_BORDER_COLOUR = 13,
wxAUI_DOCKART_GRIPPER_COLOUR = 14,
wxAUI_DOCKART_CAPTION_FONT = 15,
wxAUI_DOCKART_GRADIENT_TYPE = 16
}
\end{verbatim}
\begin{verbatim}
enum wxAuiPaneDockArtGradients
{
wxAUI_GRADIENT_NONE = 0,
wxAUI_GRADIENT_VERTICAL = 1,
wxAUI_GRADIENT_HORIZONTAL = 2
}
\end{verbatim}
\begin{verbatim}
enum wxAuiPaneButtonState
{
wxAUI_BUTTON_STATE_NORMAL = 0,
wxAUI_BUTTON_STATE_HOVER = 1,
wxAUI_BUTTON_STATE_PRESSED = 2
}
\end{verbatim}
\begin{verbatim}
enum wxAuiButtonId
{
wxAUI_BUTTON_CLOSE = 101,
wxAUI_BUTTON_MAXIMIZE_RESTORE = 102,
wxAUI_BUTTON_MINIMIZE = 103,
wxAUI_BUTTON_PIN = 104,
wxAUI_BUTTON_OPTIONS = 105,
wxAUI_BUTTON_WINDOWLIST = 106,
wxAUI_BUTTON_LEFT = 107,
wxAUI_BUTTON_RIGHT = 108,
wxAUI_BUTTON_UP = 109,
wxAUI_BUTTON_DOWN = 110,
wxAUI_BUTTON_CUSTOM1 = 201,
wxAUI_BUTTON_CUSTOM2 = 202,
wxAUI_BUTTON_CUSTOM3 = 203
};
\end{verbatim}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAuiDockArt::wxAuiDockArt}\label{wxauidockartwxauidockart}
\func{}{wxAuiDockArt}{\void}
Constructor.
\membersection{wxAuiDockArt::\destruct{wxAuiDockArt}}\label{wxauidockartdtor}
\func{}{\destruct{wxAuiDockArt}}{\void}
Destructor.
\membersection{wxAuiDockArt::DrawBackground}\label{wxauidockartdrawbackground}
\func{virtual void}{DrawBackground}{\param{wxDC\& }{dc}, \param{wxWindow* }{window}, \param{int }{orientation}, \param{const wxRect\& }{rect}}
Draws a background.
\membersection{wxAuiDockArt::DrawBorder}\label{wxauidockartdrawborder}
\func{virtual void}{DrawBorder}{\param{wxDC\& }{dc}, \param{wxWindow* }{window}, \param{const wxRect\& }{rect}, \param{wxAuiPaneInfo\& }{pane}}
Draws a border.
\membersection{wxAuiDockArt::DrawCaption}\label{wxauidockartdrawcaption}
\func{virtual void}{DrawCaption}{\param{wxDC\& }{dc}, \param{wxWindow* }{window}, \param{const wxString\& }{text}, \param{const wxRect\& }{rect}, \param{wxAuiPaneInfo\& }{pane}}
Draws a caption.
\membersection{wxAuiDockArt::DrawGripper}\label{wxauidockartdrawgripper}
\func{virtual void}{DrawGripper}{\param{wxDC\& }{dc}, \param{wxWindow* }{window}, \param{const wxRect\& }{rect}, \param{wxAuiPaneInfo\& }{pane}}
Draws a gripper.
\membersection{wxAuiDockArt::DrawPaneButton}\label{wxauidockartdrawpanebutton}
\func{virtual void}{DrawPaneButton}{\param{wxDC\& }{dc}, \param{wxWindow* }{window}, \param{int }{button}, \param{int }{button\_state}, \param{const wxRect\& }{rect}, \param{wxAuiPaneInfo\& }{pane}}
Draws a button in the pane's title bar.
{\it button} can be one of the values of {\bf wxAuiButtonId}.
{\it button\_state} can be one of the values of {\bf wxAuiPaneButtonState}.
\membersection{wxAuiDockArt::DrawSash}\label{wxauidockartdrawsash}
\func{virtual void}{DrawSash}{\param{wxDC\& }{dc}, \param{wxWindow* }{window}, \param{int }{orientation}, \param{const wxRect\& }{rect}}
Draws a sash between two windows.
\membersection{wxAuiDockArt::GetColor}\label{wxauidockartgetcolor}
\func{virtual wxColour}{GetColor}{\param{int }{id}}
The same as \helpref{GetColour}{wxauidockartgetcolour}.
\membersection{wxAuiDockArt::GetColour}\label{wxauidockartgetcolour}
\func{virtual wxColour}{GetColour}{\param{int }{id}}
Get the colour of a certain setting.
{\it id} can be one of the colour values of {\bf wxAuiPaneDockArtSetting}.
\membersection{wxAuiDockArt::GetFont}\label{wxauidockartgetfont}
\func{virtual wxFont}{GetFont}{\param{int }{id}}
Get a font setting.
\membersection{wxAuiDockArt::GetMetric}\label{wxauidockartgetmetric}
\func{virtual int}{GetMetric}{\param{int }{id}}
Get the value of a certain setting.
{\it id} can be one of the size values of {\bf wxAuiPaneDockArtSetting}.
\membersection{wxAuiDockArt::SetColor}\label{wxauidockartsetcolor}
\func{virtual void}{SetColor}{\param{int }{id}, \param{const wxColour\& }{color}}
The same as \helpref{SetColour}{wxauidockartsetcolour}.
\membersection{wxAuiDockArt::SetColour}\label{wxauidockartsetcolour}
\func{virtual void}{SetColour}{\param{int }{id}, \param{const wxColor\& }{colour}}
Set a certain setting with the value {\it colour}.
{\it id} can be one of the colour values of {\bf wxAuiPaneDockArtSetting}.
\membersection{wxAuiDockArt::SetFont}\label{wxauidockartsetfont}
\func{virtual void}{SetFont}{\param{int }{id}, \param{const wxFont\& }{font}}
Set a font setting.
\membersection{wxAuiDockArt::SetMetric}\label{wxauidockartsetmetric}
\func{virtual void}{SetMetric}{\param{int }{id}, \param{int }{new\_val}}
Set a certain setting with the value {\it new\_val}.
{\it id} can be one of the size values of {\bf wxAuiPaneDockArtSetting}.

View File

@@ -1,324 +0,0 @@
\section{\class{wxAuiManager}}\label{wxauimanager}
wxAuiManager is the central class of the wxAUI class framework.
See also \helpref{wxAUI overview}{wxauioverview}.
wxAuiManager manages the panes associated with it
for a particular wxFrame, using a pane's wxAuiPaneInfo information to
determine each pane's docking and floating behavior. wxAuiManager
uses wxWidgets' sizer mechanism to plan the layout of each frame. It
uses a replaceable dock art class to do all drawing, so all drawing is
localized in one area, and may be customized depending on an
application's specific needs.
wxAuiManager works as follows: the programmer adds panes to the class,
or makes changes to existing pane properties (dock position, floating
state, show state, etc.). To apply these changes, wxAuiManager's
Update() function is called. This batch processing can be used to avoid
flicker, by modifying more than one pane at a time, and then "committing"
all of the changes at once by calling Update().
Panes can be added quite easily:
\begin{verbatim}
wxTextCtrl* text1 = new wxTextCtrl(this, -1);
wxTextCtrl* text2 = new wxTextCtrl(this, -1);
m_mgr.AddPane(text1, wxLEFT, wxT("Pane Caption"));
m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Caption"));
m_mgr.Update();
\end{verbatim}
Later on, the positions can be modified easily. The following will float
an existing pane in a tool window:
\begin{verbatim}
m_mgr.GetPane(text1).Float();
\end{verbatim}
\wxheading{Layers, Rows and Directions, Positions}
Inside wxAUI, the docking layout is figured out by checking several
pane parameters. Four of these are important for determining where a
pane will end up:
{\bf Direction:}
Each docked pane has a direction, Top, Bottom, Left, Right, or
Center. This is fairly self-explanatory. The pane will be placed in the
location specified by this variable.
{\bf Position:}
More than one pane can be placed inside of a dock. Imagine two panes
being docked on the left side of a window. One pane can be placed over
another. In proportionally managed docks, the pane position indicates
its sequential position, starting with zero. So, in our scenario with
two panes docked on the left side, the top pane in the dock would have
position 0, and the second one would occupy position 1.
{\bf Row:}
A row can allow for two docks to be placed next to each other. One of
the most common places for this to happen is in the toolbar. Multiple
toolbar rows are allowed, the first row being row 0, and the second
row 1. Rows can also be used on vertically docked panes.
{\bf Layer:}
A layer is akin to an onion. Layer 0 is the very center of the
managed pane. Thus, if a pane is in layer 0, it will be closest to the
center window (also sometimes known as the "content window").
Increasing layers "swallow up" all layers of a lower value. This can
look very similar to multiple rows, but is different because all panes
in a lower level yield to panes in higher levels. The best way to
understand layers is by running the wxAUI sample.
\wxheading{Derived from}
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/aui/aui.h>
\wxheading{See also}
\helpref{wxAuiPaneInfo}{wxauipaneinfo},
\helpref{wxAuiDockArt}{wxauidockart}
\wxheading{Data structures}
\begin{verbatim}
enum wxAuiManagerDock
{
wxAUI_DOCK_NONE = 0,
wxAUI_DOCK_TOP = 1,
wxAUI_DOCK_RIGHT = 2,
wxAUI_DOCK_BOTTOM = 3,
wxAUI_DOCK_LEFT = 4,
wxAUI_DOCK_CENTER = 5,
wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER
}
\end{verbatim}
\begin{verbatim}
enum wxAuiManagerOption
{
wxAUI_MGR_ALLOW_FLOATING = 1 << 0,
wxAUI_MGR_ALLOW_ACTIVE_PANE = 1 << 1,
wxAUI_MGR_TRANSPARENT_DRAG = 1 << 2,
wxAUI_MGR_TRANSPARENT_HINT = 1 << 3,
wxAUI_MGR_VENETIAN_BLINDS_HINT = 1 << 4,
wxAUI_MGR_RECTANGLE_HINT = 1 << 5,
wxAUI_MGR_HINT_FADE = 1 << 6,
wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 1 << 7,
wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING |
wxAUI_MGR_TRANSPARENT_HINT |
wxAUI_MGR_HINT_FADE |
wxAUI_MGR_NO_VENETIAN_BLINDS_FADE
}
\end{verbatim}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAuiManager::wxAuiManager}\label{wxauimanagerwxauimanager}
\func{}{wxAuiManager}{\param{wxWindow* }{managed\_wnd = NULL}, \param{unsigned int }{flags = wxAUI\_MGR\_DEFAULT}}
Constructor. \arg{managed\_wnd} specifies the wxFrame which should be managed.
\arg{flags} specifies options which allow the frame management behavior
to be modified.
\membersection{wxAuiManager::\destruct{wxAuiManager}}\label{wxauimanagerdtor}
\func{}{\destruct{wxAuiManager}}{\void}
\membersection{wxAuiManager::AddPane}\label{wxauimanageraddpane}
\func{bool}{AddPane}{\param{wxWindow* }{window}, \param{const wxAuiPaneInfo\& }{pane\_info}}
\func{bool}{AddPane}{\param{wxWindow* }{window}, \param{int }{direction = wxLEFT}, \param{const wxString\& }{caption = wxEmptyString}}
\func{bool}{AddPane}{\param{wxWindow* }{window}, \param{const wxAuiPaneInfo\& }{pane\_info}, \param{const wxPoint\& }{drop\_pos}}
AddPane() tells the frame manager to start managing a child window. There are several versions of this function. The first version allows the full spectrum of pane parameter possibilities. The second version is used for simpler user interfaces which do not require as much configuration. The last version allows a drop position to be specified, which will determine where the pane will be added.
\membersection{wxAuiManager::DetachPane}\label{wxauimanagerdetachpane}
\func{bool}{DetachPane}{\param{wxWindow* }{window}}
Tells the wxAuiManager to stop managing the pane specified by window.
The window, if in a floated frame, is reparented to the frame managed
by wxAuiManager.
\membersection{wxAuiManager::GetAllPanes}\label{wxauimanagergetallpanes}
\func{wxAuiPaneInfoArray\&}{GetAllPanes}{\void}
Returns an array of all panes managed by the frame manager.
\membersection{wxAuiManager::GetArtProvider}\label{wxauimanagergetartprovider}
\constfunc{wxAuiDockArt*}{GetArtProvider}{\void}
Returns the current art provider being used.
See also: \helpref{wxAuiDockArt}{wxauidockart}.
\membersection{wxAuiManager::GetDockSizeConstraint}\label{wxauimanagergetdocksizeconstraint}
\func{void}{GetDockSizeConstraint}{\param{double* }{widthpct}, \param{double* }{heightpct}}
Returns the current dock constraint values. See \helpref{SetDockSizeConstraint()}{wxauimanagersetdocksizeconstraint} for more information.
\membersection{wxAuiManager::GetFlags}\label{wxauimanagergetflags}
\constfunc{unsigned int}{GetFlags}{\void}
Returns the current manager's flags.
\membersection{wxAuiManager::GetManagedWindow}\label{wxauimanagergetmanagedwindow}
\constfunc{wxWindow*}{GetManagedWindow}{\void}
Returns the frame currently being managed by wxAuiManager.
\membersection{wxAuiManager::GetManager}\label{wxauimanagergetmanager}
\func{static wxAuiManager*}{GetManager}{\param{wxWindow* }{window}}
Calling this method will return the wxAuiManager for a given window. The \arg{window} parameter should
specify any child window or sub-child window of the frame or window managed by wxAuiManager.
The \arg{window} parameter need not be managed by the manager itself, nor does it even need to be a child
or sub-child of a managed window. It must however be inside the window hierarchy underneath the managed
window.
\membersection{wxAuiManager::GetPane}\label{wxauimanagergetpane}
\func{wxAuiPaneInfo\&}{GetPane}{\param{wxWindow* }{window}}
\func{wxAuiPaneInfo\&}{GetPane}{\param{const wxString\& }{name}}
{\it GetPane} is used to lookup a wxAuiPaneInfo object
either by window pointer or by pane name, which acts as a unique id for
a window pane. The returned wxAuiPaneInfo object may then be modified to
change a pane's look, state or position. After one or more
modifications to wxAuiPaneInfo, wxAuiManager::Update() should be called
to commit the changes to the user interface. If the lookup failed
(meaning the pane could not be found in the manager), a call to the
returned wxAuiPaneInfo's IsOk() method will return false.
\membersection{wxAuiManager::HideHint}\label{wxauimanagerhidehint}
\func{void}{HideHint}{\void}
HideHint() hides any docking hint that may be visible.
\membersection{wxAuiManager::InsertPane}\label{wxauimanagerinsertpane}
\func{bool}{InsertPane}{\param{wxWindow* }{window}, \param{const wxAuiPaneInfo\& }{insert\_location}, \param{int }{insert\_level = wxAUI\_INSERT\_PANE}}
This method is used to insert either a previously unmanaged pane window
into the frame manager, or to insert a currently managed pane somewhere
else. {\it InsertPane} will push all panes, rows, or docks aside and
insert the window into the position specified by \arg{insert\_location}.
Because \arg{insert\_location} can specify either a pane, dock row, or dock
layer, the \arg{insert\_level} parameter is used to disambiguate this. The
parameter \arg{insert\_level} can take a value of wxAUI\_INSERT\_PANE, wxAUI\_INSERT\_ROW
or wxAUI\_INSERT\_DOCK.
\membersection{wxAuiManager::LoadPaneInfo}\label{wxauimanagerloadpaneinfo}
\func{void}{LoadPaneInfo}{\param{wxString }{pane\_part}, \param{wxAuiPaneInfo\& }{pane}}
LoadPaneInfo() is similar to to LoadPerspective, with the exception that it only loads information about a single pane. It is used in combination with SavePaneInfo().
\membersection{wxAuiManager::LoadPerspective}\label{wxauimanagerloadperspective}
\func{bool}{LoadPerspective}{\param{const wxString\& }{perspective}, \param{bool }{update = true}}
Loads a saved perspective. If update is true, wxAuiManager::Update()
is automatically invoked, thus realizing the saved perspective on screen.
\membersection{wxAuiManager::ProcessDockResult}\label{wxauimanagerprocessdockresult}
\func{bool}{ProcessDockResult}{\param{wxAuiPaneInfo\& }{target}, \param{const wxAuiPaneInfo\& }{new\_pos}}
ProcessDockResult() is a protected member of the wxAUI layout manager. It can be overridden by derived classes to provide custom docking calculations.
\membersection{wxAuiManager::SavePaneInfo}\label{wxauimanagersavepaneinfo}
\func{wxString}{SavePaneInfo}{\param{wxAuiPaneInfo\& }{pane}}
SavePaneInfo() is similar to SavePerspective, with the exception that it only saves information about a single pane. It is used in combination with LoadPaneInfo().
\membersection{wxAuiManager::SavePerspective}\label{wxauimanagersaveperspective}
\func{wxString}{SavePerspective}{\void}
Saves the entire user interface layout into an encoded wxString, which
can then be stored by the application (probably using wxConfig). When
a perspective is restored using LoadPerspective(), the entire user
interface will return to the state it was when the perspective was saved.
\membersection{wxAuiManager::SetArtProvider}\label{wxauimanagersetartprovider}
\func{void}{SetArtProvider}{\param{wxAuiDockArt* }{art\_provider}}
Instructs wxAuiManager to use art provider specified by parameter
\arg{art\_provider} for all drawing calls. This allows plugable
look-and-feel features. The previous art provider object, if any,
will be deleted by wxAuiManager.
See also: \helpref{wxAuiDockArt}{wxauidockart}.
\membersection{wxAuiManager::SetDockSizeConstraint}\label{wxauimanagersetdocksizeconstraint}
\func{void}{SetDockSizeConstraint}{\param{double }{widthpct}, \param{double }{heightpct}}
When a user creates a new dock by dragging a window into a docked position, often times the large size of the
window will create a dock that is unwieldly large. wxAuiManager by default limits the size of any
new dock to 1/3 of the window size. For horizontal docks, this would be 1/3 of the window height. For
vertical docks, 1/3 of the width. Calling this function will adjust this constraint value. The numbers
must be between 0.0 and 1.0. For instance, calling SetDockSizeContraint with 0.5, 0.5 will cause new
docks to be limited to half of the size of the entire managed window.
\membersection{wxAuiManager::SetFlags}\label{wxauimanagersetflags}
\func{void}{SetFlags}{\param{unsigned int }{flags}}
This method is used to specify wxAuiManager's settings flags. \arg{flags}
specifies options which allow the frame management behavior to be modified.
\membersection{wxAuiManager::SetManagedWindow}\label{wxauimanagersetmanagedwindow}
\func{void}{SetManagedWindow}{\param{wxWindow* }{managed\_wnd}}
Called to specify the frame or window which is to be managed by wxAuiManager. Frame management is not restricted to just frames. Child windows or custom controls are also allowed.
\membersection{wxAuiManager::ShowHint}\label{wxauimanagershowhint}
\func{void}{ShowHint}{\param{const wxRect\& }{rect}}
This function is used by controls to explicitly show a hint window at the specified rectangle. It is rarely called, and is mostly used by controls implementing custom pane drag/drop behaviour. The specified rectangle should be in screen coordinates.
\membersection{wxAuiManager::UnInit}\label{wxauimanageruninit}
\func{void}{UnInit}{\void}
Uninitializes the framework and should be called before a managed frame or window is destroyed. UnInit() is usually called in the managed wxFrame's destructor. It is necessary to call this function before the managed frame or window is destroyed, otherwise the manager cannot remove its custom event handlers from a window.
\membersection{wxAuiManager::Update}\label{wxauimanagerupdate}
\func{void}{Update}{\void}
This method is called after any number of changes are
made to any of the managed panes. Update() must be invoked after
AddPane() or InsertPane() are called in order to "realize" or "commit"
the changes. In addition, any number of changes may be made to
wxAuiPaneInfo structures (retrieved with wxAuiManager::GetPane), but to
realize the changes, Update() must be called. This construction allows
pane flicker to be avoided by updating the whole layout at one time.

View File

@@ -1,243 +0,0 @@
%
% automatically generated by HelpGen $Revision$ from
% auibook.h at 11/Nov/06 22:56:01
%
\section{\class{wxAuiNotebook}}\label{wxauinotebook}
wxAuiNotebook is part of the wxAUI class framework.
See also \helpref{wxAUI overview}{wxauioverview}.
wxAuiNotebook is a notebook control which implements many features common in applications with dockable panes.
Specifically, wxAuiNotebook implements functionality which allows the user to rearrange tab order via drag-and-drop,
split the tab window into many different splitter configurations, and toggle through different themes to customize
the control's look and feel.
An effort has been made to try to maintain an API as similar to that of wxNotebook.
The default theme that is used is wxAuiDefaultTabArt, which provides a modern, glossy look and feel.
The theme can be changed by calling \helpref{wxAuiNotebook::SetArtProvider}{wxauinotebooksetartprovider}.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/aui/auibook.h>
\wxheading{Library}
\helpref{wxAui}{librarieslist}
\wxheading{Window styles}
\twocolwidtha{5cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxAUI\_NB\_DEFAULT\_STYLE}}{Defined as wxAUI\_NB\_TOP | wxAUI\_NB\_TAB\_SPLIT | wxAUI\_NB\_TAB\_MOVE | wxAUI\_NB\_SCROLL\_BUTTONS | wxAUI\_NB\_CLOSE\_ON\_ACTIVE\_TAB.}
\twocolitem{\windowstyle{wxAUI\_NB\_TAB\_SPLIT}}{Allows the tab control to be split by dragging a tab.}
\twocolitem{\windowstyle{wxAUI\_NB\_TAB\_MOVE}}{Allows a tab to be moved horizontally by dragging.}
\twocolitem{\windowstyle{wxAUI\_NB\_TAB\_EXTERNAL\_MOVE}}{Allows a tab to be moved to another tab control.}
\twocolitem{\windowstyle{wxAUI\_NB\_TAB\_FIXED\_WIDTH}}{With this style, all tabs have the same width.}
\twocolitem{\windowstyle{wxAUI\_NB\_SCROLL\_BUTTONS}}{With this style, left and right scroll buttons are displayed.}
\twocolitem{\windowstyle{wxAUI\_NB\_WINDOWLIST\_BUTTON}}{With this style, a drop-down list of windows is available.}
\twocolitem{\windowstyle{wxAUI\_NB\_CLOSE\_BUTTON}}{With this style, a close button is available on the tab bar.}
\twocolitem{\windowstyle{wxAUI\_NB\_CLOSE\_ON\_ACTIVE\_TAB}}{With this style, the close button is visible on the active tab.}
\twocolitem{\windowstyle{wxAUI\_NB\_CLOSE\_ON\_ALL\_TABS}}{With this style, the close button is visible on all tabs.}
\twocolitem{\windowstyle{wxAUI\_NB\_TOP}}{With this style, tabs are drawn along the top of the notebook.}
\twocolitem{\windowstyle{wxAUI\_NB\_BOTTOM}}{With this style, tabs are drawn along the bottom of the notebook.}
\end{twocollist}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAuiNotebook::wxAuiNotebook}\label{wxauinotebookwxauinotebook}
\func{}{wxAuiNotebook}{\void}
\func{}{wxAuiNotebook}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxAUI\_NB\_DEFAULT\_STYLE}}
Constructor. Creates a wxAuiNotebok control.
\membersection{wxAuiNotebook::AddPage}\label{wxauinotebookaddpage}
\func{bool}{AddPage}{\param{wxWindow* }{page}, \param{const wxString\& }{caption}, \param{bool }{select = false}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
Adds a page. If the {\it select} parameter is true, calling this will generate a page change event.
\membersection{wxAuiNotebook::AdvanceSelection}\label{wxauinotebookadvanceselection}
\func{void}{AdvanceSelection}{\param{bool }{forward = true}}
Sets the selection to the next or previous page.
\membersection{wxAuiNotebook::Create}\label{wxauinotebookcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}}
Creates the notebook window.
\membersection{wxAuiNotebook::DeletePage}\label{wxauinotebookdeletepage}
\func{bool}{DeletePage}{\param{size\_t }{page}}
Deletes a page at the given index. Calling this method will generate a page change event.
\membersection{wxAuiNotebook::GetArtProvider}\label{wxauinotebookgetartprovider}
\constfunc{wxAuiTabArt*}{GetArtProvider}{\void}
Returns the associated art provider.
\membersection{wxAuiNotebook::GetHeightForPageHeight}\label{wxauinotebookgetheightforpageheight}
\func{int}{GetHeightForPageHeight}{\param{int }{pageHeight}}
Returns the desired height of the notebook for the given page height. Use this to fit the notebook to
a given page size.
\membersection{wxAuiNotebook::GetPage}\label{wxauinotebookgetpage}
\constfunc{wxWindow*}{GetPage}{\param{size\_t }{page\_idx}}
Returns the page specified by the given index.
\membersection{wxAuiNotebook::GetPageBitmap}\label{wxauinotebookgetpagebitmap}
\constfunc{wxBitmap}{GetPageBitmap}{\param{size\_t }{page}}
Returns the tab bitmap for the page.
\membersection{wxAuiNotebook::GetPageCount}\label{wxauinotebookgetpagecount}
\constfunc{size\_t}{GetPageCount}{\void}
Returns the number of pages in the notebook.
\membersection{wxAuiNotebook::GetPageIndex}\label{wxauinotebookgetpageindex}
\constfunc{int}{GetPageIndex}{\param{wxWindow* }{page\_wnd}}
Returns the page index for the specified window. If the window is not found in
the notebook, wxNOT\_FOUND is returned.
\membersection{wxAuiNotebook::GetPageText}\label{wxauinotebookgetpagetext}
\constfunc{wxString}{GetPageText}{\param{size\_t }{page}}
Returns the tab label for the page.
\membersection{wxAuiNotebook::GetTabCtrlHeight}\label{wxauinotebookgettabctrlheight}
\constfunc{int}{GetTabCtrlHeight}{\void}
Returns the height of the tab control.
\membersection{wxAuiNotebook::GetSelection}\label{wxauinotebookgetselection}
\constfunc{int}{GetSelection}{\void}
Returns the currently selected page.
\membersection{wxAuiNotebook::InsertPage}\label{wxauinotebookinsertpage}
\func{bool}{InsertPage}{\param{size\_t }{page\_idx}, \param{wxWindow* }{page}, \param{const wxString\& }{caption}, \param{bool }{select = false}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
InsertPage() is similar to AddPage, but allows the ability to specify the insert location.
If the {\it select} parameter is true, calling this will generate a page change event.
\membersection{wxAuiNotebook::RemovePage}\label{wxauinotebookremovepage}
\func{bool}{RemovePage}{\param{size\_t }{page}}
Removes a page, without deleting the window pointer.
\membersection{wxAuiNotebook::SetArtProvider}\label{wxauinotebooksetartprovider}
\func{void}{SetArtProvider}{\param{wxAuiTabArt* }{art}}
Sets the art provider to be used by the notebook.
\membersection{wxAuiNotebook::SetFont}\label{wxauinotebooksetfont}
\func{bool}{SetFont}{\param{const wxFont\& }{font}}
Sets the font for drawing the tab labels, using a bold version of the font for selected tab labels.
\membersection{wxAuiNotebook::SetNormalFont}\label{wxauinotebooksetnormalfont}
\func{void}{SetNormalFont}{\param{const wxFont\& }{font}}
Sets the font for drawing unselected tab labels.
\membersection{wxAuiNotebook::SetSelectedFont}\label{wxauinotebooksetselectedfont}
\func{void}{SetSelectedFont}{\param{const wxFont\& }{font}}
Sets the font for drawing selected tab labels.
\membersection{wxAuiNotebook::SetMeasuringFont}\label{wxauinotebooksetmeasuringfont}
\func{void}{SetMeasuringFont}{\param{const wxFont\& }{font}}
Sets the font for measuring tab labels.
\membersection{wxAuiNotebook::SetPageBitmap}\label{wxauinotebooksetpagebitmap}
\func{bool}{SetPageBitmap}{\param{size\_t }{page}, \param{const wxBitmap\& }{bitmap}}
Sets the bitmap for the page. To remove a bitmap from the tab caption, pass
wxNullBitmap.
\membersection{wxAuiNotebook::SetPageText}\label{wxauinotebooksetpagetext}
\func{bool}{SetPageText}{\param{size\_t }{page}, \param{const wxString\& }{text}}
Sets the tab label for the page.
\membersection{wxAuiNotebook::SetSelection}\label{wxauinotebooksetselection}
\func{size\_t}{SetSelection}{\param{size\_t }{new\_page}}
Sets the page selection. Calling this method will generate a page change event.
\membersection{wxAuiNotebook::SetTabCtrlHeight}\label{wxauinotebooksettabctrlheight}
\func{void}{SetTabCtrlHeight}{\param{int }{height}}
Sets the tab height. By default, the tab control height is calculated
by measuring the text height and bitmap sizes on the tab captions. Calling this
method will override that calculation and set the tab control to the specified
height parameter. A call to this method will override any call to SetUniformBitmapSize().
Specifying -1 as the height will return the control to its default auto-sizing behaviour.
\membersection{wxAuiNotebook::SetUniformBitmapSize}\label{wxauinotebooksetuniformbitmapsize}
\func{void}{SetUniformBitmapSize}{\param{const wxSize\& }{size}}
SetUniformBitmapSize() ensures that all tabs will have the same height, even
if some tabs don't have bitmaps. Passing wxDefaultSize to this function will
instruct the control to use dynamic tab height, which is the default behaviour.
Under the default behaviour, when a tab with a large bitmap is added, the tab control's
height will automatically increase to accommodate the larger bitmap.
\func{void}{Split}{\param{size\_t }{page}, \param{int }{direction}}
Split performs a split operation programmatically. The argument \arg{page} indicates
the page that will be split off. This page will also become the active page after the
split. The \arg{direction} argument specifies where the pane should go, it should be one
of the following: wxTOP, wxBOTTOM, wxLEFT, or wxRIGHT.
\membersection{wxAuiNotebook::ShowWindowMenu}\label{wxauinotebookshowwindowmenu}
\func{bool}{ShowWindowMenu}{\void}
Shows the window menu for the active tab control associated with this notebook,
and returns \true if a selection was made.

View File

@@ -1,477 +0,0 @@
\section{\class{wxAuiPaneInfo}}\label{wxauipaneinfo}
wxAuiPaneInfo is part of the wxAUI class framework.
See also \helpref{wxAUI overview}{wxauioverview}.
wxAuiPaneInfo specifies all the parameters for a pane.
These parameters specify where the pane is on the
screen, whether it is docked or floating, or hidden.
In addition, these parameters specify the pane's
docked position, floating position, preferred size,
minimum size, caption text among many other parameters.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/aui/aui.h>
\wxheading{See also}
\helpref{wxAuiManager}{wxauimanager},
\helpref{wxAuiDockArt}{wxauidockart}
\wxheading{Data structures}
\begin{verbatim}
enum wxAuiPaneInsertLevel
{
wxAUI_INSERT_PANE = 0,
wxAUI_INSERT_ROW = 1,
wxAUI_INSERT_DOCK = 2
}
\end{verbatim}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAuiPaneInfo::wxAuiPaneInfo}\label{wxauipaneinfowxauipaneinfo}
\func{}{wxAuiPaneInfo}{\void}
Default constructor.
\func{}{wxAuiPaneInfo}{\param{const wxAuiPaneInfo\& }{c}}
Copy constructor.
\membersection{wxAuiPaneInfo::BestSize}\label{wxauipaneinfobestsize}
\func{wxAuiPaneInfo\&}{BestSize}{\param{const wxSize\& }{size}}
\func{wxAuiPaneInfo\&}{BestSize}{\param{int }{x}, \param{int }{y}}
BestSize() sets the ideal size for the pane. The docking manager will attempt to use this size as much as possible when docking or floating the pane.
\membersection{wxAuiPaneInfo::Bottom}\label{wxauipaneinfobottom}
\func{wxAuiPaneInfo\&}{Bottom}{\void}
Bottom() sets the pane dock position to the bottom side of the frame. This is
the same thing as calling Direction(wxAUI\_DOCK\_BOTTOM).
\membersection{wxAuiPaneInfo::BottomDockable}\label{wxauipaneinfobottomdockable}
\func{wxAuiPaneInfo\&}{BottomDockable}{\param{bool }{b = true}}
BottomDockable() indicates whether a pane can be docked at the bottom of the frame.
\membersection{wxAuiPaneInfo::Caption}\label{wxauipaneinfocaption}
\func{wxAuiPaneInfo\&}{Caption}{\param{const wxString\& }{c}}
Caption() sets the caption of the pane.
\membersection{wxAuiPaneInfo::CaptionVisible}\label{wxauipaneinfocaptionvisible}
\func{wxAuiPaneInfo\&}{CaptionVisible}{\param{bool }{visible = true}}
CaptionVisible indicates that a pane caption should be visible. If false, no pane caption is drawn.
\membersection{wxAuiPaneInfo::Centre}\label{wxauipaneinfocentre}
\func{wxAuiPaneInfo\&}{Centre}{\void}
\func{wxAuiPaneInfo\&}{Center}{\void}
Center() sets the pane dock position to the left side of the frame.
The centre pane is the space in the middle after all border panes (left, top, right, bottom) are subtracted from the layout.
This is the same thing as calling Direction(wxAUI\_DOCK\_CENTRE).
\membersection{wxAuiPaneInfo::CentrePane}\label{wxauipaneinfocentrepane}
\func{wxAuiPaneInfo\&}{CentrePane}{\void}
\func{wxAuiPaneInfo\&}{CenterPane}{\void}
CentrePane() specifies that the pane should adopt the default center pane settings. Centre panes usually do not have caption bars. This function provides an easy way of preparing a pane to be displayed in the center dock position.
\membersection{wxAuiPaneInfo::CloseButton}\label{wxauipaneinfoclosebutton}
\func{wxAuiPaneInfo\&}{CloseButton}{\param{bool }{visible = true}}
CloseButton() indicates that a close button should be drawn for the pane.
\membersection{wxAuiPaneInfo::DefaultPane}\label{wxauipaneinfodefaultpane}
\func{wxAuiPaneInfo\&}{DefaultPane}{\void}
DefaultPane() specifies that the pane should adopt the default pane settings.
\membersection{wxAuiPaneInfo::DestroyOnClose}\label{wxauipaneinfodestroyonclose}
\func{wxAuiPaneInfo\&}{DestroyOnClose}{\param{bool }{b = true}}
DestroyOnClose() indicates whether a pane should be detroyed when it is closed. Normally a pane is simply hidden when the close button is clicked. Setting DestroyOnClose to true will cause the window to be destroyed when the user clicks the pane's close button.
\membersection{wxAuiPaneInfo::Direction}\label{wxauipaneinfodirection}
\func{wxAuiPaneInfo\&}{Direction}{\param{int }{direction}}
Direction() determines the direction of the docked pane. It is functionally the same as calling Left(), Right(), Top() or Bottom(), except that docking direction may be specified programmatically via the parameter.
\membersection{wxAuiPaneInfo::Dock}\label{wxauipaneinfodock}
\func{wxAuiPaneInfo\&}{Dock}{\void}
Dock() indicates that a pane should be docked. It is the opposite of Float().
\membersection{wxAuiPaneInfo::DockFixed}\label{wxauipaneinfodockfixed}
\func{wxAuiPaneInfo\&}{DockFixed}{\param{bool }{b = true}}
DockFixed() causes the containing dock to have no resize sash. This is useful for creating panes that span the entire width or height of a dock, but should not be resizable in the other direction.
\membersection{wxAuiPaneInfo::Dockable}\label{wxauipaneinfodockable}
\func{wxAuiPaneInfo\&}{Dockable}{\param{bool }{b = true}}
Dockable() specifies whether a frame can be docked or not. It is the same as specifying TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b).
\membersection{wxAuiPaneInfo::Fixed}\label{wxauipaneinfofixed}
\func{wxAuiPaneInfo\&}{Fixed}{\void}
Fixed() forces a pane to be fixed size so that it cannot be resized. After calling Fixed(), IsFixed() will return true.
\membersection{wxAuiPaneInfo::Float}\label{wxauipaneinfofloat}
\func{wxAuiPaneInfo\&}{Float}{\void}
Float() indicates that a pane should be floated. It is the opposite of Dock().
\membersection{wxAuiPaneInfo::Floatable}\label{wxauipaneinfofloatable}
\func{wxAuiPaneInfo\&}{Floatable}{\param{bool }{b = true}}
Floatable() sets whether the user will be able to undock a pane and turn it into a floating window.
\membersection{wxAuiPaneInfo::FloatingPosition}\label{wxauipaneinfofloatingposition}
\func{wxAuiPaneInfo\&}{FloatingPosition}{\param{const wxPoint\& }{pos}}
\func{wxAuiPaneInfo\&}{FloatingPosition}{\param{int }{x}, \param{int }{y}}
FloatingPosition() sets the position of the floating pane.
\membersection{wxAuiPaneInfo::FloatingSize}\label{wxauipaneinfofloatingsize}
\func{wxAuiPaneInfo\&}{FloatingSize}{\param{const wxSize\& }{size}}
\func{wxAuiPaneInfo\&}{FloatingSize}{\param{int }{x}, \param{int }{y}}
FloatingSize() sets the size of the floating pane.
\membersection{wxAuiPaneInfo::Gripper}\label{wxauipaneinfogripper}
\func{wxAuiPaneInfo\&}{Gripper}{\param{bool }{visible = true}}
Gripper() indicates that a gripper should be drawn for the pane.
\membersection{wxAuiPaneInfo::GripperTop}\label{wxauipaneinfogrippertop}
\func{wxAuiPaneInfo\&}{GripperTop}{\param{bool }{attop = true}}
GripperTop() indicates that a gripper should be drawn at the top of the pane.
\membersection{wxAuiPaneInfo::HasBorder}\label{wxauipaneinfohasborder}
\constfunc{bool}{HasBorder}{\void}
HasBorder() returns true if the pane displays a border.
\membersection{wxAuiPaneInfo::HasCaption}\label{wxauipaneinfohascaption}
\constfunc{bool}{HasCaption}{\void}
HasCaption() returns true if the pane displays a caption.
\membersection{wxAuiPaneInfo::HasCloseButton}\label{wxauipaneinfohasclosebutton}
\constfunc{bool}{HasCloseButton}{\void}
HasCloseButton() returns true if the pane displays a button to close the pane.
\membersection{wxAuiPaneInfo::HasFlag}\label{wxauipaneinfohasflag}
\constfunc{bool}{HasFlag}{\param{unsigned int }{flag}}
HasFlag() returns true if the the property specified by flag is active for the pane.
\membersection{wxAuiPaneInfo::HasGripper}\label{wxauipaneinfohasgripper}
\constfunc{bool}{HasGripper}{\void}
HasGripper() returns true if the pane displays a gripper.
\membersection{wxAuiPaneInfo::HasGripperTop}\label{wxauipaneinfohasgrippertop}
\constfunc{bool}{HasGripperTop}{\void}
HasGripper() returns true if the pane displays a gripper at the top.
\membersection{wxAuiPaneInfo::HasMaximizeButton}\label{wxauipaneinfohasmaximizebutton}
\constfunc{bool}{HasMaximizeButton}{\void}
HasMaximizeButton() returns true if the pane displays a button to maximize the pane.
\membersection{wxAuiPaneInfo::HasMinimizeButton}\label{wxauipaneinfohasminimizebutton}
\constfunc{bool}{HasMinimizeButton}{\void}
HasMinimizeButton() returns true if the pane displays a button to minimize the pane.
\membersection{wxAuiPaneInfo::HasPinButton}\label{wxauipaneinfohaspinbutton}
\constfunc{bool}{HasPinButton}{\void}
HasPinButton() returns true if the pane displays a button to float the pane.
\membersection{wxAuiPaneInfo::Hide}\label{wxauipaneinfohide}
\func{wxAuiPaneInfo\&}{Hide}{\void}
Hide() indicates that a pane should be hidden.
\membersection{wxAuiPaneInfo::IsBottomDockable}\label{wxauipaneinfoisbottomdockable}
\constfunc{bool}{IsBottomDockable}{\void}
IsBottomDockable() returns true if the pane can be docked at the bottom of the managed frame.
\membersection{wxAuiPaneInfo::IsDocked}\label{wxauipaneinfoisdocked}
\constfunc{bool}{IsDocked}{\void}
IsDocked() returns true if the pane is docked.
\membersection{wxAuiPaneInfo::IsFixed}\label{wxauipaneinfoisfixed}
\constfunc{bool}{IsFixed}{\void}
IsFixed() returns true if the pane cannot be resized.
\membersection{wxAuiPaneInfo::IsFloatable}\label{wxauipaneinfoisfloatable}
\constfunc{bool}{IsFloatable}{\void}
IsFloatable() returns true if the pane can be undocked and displayed as a floating window.
\membersection{wxAuiPaneInfo::IsFloating}\label{wxauipaneinfoisfloating}
\constfunc{bool}{IsFloating}{\void}
IsFloating() returns true if the pane is floating.
\membersection{wxAuiPaneInfo::IsLeftDockable}\label{wxauipaneinfoisleftdockable}
\constfunc{bool}{IsLeftDockable}{\void}
IsLeftDockable() returns true if the pane can be docked on the left of the managed frame.
\membersection{wxAuiPaneInfo::IsMovable}\label{wxauipaneinfoismovable}
\constfunc{bool}{IsMovable}{\void}
IsMoveable() returns true if the docked frame can be undocked or moved to another dock position.
\membersection{wxAuiPaneInfo::IsOk}\label{wxauipaneinfoisok}
\constfunc{bool}{IsOk}{\void}
IsOk() returns true if the wxAuiPaneInfo structure is valid. A pane structure is valid if it has an associated window.
\membersection{wxAuiPaneInfo::IsResizable}\label{wxauipaneinfoisresizable}
\constfunc{bool}{IsResizable}{\void}
IsResizable() returns true if the pane can be resized.
\membersection{wxAuiPaneInfo::IsRightDockable}\label{wxauipaneinfoisrightdockable}
\constfunc{bool}{IsRightDockable}{\void}
IsRightDockable() returns true if the pane can be docked on the right of the managed frame.
\membersection{wxAuiPaneInfo::IsShown}\label{wxauipaneinfoisshown}
\constfunc{bool}{IsShown}{\void}
IsShown() returns true if the pane is currently shown.
\membersection{wxAuiPaneInfo::IsToolbar}\label{wxauipaneinfoistoolbar}
\constfunc{bool}{IsToolbar}{\void}
IsToolbar() returns true if the pane contains a toolbar.
\membersection{wxAuiPaneInfo::IsTopDockable}\label{wxauipaneinfoistopdockable}
\constfunc{bool}{IsTopDockable}{\void}
IsTopDockable() returns true if the pane can be docked at the top of the managed frame.
\membersection{wxAuiPaneInfo::Layer}\label{wxauipaneinfolayer}
\func{wxAuiPaneInfo\&}{Layer}{\param{int }{layer}}
Layer() determines the layer of the docked pane. The dock layer is similar to an onion, the inner-most layer being layer 0. Each shell moving in the outward direction has a higher layer number. This allows for more complex docking layout formation.
\membersection{wxAuiPaneInfo::Left}\label{wxauipaneinfoleft}
\func{wxAuiPaneInfo\&}{Left}{\void}
Left() sets the pane dock position to the left side of the frame. This is the
same thing as calling Direction(wxAUI\_DOCK\_LEFT).
\membersection{wxAuiPaneInfo::LeftDockable}\label{wxauipaneinfoleftdockable}
\func{wxAuiPaneInfo\&}{LeftDockable}{\param{bool }{b = true}}
LeftDockable() indicates whether a pane can be docked on the left of the frame.
\membersection{wxAuiPaneInfo::MaxSize}\label{wxauipaneinfomaxsize}
\func{wxAuiPaneInfo\&}{MaxSize}{\param{const wxSize\& }{size}}
\func{wxAuiPaneInfo\&}{MaxSize}{\param{int }{x}, \param{int }{y}}
MaxSize() sets the maximum size of the pane.
\membersection{wxAuiPaneInfo::MaximizeButton}\label{wxauipaneinfomaximizebutton}
\func{wxAuiPaneInfo\&}{MaximizeButton}{\param{bool }{visible = true}}
MaximizeButton() indicates that a maximize button should be drawn for the pane.
\membersection{wxAuiPaneInfo::MinSize}\label{wxauipaneinfominsize}
\func{wxAuiPaneInfo\&}{MinSize}{\param{const wxSize\& }{size}}
\func{wxAuiPaneInfo\&}{MinSize}{\param{int }{x}, \param{int }{y}}
MinSize() sets the minimum size of the pane. Please note that this is only partially supported as of this writing.
\membersection{wxAuiPaneInfo::MinimizeButton}\label{wxauipaneinfominimizebutton}
\func{wxAuiPaneInfo\&}{MinimizeButton}{\param{bool }{visible = true}}
MinimizeButton() indicates that a minimize button should be drawn for the pane.
\membersection{wxAuiPaneInfo::Movable}\label{wxauipaneinfomovable}
\func{wxAuiPaneInfo\&}{Movable}{\param{bool }{b = true}}
Movable indicates whether a frame can be moved.
\membersection{wxAuiPaneInfo::Name}\label{wxauipaneinfoname}
\func{wxAuiPaneInfo\&}{Name}{\param{const wxString\& }{n}}
Name() sets the name of the pane so it can be referenced in lookup functions. If a name is not specified by the user, a random name is assigned to the pane when it is added to the manager.
\membersection{wxAuiPaneInfo::PaneBorder}\label{wxauipaneinfopaneborder}
\func{wxAuiPaneInfo\&}{PaneBorder}{\param{bool }{visible = true}}
PaneBorder indicates that a border should be drawn for the pane.
\membersection{wxAuiPaneInfo::PinButton}\label{wxauipaneinfopinbutton}
\func{wxAuiPaneInfo\&}{PinButton}{\param{bool }{visible = true}}
PinButton() indicates that a pin button should be drawn for the pane.
\membersection{wxAuiPaneInfo::Position}\label{wxauipaneinfoposition}
\func{wxAuiPaneInfo\&}{Position}{\param{int }{pos}}
Position() determines the position of the docked pane.
\membersection{wxAuiPaneInfo::Resizable}\label{wxauipaneinforesizable}
\func{wxAuiPaneInfo\&}{Resizable}{\param{bool }{resizable = true}}
Resizable() allows a pane to be resized if the parameter is true, and forces it to be a fixed size if the parameter is false. This is simply an antonym for Fixed().
\membersection{wxAuiPaneInfo::Right}\label{wxauipaneinforight}
\func{wxAuiPaneInfo\&}{Right}{\void}
Right() sets the pane dock position to the right side of the frame.
\membersection{wxAuiPaneInfo::RightDockable}\label{wxauipaneinforightdockable}
\func{wxAuiPaneInfo\&}{RightDockable}{\param{bool }{b = true}}
RightDockable() indicates whether a pane can be docked on the right of the frame.
\membersection{wxAuiPaneInfo::Row}\label{wxauipaneinforow}
\func{wxAuiPaneInfo\&}{Row}{\param{int }{row}}
Row() determines the row of the docked pane.
\membersection{wxAuiPaneInfo::SafeSet}\label{wxauipaneinfosafeset}
\func{void}{SafeSet}{\param{wxAuiPaneInfo }{source}}
Write the safe parts of a newly loaded PaneInfo structure "source" into "this"
used on loading perspectives etc.
\membersection{wxAuiPaneInfo::SetFlag}\label{wxauipaneinfosetflag}
\func{wxAuiPaneInfo\&}{SetFlag}{\param{unsigned int }{flag}, \param{bool }{option\_state}}
SetFlag() turns the property given by flag on or off with the option\_state parameter.
\membersection{wxAuiPaneInfo::Show}\label{wxauipaneinfoshow}
\func{wxAuiPaneInfo\&}{Show}{\param{bool }{show = true}}
Show() indicates that a pane should be shown.
\membersection{wxAuiPaneInfo::ToolbarPane}\label{wxauipaneinfotoolbarpane}
\func{wxAuiPaneInfo\&}{ToolbarPane}{\void}
ToolbarPane() specifies that the pane should adopt the default toolbar pane settings.
\membersection{wxAuiPaneInfo::Top}\label{wxauipaneinfotop}
\func{wxAuiPaneInfo\&}{Top}{\void}
Top() sets the pane dock position to the top of the frame.
\membersection{wxAuiPaneInfo::TopDockable}\label{wxauipaneinfotopdockable}
\func{wxAuiPaneInfo\&}{TopDockable}{\param{bool }{b = true}}
TopDockable() indicates whether a pane can be docked at the top of the frame.
\membersection{wxAuiPaneInfo::Window}\label{wxauipaneinfowindow}
\func{wxAuiPaneInfo\&}{Window}{\param{wxWindow* }{w}}
Window() assigns the window pointer that the wxAuiPaneInfo should use. This normally does not need to be specified, as the window pointer is automatically assigned to the wxAuiPaneInfo structure as soon as it is added to the manager.
\membersection{wxAuiPaneInfo::operator=}\label{wxauipaneinfooperatorassign}
\func{wxAuiPaneInfo\& operator}{operator=}{\param{const wxAuiPaneInfo\& }{c}}
Makes a copy of the wxAuiPaneInfo object.

View File

@@ -1,109 +0,0 @@
%
% automatically generated by HelpGen $Revision$ from
% auibook.h at 11/Nov/06 22:56:01
%
\section{\class{wxAuiTabArt}}\label{wxauitabart}
Tab art class.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/aui/auibook.h>
\wxheading{Library}
\helpref{wxAui}{librarieslist}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAuiTabArt::wxAuiTabArt}\label{wxauitabartwxauitabart}
\func{}{wxAuiTabArt}{\void}
Constructor.
\membersection{wxAuiTabArt::Clone}\label{wxauitabartclone}
\func{wxAuiTabArt*}{Clone}{\void}
Clones the art object.
\membersection{wxAuiTabArt::DrawBackground}\label{wxauitabartdrawbackground}
\func{void}{DrawBackground}{\param{wxDC\& }{dc}, \param{wxWindow* }{wnd}, \param{const wxRect\& }{rect}}
Draws a background on the given area.
\membersection{wxAuiTabArt::DrawButton}\label{wxauitabartdrawbutton}
\func{void}{DrawButton}{\param{wxDC\& }{dc}, \param{wxWindow* }{wnd}, \param{const wxRect\& }{in\_rect}, \param{int }{bitmap\_id}, \param{int }{button\_state}, \param{int }{orientation}, \param{const wxBitmap\& }{bitmap\_override}, \param{wxRect* }{out\_rect}}
Draws a button.
\membersection{wxAuiTabArt::DrawTab}\label{wxauitabartdrawtab}
\func{void}{DrawTab}{\param{wxDC\& }{dc}, \param{wxWindow* }{wnd}, \param{const wxRect\& }{in\_rect}, \param{const wxString\& }{caption}, \param{const wxBitmap\& }{bitmap}, \param{bool }{active}, \param{int }{close\_button\_state}, \param{wxRect* }{out\_tab\_rect}, \param{wxRect* }{out\_button\_rect}, \param{int* }{x\_extent}}
Draws a tab.
\membersection{wxAuiTabArt::GetBestTabCtrlSize}\label{wxauitabartgetbesttabctrlsize}
\func{int}{GetBestTabCtrlSize}{\param{wxWindow* }{wnd}, \param{wxAuiNotebookPageArray\& }{pages}}
Returns the tab control size.
\membersection{wxAuiTabArt::GetIndentSize}\label{wxauitabartgetindentsize}
\func{int}{GetIndentSize}{\void}
Returns the indent size.
\membersection{wxAuiTabArt::GetTabSize}\label{wxauitabartgettabsize}
\func{wxSize}{GetTabSize}{\param{wxDC\& }{dc}, \param{wxWindow* }{wnd}, \param{const wxString\& }{caption}, \param{const wxBitmap\& }{bitmap}, \param{bool }{active}, \param{int }{close\_button\_state}, \param{int* }{x\_extent}}
Returns the tab size for the given caption, bitmap and state.
\membersection{wxAuiTabArt::SetFlags}\label{wxauitabartsetflags}
\func{void}{SetFlags}{\param{unsigned int }{flags}}
Sets flags.
\membersection{wxAuiTabArt::SetMeasuringFont}\label{wxauitabartsetmeasuringfont}
\func{void}{SetMeasuringFont}{\param{const wxFont\& }{font}}
Sets the font used for calculating measurements.
\membersection{wxAuiTabArt::SetNormalFont}\label{wxauitabartsetnormalfont}
\func{void}{SetNormalFont}{\param{const wxFont\& }{font}}
Sets the normal font for drawing labels.
\membersection{wxAuiTabArt::SetSelectedFont}\label{wxauitabartsetselectedfont}
\func{void}{SetSelectedFont}{\param{const wxFont\& }{font}}
Sets the font for drawing text for selected UI elements.
\membersection{wxAuiTabArt::SetSizingInfo}\label{wxauitabartsetsizinginfo}
\func{void}{SetSizingInfo}{\param{const wxSize\& }{tab\_ctrl\_size}, \param{size\_t }{tab\_count}}
Sets sizing information.
\membersection{wxAuiTabArt::ShowWindowList}\label{wxauitabartshowwindowlist}
\func{int}{ShowWindowList}{\param{wxWindow* }{wnd}, \param{const wxArrayString\& }{items}, \param{int }{active\_idx}}
Pops up a menu to show the list of windows managed by wxAui.

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 978 B

View File

@@ -1,173 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: backwardcompat.tex
%% Purpose: Explains how much and what kind of backward compatibility users
%% can expect
%% Author: M.J.Wetherell
%% RCS-ID: $Id$
%% Copyright: 2005 M.J.Wetherell
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Backward compatibility}\label{backwardcompatibility}
Many of the GUIs and platforms supported by wxWidgets are continuously
evolving, and some of the new platforms wxWidgets now supports were quite
unimaginable even a few years ago. In this environment wxWidgets must also
evolve in order to support these new features and platforms.
However the goal of wxWidgets is not only to provide a consistent
programming interface across many platforms, but also to provide an
interface that is reasonably stable over time, to help protect its users
from some of the uncertainty of the future.
\subsection{The version numbering scheme}\label{versionnumbering}
wxWidgets version numbers can have up to four components, with trailing
zeros sometimes omitted:
\begin{verbatim}
major.minor.release.sub-release
\end{verbatim}
A {\em stable} release of wxWidgets will have an even number for {\tt
minor}, e.g. {\tt 2.6.0}.
Stable, in this context, means that the API is not changing. In truth, some
changes are permitted, but only those that are backward compatible. For
example, you can expect later {\tt 2.6.x.x} releases, such as {\tt 2.6.1}
and {\tt 2.6.2} to be backward compatible with their predecessor.
When it becomes necessary to make changes which are not wholly backward
compatible, the stable branch is forked, creating a new {\em development}
branch of wxWidgets. This development branch will have an odd number
for {\tt minor}, for example {\tt 2.7.x.x}. Releases from this branch are
known as {\em development snapshots}.
The stable branch and the development branch will then be developed in
parallel for some time. When it is no longer useful to continue developing
the stable branch, the development branch is renamed and becomes a new
stable branch, for example {\tt 2.8.0}. And the process begins again.
This is how the tension between keeping the interface stable, and allowing
the library to evolve is managed.
You can expect the versions with the same major and {\em even} minor
version number to be compatible, but between minor versions there will be
incompatibilities. Compatibility is not broken gratuitously however, so
many applications will require no changes or only small changes to work
with the new version.
\subsection{Source level compatibility}\label{sourcecompatibility}
Later releases from a stable branch are backward compatible with earlier
releases from the same branch at the {\em source} level.
This means that, for example, if you develop your application using
wxWidgets {\tt 2.6.0} then it should also compile fine with all later {\tt
2.6.x} versions. The converse is also true providing you avoid any new
features not present in the earlier version. For example if you develop
using {\tt 2.6.1} your program will compile fine with wxWidgets {\tt 2.6.0}
providing you don't use any {\tt 2.6.1} specific features.
For some platforms binary compatibility is also supported, see 'Library
binary compatibility' below.
Between minor versions, for example between {\tt 2.2.x}, {\tt 2.4.x} and {\tt
2.6.x}, there will be some incompatibilities. Wherever possible the old way
of doing something is kept alongside the new for a time wrapped inside:
\begin{verbatim}
#if WXWIN_COMPATIBILITY_2_4
/* deprecated feature */
...
#endif
\end{verbatim}
By default the {\tt WXWIN\_COMPATIBILITY{\it \_X\_X}} macro is set
to 1 for the previous stable branch, for example
in {\tt 2.6.x} {\tt WXWIN\_COMPATIBILITY\_2\_4 = 1}. For the next earlier
stable branch the default is 0, so {\tt WXWIN\_COMPATIBILITY\_2\_2 = 0}
for {\tt 2.6.x}. Earlier than that, obsolete features are removed.
These macros can be changed in {\tt setup.h}. Or on UNIX-like systems you can
set them using the {\tt --disable-compat24} and {\tt --enable-compat22}
options to {\tt configure}.
They can be useful in two ways:
\begin{enumerate}
\item Changing {\tt WXWIN\_COMPATIBILITY\_2\_4} to 0 can be useful to
find uses of deprecated features in your program.
\item Changing {\tt WXWIN\_COMPATIBILITY\_2\_2} to 1 can be useful to
compile a program developed using {\tt 2.2.x} that no longer compiles
with {\tt 2.6.x}.
\end{enumerate}
A program requiring one of these macros to be 1 will become
incompatible with some future version of wxWidgets, and you should consider
updating it.
\subsection{Library binary compatibility}\label{libbincompatibility}
For some platforms, releases from a stable branch are not only source level
compatible but can also be {\em binary compatible}.
Binary compatibility makes it possible to get the maximum benefit from
using shared libraries, also known as dynamic link libraries (DLLs) on
Windows or dynamic shared libraries on OS X.
For example, suppose several applications are installed on a system requiring
wxWidgets {\tt 2.6.0}, {\tt 2.6.1} and {\tt 2.6.2}. Since {\tt 2.6.2} is
backward compatible with the earlier versions, it should be enough to
install just wxWidgets {\tt 2.6.2} shared libraries, and all the applications
should be able to use them. If binary compatibility is not supported, then all
the required versions {\tt 2.6.0}, {\tt 2.6.1} and {\tt 2.6.2} must be
installed side by side.
Achieving this, without the user being required to have the source code
and recompile everything, places many extra constraints on the changes
that can be made within the stable branch. So it is not supported for all
platforms, and not for all versions of wxWidgets. To date it has mainly
been supported by wxGTK for UNIX-like platforms.
Another practical consideration is that for binary compatibility to work,
all the applications and libraries must have been compiled with compilers
that are capable of producing compatible code; that is, they must use the
same ABI (Application Binary Interface). Unfortunately most different C++
compilers do not produce code compatible with each other, and often even
different versions of the same compiler are not compatible.
\subsection{Application binary compatibility}\label{appbincompatibility}
The most important aspect of binary compatibility is that applications
compiled with one version of wxWidgets, e.g. {\tt 2.6.1}, continue to work
with shared libraries of a later binary compatible version, for example {\tt
2.6.2}.
The converse can also be useful however. That is, it can be useful for a
developer using a later version, e.g. {\tt 2.6.2} to be able to create binary
application packages that will work with all binary compatible versions of
the shared library starting with, for example {\tt 2.6.0}.
To do this the developer must, of course, avoid any features not available
in the earlier versions. However this is not necessarily enough; in some
cases an application compiled with a later version may depend on it even
though the same code would compile fine against an earlier version.
% thinks: a situation we should try to avoid.
To help with this, a preprocessor symbol {\tt wxABI\_VERSION} can be defined
during the compilation of the application (this would usually be done in the
application's makefile or project settings). It should be set to the lowest
version that is being targeted, as a number with two decimal digits for each
component, for example {\tt wxABI\_VERSION=20600} for {\tt 2.6.0}.
Setting {\tt wxABI\_VERSION} should prevent the application from implicitly
depending on a later version of wxWidgets, and also disables any new features
in the API, giving a compile time check that the source is compatible with
the versions of wxWidgets being targeted.
Uses of {\tt wxABI\_VERSION} are stripped out of the wxWidgets sources when
each new development branch is created. Therefore it is only useful to help
achieve compatibility with earlier versions with the same major
and {\em even} minor version numbers. It won't, for example, help you write
code compatible with {\tt 2.4.x} using wxWidgets {\tt 2.6.x}.

View File

@@ -1,322 +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{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Remarks}
A bitmap button can be supplied with a single bitmap, and wxWidgets 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{Button states}
This class supports bitmaps for several different states:
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{normal}}{This is the bitmap shown in the default state,
it must be always valid while all the other bitmaps are optional and don't have
to be set.}
\twocolitem{\windowstyle{disabled}}{Bitmap shown when the button is disabled.}
\twocolitem{\windowstyle{selected}}{Bitmap shown when the button is pushed
(e.g. while the user keeps the mouse button pressed on it)}
\twocolitem{\windowstyle{focus}}{Bitmap shown when the button has keyboard
focus but is not pressed.}
\twocolitem{\windowstyle{hover}}{Bitmap shown when the mouse is over the
button (but it is not pressed). Notice that if hover bitmap is not specified
but the current platform UI uses hover images for the buttons (such as Windows
XP or GTK+), then the focus bitmap is used for hover state as well. This makes
it possible to set focus bitmap only to get reasonably good behaviour on all
platforms.}
\end{twocollist}
\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}
Note that \windowstyle{wxBU\_EXACTFIT} supported by
\helpref{wxButton}{wxbutton} is \emph{not} used by this class as bitmap buttons
don't have any minimal standard size by default.
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{wxbitmapbuttonctor}
\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 wxWidgets 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}}\label{wxbitmapbuttondtor}
\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}{wxbitmapbuttonctor}.
\membersection{wxBitmapButton::GetBitmapDisabled}\label{wxbitmapbuttongetbitmapdisabled}
\constfunc{const wxBitmap\&}{GetBitmapDisabled}{\void}
\func{wxBitmap\&}{GetBitmapDisabled}{\void}
Returns the bitmap for the disabled state, may be invalid.
\wxheading{Return value}
A reference to the disabled state bitmap.
\wxheading{See also}
\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled}
\membersection{wxBitmapButton::GetBitmapFocus}\label{wxbitmapbuttongetbitmapfocus}
\constfunc{const wxBitmap\&}{GetBitmapFocus}{\void}
\func{wxBitmap\&}{GetBitmapFocus}{\void}
Returns the bitmap for the focused state, may be invalid.
\wxheading{Return value}
A reference to the focused state bitmap.
\wxheading{See also}
\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus}
\membersection{wxBitmapButton::GetBitmapHover}\label{wxbitmapbuttongetbitmaphover}
\constfunc{const wxBitmap\&}{GetBitmapHover}{\void}
\func{wxBitmap\&}{GetBitmapHover}{\void}
Returns the bitmap used when the mouse is over the button, may be invalid.
\wxheading{See also}
\helpref{wxBitmapButton::SetBitmapHover}{wxbitmapbuttonsetbitmaphover}
\membersection{wxBitmapButton::GetBitmapLabel}\label{wxbitmapbuttongetbitmaplabel}
\constfunc{const wxBitmap\&}{GetBitmapLabel}{\void}
\func{wxBitmap\&}{GetBitmapLabel}{\void}
Returns the label bitmap (the one passed to the constructor), always valid.
\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::SetBitmapHover}\label{wxbitmapbuttonsetbitmaphover}
\func{void}{SetBitmapHover}{\param{const wxBitmap\& }{bitmap}}
Sets the bitmap to be shown when the mouse is over the button.
\newsince{2.7.0} and the hover bitmap is currently only supported in wxMSW.
\wxheading{See also}
\helpref{wxBitmapButton::GetBitmapHover}{wxbitmapbuttongetbitmaphover}
\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,600 +0,0 @@
\section{\class{wxBitmap}}\label{wxbitmap}
%\overview{Overview}{wxbitmapoverview}
%
This class encapsulates the concept of a platform-dependent bitmap,
either monochrome or colour or colour with alpha channel support.
\wxheading{Derived from}
\helpref{wxGDIObject}{wxgdiobject}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/bitmap.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\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{wxbitmapctor}
\func{}{wxBitmap}{\void}
Default constructor.
\func{}{wxBitmap}{\param{const wxBitmap\& }{bitmap}}
Copy constructor, uses \helpref{reference counting}{trefcount}.
To make a real copy, you can use:
\begin{verbatim}
wxBitmap newBitmap = oldBitmap.GetSubBitmap(
wxRect(0, 0, oldBitmap.GetWidth(), oldBitmap.GetHeight()));
\end{verbatim}
\func{}{wxBitmap}{\param{const 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. Beginning with version 2.5.4 of wxWidgets a depth of 32 including
an alpha channel is supported under MSW, Mac and GTK+.
\func{}{wxBitmap}{\param{const char* const*}{ bits}}
Creates a bitmap from XPM data.
\func{}{wxBitmap}{\param{const wxString\& }{name}, \param{long}{ type}}
Loads a bitmap from a file or resource.
\func{}{wxBitmap}{\param{const wxImage\&}{ img}, \param{int}{ depth = -1}}
Creates bitmap object from the image. This has to be done
to actually display an image as you cannot draw an image directly on a window.
The resulting bitmap will use the provided colour depth (or that of the
current system if depth is -1) which entails that a colour reduction has
to take place.
When in 8-bit mode (PseudoColour mode), the GTK port will use a color cube created
on program start-up to look up colors. This ensures a very fast conversion, but
the image quality won't be perfect (and could be better for photo images using more
sophisticated dithering algorithms).
On Windows, if there is a palette present (set with SetPalette), it will be used when
creating the wxBitmap (most useful in 8-bit display mode). On other platforms,
the palette is currently ignored.
\wxheading{Parameters}
\docparam{bits}{Specifies an array of pixel values.}
\docparam{width}{Specifies the width of the bitmap.}
\docparam{height}{Specifies the height of the bitmap.}
\docparam{depth}{Specifies the depth of the bitmap. If this is omitted, the display depth of the
screen is used.}
\docparam{name}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X.
Its meaning is determined by the {\it type} parameter.}
\docparam{type}{May be one of the following:
\twocolwidtha{5cm}
\begin{twocollist}
\twocolitem{\indexit{wxBITMAP\_TYPE\_BMP}}{Load a Windows bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap resource from the executable. Windows only.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_PICT\_RESOURCE}}{Load a PICT image resource from the executable. Mac OS only.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
\twocolitem{\indexit{wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.}
\end{twocollist}
The validity of these flags depends on the platform and wxWidgets configuration.
If all possible wxWidgets settings are used, the Windows platform supports BMP file, BMP resource,
XPM data, and XPM. Under wxGTK, the available formats are BMP file, XPM data, XPM file, and PNG file.
Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file.
In addition, wxBitmap can read all formats that \helpref{wxImage}{wximage} can, which currently include
wxBITMAP\_TYPE\_JPEG, wxBITMAP\_TYPE\_TIF, wxBITMAP\_TYPE\_PNG, wxBITMAP\_TYPE\_GIF, wxBITMAP\_TYPE\_PCX,
and wxBITMAP\_TYPE\_PNM. Of course, you must have wxImage handlers loaded. }
\docparam{img}{Platform-independent wxImage object.}
\wxheading{Remarks}
The first form constructs a bitmap object with no data; an assignment or another member function such as Create
or LoadFile must be called subsequently.
The second and third forms provide copy constructors. Note that these do not copy the
bitmap data, but instead a pointer to the data, keeping a reference count. They are therefore
very efficient operations.
The fourth form constructs a bitmap from data whose type and value depends on
the value of the {\it type} argument.
The fifth form constructs a (usually monochrome) bitmap from an array of pixel values, under both
X and Windows.
The sixth form constructs a new bitmap.
The seventh form constructs a bitmap from pixmap (XPM) data, if wxWidgets has been configured
to incorporate this feature.
To use this constructor, you must first include an XPM file. For
example, assuming that the file {\tt mybitmap.xpm} contains an XPM array
of character pointers called mybitmap:
\begin{verbatim}
#include "mybitmap.xpm"
...
wxBitmap *bitmap = new wxBitmap(mybitmap);
\end{verbatim}
The eighth form constructs a bitmap from a file or resource. {\it name} can refer
to a resource name under MS Windows, or a filename under MS Windows and X.
Under Windows, {\it type} defaults to wxBITMAP\_TYPE\_BMP\_RESOURCE.
Under X, {\it type} defaults to wxBITMAP\_TYPE\_XPM.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}
\pythonnote{Constructors supported by wxPython are:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf wxBitmap(name, flag)}}{Loads a bitmap from a file}
\twocolitem{{\bf wxEmptyBitmap(width, height, depth = -1)}}{Creates an
empty bitmap with the given specifications}
\twocolitem{{\bf wxBitmapFromXPMData(listOfStrings)}}{Create a bitmap
from a Python list of strings whose contents are XPM data.}
\twocolitem{{\bf wxBitmapFromBits(bits, width, height,
depth=-1)}}{Create a bitmap from an array of bits contained in a
string.}
\twocolitem{{\bf wxBitmapFromImage(image, depth=-1)}}{Convert a
wxImage to a wxBitmap.}
\end{twocollist}}
}
\perlnote{Constructors supported by wxPerl are:\par
\begin{itemize}
\item{Wx::Bitmap->new( width, height, depth = -1 )}
\item{Wx::Bitmap->new( name, type )}
\item{Wx::Bitmap->new( icon )}
\item{Wx::Bitmap->newFromBits( bits, width, height, depth = 1 )}
\item{Wx::Bitmap->newFromXPM( data )}
\end{itemize}
}
\membersection{wxBitmap::\destruct{wxBitmap}}\label{wxbitmapdtor}
\func{}{\destruct{wxBitmap}}{\void}
Destructor.
See \helpref{reference-counted object destruction}{refcountdestruct} for more info.
If the application omits to delete the bitmap explicitly, the bitmap will be
destroyed automatically by wxWidgets 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}\label{wxbitmapcleanuphandlers}
\func{static void}{CleanUpHandlers}{\void}
Deletes all bitmap handlers.
This function is called by wxWidgets on exit.
\membersection{wxBitmap::ConvertToImage}\label{wxbitmapconverttoimage}
\func{wxImage}{ConvertToImage}{\void}
Creates an image from a platform-dependent bitmap. This preserves
mask information so that bitmaps and images can be converted back
and forth without loss in that respect.
\membersection{wxBitmap::CopyFromIcon}\label{wxbitmapcopyfromicon}
\func{bool}{CopyFromIcon}{\param{const wxIcon\&}{ icon}}
Creates the bitmap from an icon.
\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{const 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}{wxbitmapctor} 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}{wxbitmapctor}
\membersection{wxBitmap::FindHandler}\label{wxbitmapfindhandler}
\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{name}}
Finds the handler with the given name.
\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{extension}, \param{wxBitmapType}{ bitmapType}}
Finds the handler associated with the given extension and type.
\func{static wxBitmapHandler*}{FindHandler}{\param{wxBitmapType }{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}\label{wxbitmapgetdepth}
\constfunc{int}{GetDepth}{\void}
Gets the colour depth of the bitmap. A value of 1 indicates a
monochrome bitmap.
\membersection{wxBitmap::GetHandlers}\label{wxbitmapgethandlers}
\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}\label{wxbitmapinitstandardhandlers}
\func{static void}{InitStandardHandlers}{\void}
Adds the standard bitmap format handlers, which, depending on wxWidgets
configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM.
This function is called by wxWidgets on startup.
\wxheading{See also}
\helpref{wxBitmapHandler}{wxbitmaphandler}
\membersection{wxBitmap::InsertHandler}\label{wxbitmapinserthandler}
\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{wxBitmapType}{ 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 resource from the executable.}
\twocolitem{{\bf wxBITMAP\_TYPE\_PICT\_RESOURCE}}{Load a PICT image resource from the executable. Mac OS only.}
\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 wxWidgets 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::IsOk}\label{wxbitmapisok}
\constfunc{bool}{IsOk}{\void}
Returns true if bitmap data is present.
\membersection{wxBitmap::RemoveHandler}\label{wxbitmapremovehandler}
\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{wxBitmapType}{ 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 wxWidgets 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 wxWidgets has been configured, not all formats may be available.
\wxheading{See also}
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}
\membersection{wxBitmap::SetDepth}\label{wxbitmapsetdepth}
\func{void}{SetDepth}{\param{int }{depth}}
Sets the depth member (does not affect the bitmap data).
\wxheading{Parameters}
\docparam{depth}{Bitmap depth.}
\membersection{wxBitmap::SetHeight}\label{wxbitmapsetheight}
\func{void}{SetHeight}{\param{int }{height}}
Sets the height member (does not affect the bitmap data).
\wxheading{Parameters}
\docparam{height}{Bitmap height in pixels.}
\membersection{wxBitmap::SetMask}\label{wxbitmapsetmask}
\func{void}{SetMask}{\param{wxMask* }{mask}}
Sets the mask for this bitmap.
\wxheading{Remarks}
The bitmap object owns the mask once this has been called.
\wxheading{See also}
\helpref{wxBitmap::GetMask}{wxbitmapgetmask}, \helpref{wxMask}{wxmask}
%% VZ: this function is an implementation detail and shouldn't be documented
%%\membersection{wxBitmap::SetOk}\label{wxbitmapsetok}
%%
%%\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. (Not implemented under GTK+).
\wxheading{Parameters}
\docparam{palette}{The palette to set.}
\wxheading{See also}
\helpref{wxPalette}{wxpalette}
\membersection{wxBitmap::SetWidth}\label{wxbitmapsetwidth}
\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 $=$}\label{wxbitmapassign}
\func{wxBitmap\& }{operator $=$}{\param{const wxBitmap\& }{bitmap}}
Assignment operator, using \helpref{reference counting}{trefcount}.
\wxheading{Parameters}
\docparam{bitmap}{Bitmap to assign.}
\wxheading{Return value}
Returns 'this' object.

View File

@@ -1,187 +0,0 @@
\section{\class{wxBitmapComboBox}}\label{wxbitmapcombobox}
A combobox that displays bitmap in front of the list items.
It currently only allows using bitmaps of one size, and resizes itself
so that a bitmap can be shown next to the text field.
\wxheading{Derived from}
\helpref{wxComboBox}{wxcombobox}\\
\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Remarks}
While wxBitmapComboBox contains the \helpref{wxComboBox}{wxcombobox}
API, but it might not actually be derived from that class. In fact,
if the platform does not have a native implementation, wxBitmapComboBox
will inherit from \helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox}.
You can determine if the implementation is generic by checking whether
wxGENERIC\_BITMAPCOMBOBOX is defined.
\wxheading{Include files}
<wx/bmpcbox.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\wxheading{Window styles}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCB\_READONLY}}{Creates a combobox without a text
editor. On some platforms the control may appear very different when this
style is used.}
\twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries in the list alphabetically.}
\twocolitem{\windowstyle{wxTE\_PROCESS\_ENTER}}{The control will generate
the event wxEVT\_COMMAND\_TEXT\_ENTER (otherwise pressing Enter key
is either processed internally by the control or used for navigation between
dialog controls). Windows only.}
\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.}
\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER event,
when <RETURN> is pressed in the combobox.}
\end{twocollist}
\wxheading{See also}
\helpref{wxComboBox}{wxcombobox}, \helpref{wxChoice}{wxchoice}, \helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox},
\rtfsp\helpref{wxCommandEvent}{wxcommandevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBitmapComboBox::wxBitmapComboBox}\label{wxbitmapcomboboxctor}
\func{}{wxBitmapComboBox}{\void}
Default constructor.
\func{}{wxBitmapComboBox}{\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 = 0}, \param{const wxString }{choices[] = NULL},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
\func{}{wxBitmapComboBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{value}, \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
\param{const wxArrayString\& }{choices},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
Constructor, creating and showing a combobox.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
\docparam{value}{Initial selection string. An empty string indicates no selection.}
\docparam{pos}{Window position.}
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
appropriately.}
\docparam{n}{Number of strings with which to initialise the control.}
\docparam{choices}{An array of strings with which to initialise the control.}
\docparam{style}{Window style. See \helpref{wxBitmapComboBox}{wxbitmapcombobox}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\wxheading{See also}
\helpref{wxBitmapComboBox::Create}{wxbitmapcomboboxcreate}, \helpref{wxValidator}{wxvalidator}
\membersection{wxBitmapComboBox::\destruct{wxBitmapComboBox}}\label{wxbitmapcomboboxdtor}
\func{}{\destruct{wxBitmapComboBox}}{\void}
Destructor, destroying the combobox.
\membersection{wxBitmapComboBox::Create}\label{wxbitmapcomboboxcreate}
\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"}}
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{value}, \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
\param{const wxArrayString\& }{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{wxBitmapComboBox::wxBitmapComboBox}{wxbitmapcomboboxctor}\rtfsp
for further details.
\membersection{wxBitmapComboBox::Append}\label{wxbitmapcomboboxappend}
\func{int}{Append}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap = wxNullBitmap}}
Adds the item to the end of the combo box.
\func{int}{Append}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{void *}{clientData}}
\func{int}{Append}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{wxClientData *}{clientData}}
Adds the item to the end of the combo box, associating the given, typed or
untyped, client data pointer with the item.
\membersection{wxBitmapComboBox::GetBitmapSize}\label{wxbitmapcomboboxgetbitmapsize}
\constfunc{wxSize}{GetBitmapSize}{\void}
Returns size of bitmaps used in the list.
\membersection{wxBitmapComboBox::GetItemBitmap}\label{wxbitmapcomboboxgetitembitmap}
\constfunc{wxBitmap}{GetItemBitmap}{\param{unsigned int }{n}}
Returns the bitmap of the item with the given index.
\membersection{wxBitmapComboBox::Insert}\label{wxbitmapcomboboxinsert}
\func{int}{Insert}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{unsigned int }{pos}}
Inserts the item into the list before pos.
Not valid for {\tt wxCB\_SORT} style, use Append instead.
\func{int}{Insert}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{unsigned int }{pos}, \param{void *}{clientData}}
\func{int}{Insert}{\param{const wxString\& }{ item}, \param{const wxBitmap\& }{bitmap}, \param{unsigned int }{pos}, \param{wxClientData *}{clientData}}
Inserts the item into the list before pos, associating the given, typed or
untyped, client data pointer with the item.
Not valid for {\tt wxCB\_SORT} style, use Append instead.
\membersection{wxBitmapComboBox::SetItemBitmap}\label{wxbitmapcomboboxsetitembitmap}
\func{void}{SetItemBitmap}{\param{unsigned int }{n}, \param{const wxBitmap\& }{bitmap}}
Sets the bitmap for the given item.

View File

@@ -1,86 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: bitmaptglbtn.tex
%% Purpose: wxBitmapToggleButton documentation
%% Author: Robert Roebling
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxBitmapToggleButton}}\label{wxbitmaptogglebutton}
wxBitmapToggleButton is a \helpref{wxToggleButton}{wxtogglebutton}
that contains a bitmap instead of text.
This control emits an update UI event.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/tglbtn.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Window styles}
There are no special styles for wxBitmapToggleButton.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_TOGGLEBUTTON(id, func)}}{Handles a toggle button click event.}
\end{twocollist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBitmapToggleButton::wxBitmapToggleButton}\label{wxbitmaptogglebuttonconstr}
\func{}{wxBitmapToggleButton}{\void}
Default constructor.
\func{}{wxBitmapToggleButton}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxBitmap\& }{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 toggle button with the bitmap {\it label}.
Internally calls Create().
\membersection{wxBitmapToggleButton::Create}\label{wxbitmaptogglebuttoncreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxBitmap\& }{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"}}
Create method for two-step construction.
\membersection{wxBitmapToggleButton::GetValue}\label{wxbitmaptogglebuttongetvalue}
\constfunc{bool}{GetValue}{\void}
Gets the state of the toggle button.
\wxheading{Return value}
Returns {\tt true} if it is pressed, {\tt false} otherwise.
\membersection{wxBitmapToggleButton::SetValue}\label{wxbitmaptogglebuttonsetvalue}
\func{void}{SetValue}{\param{bool}{ state}}
Sets the toggle button to the given state. This does not cause a
{\tt EVT\_TOGGLEBUTTON} event to be emitted.
\wxheading{Parameters}
\docparam{state}{If {\tt true}, the button is pressed.}

View File

@@ -1,70 +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{Library}
\helpref{wxCore}{librarieslist}
\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}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBitmapDataObject::wxBitmapDataObject}\label{wxbitmapdataobjectctor}
\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
wxWidgets' 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,169 +0,0 @@
\section{\class{wxBitmapHandler}}\label{wxbitmaphandler}
\overview{Overview}{wxbitmapoverview}
This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
It is used within wxBitmap and is not normally seen by the application.
If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler
and add the handler using \helpref{wxBitmap::AddHandler}{wxbitmapaddhandler} in your
application initialisation.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/bitmap.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBitmapHandler::wxBitmapHandler}\label{wxbitmaphandlerctor}
\func{}{wxBitmapHandler}{\void}
Default constructor. In your own default constructor, initialise the members
m\_name, m\_extension and m\_type.
\membersection{wxBitmapHandler::\destruct{wxBitmapHandler}}\label{wxbitmaphandlerdtor}
\func{}{\destruct{wxBitmapHandler}}{\void}
Destroys the wxBitmapHandler object.
\membersection{wxBitmapHandler::Create}\label{wxbitmaphandlercreate}
\func{virtual bool}{Create}{\param{wxBitmap* }{bitmap}, \param{const 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}{wxbitmapctor} for a list
of possible values.}
\wxheading{Return value}
true if the call succeeded, false otherwise (the default).
\membersection{wxBitmapHandler::GetName}\label{wxbitmaphandlergetname}
\constfunc{const wxString\&}{ GetName}{\void}
Gets the name of this handler.
\membersection{wxBitmapHandler::GetExtension}\label{wxbitmaphandlergetextension}
\constfunc{const wxString\&}{ GetExtension}{\void}
Gets the file extension associated with this handler.
\membersection{wxBitmapHandler::GetType}\label{wxbitmaphandlergettype}
\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}{wxbitmapctor} 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}{wxbitmapctor} 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}\label{wxbitmaphandlersetname}
\func{void}{SetName}{\param{const wxString\& }{name}}
Sets the handler name.
\wxheading{Parameters}
\docparam{name}{Handler name.}
\membersection{wxBitmapHandler::SetExtension}\label{wxbitmaphandlersetextension}
\func{void}{SetExtension}{\param{const wxString\& }{extension}}
Sets the handler extension.
\wxheading{Parameters}
\docparam{extension}{Handler extension.}
\membersection{wxBitmapHandler::SetType}\label{wxbitmaphandlersettype}
\func{void}{SetType}{\param{long }{type}}
Sets the handler type.
\wxheading{Parameters}
\docparam{name}{Handler type.}

View File

@@ -1,631 +0,0 @@
\chapter{Introduction}\label{introduction}
\pagenumbering{arabic}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
\section{What is wxWidgets?}\label{whatis}
wxWidgets is a C++ framework providing GUI (Graphical User
Interface) and other facilities on more than one platform. Version 2 and higher
currently support all desktop versions of MS Windows, Unix with GTK+ 1.x or 2.x,
Unix with Motif, Unix with just X11, Unix with DirectFB, Mac OS X, OS/2.
wxWidgets was originally developed at the Artificial Intelligence
Applications Institute, University of Edinburgh, for internal use,
and was first made publicly available in 1992.
Version 2 is a vastly improved version written and maintained by
Julian Smart, Robert Roebling, Vadim Zeitlin, Vaclav Slavik and many others.
This manual contains a class reference and topic overviews.
For a selection of wxWidgets tutorials, please see the documentation page on the \urlref{wxWidgets web site}{http://www.wxwidgets.org}.
Please note that in the following, ``MS Windows" often refers to all
platforms related to Microsoft Windows, including 32-bit and 64-bit
variants, unless otherwise stated. All trademarks are acknowledged.
\section{Why another cross-platform development tool?}\label{why}
wxWidgets 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 wxWidgets 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 wxWidgets has.
As open source software, wxWidgets has benefited from comments,
ideas, bug fixes, enhancements and the sheer enthusiasm of
users. This gives wxWidgets 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. wxWidgets helps to
insulate the programmer from these winds of change. Although
wxWidgets 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 wxWidgets even if they are developing on only
one platform.
It is impossible to sum up the functionality of wxWidgets 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 70 example programs.
\item Over 1000 pages of printable and on-line documentation.
\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 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).
\item Includes Tex2RTF, to allow you to produce your own documentation
in Windows Help, HTML and Word RTF formats.
\end{itemize}
\section{wxWidgets requirements}\label{requirements}
To make use of wxWidgets, you currently need one of the following setups.
(a) MS-Windows:
\begin{enumerate}\itemsep=0pt
\item A 32-bit or 64-bit PC running MS Windows.
\item A Windows compiler: MS Visual C++ (embedded Visual C++ for wxWinCE
port), Borland C++, Watcom C++, Cygwin, MinGW, Metrowerks CodeWarrior,
Digital Mars C++. See {\tt install.txt} for details about compiler
version supported.
\end{enumerate}
(b) Unix:
\begin{enumerate}\itemsep=0pt
\item Almost any C++ compiler, including GNU C++ and many Unix vendors
compilers such as Sun CC, HP-UX aCC or SGI mipsPro.
\item Almost any Unix workstation, and one of: GTK+ 2.4 or higher (GTK+ 1.2.10
may still be supported but wxGTK1 port is not maintained any longer and lacks
many features of wxGTK2), Motif 1.2 or higher or Lesstif. If using the wxX11
port, no such widget set is required.
\end{enumerate}
(c) Mac OS/Mac OS X:
\begin{enumerate}\itemsep=0pt
\item A PowerPC or Intel Mac running Mac OS X 10.3 or higher
\item The Apple Developer Tools (eg. GNU C++) or MetroWerks CodeWarrior (not
actively supported)
\end{enumerate}
Under all platforms it's recommended to have large amounts of free hard disk
space. The exact amount needed depends on the port, compiler and build
configurations but to give an example, a debug build of the library may take up
to 500MB.
\section{Availability and location of wxWidgets}\label{where}
\winhelponly{wxWidgets is available by anonymous FTP and World Wide Web
from ftp://biolpc22.york.ac.uk/pub and/or http://www.wxwidgets.org.}
\winhelpignore{wxWidgets is available by anonymous FTP and World Wide Web
from \urlref{ftp://biolpc22.york.ac.uk/pub}{ftp://biolpc22.york.ac.uk/pub}
and/or \urlref{http://www.wxwidgets.org}{http://www.wxwidgets.org}.}
You can also buy a CD-ROM using the form on the Web site.
\section{Acknowledgements}\label{acknowledgements}
The following is the list of the core, active developers of wxWidgets which keep
it running and have provided an invaluable, extensive and high-quality amount of
changes over the many of years of wxWidgets' life:
\begin{description}\itemsep=0pt
\item Julian Smart
\item Vadim Zeitlin
\item Robert Roebling
\item Robin Dunn
\item Stefan Csomor
\item Vaclav Slavik
\item Paul Cornett
\item Wlodzimierz `ABX' Skiba
\item Chris Elliott
\item David Elliott
\item Kevin Hock
\item Stefan Neis
\item Michael Wetherell
\end{description}
We would particularly like to thank the following peoples for their contributions
to wxWidgets, and the many others who have been involved in the project over the years.
Apologies for any unintentional omissions from this alphabetic list:
Yiorgos Adamopoulos, Jamshid Afshar, Alejandro Aguilar-Sierra, AIAI,
Patrick Albert, Karsten Ballueder, Mattia Barbon, Michael Bedward,
Kai Bendorf, Yura Bidus, Keith Gary Boyce, Chris Breeze, Pete Britton,
Ian Brown, C. Buckley, Marco Cavallini, Dmitri Chubraev, Robin Corbet, Cecil Coupe,
Andrew Davison, Gilles Depeyrot, Neil Dudman, 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, Ron Lee, Jan Lessner, Nicholas Liebmann,
Torsten Liermann, Per Lindqvist, Francesco Montorsi, Thomas Runge, Tatu M\"{a}nnist\"{o},
Scott Maxwell, Thomas Myers, Oliver Niedung, Ryan Norton, Hernan Otero,
Ian Perrigo, Timothy Peters, Giordano Pezzoli, Harri Pasanen, Thomaso Paoletti,
Garrett Potts, Marcel Rasche, Dino Scaringella, Jobst Schmalenbach, Arthur Seaton,
Paul Shirley, Stein Somers, Petr Smilauer, Neil Smith, Kari Syst\"{a}, George Tasker,
Arthur Tetzlaff-Deas, Jonathan Tonberg, Jyrki Tuomi, Janos Vegh, Andrea Venturoli,
David Webster, Otto Wyss, Xiaokun Zhu, Edward Zimmermann.
Many thanks also to AIAI for being willing to release the original version of
wxWidgets into the public domain, and to our patient partners.
`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 (not in wxWidgets anymore) 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 wxWidgets}\label{multiplat}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
This chapter describes the practical details of using wxWidgets. Please
see the file install.txt for up-to-date installation instructions, and
changes.txt for differences between versions.
\section{Include files}\label{includefiles}
The main include file is {\tt "wx/wx.h"}; this includes the most commonly
used modules of wxWidgets.
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 which is largely automatic for
compilers with necessary support. Currently it is used for Visual C++ (including
embedded Visual C++), Borland C++, Open Watcom C++, Digital Mars C++
and newer versions of GCC.
Some compilers might need extra work from the application developer to set the
build environment up as necessary for the support.
\section{Libraries}\label{libraries}
Most ports of wxWidgets can create either a static library or a shared
library. wxWidgets can also be built in multilib and monolithic variants.
See the \helpref{libraries list}{librarieslist} for more
information on these.
\section{Configuration}\label{configuration}
When using project files and makefiles directly to build wxWidgets,
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.
When using the 'configure' script to configure wxWidgets (on Unix and other platforms where
configure is available), the corresponding setup.h files are generated automatically
along with suitable makefiles. When using the RPM packages
for installing wxWidgets on Linux, a correct setup.h is shipped in the package and
this must not be changed.
\section{Makefiles}\label{makefiles}
On Microsoft Windows, wxWidgets has a different set of makefiles for each
compiler, because each compiler's 'make' tool is slightly different.
Popular Windows compilers that we cater for, and the corresponding makefile
extensions, include: Microsoft Visual C++ (.vc), Borland C++ (.bcc),
OpenWatcom C++ (.wat) and MinGW/Cygwin (.gcc). Makefiles are provided
for the wxWidgets library itself, samples, demos, and utilities.
On Linux, Mac and OS/2, you use the 'configure' command to
generate the necessary makefiles. You should also use this method when
building with MinGW/Cygwin on Windows.
We also provide project files for some compilers, such as
Microsoft VC++. However, we recommend using makefiles
to build the wxWidgets library itself, because makefiles
can be more powerful and less manual intervention is required.
On Windows using a compiler other than MinGW/Cygwin, you would
build the wxWidgets library from the build/msw directory
which contains the relevant makefiles.
On Windows using MinGW/Cygwin, and on Unix, MacOS X and OS/2, you invoke
'configure' (found in the top-level of the wxWidgets source hierarchy),
from within a suitable empty directory for containing makefiles, object files and
libraries.
For details on using makefiles, configure, and project files,
please see docs/xxx/install.txt in your distribution, where
xxx is the platform of interest, such as msw, gtk, x11, mac.
\section{Windows-specific files}\label{windowsfiles}
wxWidgets application compilation under MS Windows requires at least one
extra file: a resource file.
\subsection{Resource file}\label{resources}
The least that must be defined in the Windows resource file (extension RC)
is the following statement:
\begin{verbatim}
#include "wx/msw/wx.rc"
\end{verbatim}
which includes essential internal wxWidgets 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.}
\section{Allocating and deleting wxWidgets objects}\label{allocatingobjects}
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 wxWidgets 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 wxWidgets, make sure you delete the array explicitly
before wxWidgets 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}\label{architecturedependency}
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). wxWidgets
defines types and macros that make it easy to write architecture independent
code. The types are:
wxInt32, wxInt16, wxInt8, wxUint32, wxUint16 = wxWord, wxUint8 = wxByte
where wxInt32 stands for a 32-bit signed integer type etc. You can also check
which architecture the program is compiled on using the wxBYTE\_ORDER define
which is either wxBIG\_ENDIAN or wxLITTLE\_ENDIAN (in the future maybe wxPDP\_ENDIAN
as well).
The macros handling bit-swapping with respect to the applications endianness
are described in the \helpref{Byte order macros}{byteordermacros} section.
\section{Conditional compilation}\label{conditionalcompilation}
One of the purposes of wxWidgets 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 \helpref{wxUSE\_*}{wxusedef}
symbols listed in the file {\tt setup.h} may be used for this purpose,
along with any user-supplied ones.
\section{C++ issues}\label{cpp}
The following documents some miscellaneous C++ issues.
\subsection{Templates}\label{templates}
wxWidgets does not use templates (except for some advanced features that
are switched off by default) since it is a notoriously unportable feature.
\subsection{RTTI}\label{rtti}
wxWidgets does not use C++ run-time type information since wxWidgets provides
its own run-time type information system, implemented using macros.
\subsection{Type of NULL}\label{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 wxWidgets as
this make the code (a bit) more portable.
\subsection{Precompiled headers}\label{precompiledheaders}
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 wxWidgets itself and any
wxWidgets 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
wxWidgets, 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}\label{filehandling}
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 then searches into a list of standard
paths (platform-specific) through the use of \helpref{wxStandardPaths}{wxstandardpaths}.
Eventually you may want to use also the \helpref{wxPathList}{wxpathlist} class.
Nowadays the limitations of DOS 8+3 filenames doesn't apply anymore.
Most modern operating systems allow at least 255 characters in the filename;
the exact maximum length, as well as the characters allowed in the filenames,
are OS-specific so you should try to avoid extremely long (> 255 chars) filenames
and/or filenames with non-ANSI characters.
Another thing you need to keep in mind is that all Windows operating systems
are case-insensitive, while Unix operating systems (Linux, Mac, etc) are
case-sensitive.
Also, for text files, different OSes use different End Of Lines (EOL).
Windows uses CR+LF convention, Linux uses LF only, Mac CR only.
The \helpref{wxTextFile}{wxtextfile},\helpref{wxTextInputStream}{wxtextinputstream},
\helpref{wxTextOutputStream}{wxtextoutputstream} classes help to abstract
from these differences.
Of course, there are also 3rd party utilities such as \tt{dos2unix} and \tt{unix2dos}
which do the EOL conversions.
See also the \helpref{File Functions}{filefunctions} section of the reference
manual for the description of miscellaneous file handling functions.
\chapter{Utilities and libraries supplied with wxWidgets}\label{utilities}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
In addition to the \helpref{wxWidgets libraries}{librarieslist}, some
additional utilities are supplied in the \tt{utils} hierarchy.
For other user-contributed packages, please see the Contributions page
on the \urlref{wxWidgets Web site}{http://www.wxwidgets.org}.
\begin{description}\itemsep=0pt
\item[{\bf Helpview}]
Helpview is a program for displaying wxWidgets HTML
Help files. In many cases, you may wish to use the wxWidgets HTML
Help classes from within your application, but this provides a
handy stand-alone viewer. See \helpref{wxHTML Notes}{wxhtml} for more details.
You can find it in {\tt samples/html/helpview}.
\item[{\bf Tex2RTF}]
Supplied with wxWidgets is a utility called Tex2RTF for converting\rtfsp
\LaTeX\ manuals HTML, MS HTML Help, wxHTML Help, RTF, and Windows
Help RTF formats. Tex2RTF is used for the wxWidgets manuals and can be used independently
by authors wishing to create on-line and printed manuals from the same\rtfsp
\LaTeX\ source. Please see the separate documentation for Tex2RTF.
You can find it under {\tt utils/tex2rtf}.
\item[{\bf Helpgen}]
Helpgen takes C++ header files and generates a Tex2RTF-compatible
documentation file for each class it finds, using comments as appropriate.
This is a good way to start a reference for a set of classes.
Helpgen can be found in {\tt utils/HelpGen}.
\item[{\bf Emulator}]
Xnest-based display emulator for X11-based PDA applications. On some
systems, the Xnest window does not synchronise with the
'skin' window. This program can be found in {\tt utils/emulator}.
\end{description}
\chapter{Programming strategies}\label{strategies}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
This chapter is intended to list strategies that may be useful when
writing and debugging wxWidgets programs. If you have any good tips,
please submit them for inclusion here.
\section{Strategies for reducing programming errors}\label{reducingerrors}
\subsection{Use ASSERT}\label{useassert}
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 wxWidgets
and your application. Using ASSERT is an example of `defensive programming':
it can alert you to problems later on.
See \helpref{wxASSERT}{wxassert} for more info.
\subsection{Use wxString in preference to character arrays}\label{usewxstring}
Using \helpref{wxString}{wxstring} can be much safer and more convenient than using wxChar *.
You can reduce the possibility of memory leaks substantially, and it is much more
convenient to use the overloaded operators than functions such as \tt{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}\label{portability}
\subsection{Use sizers}\label{usesizers}
Don't use absolute panel item positioning if you can avoid it. Different GUIs have
very differently sized panel items. Consider using the \helpref{sizers}{sizeroverview} instead.
\subsection{Use wxWidgets resource files}\label{useresources}
Use .xrc (wxWidgets resource files) where possible, because they can be easily changed
independently of source code. See the \helpref{XRC overview}{xrcoverview} for more info.
\section{Strategies for debugging}\label{debugstrategies}
\subsection{Positive thinking}\label{positivethinking}
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}\label{simplifyproblem}
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}\label{usedebugger}
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}\label{uselogging}
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 wxWidgets debugging facilities}\label{usedebuggingfacilities}
You can use \helpref{wxDebugContext}{wxdebugcontext} to check for
memory leaks and corrupt memory: in fact in debugging mode, wxWidgets will
automatically check for memory leaks at the end of the program if wxWidgets 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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -1,57 +0,0 @@
\section{\class{wxBoxSizer}}\label{wxboxsizer}
The basic idea behind a box sizer is that windows will most often be laid out in rather
simple basic geometry, typically in a row or a column or several hierarchies of either.
For more information, please see \helpref{Programming with wxBoxSizer}{boxsizerprogramming}.
\wxheading{Derived from}
\helpref{wxSizer}{wxsizer}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/sizer.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxSizer}{wxsizer}, \helpref{Sizer overview}{sizeroverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\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 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 (call Layout() if you want to resize). 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,391 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: brush.tex
%% Purpose: wxPen docs
%% Author:
%% Modified by:
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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{Library}
\helpref{wxCore}{librarieslist}
\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, wxWidgets 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}.
This class uses \helpref{reference counting and copy-on-write}{trefcount}
internally so that assignments between two instances of this class are very
cheap. You can therefore use actual objects instead of pointers without
efficiency problems. If an instance of this class is changed it will create
its own data internally so that other instances, which previously shared the
data using the reference counting, are not affected.
%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}\label{wxbrushctor}
\func{}{wxBrush}{\void}
Default constructor. The brush will be uninitialised, and \helpref{wxBrush:IsOk}{wxbrushisok} will
return false.
\func{}{wxBrush}{\param{const wxColour\&}{ colour}, \param{int}{ style = {\tt wxSOLID}}}
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, uses \helpref{reference counting}{trefcount}.
\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 wxSTIPPLE}}{Uses a bitmap as a stipple.}
\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}}\label{wxbrushdtor}
\func{}{\destruct{wxBrush}}{\void}
Destructor.
See \helpref{reference-counted object destruction}{refcountdestruct} for more info.
\wxheading{Remarks}
Although all remaining brushes are deleted when the application exits,
the application should try to clean up all brushes itself. This is because
wxWidgets 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:IsOk}{wxbitmapisok} 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::IsHatch}\label{wxbrushishatch}
\constfunc{bool}{IsHatch}{\void}
Returns true if the style of the brush is any of hatched fills.
\wxheading{See also}
\helpref{wxBrush::GetStyle}{wxbrushgetstyle}
\membersection{wxBrush::IsOk}\label{wxbrushisok}
\constfunc{bool}{IsOk}{\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{unsigned char}{ red}, \param{unsigned char}{ green}, \param{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 \helpref{reference counting}{trefcount}.
\membersection{wxBrush::operator $==$}\label{wxbrushequals}
\func{bool}{operator $==$}{\param{const wxBrush\& }{brush}}
Equality operator.
See \helpref{reference-counted object comparison}{refcountequality} for more info.
\membersection{wxBrush::operator $!=$}\label{wxbrushnotequals}
\func{bool}{operator $!=$}{\param{const wxBrush\& }{brush}}
Inequality operator.
See \helpref{reference-counted object comparison}{refcountequality} for more info.
\section{\class{wxBrushList}}\label{wxbrushlist}
A brush list is a list containing all brushes which have been created.
\wxheading{Derived from}
\helpref{wxList}{wxlist}
\wxheading{Include files}
<wx/gdicmn.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\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 wxWidgets 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 reference
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 reference 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 wxWidgets to keep
track of brushes in order to clean them up on exit. It is also kept for
backward compatibility with earlier versions of wxWidgets.
\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::FindOrCreateBrush}\label{wxbrushlistfindorcreatebrush}
\func{wxBrush *}{FindOrCreateBrush}{\param{const wxColour\& }{colour}, \param{int}{ style = wxSOLID}}
Finds a brush with the specified attributes and returns it, else creates a new brush, adds it
to the brush list, and returns it.
\wxheading{Parameters}
\docparam{colour}{Colour object.}
\docparam{style}{Brush style. See \helpref{wxBrush::SetStyle}{wxbrushsetstyle} for a list of styles.}

View File

@@ -1,213 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: bufferdc.tex
%% Purpose: wxBufferedDC documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 07.02.04
%% RCS-ID: $Id$
%% Copyright: (c) 2004 Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxBufferedDC}}\label{wxbuffereddc}
This class provides a simple way to avoid flicker: when drawing on it,
everything is in fact first drawn on an in-memory buffer (a
\helpref{wxBitmap}{wxbitmap}) and then copied to the screen, using the
associated wxDC, only once, when this object is destroyed. wxBufferedDC itself
is typically associated with \helpref{wxClientDC}{wxclientdc}, if you want to
use it in your \texttt{EVT\_PAINT} handler, you should look at
\helpref{wxBufferedPaintDC}{wxbufferedpaintdc} instead.
When used like this, a valid \arg{dc} must be specified in the constructor
while the \arg{buffer} bitmap doesn't have to be explicitly provided, by
default this class will allocate the bitmap of required size itself. However
using a dedicated bitmap can speed up the redrawing process by eliminating the
repeated creation and destruction of a possibly big bitmap. Otherwise,
wxBufferedDC can be used in the same way as any other device context.
There is another possible use for wxBufferedDC is to use it to maintain a
backing store for the window contents. In this case, the associated \arg{dc}
may be \NULL but a valid backing store bitmap should be specified.
Finally, please note that GTK+ 2.0 as well as OS X provide double buffering
themselves natively. You can either use \helpref{wxWindow::IsDoubleBuffered}{wxwindowisdoublebuffered}
to determine whether you need to use buffering or not, or use
\helpref{wxAutoBufferedPaintDC}{wxautobufferedpaintdc} to avoid needless double
buffering on the systems which already do it automatically.
\wxheading{Derived from}
\helpref{wxMemoryDC}{wxmemorydc}\\
\helpref{wxDC}{wxdc}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dcbuffer.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxDC}{wxdc},\rtfsp
\helpref{wxMemoryDC}{wxmemorydc},\rtfsp
\helpref{wxBufferedPaintDC}{wxbufferedpaintdc},\rtfsp
\helpref{wxAutoBufferedPaintDC}{wxautobufferedpaintdc}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBufferedDC::wxBufferedDC}\label{wxbuffereddcctor}
\func{}{wxBufferedDC}{\void}
\func{}{wxBufferedDC}{\param{wxDC *}{dc}, \param{const wxSize\& }{area}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
\func{}{wxBufferedDC}{\param{wxDC *}{dc}, \param{wxBitmap\& }{buffer}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
If you use the first, default, constructor, you must call one of the
\helpref{Init}{wxbuffereddcinit} methods later in order to use the object.
The other constructors initialize the object immediately and \texttt{Init()}
must not be called after using them.
\wxheading{Parameters}
\docparam{dc}{The underlying DC: everything drawn to this object will be
flushed to this DC when this object is destroyed. You may pass NULL
in order to just initialize the buffer, and not flush it.}
\docparam{area}{The size of the bitmap to be used for buffering (this bitmap is
created internally when it is not given explicitly).}
\docparam{buffer}{Explicitly provided bitmap to be used for buffering: this is
the most efficient solution as the bitmap doesn't have to be recreated each
time but it also requires more memory as the bitmap is never freed. The bitmap
should have appropriate size, anything drawn outside of its bounds is clipped.}
\docparam{style}{wxBUFFER\_CLIENT\_AREA to indicate that just the client area of
the window is buffered, or wxBUFFER\_VIRTUAL\_AREA to indicate that the buffer bitmap
covers the virtual area (in which case PrepareDC is automatically called for the actual window
device context).}
\membersection{wxBufferedDC::Init}\label{wxbuffereddcinit}
\func{void}{Init}{\param{wxDC *}{dc}, \param{const wxSize\& }{area}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
\func{void}{Init}{\param{wxDC *}{dc}, \param{wxBitmap\& }{buffer}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
These functions initialize the object created using the default constructor.
Please see \helpref{constructors documentation}{wxbuffereddcctor} for details.
% VZ: UnMask() intentionally not documented, we might want to make it private
\membersection{wxBufferedDC::\destruct{wxBufferedDC}}\label{wxbuffereddcdtor}
Copies everything drawn on the DC so far to the underlying DC associated with
this object, if any.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxBufferedPaintDC}}\label{wxbufferedpaintdc}
This is a subclass of \helpref{wxBufferedDC}{wxbuffereddc} which can be used
inside of an \texttt{OnPaint()} event handler. Just create an object of this class instead
of \helpref{wxPaintDC}{wxpaintdc} and make sure \helpref{wxWindow::SetBackgroundStyle}{wxwindowgetbackgroundstyle}
is called with wxBG\_STYLE\_CUSTOM somewhere in the class initialization code, and that's all
you have to do to (mostly) avoid flicker. The only thing to watch out for is that if you are
using this class together with \helpref{wxScrolledWindow}{wxscrolledwindow}, you probably
do \textbf{not} want to call \helpref{PrepareDC}{wxscrolledwindowpreparedc} on it as it
already does this internally for the real underlying wxPaintDC.
\wxheading{Derived from}
\helpref{wxBufferedDC}{wxbuffereddc}\\
\helpref{wxMemoryDC}{wxmemorydc}\\
\helpref{wxDC}{wxdc}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dcbuffer.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxDC}{wxdc},\rtfsp
\helpref{wxBufferedDC}{wxbuffereddc},\rtfsp
\helpref{wxAutoBufferedPaintDC}{wxautobufferedpaintdc}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBufferedPaintDC::wxBufferedPaintDC}\label{wxbufferedpaintdcctor}
\func{}{wxBufferedPaintDC}{\param{wxWindow *}{window}, \param{wxBitmap\& }{buffer}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
\func{}{wxBufferedPaintDC}{\param{wxWindow *}{window}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
As with \helpref{wxBufferedDC}{wxbuffereddcctor}, you may either provide the
bitmap to be used for buffering or let this object create one internally (in
the latter case, the size of the client part of the window is used).
Pass wxBUFFER\_CLIENT\_AREA for the {\it style} parameter to indicate that just the client area of
the window is buffered, or wxBUFFER\_VIRTUAL\_AREA to indicate that the buffer bitmap
covers the virtual area (in which case PrepareDC is automatically called for the actual window
device context).
\membersection{wxBufferedPaintDC::\destruct{wxBufferedPaintDC}}\label{wxbufferedpaintdcdtor}
Copies everything drawn on the DC so far to the window associated with this
object, using a \helpref{wxPaintDC}{wxpaintdc}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxAutoBufferedPaintDC}}\label{wxautobufferedpaintdc}
This wxDC derivative can be used inside of an \texttt{OnPaint()} event handler to achieve
double-buffered drawing. Just create an object of this class instead of \helpref{wxPaintDC}{wxpaintdc}
and make sure \helpref{wxWindow::SetBackgroundStyle}{wxwindowgetbackgroundstyle} is called
with wxBG\_STYLE\_CUSTOM somewhere in the class initialization code, and that's all you have
to do to (mostly) avoid flicker.
The difference between \helpref{wxBufferedPaintDC}{wxbufferedpaintdc} and this class,
is the lightweigthness - on platforms which have native double-buffering, wxAutoBufferedPaintDC is simply
a typedef of wxPaintDC. Otherwise, it is a typedef of wxBufferedPaintDC.
\wxheading{Derived from}
\helpref{wxBufferedPaintDC}{wxbufferedpaintdc}\\
\helpref{wxBufferedDC}{wxbuffereddc}\\
\helpref{wxMemoryDC}{wxmemorydc}\\
\helpref{wxDC}{wxdc}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dcbuffer.h>
\wxheading{See also}
\helpref{wxDC}{wxdc},\rtfsp
\helpref{wxBufferedPaintDC}{wxbufferedpaintdc}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxAutoBufferedPaintDC::wxAutoBufferedPaintDC}\label{wxautobufferedpaintdcctor}
\func{}{wxAutoBufferedPaintDC}{\param{wxWindow *}{window}}
Constructor. Pass a pointer to the window on which you wish to paint.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

View File

@@ -1,50 +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{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxBeginBusyCursor}{wxbeginbusycursor},\rtfsp
\helpref{wxEndBusyCursor}{wxendbusycursor},\rtfsp
\helpref{wxWindowDisabler}{wxwindowdisabler}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBusyCursor::wxBusyCursor}\label{wxbusycursorctor}
\func{}{wxBusyCursor}{\param{wxCursor*}{ cursor = wxHOURGLASS\_CURSOR}}
Constructs a busy cursor object, calling \helpref{wxBeginBusyCursor}{wxbeginbusycursor}.
\membersection{wxBusyCursor::\destruct{wxBusyCursor}}\label{wxbusycursordtor}
\func{}{\destruct{wxBusyCursor}}{\void}
Destroys the busy cursor object, calling \helpref{wxEndBusyCursor}{wxendbusycursor}.

View File

@@ -1,73 +0,0 @@
\section{\class{wxBusyInfo}}\label{wxbusyinfo}
This class makes it easy to tell your user that the program is temporarily busy.
Just create a wxBusyInfo object on the stack, and within the current scope,
a message window will be shown.
For example:
\begin{verbatim}
wxBusyInfo wait("Please wait, working...");
for (int i = 0; i < 100000; i++)
{
DoACalculation();
}
\end{verbatim}
It works by creating a window in the constructor,
and deleting it in the destructor.
You may also want to call wxTheApp->Yield() to refresh the window
periodically (in case it had been obscured by other windows, for
example) like this:
\begin{verbatim}
wxWindowDisabler disableAll;
wxBusyInfo wait("Please wait, working...");
for (int i = 0; i < 100000; i++)
{
DoACalculation();
if ( !(i % 1000) )
wxTheApp->Yield();
}
\end{verbatim}
but take care to not cause undesirable reentrancies when doing it (see
\helpref{wxApp::Yield()}{wxappyield} for more details). The simplest way to do
it is to use \helpref{wxWindowDisabler}{wxwindowdisabler} class as illustrated
in the above example.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/busyinfo.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxBusyInfo::wxBusyInfo}\label{wxbusyinfoctor}
\func{}{wxBusyInfo}{\param{const wxString\&}{ msg}, \param{wxWindow* }{parent = NULL}}
Constructs a busy info window as child of {\it parent} and displays {\it msg}
in it.
{\bf NB:} If {\it parent} is not {\tt NULL} you must ensure that it is not
closed while the busy info is shown.
\membersection{wxBusyInfo::\destruct{wxBusyInfo}}\label{wxbusyinfodtor}
\func{}{\destruct{wxBusyInfo}}{\void}
Hides and closes the window containing the information text.

View File

@@ -1,164 +0,0 @@
\section{\class{wxButton}}\label{wxbutton}
A button is a control that contains a text string,
and is one of the most common elements of a GUI. It may be placed on a
\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{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Window styles}
\twocolwidtha{5cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxBU\_LEFT}}{Left-justifies the label. Windows and GTK+ only.}
\twocolitem{\windowstyle{wxBU\_TOP}}{Aligns the label to the top of the button. Windows and GTK+ only.}
\twocolitem{\windowstyle{wxBU\_RIGHT}}{Right-justifies the bitmap label. Windows and GTK+ only.}
\twocolitem{\windowstyle{wxBU\_BOTTOM}}{Aligns the label to the bottom of the button. Windows and GTK+ only.}
\twocolitem{\windowstyle{wxBU\_EXACTFIT}}{Creates the button as small as possible instead of making it of the standard size (which is the default behaviour ).}
\twocolitem{\windowstyle{wxBORDER\_NONE}}{Creates a flat button. Windows and GTK+ 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{wxbuttonctor}
\func{}{wxButton}{\void}
Default constructor.
\func{}{wxButton}{\param{wxWindow* }{parent}, \param{wxWindowID}{ id}, \param{const wxString\& }{label = wxEmptyString},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``button"}}
Constructor, creating and showing a button.
The preferred way to create standard buttons is to use default value of
\arg{label}. If no label is supplied and \arg{id} is one of standard IDs from
\helpref{this list}{stockitems}, standard label will be used. In addition to
that, the button will be decorated with stock icons under GTK+ 2.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Button identifier. A value of \texttt{wxID\_ANY} 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 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}}\label{wxbuttondtor}
\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 = wxEmptyString},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition}, \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}{wxbuttonctor}.
\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{wxTopLevelWindow::SetDefaultItem}{wxtoplevelwindowsetdefaultitem}.
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: wxWidgets 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,68 +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{Library}
\helpref{wxAdv}{librarieslist}
\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}\label{wxcalculatelayouteventctor}
\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,523 +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. For this,
it displays a window containing several parts: a control at the top to pick the month
and the year (either or both of them may be disabled), and a month
area below them which shows all the days in the month. The user can move the
current selection using the keyboard and select the date (generating
{\tt EVT\_CALENDAR} event) by pressing {\tt <Return>} or double clicking it.
It has advanced possibilities for the customization of its display. All global
settings (such as colours and fonts used) can, of course, be changed. But
also, the display style for each day in the month can be set independently
using \helpref{wxCalendarDateAttr}{wxcalendardateattr} class.
An item without custom attributes is drawn with the default colours and
font and without border, but setting custom attributes with
\helpref{SetAttr}{wxcalendarctrlsetattr} allows to modify its appearance. Just
create a custom attribute object and set it for the day you want to be
displayed specially (note that the control will take ownership of the pointer,
i.e. it will delete it itself). A day may be marked as being a holiday, even
if it is not recognized as one by \helpref{wxDateTime}{tdateholidays} using
\helpref{SetHoliday}{wxcalendardateattrsetholiday} method.
As the attributes are specified for each day, they may change when the month
is changed, so you will often want to update them in
{\tt EVT\_CALENDAR\_MONTH} event handler.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/calctrl.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=4pt
\twocolitem{\windowstyle{wxCAL\_SUNDAY\_FIRST}}{Show Sunday as the first day in the week}
\twocolitem{\windowstyle{wxCAL\_MONDAY\_FIRST}}{Show Monday as the first day in the week}
\twocolitem{\windowstyle{wxCAL\_SHOW\_HOLIDAYS}}{Highlight holidays in the calendar}
\twocolitem{\windowstyle{wxCAL\_NO\_YEAR\_CHANGE}}{Disable the year changing}
\twocolitem{\windowstyle{wxCAL\_NO\_MONTH\_CHANGE}}{Disable the month (and, implicitly, the year) changing}
\twocolitem{\windowstyle{wxCAL\_SHOW\_SURROUNDING\_WEEKS}}{Show the neighbouring weeks in the previous and next months}
\twocolitem{\windowstyle{wxCAL\_SEQUENTIAL\_MONTH\_SELECTION}}{Use alternative, more compact, style for the month and year selection controls.}
\end{twocollist}
The default calendar style is {\tt wxCAL\_SHOW\_HOLIDAYS}.
\wxheading{Event table macros}
To process input from a calendar control, use these event handler macros to
direct input to member functions that take a
\helpref{wxCalendarEvent}{wxcalendarevent} argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=7pt
\twocolitem{{\bf EVT\_CALENDAR(id, func)}}{A day was double clicked in the calendar.}
\twocolitem{{\bf EVT\_CALENDAR\_SEL\_CHANGED(id, func)}}{The selected date changed.}
\twocolitem{{\bf EVT\_CALENDAR\_DAY(id, func)}}{The selected day changed.}
\twocolitem{{\bf EVT\_CALENDAR\_MONTH(id, func)}}{The selected month changed.}
\twocolitem{{\bf EVT\_CALENDAR\_YEAR(id, func)}}{The selected year changed.}
\twocolitem{{\bf EVT\_CALENDAR\_WEEKDAY\_CLICKED(id, func)}}{User clicked on the week day header}
\end{twocollist}%
Note that changing the selected date will result in either of
{\tt EVT\_CALENDAR\_DAY}, {\tt MONTH} or {\tt YEAR} events and
{\tt EVT\_CALENDAR\_SEL\_CHANGED} one.
\wxheading{Constants}
The following are the possible return values for
\helpref{HitTest}{wxcalendarctrlhittest} method:
{\small
\begin{verbatim}
enum wxCalendarHitTestResult
{
wxCAL_HITTEST_NOWHERE, // outside of anything
wxCAL_HITTEST_HEADER, // on the header (weekdays)
wxCAL_HITTEST_DAY // on a day in the calendar
}
\end{verbatim}
}
\wxheading{See also}
\helpref{Calendar sample}{samplecalendar}\\
\helpref{wxCalendarDateAttr}{wxcalendardateattr}\\
\helpref{wxCalendarEvent}{wxcalendarevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCalendarCtrl::wxCalendarCtrl}\label{wxcalendarctrlwxcalendarctrldef}
\func{}{wxCalendarCtrl}{\void}
Default constructor, use \helpref{Create}{wxcalendarctrlcreate} after it.
\func{}{wxCalendarCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxDateTime\& }{date = wxDefaultDateTime}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxCAL\_SHOW\_HOLIDAYS}, \param{const wxString\& }{name = wxCalendarNameStr}}
Does the same as \helpref{Create}{wxcalendarctrlcreate} method.
\membersection{wxCalendarCtrl::Create}\label{wxcalendarctrlcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxDateTime\& }{date = wxDefaultDateTime}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxCAL\_SHOW\_HOLIDAYS}, \param{const wxString\& }{name = wxCalendarNameStr}}
Creates the control. See \helpref{wxWindow}{wxwindowctor} for the meaning of
the parameters and the control overview for the possible styles.
\membersection{wxCalendarCtrl::\destruct{wxCalendarCtrl}}\label{wxcalendarctrldtor}
\func{}{\destruct{wxCalendarCtrl}}{\void}
Destroys the control.
\membersection{wxCalendarCtrl::SetDate}\label{wxcalendarctrlsetdate}
\func{void}{SetDate}{\param{const wxDateTime\& }{date}}
Sets the current date.
\membersection{wxCalendarCtrl::GetDate}\label{wxcalendarctrlgetdate}
\constfunc{const wxDateTime\&}{GetDate}{\void}
Gets the currently selected date.
\membersection{wxCalendarCtrl::EnableYearChange}\label{wxcalendarctrlenableyearchange}
\func{void}{EnableYearChange}{\param{bool }{enable = true}}
This function should be used instead of changing {\tt wxCAL\_NO\_YEAR\_CHANGE}
style bit directly. It allows or disallows the user to change the year
interactively.
\membersection{wxCalendarCtrl::EnableMonthChange}\label{wxcalendarctrlenablemonthchange}
\func{void}{EnableMonthChange}{\param{bool }{enable = true}}
This function should be used instead of changing
{\tt wxCAL\_NO\_MONTH\_CHANGE} style bit. It allows or disallows the user to
change the month interactively. Note that if the month can not be changed, the
year can not be changed neither.
\membersection{wxCalendarCtrl::EnableHolidayDisplay}\label{wxcalendarctrlenableholidaydisplay}
\func{void}{EnableHolidayDisplay}{\param{bool }{display = true}}
This function should be used instead of changing {\tt wxCAL\_SHOW\_HOLIDAYS}
style bit directly. It enables or disables the special highlighting of the
holidays.
\membersection{wxCalendarCtrl::SetHeaderColours}\label{wxcalendarctrlsetheadercolours}
\func{void}{SetHeaderColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}}
Set the colours used for painting the weekdays at the top of the control.
\membersection{wxCalendarCtrl::GetHeaderColourFg}\label{wxcalendarctrlgetheadercolourfg}
\constfunc{const wxColour\&}{GetHeaderColourFg}{\void}
Gets the foreground colour of the header part of the calendar window.
\wxheading{See also}
\helpref{SetHeaderColours}{wxcalendarctrlsetheadercolours}
\membersection{wxCalendarCtrl::GetHeaderColourBg}\label{wxcalendarctrlgetheadercolourbg}
\constfunc{const wxColour\&}{GetHeaderColourBg}{\void}
Gets the background colour of the header part of the calendar window.
\wxheading{See also}
\helpref{SetHeaderColours}{wxcalendarctrlsetheadercolours}
\membersection{wxCalendarCtrl::SetHighlightColours}\label{wxcalendarctrlsethighlightcolours}
\func{void}{SetHighlightColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}}
Set the colours to be used for highlighting the currently selected date.
\membersection{wxCalendarCtrl::GetHighlightColourFg}\label{wxcalendarctrlgethighlightcolourfg}
\constfunc{const wxColour\&}{GetHighlightColourFg}{\void}
Gets the foreground highlight colour.
\wxheading{See also}
\helpref{SetHighlightColours}{wxcalendarctrlsethighlightcolours}
\membersection{wxCalendarCtrl::GetHighlightColourBg}\label{wxcalendarctrlgethighlightcolourbg}
\constfunc{const wxColour\&}{GetHighlightColourBg}{\void}
Gets the background highlight colour.
\wxheading{See also}
\helpref{SetHighlightColours}{wxcalendarctrlsethighlightcolours}
\membersection{wxCalendarCtrl::SetHolidayColours}\label{wxcalendarctrlsetholidaycolours}
\func{void}{SetHolidayColours}{\param{const wxColour\& }{colFg}, \param{const wxColour\& }{colBg}}
Sets the colours to be used for the holidays highlighting (only used if the
window style includes {\tt wxCAL\_SHOW\_HOLIDAYS} flag).
\membersection{wxCalendarCtrl::GetHolidayColourFg}\label{wxcalendarctrlgetholidaycolourfg}
\constfunc{const wxColour\&}{GetHolidayColourFg}{\void}
Return the foreground colour currently used for holiday highlighting.
\wxheading{See also}
\helpref{SetHolidayColours}{wxcalendarctrlsetholidaycolours}
\membersection{wxCalendarCtrl::GetHolidayColourBg}\label{wxcalendarctrlgetholidaycolourbg}
\constfunc{const wxColour\&}{GetHolidayColourBg}{\void}
Return the background colour currently used for holiday highlighting.
\wxheading{See also}
\helpref{SetHolidayColours}{wxcalendarctrlsetholidaycolours}
\membersection{wxCalendarCtrl::GetAttr}\label{wxcalendarctrlgetattr}
\constfunc{wxCalendarDateAttr *}{GetAttr}{\param{size\_t }{day}}
Returns the attribute for the given date (should be in the range $1\ldots31$).
The returned pointer may be {\tt NULL}.
\membersection{wxCalendarCtrl::SetAttr}\label{wxcalendarctrlsetattr}
\func{void}{SetAttr}{\param{size\_t }{day}, \param{wxCalendarDateAttr* }{attr}}
Associates the attribute with the specified date (in the range $1\ldots31$).
If the pointer is {\tt NULL}, the items attribute is cleared.
\membersection{wxCalendarCtrl::SetHoliday}\label{wxcalendarctrlsetholiday}
\func{void}{SetHoliday}{\param{size\_t }{day}}
Marks the specified day as being a holiday in the current month.
\membersection{wxCalendarCtrl::ResetAttr}\label{wxcalendarctrlresetattr}
\func{void}{ResetAttr}{\param{size\_t }{day}}
Clears any attributes associated with the given day (in the range
$1\ldots31$).
\membersection{wxCalendarCtrl::HitTest}\label{wxcalendarctrlhittest}
\func{wxCalendarHitTestResult}{HitTest}{\param{const wxPoint\& }{pos}, \param{wxDateTime* }{date = NULL}, \param{wxDateTime::WeekDay* }{wd = NULL}}
Returns one of {\tt wxCAL\_HITTEST\_XXX}
\helpref{constants}{wxcalendarctrl} and fills either {\it date} or
{\it wd} pointer with the corresponding value depending on the hit test code.
\section{\class{wxCalendarDateAttr}}\label{wxcalendardateattr}
wxCalendarDateAttr is a custom attributes for a calendar date. The objects of
this class are used with \helpref{wxCalendarCtrl}{wxcalendarctrl}.
\wxheading{Derived from}
No base class
\wxheading{Constants}
Here are the possible kinds of borders which may be used to decorate a date:
\begin{verbatim}
enum wxCalendarDateBorder
{
wxCAL_BORDER_NONE, // no border (default)
wxCAL_BORDER_SQUARE, // a rectangular border
wxCAL_BORDER_ROUND // a round border
}
\end{verbatim}
\wxheading{See also}
\helpref{wxCalendarCtrl}{wxcalendarctrl}
\wxheading{Include files}
<wx/calctrl.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\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{Derived from}
\helpref{wxDateEvent}{wxdateevent}\\
\helpref{wxCommandEvent}{wxcommandevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/calctrl.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\wxheading{See also}
\helpref{wxCalendarCtrl}{wxcalendarctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCalendarEvent::GetWeekDay}\label{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.
\membersection{wxCalendarEvent::SetWeekDay}\label{wxcalendareventsetweekday}
\func{void}{SetWeekDay}{\param{wxDateTime::WeekDay}{ day}}
Sets the week day carried by the event, normally only used by the library
internally.

View File

@@ -1,169 +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{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCaret::wxCaret}\label{wxcaretwxcaret}
\func{}{wxCaret}{\void}
Default constructor: you must use one of Create() functions later.
\func{}{wxCaret}{\param{wxWindow* }{window}, \param{int }{width}, \param{int }{height}}
\func{}{wxCaret}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
Create the caret of given (in pixels) width and height and associates it
with the given window.
\membersection{wxCaret::Create}\label{wxcaretcreate}
\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{int }{width}, \param{int }{height}}
\func{bool}{Create}{\param{wxWindowBase* }{window}, \param{const wxSize\& }{size}}
Create the caret of given (in pixels) width and height and associates it
with the given window (same as constructor).
\membersection{wxCaret::GetBlinkTime}\label{wxcaretgetblinktime}
\func{static int}{GetBlinkTime}{\void}
Returns the blink time which is measured in milliseconds and is the time elapsed
between 2 inversions of the caret (blink time of the caret is the same
for all carets, so this functions is static).
\membersection{wxCaret::GetPosition}\label{wxcaretgetposition}
\constfunc{void}{GetPosition}{\param{int* }{x}, \param{int* }{y}}
\constfunc{wxPoint}{GetPosition}{\void}
Get the caret position (in pixels).
\perlnote{In wxPerl there are two methods instead of a single overloaded
method:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetPosition()}}{Returns a Wx::Point}
\twocolitem{{\bf GetPositionXY()}}{Returns a 2-element list
{\tt ( x, y )}}
\end{twocollist}
}}
\membersection{wxCaret::GetSize}\label{wxcaretgetsize}
\constfunc{void}{GetSize}{\param{int* }{width}, \param{int* }{height}}
\constfunc{wxSize}{GetSize}{\void}
Get the caret size.
\perlnote{In wxPerl there are two methods instead of a single overloaded
method:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf GetSize()}}{Returns a Wx::Size}
\twocolitem{{\bf GetSizeWH()}}{Returns a 2-element list
{\tt ( width, height )}}
\end{twocollist}
}}
\membersection{wxCaret::GetWindow}\label{wxcaretgetwindow}
\constfunc{wxWindow*}{GetWindow}{\void}
Get the window the caret is associated with.
\membersection{wxCaret::Hide}\label{wxcarethide}
\func{void}{Hide}{\void}
Same as \helpref{wxCaret::Show(false)}{wxcaretshow}.
\membersection{wxCaret::IsOk}\label{wxcaretisok}
\constfunc{bool}{IsOk}{\void}
Returns true if the caret was created successfully.
\membersection{wxCaret::IsVisible}\label{wxcaretisvisible}
\constfunc{bool}{IsVisible}{\void}
Returns true if the caret is visible and false if it is permanently
hidden (if it is is blinking and not shown currently but will be after the
next blink, this method still returns true).
\membersection{wxCaret::Move}\label{wxcaretmove}
\func{void}{Move}{\param{int }{x}, \param{int }{y}}
\func{void}{Move}{\param{const wxPoint\& }{pt}}
Move the caret to given position (in logical coordinates).
\membersection{wxCaret::SetBlinkTime}\label{wxcaretsetblinktime}
\func{static void}{SetBlinkTime}{\param{int }{milliseconds}}
Sets the blink time for all the carets.
\wxheading{Remarks}
Under Windows, this function will change the blink time for {\bf all} carets
permanently (until the next time it is called), even for the carets in other
applications.
\wxheading{See also}
\helpref{GetBlinkTime}{wxcaretgetblinktime}
\membersection{wxCaret::SetSize}\label{wxcaretsetsize}
\func{void}{SetSize}{\param{int }{width}, \param{int }{height}}
\func{void}{SetSize}{\param{const wxSize\& }{size}}
Changes the size of the caret.
\membersection{wxCaret::Show}\label{wxcaretshow}
\func{void}{Show}{\param{bool }{show = true}}
Shows or hides the caret. Notice that if the caret was hidden $N$ times, it
must be shown $N$ times as well to reappear on the screen.

View File

@@ -1,767 +0,0 @@
\chapter{Classes by category}\label{classesbycat}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
A classification of wxWidgets classes by category.
{\large {\bf Managed windows}}
There are several types of window that are directly controlled by the
window manager (such as MS Windows, or the Motif Window Manager).
Frames and dialogs are similar in wxWidgets, but only dialogs may be modal.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxTopLevelWindow}{wxtoplevelwindow}}{Any top level window, dialog or frame}
\twocolitem{\helpref{wxDialog}{wxdialog}}{Dialog box}
\twocolitem{\helpref{wxFrame}{wxframe}}{Normal frame}
\twocolitem{\helpref{wxMDIChildFrame}{wxmdichildframe}}{MDI child frame}
\twocolitem{\helpref{wxMDIParentFrame}{wxmdiparentframe}}{MDI parent frame}
\twocolitem{\helpref{wxMiniFrame}{wxminiframe}}{A frame with a small title bar}
\twocolitem{\helpref{wxPropertySheetDialog}{wxpropertysheetdialog}}{Property sheet dialog}
\twocolitem{\helpref{wxSplashScreen}{wxsplashscreen}}{Splash screen class}
%\twocolitem{\helpref{wxTabbedDialog}{wxtabbeddialog}}{Tabbed dialog
%(deprecated, use wxNotebook instead)}
\twocolitem{\helpref{wxTipWindow}{wxtipwindow}}{Shows text in a small window}
\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog}
\end{twocollist}
See also the \helpref{Common dialogs overview}{commondialogsoverview}.
{\large {\bf Miscellaneous windows}}
The following are a variety of classes that are derived from wxWindow.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxPanel}{wxpanel}}{A window whose colour changes according to current user settings}
\twocolitem{\helpref{wxScrolledWindow}{wxscrolledwindow}}{Window with automatically managed scrollbars}
\twocolitem{\helpref{wxGrid}{wxgrid}}{A grid (table) window}
\twocolitem{\helpref{wxSplitterWindow}{wxsplitterwindow}}{Window which can be split vertically or horizontally}
\twocolitem{\helpref{wxStatusBar}{wxstatusbar}}{Implements the status bar on a frame}
\twocolitem{\helpref{wxToolBar}{wxtoolbar}}{Toolbar class}
%\twocolitem{\helpref{wxTabbedPanel}{wxtabbedpanel}}{Tabbed panel (to be replaced with wxNotebook)}
\twocolitem{\helpref{wxNotebook}{wxnotebook}}{Notebook class}
\twocolitem{\helpref{wxListbook}{wxlistbook}}{Similar to notebook but using list control}
\twocolitem{\helpref{wxChoicebook}{wxchoicebook}}{Similar to notebook but using choice control}
\twocolitem{\helpref{wxTreebook}{wxtreebook}}{Similar to notebook but using tree control}
\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{wxVScrolledWindow}{wxvscrolledwindow}}{As wxScrolledWindow but supports lines of variable height}
\twocolitem{\helpref{wxWizardPage}{wxwizardpage}}{A base class for the page in wizard dialog.}
\twocolitem{\helpref{wxWizardPageSimple}{wxwizardpagesimple}}{A page in wizard dialog.}
\end{twocollist}
{\large {\bf Common dialogs}}
\overview{Overview}{commondialogsoverview}
Common dialogs are ready-made dialog classes which are frequently used
in an application.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDialog}{wxdialog}}{Base class for common dialogs}
\twocolitem{\helpref{wxColourDialog}{wxcolourdialog}}{Colour chooser dialog}
\twocolitem{\helpref{wxDirDialog}{wxdirdialog}}{Directory selector dialog}
\twocolitem{\helpref{wxFileDialog}{wxfiledialog}}{File selector dialog}
\twocolitem{\helpref{wxFindReplaceDialog}{wxfindreplacedialog}}{Text search/replace dialog}
\twocolitem{\helpref{wxMultiChoiceDialog}{wxmultichoicedialog}}{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{wxPasswordEntryDialog}{wxpasswordentrydialog}}{Dialog to get a password 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{wxProgressDialog}{wxprogressdialog}}{Progress indication dialog}
\twocolitem{\helpref{wxMessageDialog}{wxmessagedialog}}{Simple message box dialog}
\twocolitem{\helpref{wxSymbolPickerDialog}{wxsymbolpickerdialog}}{Symbol selector dialog}
\twocolitem{\helpref{wxRichTextFormattingDialog}{wxrichtextformattingdialog}}{A dialog for formatting the content of a wxRichTextCtrl}
\twocolitem{\helpref{wxWizard}{wxwizard}}{A wizard dialog.}
\end{twocollist}
{\large {\bf Controls}}
Typically, these are small windows which provide interaction with the user. Controls
that are not static can have \helpref{validators}{wxvalidator} associated with them.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxAnimationCtrl}{wxanimationctrl}}{A control to display an animation}
\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{wxBitmapComboBox}{wxbitmapcombobox}}{A combobox with bitmaps next to text items}
\twocolitem{\helpref{wxToggleButton}{wxtogglebutton}}{A button which stays pressed when clicked by user.}
\twocolitem{\helpref{wxBitmapToggleButton}{wxbitmaptogglebutton}}{A toggle button with bitmaps.}
\twocolitem{\helpref{wxCalendarCtrl}{wxcalendarctrl}}{Control showing an entire calendar month}
\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{wxCollapsiblePane}{wxcollapsiblepane}}{A panel which can be shown/hidden by the user}
\twocolitem{\helpref{wxComboBox}{wxcombobox}}{A choice with an editable area}
\twocolitem{\helpref{wxComboCtrl}{wxcomboctrl}}{A combobox with application defined popup}
\twocolitem{\helpref{wxDataViewCtrl}{wxdataviewctrl}}{A control to tabular or tree like data}
\twocolitem{\helpref{wxDataViewTreeCtrl}{wxdataviewtreectrl}}{A specialized wxDataViewCtrl with wxTreeCtrl-like API}
\twocolitem{\helpref{wxGauge}{wxgauge}}{A control to represent a varying quantity, such as time remaining}
\twocolitem{\helpref{wxGenericDirCtrl}{wxgenericdirctrl}}{A control for displaying a directory tree}
\twocolitem{\helpref{wxHtmlListBox}{wxhtmllistbox}}{An abstract class for creating listboxes showing HTML content}
\twocolitem{\helpref{wxSimpleHtmlListBox}{wxsimplehtmllistbox}}{A listbox showing HTML content}
\twocolitem{\helpref{wxStaticBox}{wxstaticbox}}{A static, or group box for visually grouping related controls}
\twocolitem{\helpref{wxListBox}{wxlistbox}}{A list of strings for single or multiple selection}
\twocolitem{\helpref{wxListCtrl}{wxlistctrl}}{A control for displaying lists of strings and/or icons, plus a multicolumn report view}
\twocolitem{\helpref{wxListView}{wxlistview}}{A simpler interface ({\it fa\c{c}ade}) for wxListCtrl in report mode}
\twocolitem{\helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox}}{A combobox with owner-drawn list items}
\twocolitem{\helpref{wxRichTextCtrl}{wxrichtextctrl}}{Generic rich text editing control}
\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{wxHyperlinkCtrl}{wxhyperlinkctrl}}{A static text which opens an URL when clicked}
\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}
\twocolitem{\helpref{wxVListBox}{wxvlistbox}}{A listbox supporting variable height rows}
\end{twocollist}
{\large {\bf Miscellaneous pickers}}
A picker control is a control whose appearance and behaviour is highly platform-dependent.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxColourPickerCtrl}{wxcolourpickerctrl}}{A control which allows the user to choose a colour}
\twocolitem{\helpref{wxDirPickerCtrl}{wxdirpickerctrl}}{A control which allows the user to choose a directory}
\twocolitem{\helpref{wxFilePickerCtrl}{wxfilepickerctrl}}{A control which allows the user to choose a file}
\twocolitem{\helpref{wxFontPickerCtrl}{wxfontpickerctrl}}{A control which allows the user to choose a font}
\twocolitem{\helpref{wxDatePickerCtrl}{wxdatepickerctrl}}{Small date picker control}
\end{twocollist}
{\large {\bf Menus}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxMenu}{wxmenu}}{Displays a series of menu items for selection}
\twocolitem{\helpref{wxMenuBar}{wxmenubar}}{Contains a series of menus for use with a frame}
\twocolitem{\helpref{wxMenuItem}{wxmenuitem}}{Represents a single menu item}
\end{twocollist}
{\large {\bf wxAUI - advanced user interface}}
This is a new set of classes for writing a customizable application
interface with built-in docking, floatable panes and a flexible
MDI-like interface. Further classes for custom notebooks with
draggable tabs etc. are in progress. See also \helpref{wxAUI overview}{wxauioverview}.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxAuiManager}{wxauimanager}}{The central class for managing the interface}
\twocolitem{\helpref{wxAuiNotebook}{wxauinotebook}}{A replacement notebook class with extra features}
\twocolitem{\helpref{wxAuiPaneInfo}{wxauipaneinfo}}{Describes a single pane}
\twocolitem{\helpref{wxAuiDockArt}{wxauidockart}}{Art and metrics provider for customizing the docking user interface}
\twocolitem{\helpref{wxAuiTabArt}{wxauitabart}}{Art and metrics provider for customizing the notebook user interface}
\end{twocollist}
{\large {\bf Window layout}}
There are two different systems for laying out windows (and dialogs in particular).
One is based upon so-called sizers and it requires less typing, thinking and calculating
and will in almost all cases produce dialogs looking equally well on all platforms, the
other is based on so-called constraints and is deprecated, though still available.
\overview{Sizer overview}{sizeroverview} describes sizer-based layout.
These are the classes relevant to sizer-based layout.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxSizer}{wxsizer}}{Abstract base class}
\twocolitem{\helpref{wxGridSizer}{wxgridsizer}}{A sizer for laying out windows in a grid with all fields having the same size}
\twocolitem{\helpref{wxFlexGridSizer}{wxflexgridsizer}}{A sizer for laying out windows in a flexible grid}
\twocolitem{\helpref{wxGridBagSizer}{wxgridbagsizer}}{Another grid sizer that lets you specify the cell an item is in, and items can span rows and/or columns.}
\twocolitem{\helpref{wxBoxSizer}{wxboxsizer}}{A sizer for laying out windows in a row or column}
\twocolitem{\helpref{wxStaticBoxSizer}{wxstaticboxsizer}}{Same as wxBoxSizer, but with a surrounding static box}
\twocolitem{\helpref{wxWrapSizer}{wxwrapsizer}}{A sizer which wraps its child controls as size permits}
\end{twocollist}
\overview{Constraints overview}{constraintsoverview} describes constraints-based layout.
These are the classes relevant to constraints-based window layout.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}}{Represents a single constraint dimension}
\twocolitem{\helpref{wxLayoutConstraints}{wxlayoutconstraints}}{Represents the constraints for a window class}
\end{twocollist}
Other layouting classes:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxLayoutAlgorithm}{wxlayoutalgorithm}}{An alternative window layout facility}
\end{twocollist}
{\large {\bf Device contexts}}
\overview{Overview}{dcoverview}
Device contexts are surfaces that may be drawn on, and provide an
abstraction that allows parameterisation of your drawing code
by passing different device contexts.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxAutoBufferedPaintDC}{wxautobufferedpaintdc}}{A helper device context for double buffered drawing inside \textbf{OnPaint}.}
\twocolitem{\helpref{wxBufferedDC}{wxbuffereddc}}{A helper device context for double buffered drawing.}
\twocolitem{\helpref{wxBufferedPaintDC}{wxbufferedpaintdc}}{A helper device context for double buffered drawing inside \textbf{OnPaint}.}
\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{wxMirrorDC}{wxmirrordc}}{A proxy device context allowing for simple mirroring.}
\twocolitem{\helpref{wxPostScriptDC}{wxpostscriptdc}}{A device context for drawing into PostScript files}
\twocolitem{\helpref{wxPrinterDC}{wxprinterdc}}{A device context for drawing to printers}
\end{twocollist}
{\large {\bf Graphics device interface}}
\overview{Bitmaps overview}{wxbitmapoverview}
These classes are related to drawing on device contexts and windows.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxColour}{wxcolour}}{Represents the red, blue and green elements of a colour}
\twocolitem{\helpref{wxDCClipper}{wxdcclipper}}{Wraps the operations of setting and destroying the clipping region}
\twocolitem{\helpref{wxBitmap}{wxbitmap}}{Represents a bitmap}
\twocolitem{\helpref{wxBrush}{wxbrush}}{Used for filling areas on a device context}
\twocolitem{\helpref{wxBrushList}{wxbrushlist}}{The list of previously-created brushes}
\twocolitem{\helpref{wxCursor}{wxcursor}}{A small, transparent bitmap representing the cursor}
\twocolitem{\helpref{wxFont}{wxfont}}{Represents fonts}
\twocolitem{\helpref{wxFontList}{wxfontlist}}{The list of previously-created fonts}
\twocolitem{\helpref{wxIcon}{wxicon}}{A small, transparent bitmap for assigning to frames and drawing on device contexts}
\twocolitem{\helpref{wxImage}{wximage}}{A platform-independent image class}
\twocolitem{\helpref{wxImageList}{wximagelist}}{A list of images, used with some controls}
\twocolitem{\helpref{wxMask}{wxmask}}{Represents a mask to be used with a bitmap for transparent drawing}
\twocolitem{\helpref{wxPen}{wxpen}}{Used for drawing lines on a device context}
\twocolitem{\helpref{wxPenList}{wxpenlist}}{The list of previously-created pens}
\twocolitem{\helpref{wxPalette}{wxpalette}}{Represents a table of indices into RGB values}
\twocolitem{\helpref{wxRegion}{wxregion}}{Represents a simple or complex region on a window or device context}
\twocolitem{\helpref{wxRendererNative}{wxrenderernative}}{Abstracts high-level drawing primitives}
\end{twocollist}
{\large {\bf Events}}
\overview{Overview}{eventhandlingoverview}
An event object contains information about a specific event. Event handlers
(usually member functions) have a single, event argument.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxActivateEvent}{wxactivateevent}}{A window or application activation event}
\twocolitem{\helpref{wxCalendarEvent}{wxcalendarevent}}{Used with \helpref{wxCalendarCtrl}{wxcalendarctrl}}
\twocolitem{\helpref{wxCalculateLayoutEvent}{wxcalculatelayoutevent}}{Used to calculate window layout}
\twocolitem{\helpref{wxChildFocusEvent}{wxchildfocusevent}}{A child window focus event}
\twocolitem{\helpref{wxClipboardTextEvent}{wxclipboardtextevent}}{A clipboard copy/cut/paste treebook event event}
\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{wxContextMenuEvent}{wxcontextmenuevent}}{An event generated when the user issues a context menu command}
\twocolitem{\helpref{wxDateEvent}{wxdateevent}}{Used with \helpref{wxDatePickerCtrl}{wxdatepickerctrl}}
\twocolitem{\helpref{wxDialUpEvent}{wxdialupevent}}{Event send by \helpref{wxDialUpManager}{wxdialupmanager}}
\twocolitem{\helpref{wxDropFilesEvent}{wxdropfilesevent}}{A drop files event}
\twocolitem{\helpref{wxEraseEvent}{wxeraseevent}}{An erase background event}
\twocolitem{\helpref{wxEvent}{wxevent}}{The event base class}
\twocolitem{\helpref{wxFindDialogEvent}{wxfinddialogevent}}{Event sent by
\helpref{wxFindReplaceDialog}{wxfindreplacedialog}}
\twocolitem{\helpref{wxFocusEvent}{wxfocusevent}}{A window focus event}
\twocolitem{\helpref{wxKeyEvent}{wxkeyevent}}{A keypress event}
\twocolitem{\helpref{wxIconizeEvent}{wxiconizeevent}}{An iconize/restore event}
\twocolitem{\helpref{wxIdleEvent}{wxidleevent}}{An idle event}
\twocolitem{\helpref{wxInitDialogEvent}{wxinitdialogevent}}{A dialog initialisation event}
\twocolitem{\helpref{wxJoystickEvent}{wxjoystickevent}}{A joystick event}
\twocolitem{\helpref{wxListEvent}{wxlistevent}}{A list control event}
\twocolitem{\helpref{wxMaximizeEvent}{wxmaximizeevent}}{A maximize event}
\twocolitem{\helpref{wxMenuEvent}{wxmenuevent}}{A menu event}
\twocolitem{\helpref{wxMouseCaptureChangedEvent}{wxmousecapturechangedevent}}{A mouse capture changed event}
\twocolitem{\helpref{wxMouseCaptureLostEvent}{wxmousecapturelostevent}}{A mouse capture lost event}
\twocolitem{\helpref{wxMouseEvent}{wxmouseevent}}{A mouse event}
\twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{A move event}
\twocolitem{\helpref{wxNavigationKeyEvent}{wxnavigationkeyevent}}{An event set by navigation keys such as tab}
\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{wxRichTextEvent}{wxrichtextevent}}{A rich text editing event}
\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{wxSplitterEvent}{wxsplitterevent}}{An event from \helpref{wxSplitterWindow}{wxsplitterwindow}}
\twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{A system colour change event}
\twocolitem{\helpref{wxTimerEvent}{wxtimerevent}}{A timer expiration event}
\twocolitem{\helpref{wxTreebookEvent}{wxtreebookevent}}{A treebook control event}
\twocolitem{\helpref{wxTreeEvent}{wxtreeevent}}{A tree control event}
\twocolitem{\helpref{wxUpdateUIEvent}{wxupdateuievent}}{A user interface update event}
\twocolitem{\helpref{wxWindowCreateEvent}{wxwindowcreateevent}}{A window creation event}
\twocolitem{\helpref{wxWindowDestroyEvent}{wxwindowdestroyevent}}{A window destruction event}
\twocolitem{\helpref{wxWizardEvent}{wxwizardevent}}{A wizard event}
\end{twocollist}
{\large {\bf Validators}}
\overview{Overview}{validatoroverview}
These are the window validators, used for filtering and validating
user input.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxValidator}{wxvalidator}}{Base validator class}
\twocolitem{\helpref{wxTextValidator}{wxtextvalidator}}{Text control validator class}
\twocolitem{\helpref{wxGenericValidator}{wxgenericvalidator}}{Generic control validator class}
\end{twocollist}
{\large {\bf Data structures}}
These are the data structure classes supported by wxWidgets.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class}
\twocolitem{\helpref{wxDateSpan}{wxdatespan}}{A logical time interval.}
\twocolitem{\helpref{wxDateTime}{wxdatetime}}{A class for date/time manipulations}
\twocolitem{\helpref{wxLongLong}{wxlonglong}}{A portable 64 bit integer type}
\twocolitem{\helpref{wxObject}{wxobject}}{The root class for most wxWidgets classes}
\twocolitem{\helpref{wxPathList}{wxpathlist}}{A class to help search multiple paths}
\twocolitem{\helpref{wxPoint}{wxpoint}}{Representation of a point}
\twocolitem{\helpref{wxRect}{wxrect}}{A class representing a rectangle}
\twocolitem{\helpref{wxRegEx}{wxregex}}{Regular expression support}
\twocolitem{\helpref{wxRegion}{wxregion}}{A class representing a region}
\twocolitem{\helpref{wxString}{wxstring}}{A string class}
\twocolitem{\helpref{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{wxTimeSpan}{wxtimespan}}{A time interval.}
\twocolitem{\helpref{wxURI}{wxuri}}{Represents a Uniform Resource Identifier}
\twocolitem{\helpref{wxVariant}{wxvariant}}{A class for storing arbitrary types that may change at run-time}
\end{twocollist}
{\large {\bf Container classes}}
\overview{Overview}{wxcontaineroverview}
These are classes, templates and class macros are used by wxWidgets. Most
of these classes provide a subset or almost complete STL API.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxArray<T>}{wxarray}}{A type-safe dynamic array implementation (macro based)}
\twocolitem{\helpref{wxArrayString}{wxarraystring}}{An efficient container for storing \helpref{wxString}{wxstring} objects}
\twocolitem{\helpref{wxHashMap<T>}{wxhashmap}}{A type-safe hash map implementation (macro based)}
\twocolitem{\helpref{wxHashSet<T>}{wxhashset}}{A type-safe hash set implementation(macro based)}
\twocolitem{\helpref{wxHashTable}{wxhashtable}}{A simple hash table implementation (deprecated, use wxHashMap)}
\twocolitem{\helpref{wxList<T>}{wxlist}}{A type-safe linked list implementation (macro based)}
\twocolitem{\helpref{wxVector<T>}{wxvector}}{Template base vector implementation identical to std::vector}
\end{twocollist}
{\large {\bf Smart pointers}}
wxWidgets provides a few smart pointer class templates.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxObjectDataPtr<T>}{wxobjectdataptr}}{A shared pointer (using intrusive reference counting)}
\twocolitem{\helpref{wxScopedPtr<T>}{wxscopedptrtemplate}}{A scoped pointer}
\twocolitem{\helpref{wxSharedPtr<T>}{wxsharedptr}}{A shared pointer (using non-intrusive reference counting)}
\twocolitem{\helpref{wxWeakRef<T>}{wxweakref}}{A weak reference}
\end{twocollist}
{\large {\bf Run-time class information system}}
\overview{Overview}{runtimeclassoverview}
wxWidgets supports run-time manipulation of class information, and dynamic
creation of objects given class names.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxClassInfo}{wxclassinfo}}{Holds run-time class information}
\twocolitem{\helpref{wxObject}{wxobject}}{Root class for classes with run-time information}
\twocolitem{\helpref{RTTI macros}{rttimacros}}{Macros for manipulating run-time information}
\end{twocollist}
{\large {\bf Logging features}}
\overview{Overview}{wxlogoverview}
wxWidgets provides several classes and functions for message logging.
Please see the \helpref{wxLog overview}{wxlogoverview} for more details.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxLog}{wxlog}}{The base log class}
\twocolitem{\helpref{wxLogStderr}{wxlogstderr}}{Log messages to a C STDIO stream}
\twocolitem{\helpref{wxLogStream}{wxlogstream}}{Log messages to a C++ iostream}
\twocolitem{\helpref{wxLogTextCtrl}{wxlogtextctrl}}{Log messages to a \helpref{wxTextCtrl}{wxtextctrl}}
\twocolitem{\helpref{wxLogWindow}{wxlogwindow}}{Log messages to a log frame}
\twocolitem{\helpref{wxLogGui}{wxloggui}}{Default log target for GUI programs}
\twocolitem{\helpref{wxLogNull}{wxlognull}}{Temporarily suppress message logging}
\twocolitem{\helpref{wxLogChain}{wxlogchain}}{Allows to chain two log targets}
\twocolitem{\helpref{wxLogInterposer}{wxloginterposer}}{Allows to filter the log messages}
\twocolitem{\helpref{wxLogInterposerTemp}{wxloginterposertemp}}{Allows to filter the log messages}
\twocolitem{\helpref{wxStreamToTextRedirector}{wxstreamtotextredirector}}{Allows
to redirect output sent to {\tt cout} to a \helpref{wxTextCtrl}{wxtextctrl}}
\twocolitem{\helpref{Log functions}{logfunctions}}{Error and warning logging functions}
\end{twocollist}
{\large {\bf Debugging features}}
\overview{Overview}{debuggingoverview}
wxWidgets supports some aspects of debugging an application through
classes, functions and macros.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDebugContext}{wxdebugcontext}}{Provides memory-checking facilities}
\twocolitem{\helpref{Debugging macros}{debugmacros}}{Debug macros for assertion and checking}
\twocolitem{\helpref{WXDEBUG\_NEW}{debugnew}}{Use this macro to give further debugging information}
\twocolitem{\helpref{wxDebugReport}{wxdebugreport}}{Base class for creating debug reports in case of a program crash.}
\twocolitem{\helpref{wxDebugReportCompress}{wxdebugreportcompress}}{Class for creating compressed debug reports.}
\twocolitem{\helpref{wxDebugReportUpload}{wxdebugreportupload}}{Class for uploading compressed debug reports via HTTP.}
\twocolitem{\helpref{wxDebugReportPreview}{wxdebugreportpreview}}{Abstract base class for previewing the contents of a debug report.}
\twocolitem{\helpref{wxDebugReportPreviewStd}{wxdebugreportpreviewstd}}{Standard implementation of wxDebugReportPreview.}
\end{twocollist}
{\large {\bf Networking classes}}
wxWidgets provides its own classes for socket based networking.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDialUpManager}{wxdialupmanager}}{Provides functions to check the status of network connection and to establish one}
\twocolitem{\helpref{wxIPV4address}{wxipv4address}}{Represents an Internet address}
\twocolitem{\helpref{wxIPaddress}{wxipaddress}}{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}
wxWidgets provides simple interprocess communications facilities
based on Windows DDE, but available on most platforms using TCP.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxClient}{wxclient}, \helpref{wxDDEClient}{wxddeclient}}{Represents a client}
\twocolitem{\helpref{wxConnection}{wxconnection}, \helpref{wxDDEConnection}{wxddeconnection}}{Represents the connection between a client and a server}
\twocolitem{\helpref{wxServer}{wxserver}, \helpref{wxDDEServer}{wxddeserver}}{Represents a server}
%\twocolitem{\helpref{wxSocketHandler}{wxsockethandler}}{Represents a socket handler}
\end{twocollist}
{\large {\bf Document/view framework}}
\overview{Overview}{docviewoverview}
wxWidgets supports a document/view framework which provides
housekeeping for a document-centric application.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDocument}{wxdocument}}{Represents a document}
\twocolitem{\helpref{wxView}{wxview}}{Represents a view}
\twocolitem{\helpref{wxDocTemplate}{wxdoctemplate}}{Manages the relationship between a document class and a view class}
\twocolitem{\helpref{wxDocManager}{wxdocmanager}}{Manages the documents and views in an application}
\twocolitem{\helpref{wxDocChildFrame}{wxdocchildframe}}{A child frame for showing a document view}
\twocolitem{\helpref{wxDocParentFrame}{wxdocparentframe}}{A parent frame to contain views}
%\twocolitem{\helpref{wxMDIDocChildFrame}{wxmdidocchildframe}}{An MDI child frame for showing a document view}
%\twocolitem{\helpref{wxMDIDocParentFrame}{wxmdidocparentframe}}{An MDI parent frame to contain views}
\end{twocollist}
{\large {\bf Printing framework}}
\overview{Overview}{printingoverview}
A printing and previewing framework is implemented to
make it relatively straightforward to provide document printing
facilities.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxPreviewFrame}{wxpreviewframe}}{Frame for displaying a print preview}
\twocolitem{\helpref{wxPreviewCanvas}{wxpreviewcanvas}}{Canvas for displaying a print preview}
\twocolitem{\helpref{wxPreviewControlBar}{wxpreviewcontrolbar}}{Standard control bar for a print preview}
\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog}
\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog}
\twocolitem{\helpref{wxPrinter}{wxprinter}}{Class representing the printer}
\twocolitem{\helpref{wxPrinterDC}{wxprinterdc}}{Printer device context}
\twocolitem{\helpref{wxPrintout}{wxprintout}}{Class representing a particular printout}
\twocolitem{\helpref{wxPrintPreview}{wxprintpreview}}{Class representing a print preview}
\twocolitem{\helpref{wxPrintData}{wxprintdata}}{Represents information about the document being printed}
\twocolitem{\helpref{wxPrintDialogData}{wxprintdialogdata}}{Represents information about the print dialog}
\twocolitem{\helpref{wxPageSetupDialogData}{wxpagesetupdialogdata}}{Represents information about the page setup dialog}
\end{twocollist}
{\large {\bf Drag and drop and clipboard classes}}
\overview{Drag and drop and clipboard overview}{wxdndoverview}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxDataObject}{wxdataobject}}{Data object class}
\twocolitem{\helpref{wxDataFormat}{wxdataformat}}{Represents a data format}
\twocolitem{\helpref{wxTextDataObject}{wxtextdataobject}}{Text data object class}
\twocolitem{\helpref{wxFileDataObject}{wxfiledataobject}}{File data object class}
\twocolitem{\helpref{wxBitmapDataObject}{wxbitmapdataobject}}{Bitmap data object class}
\twocolitem{\helpref{wxURLDataObject}{wxurldataobject}}{URL 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}}
wxWidgets has several small classes to work with disk files, see \helpref{file classes
overview}{wxfileoverview} for more details.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxFileName}{wxfilename}}{Operations with the file name and attributes}
\twocolitem{\helpref{wxDir}{wxdir}}{Class for enumerating files/subdirectories.}
\twocolitem{\helpref{wxDirTraverser}{wxdirtraverser}}{Class used together with wxDir for recursively enumerating the files/subdirectories}
\twocolitem{\helpref{wxFile}{wxfile}}{Low-level file input/output class.}
\twocolitem{\helpref{wxFFile}{wxffile}}{Another low-level file input/output class.}
\twocolitem{\helpref{wxTempFile}{wxtempfile}}{Class to safely replace an existing file}
\twocolitem{\helpref{wxTextFile}{wxtextfile}}{Class for working with text files as with arrays of lines}
\twocolitem{\helpref{wxStandardPaths}{wxstandardpaths}}{Paths for standard directories}
\twocolitem{\helpref{wxPathList}{wxpathlist}}{A class to help search multiple paths}
\end{twocollist}
{\large {\bf Stream classes}}
wxWidgets has its own set of stream classes, as an alternative to often buggy standard stream
libraries, and to provide enhanced functionality.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxStreamBase}{wxstreambase}}{Stream base class}
\twocolitem{\helpref{wxStreamBuffer}{wxstreambuffer}}{Stream buffer class}
\twocolitem{\helpref{wxInputStream}{wxinputstream}}{Input stream class}
\twocolitem{\helpref{wxOutputStream}{wxoutputstream}}{Output stream class}
\twocolitem{\helpref{wxCountingOutputStream}{wxcountingoutputstream}}{Stream class for querying what size a stream would have.}
\twocolitem{\helpref{wxFilterInputStream}{wxfilterinputstream}}{Filtered input stream class}
\twocolitem{\helpref{wxFilterOutputStream}{wxfilteroutputstream}}{Filtered output stream class}
\twocolitem{\helpref{wxBufferedInputStream}{wxbufferedinputstream}}{Buffered input stream class}
\twocolitem{\helpref{wxBufferedOutputStream}{wxbufferedoutputstream}}{Buffered output stream class}
\twocolitem{\helpref{wxMemoryInputStream}{wxmeminputstream}}{Memory input stream class}
\twocolitem{\helpref{wxMemoryOutputStream}{wxmemoutputstream}}{Memory output stream class}
\twocolitem{\helpref{wxDataInputStream}{wxdatainputstream}}{Platform-independent binary data input stream class}
\twocolitem{\helpref{wxDataOutputStream}{wxdataoutputstream}}{Platform-independent binary data output stream class}
\twocolitem{\helpref{wxTextInputStream}{wxtextinputstream}}{Platform-independent text data input stream class}
\twocolitem{\helpref{wxTextOutputStream}{wxtextoutputstream}}{Platform-independent text data output stream class}
\twocolitem{\helpref{wxFileInputStream}{wxfileinputstream}}{File input stream class}
\twocolitem{\helpref{wxFileOutputStream}{wxfileoutputstream}}{File output stream class}
\twocolitem{\helpref{wxFFileInputStream}{wxffileinputstream}}{Another file input stream class}
\twocolitem{\helpref{wxFFileOutputStream}{wxffileoutputstream}}{Another file output stream class}
\twocolitem{\helpref{wxTempFileOutputStream}{wxtempfileoutputstream}}{Stream to safely replace an existing file}
\twocolitem{\helpref{wxStringInputStream}{wxstringinputstream}}{String input stream class}
\twocolitem{\helpref{wxStringOutputStream}{wxstringoutputstream}}{String output stream class}
\twocolitem{\helpref{wxZlibInputStream}{wxzlibinputstream}}{Zlib and gzip (compression) input stream class}
\twocolitem{\helpref{wxZlibOutputStream}{wxzliboutputstream}}{Zlib and gzip (compression) output stream class}
\twocolitem{\helpref{wxZipInputStream}{wxzipinputstream}}{Input stream for reading from ZIP archives}
\twocolitem{\helpref{wxZipOutputStream}{wxzipoutputstream}}{Output stream for writing from ZIP archives}
\twocolitem{\helpref{wxTarInputStream}{wxtarinputstream}}{Input stream for reading from tar archives}
\twocolitem{\helpref{wxTarOutputStream}{wxtaroutputstream}}{Output stream for writing from tar 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}
wxWidgets provides a set of classes to make use of the native thread
capabilities of the various platforms.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxThread}{wxthread}}{Thread class}
\twocolitem{\helpref{wxThreadHelper}{wxthreadhelper}}{Manages background threads easily}
\twocolitem{\helpref{wxMutex}{wxmutex}}{Mutex class}
\twocolitem{\helpref{wxMutexLocker}{wxmutexlocker}}{Mutex locker utility class}
\twocolitem{\helpref{wxCriticalSection}{wxcriticalsection}}{Critical section class}
\twocolitem{\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker}}{Critical section locker utility class}
\twocolitem{\helpref{wxCondition}{wxcondition}}{Condition class}
\twocolitem{\helpref{wxSemaphore}{wxsemaphore}}{Semaphore class}
\end{twocollist}
{\large {\bf HTML classes}}
wxWidgets provides a set of classes to display text in HTML format. These
class include a help system based on the HTML widget.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}}{HTML help controller class}
\twocolitem{\helpref{wxHtmlWindow}{wxhtmlwindow}}{HTML window class}
\twocolitem{\helpref{wxHtmlEasyPrinting}{wxhtmleasyprinting}}{Simple class for printing HTML}
\twocolitem{\helpref{wxHtmlPrintout}{wxhtmlprintout}}{Generic HTML wxPrintout class}
\twocolitem{\helpref{wxHtmlParser}{wxhtmlparser}}{Generic HTML parser class}
\twocolitem{\helpref{wxHtmlTagHandler}{wxhtmltaghandler}}{HTML tag handler, pluginable into wxHtmlParser}
\twocolitem{\helpref{wxHtmlWinParser}{wxhtmlwinparser}}{HTML parser class for wxHtmlWindow}
\twocolitem{\helpref{wxHtmlWinTagHandler}{wxhtmlwintaghandler}}{HTML tag handler, pluginable into wxHtmlWinParser}
\end{twocollist}
{\large {\bf Rich text classes}}
wxWidgets provides a set of generic classes to edit and print simple rich text with character
and paragraph formatting.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxTextAttr}{wxtextattr}}{Attributes specifying text styling.}
\twocolitem{\helpref{wxRichTextCtrl}{wxrichtextctrl}}{A rich text control.}
\twocolitem{\helpref{wxRichTextBuffer}{wxrichtextbuffer}}{The content of a rich text control.}
\twocolitem{\helpref{wxRichTextCharacterStyleDefinition}{wxrichtextcharacterstyledefinition}}{Definition of character styling.}
\twocolitem{\helpref{wxRichTextParagraphStyleDefinition}{wxrichtextparagraphstyledefinition}}{Definition of paragraph styling.}
\twocolitem{\helpref{wxRichTextListStyleDefinition}{wxrichtextliststyledefinition}}{Definition of list styling.}
\twocolitem{\helpref{wxRichTextStyleSheet}{wxrichtextstylesheet}}{A set of style definitions.}
\twocolitem{\helpref{wxRichTextStyleComboCtrl}{wxrichtextstylecomboctrl}}{A drop-down control for applying styles.}
\twocolitem{\helpref{wxRichTextStyleListBox}{wxrichtextstylelistbox}}{A listbox for applying styles.}
\twocolitem{\helpref{wxRichTextStyleOrganiserDialog}{wxrichtextstyleorganiserdialog}}{A dialog that can be used for managing or browsing styles.}
\twocolitem{\helpref{wxRichTextEvent}{wxrichtextevent}}{A rich text event.}
\twocolitem{\helpref{wxRichTextRange}{wxrichtextrange}}{Specification for ranges in a rich text control or buffer.}
\twocolitem{\helpref{wxRichTextFileHandler}{wxrichtextfilehandler}}{File handler base class.}
\twocolitem{\helpref{wxRichTextHTMLHandler}{wxrichtexthtmlhandler}}{A handler for converting rich text to HTML.}
\twocolitem{\helpref{wxRichTextXMLHandler}{wxrichtextxmlhandler}}{A handler for loading and saving rich text XML.}
\twocolitem{\helpref{wxRichTextFormattingDialog}{wxrichtextformattingdialog}}{A dialog for rich text formatting.}
\twocolitem{\helpref{wxRichTextPrinting}{wxrichtextprinting}}{A class for easy printing of rich text buffers.}
\twocolitem{\helpref{wxRichTextPrintout}{wxrichtextprintout}}{A class used by wxRichTextPrinting.}
\twocolitem{\helpref{wxRichTextHeaderFooterData}{wxrichtextheaderfooterdata}}{Header and footer data specification.}
\end{twocollist}
{\large {\bf Scintilla text editor classes}}
wxWidgets also provides a wrapper around the Scintilla text editor control, which is
a control for plain-text editing with support for highlighting, smart indentation, etc.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxStyledTextCtrl}{wxstyledtextctrl}}{A wxWidgets implementation of the Scintilla source code editing component.}
\end{twocollist}
{\large {\bf Virtual file system classes}}
wxWidgets provides a set of classes that implement an extensible virtual file system,
used internally by the HTML classes.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxFSFile}{wxfsfile}}{Represents a file in the virtual file system}
\twocolitem{\helpref{wxFileSystem}{wxfilesystem}}{Main interface for the virtual file system}
\twocolitem{\helpref{wxFileSystemHandler}{wxfilesystemhandler}}{Class used to announce file system type}
\end{twocollist}
{\large {\bf XML classes}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxXmlDocument}{wxxmldocument}}{A class to parse XML files}
\twocolitem{\helpref{wxXmlNode}{wxxmlnode}}{A class which represents XML nodes}
\twocolitem{\helpref{wxXmlAttribute}{wxxmlattribute}}{A class which represent an XML attribute}
\end{twocollist}
{\large {\bf XML-based resource system classes}}
\overview{XML-based resource system (XRC) overview}{xrcoverview}
Resources allow your application to create controls and other user interface elements
from specifications stored in an XML format.
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxXmlResource}{wxxmlresource}}{The main class for working with resources}
\twocolitem{\helpref{wxXmlResourceHandler}{wxxmlresourcehandler}}{The base class for XML resource handlers}
\end{twocollist}
{\large {\bf Online help}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxHelpController}{wxhelpcontroller}}{Family of classes for controlling help windows}
\twocolitem{\helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}}{HTML help controller class}
\twocolitem{\helpref{wxContextHelp}{wxcontexthelp}}{Class to put application into context-sensitive help mode}
\twocolitem{\helpref{wxContextHelpButton}{wxcontexthelpbutton}}{Button class for putting application into context-sensitive help mode}
\twocolitem{\helpref{wxHelpProvider}{wxhelpprovider}}{Abstract class for context-sensitive help provision}
\twocolitem{\helpref{wxSimpleHelpProvider}{wxsimplehelpprovider}}{Class for simple context-sensitive help provision}
\twocolitem{\helpref{wxHelpControllerHelpProvider}{wxhelpcontrollerhelpprovider}}{Class for context-sensitive help provision via a help controller}
\twocolitem{\helpref{wxToolTip}{wxtooltip}}{Class implementing tooltips}
\end{twocollist}
{\large {\bf Multimedia classes}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxMediaCtrl}{wxmediactrl}}{Display multimedia contents.}
\end{twocollist}
{\large {\bf OpenGL classes}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxGLCanvas}{wxglcanvas}}{Canvas that you can render OpenGL calls to.}
\twocolitem{\helpref{wxGLContext}{wxglcontext}}{Class to ease sharing of OpenGL data resources.}
\end{twocollist}
{\large {\bf Application and process-management classes}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxApp}{wxapp}}{Application class}
\twocolitem{\helpref{wxCmdLineParser}{wxcmdlineparser}}{Command line parser class}
\twocolitem{\helpref{wxDllLoader}{wxdllloader}}{Class to work with shared libraries.}
\twocolitem{\helpref{wxProcess}{wxprocess}}{Process class}
\end{twocollist}
{\large {\bf Miscellaneous}}
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxCaret}{wxcaret}}{A caret (cursor) object}
\twocolitem{\helpref{wxConfig}{wxconfigbase}}{Classes for configuration reading/writing (using either INI files or registry)}
\twocolitem{\helpref{wxTimer}{wxtimer}}{Timer class}
\twocolitem{\helpref{wxStopWatch}{wxstopwatch}}{Stop watch class}
\twocolitem{\helpref{wxMimeTypesManager}{wxmimetypesmanager}}{MIME-types manager class}
\twocolitem{\helpref{wxSystemSettings}{wxsystemsettings}}{System settings class for obtaining various global parameters}
\twocolitem{\helpref{wxSystemOptions}{wxsystemoptions}}{System options class for run-time configuration}
\twocolitem{\helpref{wxAcceleratorTable}{wxacceleratortable}}{Accelerator table}
\twocolitem{\helpref{wxAutomationObject}{wxautomationobject}}{OLE automation class}
\twocolitem{\helpref{wxFontMapper}{wxfontmapper}}{Font mapping, finding suitable font for given encoding}
\twocolitem{\helpref{wxEncodingConverter}{wxencodingconverter}}{Encoding conversions}
\twocolitem{\helpref{wxCalendarDateAttr}{wxcalendardateattr}}{Used with \helpref{wxCalendarCtrl}{wxcalendarctrl}}
\twocolitem{\helpref{wxQuantize}{wxquantize}}{Class to perform quantization, or colour reduction}
\twocolitem{\helpref{wxSingleInstanceChecker}{wxsingleinstancechecker}}{Check that only single program instance is running}
\end{twocollist}

View File

@@ -1,175 +0,0 @@
\section{\class{wxCheckBox}}\label{wxcheckbox}
A checkbox is a labelled box which by default is either on (checkmark is
visible) or off (no checkmark). Optionally (when the wxCHK\_3STATE style flag
is set) it can have a third state, called the mixed or undetermined state.
Often this is used as a "Does Not Apply" state.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/checkbox.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Window styles}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCHK\_2STATE}}{Create a 2-state checkbox. This is the default.}
\twocolitem{\windowstyle{wxCHK\_3STATE}}{Create a 3-state checkbox.
Not implemented in wxMGL, wxOS2 and wxGTK built against GTK+ 1.2.}
\twocolitem{\windowstyle{wxCHK\_ALLOW\_3RD\_STATE\_FOR\_USER}}{By default a user can't set a 3-state checkbox
to the third state. It can only be done from code. Using this flags allows the user to set the checkbox to the third state by clicking. }
\twocolitem{\windowstyle{wxALIGN\_RIGHT}}{Makes the text appear on the left of the checkbox.}
\end{twocollist}
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{wxcheckboxctor}
\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}}\label{wxcheckboxdtor}
\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}{wxcheckboxctor}\rtfsp
for details.
\membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue}
\constfunc{bool}{GetValue}{\void}
Gets the state of a 2-state checkbox.
\wxheading{Return value}
Returns \true if it is checked, \false otherwise.
\membersection{wxCheckBox::Get3StateValue}\label{wxcheckboxgetthreestatevalue}
\constfunc{wxCheckBoxState}{Get3StateValue}{\void}
Gets the state of a 3-state checkbox.
\wxheading{Return value}
Returns wxCHK\_UNCHECKED when the checkbox is unchecked, wxCHK\_CHECKED
when it is checked and wxCHK\_UNDETERMINED when it's in the undetermined
state. Asserts when the function is used with a 2-state checkbox.
\membersection{wxCheckBox::Is3rdStateAllowedForUser}\label{wxcheckboxis3rdstateallowedforuser}
\constfunc{bool}{Is3rdStateAllowedForUser}{\void}
Returns whether or not the user can set the checkbox to the third state.
\wxheading{Return value}
Returns \true if the user can set the third state of this checkbox, \false if it can only be set
programmatically or if it's a 2-state checkbox.
\membersection{wxCheckBox::Is3State}\label{wxcheckboxis3state}
\constfunc{bool}{Is3State}{\void}
Returns whether or not the checkbox is a 3-state checkbox.
\wxheading{Return value}
Returns \true if this checkbox is a 3-state checkbox, \false if it's a 2-state checkbox.
\membersection{wxCheckBox::IsChecked}\label{wxcheckboxischecked}
\constfunc{bool}{IsChecked}{\void}
This is just a maybe more readable synonym for
\helpref{GetValue}{wxcheckboxgetvalue}: just as the latter, it returns
\true if the checkbox is checked and \false otherwise.
\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
\func{void}{SetValue}{\param{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.}
\membersection{wxCheckBox::Set3StateValue}\label{wxcheckboxset3statevalue}
\func{void}{Set3StateValue}{\param{const wxCheckBoxState}{ 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}{Can be one of: wxCHK\_UNCHECKED (Check is off), wxCHK\_CHECKED
(Check is on) or wxCHK\_UNDETERMINED (Check is mixed). Asserts when the checkbox
is a 2-state checkbox and setting the state to wxCHK\_UNDETERMINED.}

View File

@@ -1,132 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: checklst.tex
%% Purpose: wxCheckListBox documentation
%% Author: wxWidgets Team
%% Modified by:
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets Team
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxCheckListBox}}\label{wxchecklistbox}
A checklistbox is like a listbox, but allows items to be checked or unchecked.
When using this class under Windows wxWidgets must be compiled with USE\_OWNER\_DRAWN set to 1.
Only the new functions for this class are documented; see also \helpref{wxListBox}{wxlistbox}.
Please note that wxCheckListBox uses client data in its implementation,
and therefore this is not available to the application.
\wxheading{Derived from}
\helpref{wxListBox}{wxlistbox}\\
\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/checklst.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\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\_TOGGLED 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{wxchecklistboxctor}
\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"}}
\func{}{wxCheckListBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
\param{const wxArrayString\& }{choices},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}}
Constructor, creating and showing a list box.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
\docparam{pos}{Window position.}
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
appropriately.}
\docparam{n}{Number of strings with which to initialise the control.}
\docparam{choices}{An array of strings with which to initialise the control.}
\docparam{style}{Window style. See \helpref{wxCheckListBox}{wxchecklistbox}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\pythonnote{The wxCheckListBox constructor in wxPython reduces the {\tt n}
and {\tt choices} arguments are to a single argument, which is
a list of strings.}
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{wxCheckListBox::\destruct{wxCheckListBox}}\label{wxchecklistboxdtor}
\func{void}{\destruct{wxCheckListBox}}{\void}
Destructor, destroying the list box.
\membersection{wxCheckListBox::Check}\label{wxchecklistboxcheck}
\func{void}{Check}{\param{int }{item}, \param{bool}{ check = true}}
Checks the given item. Note that calling this method doesn't result in
wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
\wxheading{Parameters}
\docparam{item}{Index of item to check.}
\docparam{check}{true if the item is to be checked, false otherwise.}
\membersection{wxCheckListBox::IsChecked}\label{wxchecklistboxischecked}
\constfunc{bool}{IsChecked}{\param{unsigned 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,57 +0,0 @@
\section{\class{wxChildFocusEvent}}\label{wxchildfocusevent}
A child focus event is sent to a (parent-)window when one of its child windows gains focus,
so that the window could restore the focus back to its corresponding child
if it loses it now and regains later.
Notice that child window is the direct child of the window receiving event.
Use \helpref{FindFocus}{wxwindowfindfocus} to retreive the window which is actually getting focus.
\wxheading{Derived from}
\helpref{wxCommandEvent}{wxcommandevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Event table macros}
To process a child focus event, use this event handler macro to direct input to a member
function that takes a wxChildFocusEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CHILD\_FOCUS(func)}}{Process a wxEVT\_CHILD\_FOCUS event.}
\end{twocollist}%
\wxheading{See also}
\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxChildFocusEvent::wxChildFocusEvent}\label{wxchildfocuseventctor}
\func{}{wxChildFocusEvent}{\param{wxWindow *}{win = NULL}}
Constructor.
\wxheading{Parameters}
\docparam{win}{The direct child which is (or which contains the window which is) receiving the focus.}
\membersection{wxChildFocusEvent::GetWindow}\label{wxchildfocuseventgetwindow}
Returns the direct child which receives the focus, or a (grand-)parent of the control receiving the focus.
To get the actually focused control use \helpref{wxWindow::FindFocus}{wxwindowfindfocus}.

View File

@@ -1,175 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: treectrl.tex
%% Purpose: wxChoice documentation
%% Author: wxWidgets Team
%% Modified by:
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets Team
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxChoice}}\label{wxchoice}
A choice item is used to select one of a list of strings. Unlike a
listbox, only the selection is visible until the user pulls down the
menu of choices.
\wxheading{Derived from}
\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/choice.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Window styles}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries alphabetically.}
\end{twocollist}
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{wxchoicector}
\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"}}
\func{}{wxChoice}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp
\param{const wxArrayString\& }{choices},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``choice"}}
Constructor, creating and showing a choice.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
\docparam{pos}{Window position.}
\docparam{size}{Window size. If the default size (-1, -1) is specified then the choice is sized
appropriately.}
\docparam{n}{Number of strings with which to initialise the choice control.}
\docparam{choices}{An array of strings with which to initialise the choice control.}
\docparam{style}{Window style. See \helpref{wxChoice}{wxchoice}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\wxheading{See also}
\helpref{wxChoice::Create}{wxchoicecreate}, \helpref{wxValidator}{wxvalidator}
\pythonnote{The wxChoice constructor in wxPython reduces the {\tt n}
and {\tt choices} arguments are to a single argument, which is
a list of strings.}
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{wxChoice::\destruct{wxChoice}}\label{wxchoicedtor}
\func{}{\destruct{wxChoice}}{\void}
Destructor, destroying the choice item.
\membersection{wxChoice::Create}\label{wxchoicecreate}
\func{bool}{Create}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp
\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
\param{const wxString\& }{name = ``choice"}}
\func{bool}{Create}{\param{wxWindow *}{parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp
\param{const wxArrayString\& }{choices},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
\param{const wxString\& }{name = ``choice"}}
Creates the choice for two-step construction. See \helpref{wxChoice::wxChoice}{wxchoicector}.
\membersection{wxChoice::GetColumns}\label{wxchoicegetcolumns}
\constfunc{int}{GetColumns}{\void}
Gets the number of columns in this choice item.
\wxheading{Remarks}
This is implemented for Motif only and always returns $1$ for the other
platforms.
\membersection{wxChoice::GetCurrentSelection}\label{wxchoicegetcurrentselection}
\constfunc{int}{GetCurrentSelection}{\void}
Unlike \helpref{GetSelection}{wxcontrolwithitemsgetselection} which only
returns the accepted selection value, i.e. the selection in the control once
the user closes the dropdown list, this function returns the current selection.
That is, while the dropdown list is shown, it returns the currently selected
item in it. When it is not shown, its result is the same as for the other
function.
\newsince{2.6.2} (before this version
\helpref{GetSelection}{wxcontrolwithitemsgetselection} itself behaved like
this).
\membersection{wxChoice::SetColumns}\label{wxchoicesetcolumns}
\func{void}{SetColumns}{\param{int}{ n = 1}}
Sets the number of columns in this choice item.
\wxheading{Parameters}
\docparam{n}{Number of columns.}
\wxheading{Remarks}
This is implemented for Motif only and doesn't do anything under other
platforms.

View File

@@ -1,13 +0,0 @@
\wxheading{Event handling}
To process input from a listbook control, use the following event handler macros to direct input to member
functions that take a wxChoicebookEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CHOICEBOOK\_PAGE\_CHANGED(id, func)}}{The page selection was changed. Processes a
wxEVT\_COMMAND\_LISTBOOK\_PAGE\_CHANGED event.}
\twocolitem{{\bf EVT\_CHOICEBOOK\_PAGE\_CHANGING(id, func)}}{The page selection is about to be changed.
Processes a wxEVT\_COMMAND\_CHOICEBOOK\_PAGE\_CHANGING event. This event can be \helpref{vetoed}{wxnotifyeventveto}.}
\end{twocollist}

View File

@@ -1,81 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: choicebk.tex
%% Purpose: wxChoicebook documentation
%% Author: Vadim Zeitlin
%% Modified by: Wlodzimierz ABX Skiba from listbook.tex
%% Created: 15.09.04
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxChoicebook}}\label{wxchoicebook}
wxChoicebook is a class similar to \helpref{wxNotebook}{wxnotebook} but which
uses a \helpref{wxChoice}{wxchoice} to show the labels instead of the
tabs.
There is no documentation for this class yet but its usage is
identical to wxNotebook (except for the features clearly related to tabs
only), so please refer to that class documentation for now. You can also
use the \helpref{notebook sample}{samplenotebook} to see wxChoicebook in action.
wxChoicebook allows the use of wxBookCtrl::GetControlSizer, allowing a program
to add other controls next to the choice control. This is particularly useful
when screen space is restricted, as it often is when wxChoicebook is being employed.
\wxheading{Derived from}
wxBookCtrlBase (see \helpref{wxBookCtrl overview}{wxbookctrloverview})\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/choicebk.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCHB\_DEFAULT}}{Choose the default location for the
labels depending on the current platform (left everywhere except Mac where
it is top).}
\twocolitem{\windowstyle{wxCHB\_TOP}}{Place labels above the page area.}
\twocolitem{\windowstyle{wxCHB\_LEFT}}{Place labels on the left side.}
\twocolitem{\windowstyle{wxCHB\_RIGHT}}{Place labels on the right side.}
\twocolitem{\windowstyle{wxCHB\_BOTTOM}}{Place labels below the page area.}
\end{twocollist}
\input choicebevt.inc
\wxheading{See also}
\helpref{wxBookCtrl}{wxbookctrloverview}, \helpref{wxNotebook}{wxnotebook}, \helpref{notebook sample}{samplenotebook}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxChoicebook::wxChoicebook}\label{wxchoicebookctor}
\func{}{wxChoicebook}{\void}
Default constructor.
\func{}{wxChoicebook}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = 0}, \param{const wxString\& }{name = wxEmptyStr}}
Constructs a choicebook control.
\membersection{wxChoicebook::GetChoiceCtrl}\label{wxchoicebookgetchoicectrl}
\constfunc{wxChoice *}{GetChoiceCtrl}{\void}
Returns the \helpref{wxChoice}{wxchoice} associated with the control.

View File

@@ -1,89 +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{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{Overview}{wxclassinfooverview}, \helpref{wxObject}{wxobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClassInfo::wxClassInfo}\label{wxclassinfoctor}
\func{}{wxClassInfo}{\param{const wxChar * }{className}, \param{const wxClassInfo * }{baseClass1}, \param{const wxClassInfo * }{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}\label{wxclassinfocreateobject}
\constfunc{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}\label{wxclassinfofindclass}
\func{static wxClassInfo *}{FindClass}{\param{wxChar * }{name}}
Finds the wxClassInfo object for a class of the given string name.
\membersection{wxClassInfo::GetBaseClassName1}\label{wxclassinfogetbaseclassname1}
\constfunc{wxChar *}{GetBaseClassName1}{\void}
Returns the name of the first base class (NULL if none).
\membersection{wxClassInfo::GetBaseClassName2}\label{wxclassinfogetbaseclassname2}
\constfunc{wxChar *}{GetBaseClassName2}{\void}
Returns the name of the second base class (NULL if none).
\membersection{wxClassInfo::GetClassName}\label{wxclassinfogetclassname}
\constfunc{wxChar *}{GetClassName}{\void}
Returns the string form of the class name.
\membersection{wxClassInfo::GetSize}\label{wxclassinfogetsize}
\constfunc{int}{GetSize}{\void}
Returns the size of the class.
\membersection{wxClassInfo::InitializeClasses}\label{wxclassinfoinitializeclasses}
\func{static void}{InitializeClasses}{\void}
Initializes pointers in the wxClassInfo objects for fast execution
of IsKindOf. Called in base wxWidgets library initialization.
\membersection{wxClassInfo::IsDynamic}\label{wxclassinfoisdynamic}
\constfunc{bool}{IsDynamic}{\void}
Returns true if this class info can create objects of the associated class.
\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,483 +0,0 @@
\chapter{Alphabetical class reference}\label{classref}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
% NB: the files should be in alphabetic order of the classes documented in
% them and *not* in alphabetic order of the file names!
\input aboutdlginfo.tex
\input accel.tex
\input accessible.tex
\input activevt.tex
\input activexcontainer.tex
\input activexevt.tex
\input animation.tex
\input animatctrl.tex
\input app.tex
\input apptraits.tex
\input archive.tex
\input array.tex
\input arrstrng.tex
\input artprov.tex
\input auidockart.tex
\input auitabart.tex
\input auimanager.tex
\input auinotebook.tex
\input auipaneinfo.tex
\input autoobj.tex
\input bitmap.tex
\input bitmapcombobox.tex
\input bitmaptglbutn.tex
\input bbutton.tex
\input bmpdatob.tex
\input bmphand.tex
\input boxsizer.tex
\input brush.tex
\input bufferdc.tex
\input strmbfrd.tex
\input busycurs.tex
\input busyinfo.tex
\input button.tex
\input calclevt.tex
\input calctrl.tex
\input caret.tex
\input checkbox.tex
\input checklst.tex
\input choice.tex
\input choicebk.tex
\input clasinfo.tex
\input ipcclint.tex
\input clientdc.tex
\input clientdat.tex
\input clipbrd.tex
\input clipevent.tex
\input closeevt.tex
\input cmdlpars.tex
\input collpane.tex
\input colour.tex
\input colordlg.tex
\input clrpicker.tex
\input combobox.tex
\input comboctrl.tex
\input combopopup.tex
\input command.tex
\input cmdevent.tex
\input cmdproc.tex
\input conditn.tex
\input config.tex
\input ipcconn.tex
\input chfocevt.tex
\input cntxtevt.tex
\input cshelp.tex
\input control.tex
\input ctrlsub.tex
\input convauto.tex
\input countstr.tex
\input critsect.tex
\input crtslock.tex
\input csconv.tex
\input cursor.tex
\input custdobj.tex
\input dataform.tex
\input dgramsocket.tex
\input datistrm.tex
\input dataobj.tex
\input dataviewcolumn.tex
\input dataviewctrl.tex
\input dataviewevent.tex
\input dataviewmodelnotifier.tex
\input dataviewmodel.tex
\input dataviewindexlistmodel.tex
\input dataviewitem.tex
\input dataviewitemattr.tex
\input dataviewrenderer.tex
\input dataviewtreectrl.tex
\input dataviewtreestore.tex
\input dobjcomp.tex
\input dobjsmpl.tex
\input datostrm.tex
\input dateevt.tex
\input datectrl.tex
\input datespan.tex
\input datetime.tex
\input dc.tex
\input dcclipper.tex
\input ddeclint.tex
\input ddeconn.tex
\input ddeservr.tex
\input debugcxt.tex
\input debugrpt.tex
\input debugrptz.tex
\input debugrptpvw.tex
\input debugrptpvwstd.tex
\input debugrptup.tex
\input delgrend.tex
\input dialog.tex
\input dialoglayoutadapter.tex
\input dialevt.tex
\input dialup.tex
\input dir.tex
\input dirdlg.tex
\input dirpicker.tex
\input dirtrav.tex
\input display.tex
\input dllload.tex
\input docchfrm.tex
\input docmanag.tex
\input docmdich.tex
\input docmdipr.tex
\input docprfrm.tex
\input doctempl.tex
\input document.tex
\input dragimag.tex
\input dropevt.tex
\input dropsrc.tex
\input droptrgt.tex
\input dynlib.tex
\input editlistbox.tex
\input encconv.tex
\input eraseevt.tex
\input event.tex
\input evtblocker.tex
\input evthand.tex
\input ffile.tex
\input ffilestr.tex
\input file.tex
\input fileconf.tex
\input filectrl.tex
\input fileevt.tex
\input fildatob.tex
\input filedlg.tex
\input fildrptg.tex
\input filehist.tex
\input fileistr.tex
\input filename.tex
\input fileostr.tex
\input filepicker.tex
\input filestrm.tex
\input filesys.tex
\input filesysh.tex
\input filetype.tex
\input fltfactory.tex
\input fltinstr.tex
\input fltoutst.tex
\input fdrepdlg.tex
\input flexsizr.tex
\input focusevt.tex
\input font.tex
\input fontdlg.tex
\input fontenum.tex
\input fontlist.tex
\input fontmap.tex
\input fontpicker.tex
\input frame.tex
\input fsfile.tex
\input ftp.tex
\input gauge.tex
\input gbposition.tex
\input gbsizeritem.tex
\input gbspan.tex
\input gdiobj.tex
\input dirctrl.tex
\input valgen.tex
\input glcanvas.tex
\input glcontext.tex
\input graphicsbrush.tex
\input graphicscontext.tex
\input graphicsfont.tex
\input graphicsmatrix.tex
\input graphicsobject.tex
\input graphicspath.tex
\input graphicspen.tex
\input graphicsrenderer.tex
\input grid.tex
\input gridattr.tex
\input gridbagsizer.tex
\input gridedit.tex
\input gridevt.tex
\input gridrend.tex
\input gridtbl.tex
\input gridsizr.tex
\input gupdlock.tex
\input hashmap.tex
\input hashset.tex
\input hash.tex
\input helpinst.tex
\input hprovcnt.tex
\input helpevt.tex
\input helpprov.tex
\input hscrolledwindow.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 htmllbox.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 hvscrolledwindow.tex
\input hyperlink.tex
\input icon.tex
\input iconbndl.tex
\input iconloc.tex
\input iconevt.tex
\input idleevt.tex
\input idmanager.tex
\input image.tex
\input imaglist.tex
\input ilayout.tex
\input indlgevt.tex
\input inputstr.tex
\input ipaddr.tex
\input ipvaddr.tex
\input joystick.tex
\input joyevent.tex
\input keyevent.tex
\input layalgor.tex
\input layout.tex
\input list.tex
\input listbook.tex
\input listbox.tex
\input listctrl.tex
\input listevt.tex
\input listitem.tex
\input listattr.tex
\input listview.tex
\input locale.tex
\input log.tex
\input longlong.tex
\input mask.tex
\input maxzevt.tex
\input mbconv.tex
\input mbcnvfil.tex
\input mbcnvut7.tex
\input mbcnvut8.tex
\input mbcnvutf.tex
\input mdi.tex
\input mediactrl.tex
\input mediaevt.tex
\input membuf.tex
\input memorydc.tex
\input fs_mem.tex
\input strmmem.tex
\input menu.tex
\input menuevt.tex
\input menuitem.tex
\input msgdlg.tex
\input metafile.tex
\input mimetype.tex
\input minifram.tex
\input mirrordc.tex
\input module.tex
\input mcaptevt.tex
\input mouseevt.tex
\input moveevt.tex
\input msgqueue.tex
\input mltchdlg.tex
\input mutex.tex
\input mutexlck.tex
\input navevent.tex
\input node.tex
\input notebook.tex
\input noteevt.tex
\input nbsizer.tex
\input notifmsg.tex
\input notifevt.tex
\input object.tex
\input objectdataptr.tex
\input odcbox.tex
\input outptstr.tex
\input pagedlg.tex
\input paintdc.tex
\input paintevt.tex
\input palette.tex
\input panel.tex
\input passdlg.tex
\input pathlist.tex
\input pen.tex
\input pickerbase.tex
\input platinfo.tex
\input point.tex
\input position.tex
\input postscpt.tex
\input powerevt.tex
\input prevwin.tex
\input print.tex
\input process.tex
\input procevt.tex
\input progdlg.tex
\input propdlg.tex
\input protocol.tex
\input quantize.tex
\input qylayevt.tex
\input radiobox.tex
\input radiobut.tex
\input realpoin.tex
\input rect.tex
\input recguard.tex
\input regex.tex
\input region.tex
\input regkey.tex
\input renderer.tex
\input rendver.tex
\input richtextbuffer.tex
\input richtextcharacterstyledefinition.tex
\input richtextctrl.tex
\input richtextevent.tex
\input richtextfilehandler.tex
\input richtextformattingdialog.tex
\input richtextheaderfooterdata.tex
\input richtexthtmlhandler.tex
\input richtextliststyledefinition.tex
\input richtextparagraphstyledefinition.tex
\input richtextprinting.tex
\input richtextprintout.tex
\input richtextrange.tex
\input richtextstyledefinition.tex
\input richtextstylelistbox.tex
\input richtextstyleorganiserdialog.tex
\input richtextstylesheet.tex
\input richtextxmlhandler.tex
\input sashevt.tex
\input sashlayw.tex
\input sashwin.tex
\input scpdarry.tex
\input scpdptr.tex
\input scopedptr.tex
\input screendc.tex
\input scrolbar.tex
\input scrolwin.tex
\input scrolevt.tex
\input scrlwevt.tex
\input semaphor.tex
\input setcursorevt.tex
\input ipcservr.tex
\input hprovsmp.tex
\input srchctrl.tex
\input sngchdlg.tex
\input snglinst.tex
\input sharedptr.tex
\input size.tex
\input sizeevt.tex
\input sizer.tex
\input sizeritem.tex
\input slider.tex
\input sckaddr.tex
\input socket.tex
\input strmsock.tex
\input socksrv.tex
\input sound.tex
\input spinbutt.tex
\input spinctrl.tex
\input spinevt.tex
\input splash.tex
\input splitevt.tex
\input splitter.tex
\input splitpar.tex
\input stackframe.tex
\input stackwalker.tex
\input stdpaths.tex
\input statbmp.tex
\input statbox.tex
\input sbsizer.tex
\input statline.tex
\input stattext.tex
\input statusbr.tex
\input stdbtnsz.tex
\input stopwtch.tex
\input strmbase.tex
\input stream.tex
\input strtotxt.tex
\input wxstring.tex
\input styledtextctrl.tex
\input styledtextevent.tex
\input strcldat.tex
\input sistream.tex
\input sostream.tex
\input tokenizr.tex
\input dcsvg.tex
\input symbolpickerdialog.tex
\input sysclevt.tex
\input sysopt.tex
\input settings.tex
\input tarstrm.tex
\input taskbar.tex
\input tcpclint.tex
\input tcpconn.tex
\input tcpservr.tex
\input tempfile.tex
\input tempfilestrm.tex
\input textattr.tex
\input text.tex
\input txtdatob.tex
\input txtdrptg.tex
\input textdlg.tex
\input textfile.tex
\input txtstrm.tex
\input valtext.tex
\input thread.tex
\input threadh.tex
\input timer.tex
\input timespan.tex
\input tipprov.tex
\input tipwin.tex
\input tglbtn.tex
\input toolbar.tex
\input toolbook.tex
\input tooltip.tex
\input tlw.tex
\input trackable.tex
\input treebook.tex
\input treebookevent.tex
\input treectrl.tex
\input treeevt.tex
\input treedata.tex
\input upduievt.tex
\input uri.tex
\input url.tex
\input urldataob.tex
\input validatr.tex
\input varhscrollhelper.tex
\input varhvscrollhelper.tex
\input variant.tex
\input varscrollhelperbase.tex
\input varvscrollhelper.tex
\input vector.tex
\input view.tex
\input vlbox.tex
\input vscrolledwindow.tex
\input window.tex
\input wupdlock.tex
\input wrapsizer.tex
\input createevt.tex
\input windowdc.tex
\input destroyevt.tex
\input weakref.tex
\input weakrefdynamic.tex
\input wnddisbl.tex
\input wizard.tex
\input wizevt.tex
\input wizpage.tex
\input xlocale.tex
\input xmldocument.tex
\input xmlnode.tex
\input xmlattr.tex
\input xmlres.tex
\input xmlresh.tex
\input zipstrm.tex
\input strmzlib.tex

View File

@@ -1,121 +0,0 @@
\section{\class{wxClientData}}\label{wxclientdata}
All classes deriving from \helpref{wxEvtHandler}{wxevthandler}
(such as all controls and \helpref{wxApp}{wxapp})
can hold arbitrary data which is here referred to as "client data".
This is useful e.g. for scripting languages which need to handle
shadow objects for most of wxWidgets' classes and which store
a handle to such a shadow class as client data in that class.
This data can either be of type void - in which case the data
{\it container} does not take care of freeing the data again
or it is of type wxClientData or its derivatives. In that case the
container (e.g. a control) will free the memory itself later.
Note that you {\it must not} assign both void data and data
derived from the wxClientData class to a container.
Some controls can hold various items and these controls can
additionally hold client data for each item. This is the case for
\helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}
and \helpref{wxListBox}{wxlistbox}. \helpref{wxTreeCtrl}{wxtreectrl}
has a specialized class \helpref{wxTreeItemData}{wxtreeitemdata}
for each item in the tree.
If you want to add client data to your own classes, you may
use the mix-in class \helpref{wxClientDataContainer}{wxclientdatacontainer}.
\wxheading{Include files}
<wx/clntdata.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{wxEvtHandler}{wxevthandler}, \helpref{wxTreeItemData}{wxtreeitemdata},
\helpref{wxStringClientData}{wxstringclientdata}, \helpref{wxClientDataContainer}{wxclientdatacontainer}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClientData::wxClientData}\label{wxclientdatawxclientdata}
\func{}{wxClientData}{\void}
Constructor.
\membersection{wxClientData::\destruct{wxClientData}}\label{wxclientdatadtor}
\func{}{\destruct{wxClientData}}{\void}
Virtual destructor.
\section{\class{wxClientDataContainer}}\label{wxclientdatacontainer}
This class is a mixin that provides storage and management of "client
data." This data can either be of type void - in which case the data
{\it container} does not take care of freeing the data again
or it is of type wxClientData or its derivatives. In that case the
container will free the memory itself later.
Note that you {\it must not} assign both void data and data
derived from the wxClientData class to a container.
NOTE: This functionality is currently duplicated in wxEvtHandler in
order to avoid having more than one vtable in that class hierarchy.
\wxheading{See also}
\helpref{wxEvtHandler}{wxevthandler}, \helpref{wxClientData}{wxclientdata}
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/clntdata.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClientDataContainer::wxClientDataContainer}\label{wxclientdatacontainerwxclientdatacontainer}
\func{}{wxClientDataContainer}{\void}
\membersection{wxClientDataContainer::\destruct{wxClientDataContainer}}\label{wxclientdatacontainerdtor}
\func{}{\destruct{wxClientDataContainer}}{\void}
\membersection{wxClientDataContainer::GetClientData}\label{wxclientdatacontainergetclientdata}
\constfunc{void*}{GetClientData}{\void}
Get the untyped client data.
\membersection{wxClientDataContainer::GetClientObject}\label{wxclientdatacontainergetclientobject}
\constfunc{wxClientData*}{GetClientObject}{\void}
Get a pointer to the client data object.
\membersection{wxClientDataContainer::SetClientData}\label{wxclientdatacontainersetclientdata}
\func{void}{SetClientData}{\param{void* }{data}}
Set the untyped client data.
\membersection{wxClientDataContainer::SetClientObject}\label{wxclientdatacontainersetclientobject}
\func{void}{SetClientObject}{\param{wxClientData* }{data}}
Set the client data object. Any previous object will be deleted.

View File

@@ -1,41 +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}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dcclient.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\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}\label{wxclientdcctor}
\func{}{wxClientDC}{\param{wxWindow*}{ window}}
Constructor. Pass a pointer to the window on which you wish to paint.

View File

@@ -1,188 +0,0 @@
\section{\class{wxClipboard}}\label{wxclipboard}
A class for manipulating the clipboard. Note that this is not compatible with the
clipboard class from wxWidgets 1.xx, which has the same name but a different implementation.
To use the clipboard, you call member functions of the global {\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{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDataObject}{wxdataobject}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClipboard::wxClipboard}\label{wxclipboardctor}
\func{}{wxClipboard}{\void}
Constructor.
\membersection{wxClipboard::\destruct{wxClipboard}}\label{wxclipboarddtor}
\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{void}{Close}{\void}
Call this function to close the clipboard, having opened it with \helpref{wxClipboard::Open}{wxclipboardopen}.
\membersection{wxClipboard::Flush}\label{wxclipboardflush}
\func{bool}{Flush}{\void}
Flushes the clipboard: this means that the data which is currently on
clipboard will stay available even after the application exits (possibly
eating memory), otherwise the clipboard will be emptied on exit.
Returns false if the operation is unsuccessful for any reason.
\membersection{wxClipboard::GetData}\label{wxclipboardgetdata}
\func{bool}{GetData}{\param{wxDataObject\&}{ data}}
Call this function to fill {\it data} with data on the clipboard, if available in the required
format. Returns true on success.
\membersection{wxClipboard::IsOpened}\label{wxclipboardisopened}
\constfunc{bool}{IsOpened}{\void}
Returns true if the clipboard has been opened.
\membersection{wxClipboard::IsSupported}\label{wxclipboardissupported}
\func{bool}{IsSupported}{\param{const wxDataFormat\&}{ format}}
Returns true if there is data which matches the data format of the given data object currently {\bf available} (IsSupported sounds like a misnomer, FIXME: better deprecate this name?) on the clipboard.
\membersection{wxClipboard::IsUsingPrimarySelection}\label{wxclipboardisusingprimaryselection}
\constfunc{bool}{IsUsingPrimarySelection}{\void}
Returns \true if we are using the primary selection, \false if clipboard one.
See \helpref{UsePrimarySelection}{wxclipboarduseprimary} for more information.
\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 (all X11-based ports), wxClipboard uses the
CLIPBOARD X11 selection by default. When this function is called with \true
argument, all subsequent clipboard operations will use PRIMARY selection until
this function is called again with \false.
On the other platforms, there is no PRIMARY selection and so all clipboard
operations will fail. This allows to implement the standard X11 handling of the
clipboard which consists in copying data to the CLIPBOARD selection only when
the user explicitly requests it (i.e. by selection \texttt{"Copy"} menu
command) but putting the currently selected text into the PRIMARY selection
automatically, without overwriting the normal clipboard contents with the
currently selected text on the other platforms.

View File

@@ -1,88 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: clipevent.tex
%% Purpose: wxClipboardTextEvent documentation
%% Author: Evgeniy Tarassov, Vadim Zeitlin
%% Modified by:
%% Created: 2005-10-04
%% RCS-ID: $Id$
%% Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxClipboardTextEvent}}\label{wxclipboardtextevent}
This class represents the events generated by a control (typically a
\helpref{wxTextCtrl}{wxtextctrl} but other windows can generate these events as
well) when its content gets copied or cut to, or pasted from the clipboard.
There are three types of corresponding events wxEVT\_COMMAND\_TEXT\_COPY,
wxEVT\_COMMAND\_TEXT\_CUT and wxEVT\_COMMAND\_TEXT\_PASTE.
If any of these events is processed (without being skipped) by an event
handler, the corresponding operation doesn't take place which allows to prevent
the text from being copied from or pasted to a control. It is also possible to
examine the clipboard contents in the PASTE event handler and transform it in
some way before inserting in a control -- for example, changing its case or
removing invalid characters.
Finally notice that a CUT event is always preceded by the COPY event which
makes it possible to only process the latter if it doesn't matter if the text
was copied or cut.
\wxheading{Remarks}
These events are currently only generated by \helpref{wxComboBox}{wxcombobox} and
under Windows and \helpref{wxTextCtrl}{wxtextctrl} under Windows and GTK and
are not generated for the text controls with \texttt{wxTE\_RICH} style under
Windows.
\wxheading{Derived from}
\helpref{wxCommandEvent}{wxcommandevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Event handling}
To process this type of events use the following event handling macros. The
\arg{func} parameter must be a member functions that takes an argument of type
\texttt{wxClipboardTextEvent \&}.
\twocolwidtha{10cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_TEXT\_COPY(id, func)}}{Some or all of the controls
content was copied to the clipboard.}
\twocolitem{{\bf EVT\_TEXT\_CUT(id, func)}}{Some or all of the controls content
was cut (i.e. copied and deleted).}
\twocolitem{{\bf EVT\_TEXT\_PASTE(id, func)}}{Clipboard content was pasted into
the control.}
\end{twocollist}
\wxheading{See also}
\helpref{wxClipboard}{wxclipboard}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxClipboardTextEvent::wxClipboardTextEvent}\label{wxclipboardtexteventwxclipboardtextevent}
\func{}{wxClipboardTextEvent}{\param{wxEventType }{commandType = wxEVT\_NULL}, \param{int }{id = 0}}

View File

@@ -1,113 +0,0 @@
\section{\class{wxCloseEvent}}\label{wxcloseevent}
This event class contains information about window and session close events.
The handler function for EVT\_CLOSE is called when the user has tried to close a a frame
or dialog box using the window manager (X) or system menu (Windows). It can
also be invoked by the application itself programmatically, for example by
calling the \helpref{wxWindow::Close}{wxwindowclose} function.
You should check whether the application is forcing the deletion of the window
using \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto}. If this is {\tt false},
you {\it must} destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
If the return value is true, it is up to you whether you respond by destroying the window.
If you don't destroy the window, you should call \helpref{wxCloseEvent::Veto}{wxcloseeventveto} to
let the calling code know that you did not destroy the window. This allows the \helpref{wxWindow::Close}{wxwindowclose} function
to return {\tt true} or {\tt false} depending on whether the close instruction was honoured or not.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Event table macros}
To process a close event, use these event handler macros to direct input to member
functions that take a wxCloseEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CLOSE(func)}}{Process a close event, supplying the member function. This
event applies to wxFrame and wxDialog classes.}
\twocolitem{{\bf EVT\_QUERY\_END\_SESSION(func)}}{Process a query end session event, supplying the member function.
This event applies to wxApp only.}
\twocolitem{{\bf EVT\_END\_SESSION(func)}}{Process an end session event, supplying the member function.
This event applies to wxApp only.}
\end{twocollist}%
\wxheading{See also}
\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnEndSession}{wxapponendsession},\rtfsp
\helpref{Window deletion overview}{windowdeletionoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCloseEvent::wxCloseEvent}\label{wxcloseeventctor}
\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 just logging off or false if the system is
shutting down. This method can only be called for end session and query end
session events, it doesn't make sense for close window event.
\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,194 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: clrpicker.tex
%% Purpose: wxColourPickerCtrl and wxColourPickerEvent documentation
%% Author: Francesco Montorsi
%% Created: 2006-04-17
%% RCS-ID: $Id$
%% Copyright: (c) 2006 Francesco Montorsi
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxColourPickerCtrl}}\label{wxcolourpickerctrl}
This control allows the user to select a colour. The generic implementation is
a button which brings up a \helpref{wxColourDialog}{wxcolourdialog} when clicked. Native implementation
may differ but this is usually a (small) widget which give access to the colour-chooser
dialog.
It is only available if \texttt{wxUSE\_COLOURPICKERCTRL} is set to $1$ (the default).
\wxheading{Derived from}
\helpref{wxPickerBase}{wxpickerbase}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/clrpicker.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Window styles}
\twocolwidtha{5cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCLRP\_DEFAULT\_STYLE}}{The default style: 0.}
\twocolitem{\windowstyle{wxCLRP\_USE\_TEXTCTRL}}{Creates a text control to the left of the
picker button which is completely managed by the \helpref{wxColourPickerCtrl}{wxcolourpickerctrl}
and which can be used by the user to specify a colour (see \helpref{SetColour}{wxcolourpickerctrlsetcolour}).
The text control is automatically synchronized with button's value. Use functions defined in \helpref{wxPickerBase}{wxpickerbase} to modify the text control.}
\twocolitem{\windowstyle{wxCLRP\_SHOW\_LABEL}}{Shows the colour in HTML form (#AABBCC) as colour button label
(instead of no label at all).}
\end{twocollist}
\wxheading{Event handling}
To process a colour picker event, use these event handler macros to direct input to member
functions that take a \helpref{wxColourPickerEvent}{wxcolourpickerevent} argument.
\twocolwidtha{7cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_COLOURPICKER\_CHANGED(id, func)}}{The user changed the
colour selected in the control either using the button or using text control
(see wxCLRP\_USE\_TEXTCTRL; note that in this case the event is fired only if
the user's input is valid, i.e. recognizable). }
\end{twocollist}
\wxheading{See also}
\helpref{wxColourDialog}{wxcolourdialog},\\
\helpref{wxColourPickerEvent}{wxcolourpickerevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxColourPickerCtrl::wxColourPickerCtrl}\label{wxcolourpickerctrlctor}
\func{}{wxColourPickerCtrl}{\param{wxWindow *}{parent},\rtfsp
\param{wxWindowID}{ id},\rtfsp
\param{const wxColour\& }{colour = *wxBLACK},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxCLRP\_DEFAULT\_STYLE},\rtfsp
\param{const wxValidator\& }{validator = wxDefaultValidator},
\param{const wxString\& }{name = ``colourpickerctrl"}}
Initializes the object and calls \helpref{Create}{wxcolourpickerctrlcreate} with
all the parameters.
\membersection{wxColourPickerCtrl::Create}\label{wxcolourpickerctrlcreate}
\func{bool}{Create}{\param{wxWindow *}{parent},\rtfsp
\param{wxWindowID}{ id},\rtfsp
\param{const wxColour\& }{colour = *wxBLACK},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxCLRP\_DEFAULT\_STYLE},\rtfsp
\param{const wxValidator\& }{validator = wxDefaultValidator},
\param{const wxString\& }{name = ``colourpickerctrl"}}
\wxheading{Parameters}
\docparam{parent}{Parent window, must not be non-\texttt{NULL}.}
\docparam{id}{The identifier for the control.}
\docparam{colour}{The initial colour shown in the control.}
\docparam{pos}{Initial position.}
\docparam{size}{Initial size.}
\docparam{style}{The window style, see {\tt wxCRLP\_*} flags.}
\docparam{validator}{Validator which can be used for additional date checks.}
\docparam{name}{Control name.}
\wxheading{Return value}
\true if the control was successfully created or \false if creation failed.
\membersection{wxColourPickerCtrl::GetColour}\label{wxcolourpickerctrlgetcolour}
\constfunc{wxColour}{GetColour}{\void}
Returns the currently selected colour.
\membersection{wxColourPickerCtrl::SetColour}\label{wxcolourpickerctrlsetcolour}
\func{void}{SetColour}{\param{const wxColour \&}{col}}
\func{void}{SetColour}{\param{const wxString \&}{colname}}
Sets the currently selected colour. See \helpref{wxColour::Set}{wxcolourset}.
%% wxColourPickerEvent documentation
\section{\class{wxColourPickerEvent}}\label{wxcolourpickerevent}
This event class is used for the events generated by
\helpref{wxColourPickerCtrl}{wxcolourpickerctrl}.
\wxheading{Derived from}
\helpref{wxCommandEvent}{wxcommandevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/clrpicker.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Event handling}
To process input from a wxColourPickerCtrl, use one of these event handler macros to
direct input to member function that take a
\helpref{wxColourPickerEvent}{wxcolourpickerevent} argument:
\twocolwidtha{7cm}
\begin{twocollist}
\twocolitem{{\bf EVT\_COLOURPICKER\_CHANGED(id, func)}}{Generated whenever the selected colour changes.}
\end{twocollist}%
\wxheading{See also}
\helpref{wxColourPickerCtrl}{wxcolourpickerctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxColourPickerEvent::wxColourPickerEvent}\label{wxcolourpickereventctor}
\func{}{wxColourPickerEvent}{\param{wxObject *}{ generator}, \param{int}{ id}, \param{const wxColour\&}{ colour}}
The constructor is not normally used by the user code.
\membersection{wxColourPickerEvent::GetColour}\label{wxcolourpickereventgetcolour}
\constfunc{wxColour}{GetColour}{\void}
Retrieve the colour the user has just selected.
\membersection{wxColourPickerEvent::SetColour}\label{wxcolourpickereventsetcolour}
\func{void}{SetColour}{\param{const wxColour \&}{pos}}
Set the colour associated with the event.

View File

@@ -1,208 +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}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\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\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED command,
which is generated by a wxComboBox 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\_MENU(id, func)}}{Process a wxEVT\_COMMAND\_MENU\_SELECTED command,
which is generated by a menu item.}
\twocolitem{{\bf EVT\_MENU\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_MENU\_RANGE command,
which is generated by a range of menu items.}
\twocolitem{{\bf EVT\_CONTEXT\_MENU(func)}}{Process the event generated
when the user has requested a popup menu to appear by pressing a special
keyboard key (under Windows) or by right clicking the mouse.}
\twocolitem{{\bf EVT\_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\_SLIDER(id, func)}}{Process a wxEVT\_COMMAND\_SLIDER\_UPDATED command,
which is generated by a wxSlider control.}
\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED command,
which is generated by a wxTextCtrl control.}
\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER command,
which is generated by a wxTextCtrl control. Note that you must use
wxTE\_PROCESS\_ENTER flag when creating the control if you want it to generate
such events.}
\twocolitem{{\bf EVT\_TEXT\_MAXLEN(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_MAXLEN command,
which is generated by a wxTextCtrl control when the user tries to enter more
characters into it than the limit previously set with
\helpref{SetMaxLength}{wxtextctrlsetmaxlength}.}
\twocolitem{{\bf EVT\_TOGGLEBUTTON(id, func)}}{Process a wxEVT\_COMMAND\_TOGGLEBUTTON\_CLICKED event.}
\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 of 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::wxCommandEvent}\label{wxcommandeventctor}
\func{}{wxCommandEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}}
Constructor.
\membersection{wxCommandEvent::Checked}\label{wxcommandeventchecked}
\constfunc{bool}{Checked}{\void}
Deprecated, use \helpref{IsChecked}{wxcommandeventischecked} instead.
\membersection{wxCommandEvent::GetClientData}\label{wxcommandeventgetclientdata}
\func{void*}{GetClientData}{\void}
Returns client data pointer for a listbox or choice selection event
(not valid for a deselection).
\membersection{wxCommandEvent::GetClientObject}\label{wxcommandeventgetclientobject}
\func{wxClientData *}{GetClientObject}{\void}
Returns client object pointer for a listbox or choice selection event
(not valid for a deselection).
\membersection{wxCommandEvent::GetExtraLong}\label{wxcommandeventgetextralong}
\func{long}{GetExtraLong}{\void}
Returns extra information dependant on the event objects type.
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::GetInt}\label{wxcommandeventgetint}
\func{int}{GetInt}{\void}
Returns the 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::GetSelection}\label{wxcommandeventgetselection}
\func{int}{GetSelection}{\void}
Returns item index for a listbox or choice selection event (not valid for
a deselection).
\membersection{wxCommandEvent::GetString}\label{wxcommandeventgetstring}
\func{wxString}{GetString}{\void}
Returns item string for a listbox or choice selection event (not valid for
a deselection).
\membersection{wxCommandEvent::IsChecked}\label{wxcommandeventischecked}
\constfunc{bool}{IsChecked}{\void}
This method can be used with checkbox and menu events: for the checkboxes, the
method returns {\tt true} for a selection event and {\tt false} for a
deselection one. For the menu events, this method indicates if the menu item
just has become checked or unchecked (and thus only makes sense for checkable
menu items).
Notice that this method can \emph{not} be used with
\helpref{wxCheckListBox}{wxchecklistbox} currently.
\membersection{wxCommandEvent::IsSelection}\label{wxcommandeventisselection}
\func{bool}{IsSelection}{\void}
For a listbox or similar event, returns true if it is a selection, false if it
is a deselection.
\membersection{wxCommandEvent::SetClientData}\label{wxcommandeventsetclientdata}
\func{void}{SetClientData}{\param{void*}{ clientData}}
Sets the client data for this event.
\membersection{wxCommandEvent::SetClientObject}\label{wxcommandeventsetclientobject}
\func{void}{SetClientObject}{\param{wxClientData*}{ clientObject}}
Sets the client object for this event. The client object is \emph{not} owned by the event
object and the event object will not delete the client object in its destructor.
The client object must be owned and deleted by another object (e.g. a control)
that has longer life time than the event object.
\membersection{wxCommandEvent::SetExtraLong}\label{wxcommandeventsetextralong}
\func{void}{SetExtraLong}{\param{long}{ extraLong}}
Sets the {\bf m\_extraLong} member.
\membersection{wxCommandEvent::SetInt}\label{wxcommandeventsetint}
\func{void}{SetInt}{\param{int}{ intCommand}}
Sets the {\bf m\_commandInt} member.
\membersection{wxCommandEvent::SetString}\label{wxcommandeventsetstring}
\func{void}{SetString}{\param{const wxString\&}{ string}}
Sets the {\bf m\_commandString} member.

View File

@@ -1,495 +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 the command line.
It has the following features:
\begin{enumerate}\itemsep=0pt
\item distinguishes options, switches and parameters; allows option grouping
\item allows both short and long options
\item automatically generates the usage message from the command line description
\item does type checks on the options values (number, date, $\ldots$).
\end{enumerate}
To use it you should follow these steps:
\begin{enumerate}\itemsep=0pt
\item \helpref{construct}{wxcmdlineparserconstruction} an object of this class
giving it the command line to parse and optionally its description or use
{\tt AddXXX()} functions later
\item call {\tt Parse()}
\item use {\tt Found()} to retrieve the results
\end{enumerate}
In the documentation below the following terminology is used:
\begin{twocollist}\itemsep=0pt
\twocolitem{switch}{This is a boolean option which can be given or not, but
which doesn't have any value. We use the word switch to distinguish such boolean
options from more generic options like those described below. For example,
{\tt -v} might be a switch meaning "enable verbose mode".}
\twocolitem{option}{Option for us here is something which comes with a value 0
unlike a switch. For example, {\tt -o:filename} might be an option which allows
to specify the name of the output file.}
\twocolitem{parameter}{This is a required program argument.}
\end{twocollist}
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/cmdline.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\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;
wxString shortName;
wxString longName;
wxString 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 empty 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 (\tt{wxCmdLineParser(argc, argv)} or \tt{wxCmdLineParser(const wxString&)} usually)
or, if you use the default constructor, you can do it later by calling
\helpref{SetCmdLine}{wxcmdlineparsersetcmdline}.
The same holds for command line description: it can be specified either in
the \helpref{constructor}{wxcmdlineparserwxcmdlineparserctor} (with or without
the command line itself) or constructed later using either
\helpref{SetDesc}{wxcmdlineparsersetdesc} or combination of
\helpref{AddSwitch}{wxcmdlineparseraddswitch},
\helpref{AddOption}{wxcmdlineparseraddoption} and
\helpref{AddParam}{wxcmdlineparseraddparam} methods.
Using constructors or \helpref{SetDesc}{wxcmdlineparsersetdesc} uses a (usually
{\tt const static}) table containing the command line description. If you want
to decide which options to accept during the run-time, using one of the
{\tt AddXXX()} functions above might be preferable.
\membersection{Customization}\label{wxcmdlineparsercustomization}
wxCmdLineParser has several global options which may be changed by the
application. All of the functions described in this section should be called
before \helpref{Parse}{wxcmdlineparserparse}.
First global option is the support for long (also known as GNU-style) options.
The long options are the ones which start with two dashes ({\tt "--"}) and look
like this: {\tt --verbose}, i.e. they generally are complete words and not some
abbreviations of them. As long options are used by more and more applications,
they are enabled by default, but may be disabled with
\helpref{DisableLongOptions}{wxcmdlineparserdisablelongoptions}.
Another global option is the set of characters which may be used to start an
option (otherwise, the word on the command line is assumed to be a parameter).
Under Unix, {\tt '-'} is always used, but Windows has at least two common
choices for this: {\tt '-'} and {\tt '/'}. Some programs also use {\tt '+'}.
The default is to use what suits most the current platform, but may be changed
with \helpref{SetSwitchChars}{wxcmdlineparsersetswitchchars} method.
Finally, \helpref{SetLogo}{wxcmdlineparsersetlogo} can be used to show some
application-specific text before the explanation given by
\helpref{Usage}{wxcmdlineparserusage} function.
\membersection{Parsing command line}\label{wxcmdlineparserparsing}
After the command line description was constructed and the desired options were
set, you can finally call \helpref{Parse}{wxcmdlineparserparse} method.
It returns $0$ if the command line was correct and was parsed, $-1$ if the help
option was specified (this is a separate case as, normally, the program will
terminate after this) or a positive number if there was an error during the
command line parsing.
In the latter case, the appropriate error message and usage information are
logged by wxCmdLineParser itself using the standard wxWidgets 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}{wxcmdlineparserfound} 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{wxcmdlineparserwxcmdlineparserctor}
\func{}{wxCmdLineParser}{\void}
Default constructor. You must use
\helpref{SetCmdLine}{wxcmdlineparsersetcmdline} later.
\func{}{wxCmdLineParser}{\param{int }{argc}, \param{char** }{argv}}
\func{}{wxCmdLineParser}{\param{int }{argc}, \param{wchar\_t** }{argv}}
Constructors which specify 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.
The second overloaded constructor is only available in Unicode build. The
first one is available in both ANSI and Unicode modes because under some
platforms the command line arguments are passed as ASCII strings even to
Unicode programs.
\func{}{wxCmdLineParser}{\param{const wxString\& }{cmdline}}
Constructor which specify the command line to parse in Windows format. The parameter
{\it cmdline} has the same meaning as the corresponding parameter of
{\tt WinMain()}.
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}}
Specifies the \helpref{command line description}{wxcmdlineparsersetdesc} but not the
command line. You must use \helpref{SetCmdLine}{wxcmdlineparsersetcmdline} later.
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}, \param{int }{argc}, \param{char** }{argv}}
Specifies both the command line (in Unix format) and the
\helpref{command line description}{wxcmdlineparsersetdesc}.
\func{}{wxCmdLineParser}{\param{const wxCmdLineEntryDesc* }{desc}, \param{const wxString\& }{cmdline}}
Specifies both the command line (in Windows format) and the
\helpref{command line description}{wxcmdlineparsersetdesc}.
\membersection{wxCmdLineParser::ConvertStringToArgs}\label{wxcmdlineparserconvertstringtoargs}
\func{static wxArrayString}{ConvertStringToArgs}{\param{const wxChar }{*cmdline}}
Breaks down the string containing the full command line in words. The words are
separated by whitespace. The quotes can be used in the input string to quote
the white space and the back slashes can be used to quote the quotes.
\membersection{wxCmdLineParser::SetCmdLine}\label{wxcmdlineparsersetcmdline}
\func{void}{SetCmdLine}{\param{int }{argc}, \param{char** }{argv}}
\func{void}{SetCmdLine}{\param{int }{argc}, \param{wchar\_t** }{argv}}
Set command line to parse after using one of the constructors which don't do it.
The second overload of this function is only available in Unicode build.
\func{void}{SetCmdLine}{\param{const wxString\& }{cmdline}}
Set command line to parse after using one of the constructors which don't do it.
\membersection{wxCmdLineParser::\destruct{wxCmdLineParser}}\label{wxcmdlineparserdtor}
\func{}{\destruct{wxCmdLineParser}}{\void}
Frees resources allocated by the object.
{\bf NB:} destructor is not virtual, don't use this class polymorphically.
\membersection{wxCmdLineParser::SetSwitchChars}\label{wxcmdlineparsersetswitchchars}
\func{void}{SetSwitchChars}{\param{const wxString\& }{switchChars}}
{\it switchChars} contains all characters with which an option or switch may
start. Default is {\tt "-"} for Unix, {\tt "-/"} for Windows.
\membersection{wxCmdLineParser::EnableLongOptions}\label{wxcmdlineparserenablelongoptions}
\func{void}{EnableLongOptions}{\param{bool }{enable = true}}
Enable or disable support for the long options.
As long options are not (yet) POSIX-compliant, this option allows to disable
them.
\wxheading{See also}
\helpref{Customization}{wxcmdlineparsercustomization} and \helpref{AreLongOptionsEnabled}{wxcmdlineparserarelongoptionsenabled}
\membersection{wxCmdLineParser::DisableLongOptions}\label{wxcmdlineparserdisablelongoptions}
\func{void}{DisableLongOptions}{\void}
Identical to \helpref{EnableLongOptions(false)}{wxcmdlineparserenablelongoptions}.
\membersection{wxCmdLineParser::AreLongOptionsEnabled}\label{wxcmdlineparserarelongoptionsenabled}
\func{bool}{AreLongOptionsEnabled}{\void}
Returns true if long options are enabled, otherwise false.
\wxheading{See also}
\helpref{EnableLongOptions}{wxcmdlineparserenablelongoptions}
\membersection{wxCmdLineParser::SetLogo}\label{wxcmdlineparsersetlogo}
\func{void}{SetLogo}{\param{const wxString\& }{logo}}
{\it logo} is some extra text which will be shown by
\helpref{Usage}{wxcmdlineparserusage} method.
\membersection{wxCmdLineParser::SetDesc}\label{wxcmdlineparsersetdesc}
\func{void}{SetDesc}{\param{const wxCmdLineEntryDesc* }{desc}}
Construct the command line description
Take the command line description from the wxCMD\_LINE\_NONE terminated table.
Example of usage:
\begin{verbatim}
static const wxCmdLineEntryDesc cmdLineDesc[] =
{
{ wxCMD_LINE_SWITCH, "v", "verbose", "be verbose" },
{ wxCMD_LINE_SWITCH, "q", "quiet", "be quiet" },
{ wxCMD_LINE_OPTION, "o", "output", "output file" },
{ wxCMD_LINE_OPTION, "i", "input", "input dir" },
{ wxCMD_LINE_OPTION, "s", "size", "output block size", wxCMD_LINE_VAL_NUMBER },
{ wxCMD_LINE_OPTION, "d", "date", "output file date", wxCMD_LINE_VAL_DATE },
{ wxCMD_LINE_PARAM, NULL, NULL, "input file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE },
{ wxCMD_LINE_NONE }
};
wxCmdLineParser parser;
parser.SetDesc(cmdLineDesc);
\end{verbatim}
\membersection{wxCmdLineParser::AddSwitch}\label{wxcmdlineparseraddswitch}
\func{void}{AddSwitch}{\param{const wxString\& }{name}, \param{const wxString\& }{lng = wxEmptyString}, \param{const wxString\& }{desc = wxEmptyString}, \param{int }{flags = 0}}
Add a switch {\it name} with an optional long name {\it lng} (no long name if it
is empty, which is default), description {\it desc} and flags {\it flags} to the
command line description.
\membersection{wxCmdLineParser::AddOption}\label{wxcmdlineparseraddoption}
\func{void}{AddOption}{\param{const wxString\& }{name}, \param{const wxString\& }{lng = wxEmptyString}, \param{const wxString\& }{desc = wxEmptyString}, \param{wxCmdLineParamType }{type = wxCMD\_LINE\_VAL\_STRING}, \param{int }{flags = 0}}
Add an option {\it name} with an optional long name {\it lng} (no long name if
it is empty, which is default) taking a value of the given type (string by
default) to the command line description.
\membersection{wxCmdLineParser::AddParam}\label{wxcmdlineparseraddparam}
\func{void}{AddParam}{\param{const wxString\& }{desc = wxEmptyString}, \param{wxCmdLineParamType }{type = wxCMD\_LINE\_VAL\_STRING}, \param{int }{flags = 0}}
Add a parameter of the given {\it type} to the command line description.
\membersection{wxCmdLineParser::Parse}\label{wxcmdlineparserparse}
\func{int}{Parse}{\param{bool }{giveUsage = {\tt true}}}
Parse the command line, return $0$ if ok, $-1$ if {\tt "-h"} or {\tt "--help"}
option was encountered and the help message was given or a positive value if a
syntax error occurred.
\wxheading{Parameters}
\docparam{giveUsage}{If {\tt true} (default), the usage message is given if a
syntax error was encountered while parsing the command line or if help was
requested. If {\tt false}, only error messages about possible syntax errors
are given, use \helpref{Usage}{wxcmdlineparserusage} to show the usage message
from the caller if needed.}
\membersection{wxCmdLineParser::Usage}\label{wxcmdlineparserusage}
\func{void}{Usage}{\void}
Give the standard usage message describing all program options. It will use the
options and parameters descriptions specified earlier, so the resulting message
will not be helpful to the user unless the descriptions were indeed specified.
\wxheading{See also}
\helpref{SetLogo}{wxcmdlineparsersetlogo}
\membersection{wxCmdLineParser::Found}\label{wxcmdlineparserfound}
\constfunc{bool}{Found}{\param{const wxString\& }{name}}
Returns \true if the given switch was found, false otherwise.
\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).
\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).
\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).
\wxheading{See also}
\helpref{GetParamCount}{wxcmdlineparsergetparamcount}

View File

@@ -1,194 +0,0 @@
\section{\class{wxCommandProcessor}}\label{wxcommandprocessor}
wxCommandProcessor is a class that maintains a history of wxCommands,
with undo/redo functionality built-in. Derive a new class from this
if you want different behaviour.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cmdproc.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxCommandProcessor overview}{wxcommandprocessoroverview}, \helpref{wxCommand}{wxcommand}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCommandProcessor::wxCommandProcessor}\label{wxcommandprocessorctor}
\func{}{wxCommandProcessor}{\param{int}{ maxCommands = $-1$}}
Constructor.
{\it maxCommands} may be set to a positive integer to limit the number of
commands stored to it, otherwise (and by default) the list of commands can grow
arbitrarily.
\membersection{wxCommandProcessor::\destruct{wxCommandProcessor}}\label{wxcommandprocessordtor}
\func{}{\destruct{wxCommandProcessor}}{\void}
Destructor.
\membersection{wxCommandProcessor::CanUndo}\label{wxcommandprocessorcanundo}
\func{virtual bool}{CanUndo}{\void}
Returns true if the currently-active command can be undone, false otherwise.
\membersection{wxCommandProcessor::ClearCommands}\label{wxcommandprocessorclearcommands}
\func{virtual void}{ClearCommands}{\void}
Deletes all commands in the list and sets the current command pointer to \NULL.
\membersection{wxCommandProcessor::Redo}\label{wxcommandprocessorredo}
\func{virtual bool}{Redo}{\void}
Executes (redoes) the current command (the command that has just been undone if any).
\membersection{wxCommandProcessor::GetCommands}\label{wxcommandprocessorgetcommands}
\constfunc{wxList\&}{GetCommands}{\void}
Returns the list of commands.
\membersection{wxCommandProcessor::GetMaxCommands}\label{wxcommandprocessorgetmaxcommands}
\constfunc{int}{GetMaxCommands}{\void}
Returns the maximum number of commands that the command processor stores.
\membersection{wxCommandProcessor::GetEditMenu}\label{wxcommandprocessorgeteditmenu}
\constfunc{wxMenu*}{GetEditMenu}{\void}
Returns the edit menu associated with the command processor.
\membersection{wxCommandProcessor::GetRedoAccelerator}\label{wxcommandprocessorgetredoaccelerator}
\constfunc{const wxString\&}{GetRedoAccelerator}{\void}
Returns the string that will be appended to the Redo menu item.
\membersection{wxCommandProcessor::GetRedoMenuLabel}\label{wxcommandprocessorgetredomenulabel}
\constfunc{wxString}{GetRedoMenuLabel}{\void}
Returns the string that will be shown for the redo menu item.
\membersection{wxCommandProcessor::GetUndoAccelerator}\label{wxcommandprocessorgetundoaccelerator}
\constfunc{const wxString\&}{GetUndoAccelerator}{\void}
Returns the string that will be appended to the Undo menu item.
\membersection{wxCommandProcessor::GetUndoMenuLabel}\label{wxcommandprocessorgetundomenulabel}
\constfunc{wxString}{GetUndoMenuLabel}{\void}
Returns the string that will be shown for the undo menu item.
\membersection{wxCommandProcessor::Initialize}\label{wxcommandprocessorinitialize}
\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::IsDirty}\label{wxcommandprocessorisdirty}
\func{virtual bool}{IsDirty}{\void}
Returns a boolean value that indicates if changes have been made since
the last save operation. This only works if
\helpref{wxCommandProcessor::MarkAsSaved}{wxcommandprocessormarkassaved}
is called whenever the project is saved.
\membersection{wxCommandProcessor::MarkAsSaved}\label{wxcommandprocessormarkassaved}
\func{virtual void}{MarkAsSaved}{\void}
You must call this method whenever the project is saved if you plan to use
\helpref{wxCommandProcessor::IsDirty}{wxcommandprocessorisdirty}.
\membersection{wxCommandProcessor::SetEditMenu}\label{wxcommandprocessorseteditmenu}
\func{void}{SetEditMenu}{\param{wxMenu* }{menu}}
Tells the command processor to update the Undo and Redo items on this
menu as appropriate. Set this to NULL if the menu is about to be
destroyed and command operations may still be performed, or the command
processor may try to access an invalid pointer.
\membersection{wxCommandProcessor::SetMenuStrings}\label{wxcommandprocessorsetmenustrings}
\func{void}{SetMenuStrings}{\void}
Sets the menu labels according to the currently set menu and the current
command state.
\membersection{wxCommandProcessor::SetRedoAccelerator}\label{wxcommandprocessorsetredoaccelerator}
\func{void}{SetRedoAccelerator}{\param{const wxString\&}{accel}}
Sets the string that will be appended to the Redo menu item.
\membersection{wxCommandProcessor::SetUndoAccelerator}\label{wxcommandprocessorsetundoaccelerator}
\func{void}{SetUndoAccelerator}{\param{const wxString\&}{accel}}
Sets the string that will be appended to the Undo menu item.
\membersection{wxCommandProcessor::Submit}\label{wxcommandprocessorsubmit}
\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}\label{wxcommandprocessorundo}
\func{virtual bool}{Undo}{\void}
Undoes the command just executed.

View File

@@ -1,66 +0,0 @@
\section{\class{wxContextMenuEvent}}\label{wxcontextmenuevent}
This class is used for context menu events, sent to give
the application a chance to show a context (popup) menu.
Note that if \helpref{GetPosition}{wxcontextmenueventgetposition} returns wxDefaultPosition, this means that the event originated
from a keyboard context button event, and you should compute a suitable position yourself,
for example by calling \helpref{wxGetMousePosition}{wxgetmouseposition}.
When a keyboard context menu button is pressed on Windows, a right-click event with default position is sent first,
and if this event is not processed, the context menu event is sent. So if you process mouse events and you find your context menu event handler
is not being called, you could call wxEvent::Skip for mouse right-down events.
\wxheading{Derived from}
\helpref{wxCommandEvent}{wxcommandevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Event table macros}
To process a menu event, use these event handler macros to direct input to member
functions that take a wxContextMenuEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_CONTEXT\_MENU(func)}}{A right click (or other context menu command depending on platform) has been detected.}
\end{twocollist}
\wxheading{See also}
\helpref{Command events}{wxcommandevent},\\
\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxContextMenuEvent::wxContextMenuEvent}\label{wxcontextmenueventctor}
\func{}{wxContextMenuEvent}{\param{WXTYPE }{id = 0}, \param{int }{id = 0}, \param{const wxPoint\&}{ pos=wxDefaultPosition}}
Constructor.
\membersection{wxContextMenuEvent::GetPosition}\label{wxcontextmenueventgetposition}
\constfunc{wxPoint}{GetPosition}{\void}
Returns the position in screen coordinates at which the menu should be shown. Use \helpref{wxWindow::ScreenToClient}{wxwindowscreentoclient} to
convert to client coordinates. You can also omit a position from \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu} in order to use
the current mouse pointer position.
If the event originated from a keyboard event, the value returned from this function will be wxDefaultPosition.
\membersection{wxContextMenuEvent::SetPosition}\label{wxcontextmenueventsetposition}
\func{void}{SetPosition}{\param{const wxPoint\&}{ point}}
Sets the position at which the menu should be shown.

View File

@@ -1,237 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: collpane.tex
%% Purpose: wxCollapsiblePane documentation
%% Author: Francesco Montorsi
%% Created: 2006-10-14
%% RCS-ID: $Id$
%% Copyright: (c) 2006 Francesco Montorsi
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxCollapsiblePane}}\label{wxcollapsiblepane}
A collapsible pane is a container with an embedded button-like control which can be
used by the user to collapse or expand the pane's contents.
Once constructed you should use the \helpref{GetPane}{wxcollapsiblepanegetpane}
function to access the pane and add your controls inside it (i.e. use the
\helpref{GetPane}{wxcollapsiblepanegetpane}'s returned pointer as parent for the
controls which must go in the pane, NOT the wxCollapsiblePane itself!).
Note that because of its nature of control which can dynamically (and drastically)
change its size at run-time under user-input, when putting wxCollapsiblePane inside
a \helpref{wxSizer}{wxsizer} you should be careful to add it with a proportion value
of zero; this is because otherwise all other windows with non-null proportion values
would automatically get resized each time the user expands or collapse the pane window
resulting usually in a weird, flickering effect.
Usage sample:
\begin{verbatim}
wxCollapsiblePane *collpane = new wxCollapsiblePane(this, wxID_ANY, wxT("Details:"));
// add the pane with a zero proportion value to the 'sz' sizer which contains it
sz->Add(collpane, 0, wxGROW|wxALL, 5);
// now add a test label in the collapsible pane using a sizer to layout it:
wxWindow *win = collpane->GetPane();
wxSizer *paneSz = new wxBoxSizer(wxVERTICAL);
paneSz->Add(new wxStaticText(win, wxID_ANY, wxT("test!")), 1, wxGROW|wxALL, 2);
win->SetSizer(paneSz);
paneSz->SetSizeHints(win);
\end{verbatim}
It is only available if \texttt{wxUSE\_COLLPANE} is set to $1$ (the default).
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/collpane.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Window styles}
\twocolwidtha{5cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCP\_DEFAULT\_STYLE}}{The default style: 0.}
\end{twocollist}
\wxheading{Event handling}
To process a collapsible pane event, use these event handler macros to direct input to member
functions that take a \helpref{wxCollapsiblePaneEvent}{wxcollapsiblepaneevent} argument.
\twocolwidtha{7cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_COLLAPSIBLEPANE\_CHANGED(id, func)}}{The user showed or hidden the collapsible pane. }
\end{twocollist}
\wxheading{See also}
\helpref{wxPanel}{wxpanel},\\
\helpref{wxCollapsiblePaneEvent}{wxcollapsiblepaneevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCollapsiblePane::wxCollapsiblePane}\label{wxcollapsiblepanector}
\func{}{wxCollapsiblePane}{\param{wxWindow *}{parent},\rtfsp
\param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{label},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxCP\_DEFAULT\_STYLE},\rtfsp
\param{const wxValidator\& }{validator = wxDefaultValidator},
\param{const wxString\& }{name = ``collapsiblePane"}}
Initializes the object and calls \helpref{Create}{wxcollapsiblepanecreate} with
all the parameters.
\membersection{wxCollapsiblePane::Create}\label{wxcollapsiblepanecreate}
\func{bool}{Create}{\param{wxWindow *}{parent},\rtfsp
\param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{label},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxCP\_DEFAULT\_STYLE},\rtfsp
\param{const wxValidator\& }{validator = wxDefaultValidator},
\param{const wxString\& }{name = ``collapsiblePane"}}
\wxheading{Parameters}
\docparam{parent}{Parent window, must not be non-\texttt{NULL}.}
\docparam{id}{The identifier for the control.}
\docparam{label}{The initial label shown in the button which allows the user to expand or collapse the pane window.}
\docparam{pos}{Initial position.}
\docparam{size}{Initial size.}
\docparam{style}{The window style, see {\tt wxCP\_*} flags.}
\docparam{validator}{Validator which can be used for additional date checks.}
\docparam{name}{Control name.}
\wxheading{Return value}
\true if the control was successfully created or \false if creation failed.
\membersection{wxCollapsiblePane::IsCollapsed}\label{wxcollapsiblepaneiscollapsed}
\constfunc{bool}{IsCollapsed}{\void}
Returns \true if the pane window is currently hidden.
\membersection{wxCollapsiblePane::IsExpanded}\label{wxcollapsiblepaneisexpanded}
\constfunc{bool}{IsExpanded}{\void}
Returns \true if the pane window is currently shown.
\membersection{wxCollapsiblePane::Collapse}\label{wxcollapsiblepanecollapse}
\func{void}{Collapse}{\param{bool }{collapse = true}}
Collapses or expands the pane window.
\membersection{wxCollapsiblePane::Expand}\label{wxcollapsiblepaneexpand}
\func{void}{Expand}{\void}
Same as \texttt{\helpref{Collapse}{wxcollapsiblepanecollapse}(false)}.
\membersection{wxCollapsiblePane::GetPane}\label{wxcollapsiblepanegetpane}
\constfunc{wxWindow *}{GetPane}{\void}
Returns a pointer to the pane window. Add controls to the returned \helpref{wxWindow}{wxwindow}
to make them collapsible.
%% wxCollapsiblePaneEvent documentation
\section{\class{wxCollapsiblePaneEvent}}\label{wxcollapsiblepaneevent}
This event class is used for the events generated by
\helpref{wxCollapsiblePane}{wxcollapsiblepane}.
\wxheading{Derived from}
\helpref{wxCommandEvent}{wxcommandevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/collpane.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Event handling}
To process input from a wxCollapsiblePane, use one of these event handler macros to
direct input to member function that take a
\helpref{wxCollapsiblePaneEvent}{wxcollapsiblepaneevent} argument:
\twocolwidtha{7cm}
\begin{twocollist}
\twocolitem{{\bf EVT\_COLLAPSIBLEPANE\_CHANGED(id, func)}}{The user showed or hidden the collapsible pane.}
\end{twocollist}%
\wxheading{See also}
\helpref{wxCollapsiblePane}{wxcollapsiblepane}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCollapsiblePaneEvent::wxCollapsiblePaneEvent}\label{wxcollapsiblepaneeventctor}
\func{}{wxCollapsiblePaneEvent}{\param{wxObject *}{ generator}, \param{int}{ id}, \param{bool}{ collapsed}}
The constructor is not normally used by the user code.
\membersection{wxCollapsiblePaneEvent::GetCollapsed}\label{wxcollapsiblepaneeventgetcollapsed}
\constfunc{bool}{GetCollapsed}{\void}
Returns \true if the pane has been collapsed.
\membersection{wxCollapsiblePaneEvent::SetCollapsed}\label{wxcollapsiblepaneeventsetcollapsed}
\func{void}{SetCollapsed}{\param{bool}{ collapsed}}
Sets this as a collapsed pane event (if \arg{collapsed} is \true) or as an expanded
pane event (if \arg{collapsed} is \false).

View File

@@ -1,70 +0,0 @@
\section{\class{wxColourDialog}}\label{wxcolourdialog}
This class represents the colour chooser dialog.
\wxheading{Derived from}
\helpref{wxDialog}{wxdialog}\\
\helpref{wxTopLevelWindow}{wxtoplevelwindow}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/colordlg.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxColourDialog Overview}{wxcolourdialogoverview},\\
\helpref{wxColour}{wxcolour},\\
\helpref{wxColourData}{wxcolourdata},\\
\helpref{wxGetColourFromUser}{wxgetcolourfromuser}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxColourDialog::wxColourDialog}\label{wxcolourdialogctor}
\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. Custom
colours from colour data object will be be used in dialog's colour palette.
Invalid entries in custom colours list will be ignored on some platforms (GTK)
or replaced with white colour on platforms where custom colours palette has
fixed size (MSW).
\wxheading{See also}
\helpref{wxColourData}{wxcolourdata}
\membersection{wxColourDialog::\destruct{wxColourDialog}}\label{wxcolourdialogdtor}
\func{}{\destruct{wxColourDialog}}{\void}
Destructor.
\membersection{wxColourDialog::Create}\label{wxcolourdialogcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxColourData* }{data = NULL}}
Same as \helpref{constructor}{wxcolourdialogctor}.
\membersection{wxColourDialog::GetColourData}\label{wxcolourdialoggetcolourdata}
\func{wxColourData\&}{GetColourData}{\void}
Returns the \helpref{colour data}{wxcolourdata} associated with the colour dialog.
\membersection{wxColourDialog::ShowModal}\label{wxcolourdialogshowmodal}
\func{int}{ShowModal}{\void}
Shows the dialog, returning wxID\_OK if the user pressed OK, and wxID\_CANCEL
otherwise.

View File

@@ -1,411 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: colour.tex
%% Purpose: wxColour docs
%% Author:
%% Modified by: Francesco Montorsi
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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.
You can retrieve the current system colour settings with \helpref{wxSystemSettings}{wxsystemsettings}.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/colour.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\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}, \helpref{wxSystemSettings}{wxsystemsettings}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxColour::wxColour}\label{wxcolourconstr}
\func{}{wxColour}{\void}
Default constructor.
\func{}{wxColour}{\param{unsigned char}{ red}, \param{unsigned char}{ green}, \param{unsigned char}{ blue}, \param{unsigned char}{ alpha=wxALPHA\_OPAQUE}}
Constructs a colour from red, green, blue and alpha values.
\func{}{wxColour}{\param{const wxString\& }{colourNname}}
Constructs a colour using the given string. See \helpref{Set}{wxcolourset} for more info.
\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{alpha}{The alpha value. Alpha values range from 0 (wxALPHA\_TRANSPARENT) to 255 (wxALPHA\_OPAQUE).}
\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::Alpha}\label{wxcolouralpha}
\constfunc{unsigned char}{Alpha}{\void}
Returns the alpha value, on platforms where alpha is not yet supported, this always returns wxALPHA\_OPAQUE.
\membersection{wxColour::Blue}\label{wxcolourblue}
\constfunc{unsigned char}{Blue}{\void}
Returns the blue intensity.
\membersection{wxColour::GetAsString}\label{wxcolourgetasstring}
\constfunc{wxString}{GetAsString}{\param{long}{ flags}}
Converts this colour to a \helpref{wxString}{wxstring}
using the given {\it flags}.
The supported flags are \textbf{wxC2S\_NAME}, to obtain the colour name (e.g.
wxColour(255,0,0) -> \texttt{``red"}), \textbf{wxC2S\_CSS\_SYNTAX}, to obtain
the colour in the \texttt{``rgb(r,g,b)"} or \texttt{``rgba(r,g,b,a)"} syntax
(e.g. wxColour(255,0,0,85) -> \texttt{``rgba(255,0,0,0.333)"}), and
\textbf{wxC2S\_HTML\_SYNTAX}, to obtain the colour as \texttt{``\#"} followed
by 6 hexadecimal digits (e.g. wxColour(255,0,0) -> \texttt{``\#FF0000"}).
This function never fails and always returns a non-empty string but asserts if
the colour has alpha channel (i.e. is non opaque) but
\textbf{wxC2S\_CSS\_SYNTAX} (which is the only one supporting alpha) is not
specified in flags.
\newsince{2.7.0}
\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::IsOk}\label{wxcolourisok}
\constfunc{bool}{IsOk}{\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{unsigned char}{ red}, \param{unsigned char}{ green}, \param{unsigned char}{ blue}, \param{unsigned char}{ alpha=wxALPHA\_OPAQUE}}
\func{void}{Set}{\param{unsigned long}{ RGB}}
\func{bool}{Set}{\param{const wxString \&}{ str}}
Sets the RGB intensity values using the given values (first overload), extracting them from the packed long (second overload), using the given string (third overloard).
When using third form, Set() accepts: colour names (those listed in
\helpref{wxTheColourDatabase}{wxcolourdatabase}), the CSS-like
\texttt{``rgb(r,g,b)"} or \texttt{``rgba(r,g,b,a)"} syntax (case insensitive)
and the HTML-like syntax (i.e. \texttt{``\#"} followed by 6 hexadecimal digits
for red, green, blue components).
Returns \true if the conversion was successful, \false otherwise.
\newsince{2.7.0}
\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 and alpha values.
\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 and alpha values.
\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{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxColour}{wxcolour}, \helpref{wxColourDialog}{wxcolourdialog}, \helpref{wxColourDialog overview}{wxcolourdialogoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxColourData::wxColourData}\label{wxcolourdatactor}
\func{}{wxColourData}{\void}
Constructor. Initializes the custom colours to {\tt wxNullColour},
the {\it data colour} setting
to black, and the {\it choose full} setting to true.
\membersection{wxColourData::\destruct{wxColourData}}\label{wxcolourdatadtor}
\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. Under PalmOS, determines whether colour dialog
will display full rgb colour picker or only available palette indexer.
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 invalid colours.
\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 invalid colours.
\membersection{wxColourData::operator $=$}\label{wxcolourdataassign}
\func{void}{operator $=$}{\param{const wxColourData\&}{ data}}
Assignment operator for the colour data.
\section{\class{wxColourDatabase}}\label{wxcolourdatabase}
wxWidgets maintains a database of standard RGB colours for a predefined
set of named colours (such as ``BLACK'', ``LIGHT GREY''). The
application may add to this set if desired by using
\helpref{AddColour}{wxcolourdatabaseaddcolour} and may use it to look up
colours by names using \helpref{Find}{wxcolourdatabasefind} or find the names
for the standard colour suing \helpref{FindName}{wxcolourdatabasefindname}.
There is one predefined instance of this class called
{\bf wxTheColourDatabase}.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/gdicmn.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Remarks}
The standard database contains at least the following colours:
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. It will be initialized at the first use.
\membersection{wxColourDatabase::AddColour}\label{wxcolourdatabaseaddcolour}
\func{void}{AddColour}{\param{const wxString\& }{colourName}, \param{const wxColour\&}{colour}}
\func{void}{AddColour}{\param{const wxString\& }{colourName}, \param{wxColour* }{colour}}
Adds a colour to the database. If a colour with the same name already exists,
it is replaced.
Please note that the overload taking a pointer is deprecated and will be
removed in the next wxWidgets version, please don't use it.
\membersection{wxColourDatabase::Find}\label{wxcolourdatabasefind}
\func{wxColour}{Find}{\param{const wxString\& }{colourName}}
Finds a colour given the name. Returns an invalid colour object (that is, such
that its \helpref{Ok()}{wxcolourisok} method returns \false) if the colour wasn't
found in the database.
\membersection{wxColourDatabase::FindName}\label{wxcolourdatabasefindname}
\constfunc{wxString}{FindName}{\param{const wxColour\&}{ colour}}
Finds a colour name given the colour. Returns an empty string if the colour is
not found in the database.

View File

@@ -1,340 +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.
If you need a customized combobox, have a look at \helpref{wxComboCtrl}{wxcomboctrl},
\helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox}, \helpref{wxComboPopup}{wxcombopopup}
and the ready-to-use \helpref{wxBitmapComboBox}{wxbitmapcombobox}.
\wxheading{Derived from}
\helpref{wxControlWithItems}{wxcontrolwithitems}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/combobox.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\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.}
\twocolitem{\windowstyle{wxTE\_PROCESS\_ENTER}}{The control will generate
the event wxEVT\_COMMAND\_TEXT\_ENTER (otherwise pressing Enter key
is either processed internally by the control or used for navigation between
dialog controls). Windows only.}
\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. Note that calling
\helpref{GetValue}{wxcomboboxgetvalue} returns the new value of selection.}
\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED event,
when the combobox text changes.}
\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER event,
when <RETURN> is pressed in the combobox (notice that the combobox must have
been created with \texttt{wxTE\_PROCESS\_ENTER} style to receive this event).}
\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{wxcomboboxctor}
\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 = 0}, \param{const wxString }{choices[] = NULL},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
\func{}{wxComboBox}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{value}, \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
\param{const wxArrayString\& }{choices},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
Constructor, creating and showing a combobox.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
\docparam{value}{Initial selection string. An empty string indicates no selection.}
\docparam{pos}{Window position.}
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
appropriately.}
\docparam{n}{Number of strings with which to initialise the control.}
\docparam{choices}{An array of strings with which to initialise the control.}
\docparam{style}{Window style. See \helpref{wxComboBox}{wxcombobox}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\wxheading{See also}
\helpref{wxComboBox::Create}{wxcomboboxcreate}, \helpref{wxValidator}{wxvalidator}
\pythonnote{The wxComboBox constructor in wxPython reduces the {\tt n}
and {\tt choices} arguments are to a single argument, which is
a list of strings.}
\perlnote{In wxPerl there is just an array reference in place of {\tt n}
and {\tt choices}.}
\membersection{wxComboBox::\destruct{wxComboBox}}\label{wxcomboboxdtor}
\func{}{\destruct{wxComboBox}}{\void}
Destructor, destroying the combobox.
\membersection{wxComboBox::Create}\label{wxcomboboxcreate}
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
\param{int}{ n}, \param{const wxString }{choices[]},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{value}, \param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size},\rtfsp
\param{const wxArrayString\& }{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}{wxcomboboxctor}\rtfsp
for further details.
\membersection{wxComboBox::CanCopy}\label{wxcomboboxcancopy}
\constfunc{bool}{CanCopy}{\void}
Returns true if the combobox is editable and there is a text selection to copy to the clipboard.
Only available on Windows.
\membersection{wxComboBox::CanCut}\label{wxcomboboxcancut}
\constfunc{bool}{CanCut}{\void}
Returns true if the combobox is editable and there is a text selection to copy to the clipboard.
Only available on Windows.
\membersection{wxComboBox::CanPaste}\label{wxcomboboxcanpaste}
\constfunc{bool}{CanPaste}{\void}
Returns true if the combobox is editable and there is text on the clipboard that can be pasted into the
text field. Only available on Windows.
\membersection{wxComboBox::CanRedo}\label{wxcomboboxcanredo}
\constfunc{bool}{CanRedo}{\void}
Returns true if the combobox is editable and the last undo can be redone.
Only available on Windows.
\membersection{wxComboBox::CanUndo}\label{wxcomboboxcanundo}
\constfunc{bool}{CanUndo}{\void}
Returns true if the combobox is editable and the last edit can be undone.
Only available on Windows.
\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::GetCurrentSelection}\label{wxcomboboxgetcurrentselection}
\constfunc{int}{GetCurrentSelection}{\void}
This function does the same things as
\helpref{wxChoice::GetCurrentSelection}{wxchoicegetcurrentselection} and
returns the item currently selected in the dropdown list if it's open or the
same thing as \helpref{GetSelection}{wxcontrolwithitemsgetselection} otherwise.
\membersection{wxComboBox::GetInsertionPoint}\label{wxcomboboxgetinsertionpoint}
\constfunc{long}{GetInsertionPoint}{\void}
Returns the insertion point for the combobox's text field.
\textbf{Note:} Under wxMSW, this function always returns $0$ if the combobox
doesn't have the focus.
\membersection{wxComboBox::GetLastPosition}\label{wxcomboboxgetlastposition}
\constfunc{virtual wxTextPos}{GetLastPosition}{\void}
Returns the last position in the combobox text field.
\membersection{wxComboBox::GetSelection}\label{wxcomboboxgetselection}
\constfunc{void}{GetSelection}{\param{long *}{from}, \param{long *}{to}}
This is the same as \helpref{wxTextCtrl::GetSelection}{wxtextctrlgetselection}
for the text control which is part of the combobox. Notice that this is a
different method from \helpref{wxControlWithItems::GetSelection}{wxcontrolwithitemsgetselection}.
Currently this method is only implemented in wxMSW and wxGTK.
\membersection{wxComboBox::GetValue}\label{wxcomboboxgetvalue}
\constfunc{wxString}{GetValue}{\void}
Returns the current value in the combobox text field.
\membersection{wxComboBox::Paste}\label{wxcomboboxpaste}
\func{void}{Paste}{\void}
Pastes text from the clipboard to the text field.
\membersection{wxComboBox::Redo}\label{wxcomboboxredo}
\func{void}{Redo}{\void}
Redoes the last undo in the text field. Windows only.
\membersection{wxComboBox::Replace}\label{wxcomboboxreplace}
\func{void}{Replace}{\param{long}{ from}, \param{long}{ to}, \param{const wxString\& }{text}}
Replaces the text between two positions with the given text, in the combobox text field.
\wxheading{Parameters}
\docparam{from}{The first position.}
\docparam{to}{The second position.}
\docparam{text}{The text to insert.}
\membersection{wxComboBox::Remove}\label{wxcomboboxremove}
\func{void}{Remove}{\param{long}{ from}, \param{long}{ to}}
Removes the text between the two positions in the combobox text field.
\wxheading{Parameters}
\docparam{from}{The first position.}
\docparam{to}{The last position.}
\membersection{wxComboBox::SetInsertionPoint}\label{wxcomboboxsetinsertionpoint}
\func{void}{SetInsertionPoint}{\param{long}{ pos}}
Sets the insertion point in the combobox text field.
\wxheading{Parameters}
\docparam{pos}{The new insertion point.}
\membersection{wxComboBox::SetInsertionPointEnd}\label{wxcomboboxsetinsertionpointend}
\func{void}{SetInsertionPointEnd}{\void}
Sets the insertion point at the end of the combobox text field.
\membersection{wxComboBox::SetSelection}\label{wxcomboboxsetselection}
\func{void}{SetSelection}{\param{long}{ from}, \param{long}{ to}}
Selects the text between the two positions, in the combobox text field.
\wxheading{Parameters}
\docparam{from}{The first position.}
\docparam{to}{The second position.}
\pythonnote{This method is called {\tt SetMark} in wxPython, {\tt SetSelection}
name is kept for
\helpref{wxControlWithItems::SetSelection}{wxcontrolwithitemssetselection}.}
\membersection{wxComboBox::SetValue}\label{wxcomboboxsetvalue}
\func{void}{SetValue}{\param{const wxString\& }{text}}
Sets the text for the combobox text field.
{\bf NB:} For a combobox with {\tt wxCB\_READONLY} style the string must be in
the combobox choices list, otherwise the call to SetValue() is ignored.
\wxheading{Parameters}
\docparam{text}{The text to set.}
\membersection{wxComboBox::Undo}\label{wxcomboboxundo}
\func{void}{Undo}{\void}
Undoes the last edit in the text field. Windows only.

View File

@@ -1,749 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: comboctrl.tex
%% Purpose: wxComboCtrl docs
%% Author: Jaakko Salli
%% Modified by:
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) Jaakko Salli
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxComboCtrl}}\label{wxcomboctrl}
A combo control is a generic combobox that allows totally
custom popup. In addition it has other customization features.
For instance, position and size of the dropdown button
can be changed.
\wxheading{Setting Custom Popup for wxComboCtrl}
wxComboCtrl needs to be told somehow which control to use
and this is done by SetPopupControl(). However, we need
something more than just a wxControl in this method as,
for example, we need to call SetStringValue("initial text value")
and wxControl doesn't have such method. So we also need a
\helpref{wxComboPopup}{wxcombopopup} which is an interface which
must be implemented by a control to be usable as a popup.
We couldn't derive wxComboPopup from wxControl as this would make it
impossible to have a class deriving from a wxWidgets control and from
it, so instead it is just a mix-in.
Here's a minimal sample of \helpref{wxListView}{wxlistview} popup:
\begin{verbatim}
#include <wx/combo.h>
#include <wx/listctrl.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
class wxListViewComboPopup : public wxListView,
public wxComboPopup
{
public:
// Initialize member variables
virtual void Init()
{
m_value = -1;
}
// Create popup control
virtual bool Create(wxWindow* parent)
{
return wxListView::Create(parent,1,wxPoint(0,0),wxDefaultSize);
}
// Return pointer to the created control
virtual wxWindow *GetControl() { return this; }
// Translate string into a list selection
virtual void SetStringValue(const wxString& s)
{
int n = wxListView::FindItem(-1,s);
if ( n >= 0 && n < wxListView::GetItemCount() )
wxListView::Select(n);
}
// Get list selection as a string
virtual wxString GetStringValue() const
{
if ( m_value >= 0 )
return wxListView::GetItemText(m_value);
return wxEmptyString;
}
// Do mouse hot-tracking (which is typical in list popups)
void OnMouseMove(wxMouseEvent& event)
{
// TODO: Move selection to cursor
}
// On mouse left up, set the value and close the popup
void OnMouseClick(wxMouseEvent& WXUNUSED(event))
{
m_value = wxListView::GetFirstSelected();
// TODO: Send event as well
Dismiss();
}
protected:
int m_value; // current item index
private:
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(wxListViewComboPopup, wxListView)
EVT_MOTION(wxListViewComboPopup::OnMouseMove)
EVT_LEFT_UP(wxListViewComboPopup::OnMouseClick)
END_EVENT_TABLE()
\end{verbatim}
Here's how you would create and populate it in a dialog constructor:
\begin{verbatim}
wxComboCtrl* comboCtrl = new wxComboCtrl(this,wxID_ANY,wxEmptyString);
wxListViewComboPopup* popupCtrl = new wxListViewComboPopup();
comboCtrl->SetPopupControl(popupCtrl);
// Populate using wxListView methods
popupCtrl->InsertItem(popupCtrl->GetItemCount(),wxT("First Item"));
popupCtrl->InsertItem(popupCtrl->GetItemCount(),wxT("Second Item"));
popupCtrl->InsertItem(popupCtrl->GetItemCount(),wxT("Third Item"));
\end{verbatim}
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/combo.h>
\wxheading{Window styles}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxCB\_READONLY}}{Text will not be editable.}
\twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries in the list alphabetically.}
\twocolitem{\windowstyle{wxTE\_PROCESS\_ENTER}}{The control will generate
the event wxEVT\_COMMAND\_TEXT\_ENTER (otherwise pressing Enter key
is either processed internally by the control or used for navigation between
dialog controls). Windows only.}
\twocolitem{\windowstyle{wxCC\_SPECIAL\_DCLICK}}{Double-clicking triggers a call
to popup's OnComboDoubleClick. Actual behaviour is defined by a derived
class. For instance, wxOwnerDrawnComboBox will cycle an item. This style only
applies if wxCB\_READONLY is used as well.}
\twocolitem{\windowstyle{wxCC\_STD\_BUTTON}}{Drop button will behave
more like a standard push button.}
\end{twocollist}
See also \helpref{window styles overview}{windowstyles}.
\wxheading{Event handling}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED event,
when the text changes.}
\twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER event,
when <RETURN> is pressed in the combo control.}
\end{twocollist}
\wxheading{See also}
\helpref{wxComboBox}{wxcombobox}, \helpref{wxChoice}{wxchoice},
\helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox},
\rtfsp\helpref{wxComboPopup}{wxcombopopup}, \helpref{wxCommandEvent}{wxcommandevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxComboCtrl::wxComboCtrl}\label{wxcomboctrlctor}
\func{}{wxComboCtrl}{\void}
Default constructor.
\func{}{wxComboCtrl}{\param{wxWindow*}{ parent}, \param{wxWindowID}{ id},\rtfsp
\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
\param{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboCtrl"}}
Constructor, creating and showing a combo control.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
\docparam{value}{Initial selection string. An empty string indicates no selection.}
\docparam{pos}{Window position.}
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
appropriately.}
\docparam{style}{Window style. See \helpref{wxComboCtrl}{wxcomboctrl}.}
\docparam{validator}{Window validator.}
\docparam{name}{Window name.}
\wxheading{See also}
\helpref{wxComboCtrl::Create}{wxcomboctrlcreate}, \helpref{wxValidator}{wxvalidator}
\membersection{wxComboCtrl::\destruct{wxComboCtrl}}\label{wxcomboctrldtor}
\func{}{\destruct{wxComboCtrl}}{\void}
Destructor, destroying the combo control.
\membersection{wxComboCtrl::AnimateShow}\label{wxcomboctrlanimateshow}
\func{virtual bool}{AnimateShow}{\param{const wxRect\& }{rect}, \param{int }{flags}}
This member function is not normally called in application code.
Instead, it can be implemented in a derived class to create a
custom popup animation.
\wxheading{Parameters}
Same as in \helpref{DoShowPopup}{wxcomboctrldoshowpopup}.
\wxheading{Return value}
\true if animation finishes before the function returns.
\false otherwise. In the latter case you need to manually call DoShowPopup
after the animation ends.
\membersection{wxComboCtrl::Create}\label{wxcomboctrlcreate}
\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{long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboCtrl"}}
Creates the combo control for two-step construction. Derived classes
should call or replace this function. See \helpref{wxComboCtrl::wxComboCtrl}{wxcomboctrlctor}\rtfsp
for further details.
\membersection{wxComboCtrl::Copy}\label{wxcomboctrlcopy}
\func{void}{Copy}{\void}
Copies the selected text to the clipboard.
\membersection{wxComboCtrl::Cut}\label{wxcomboctrlcut}
\func{void}{Cut}{\void}
Copies the selected text to the clipboard and removes the selection.
\membersection{wxComboCtrl::DoSetPopupControl}\label{wxcomboctrldosetpopupcontrol}
\func{void}{DoSetPopupControl}{\param{wxComboPopup* }{popup}}
This member function is not normally called in application code.
Instead, it can be implemented in a derived class to return
default wxComboPopup, incase {\tt popup} is NULL.
\textbf{Note:} If you have implemented OnButtonClick to do
something else than show the popup, then DoSetPopupControl
must always return NULL.
\membersection{wxComboCtrl::DoShowPopup}\label{wxcomboctrldoshowpopup}
\func{virtual void}{DoShowPopup}{\param{const wxRect\& }{rect}, \param{int }{flags}}
This member function is not normally called in application code.
Instead, it must be called in a derived class to make sure popup
is properly shown after a popup animation has finished (but only
if \helpref{AnimateShow}{wxcomboctrlanimateshow} did not finish
the animation within it's function scope).
\wxheading{Parameters}
\docparam{rect}{Position to show the popup window at, in screen coordinates.}
\docparam{flags}{Combination of any of the following:}
\twocolwidtha{8cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{{\tt wxComboCtrl::ShowAbove}}{Popup is shown above the control instead
of below.}
\twocolitem{{\tt wxComboCtrl::CanDeferShow}}{Showing the popup can be deferred
to happen sometime after \helpref{ShowPopup}{wxcomboctrlshowpopup} has finished.
In this case, \helpref{AnimateShow}{wxcomboctrlanimateshow} must return \false.}
\end{twocollist}
\membersection{wxComboCtrl::EnablePopupAnimation}\label{wxcomboctrlenablepopupanimation}
\func{void}{EnablePopupAnimation}{\param{bool }{enable = true}}
Enables or disables popup animation, if any, depending on the value of
the argument.
\membersection{wxComboCtrl::GetBitmapDisabled}\label{wxcomboctrlgetbitmapdisabled}
\constfunc{const wxBitmap\&}{GetBitmapDisabled}{\void}
Returns disabled button bitmap that has been set with
\helpref{SetButtonBitmaps}{wxcomboctrlsetbuttonbitmaps}.
\wxheading{Return value}
A reference to the disabled state bitmap.
\membersection{wxComboCtrl::GetBitmapHover}\label{wxcomboctrlgetbitmaphover}
\constfunc{const wxBitmap\&}{GetBitmapHover}{\void}
Returns button mouse hover bitmap that has been set with
\helpref{SetButtonBitmaps}{wxcomboctrlsetbuttonbitmaps}.
\wxheading{Return value}
A reference to the mouse hover state bitmap.
\membersection{wxComboCtrl::GetBitmapNormal}\label{wxcomboctrlgetbitmapnormal}
\constfunc{const wxBitmap\&}{GetBitmapNormal}{\void}
Returns default button bitmap that has been set with
\helpref{SetButtonBitmaps}{wxcomboctrlsetbuttonbitmaps}.
\wxheading{Return value}
A reference to the normal state bitmap.
\membersection{wxComboCtrl::GetBitmapPressed}\label{wxcomboctrlgetbitmappressed}
\constfunc{const wxBitmap\&}{GetBitmapPressed}{\void}
Returns depressed button bitmap that has been set with
\helpref{SetButtonBitmaps}{wxcomboctrlsetbuttonbitmaps}.
\wxheading{Return value}
A reference to the depressed state bitmap.
\membersection{wxComboCtrl::GetButtonSize}\label{wxcomboctrlgetbuttonsize}
\func{wxSize}{GetButtonSize}{\void}
Returns current size of the dropdown button.
\membersection{wxComboCtrl::GetCustomPaintWidth}\label{wxcomboctrlgetcustompaintwidth}
\constfunc{int}{GetCustomPaintWidth}{\void}
Returns custom painted area in control.
\wxheading{See also}
\helpref{wxComboCtrl::SetCustomPaintWidth}{wxcomboctrlsetcustompaintwidth}.
\membersection{wxComboCtrl::GetFeatures}\label{wxcomboctrlgetfeatures}
\func{static int}{GetFeatures}{\void}
Returns features supported by wxComboCtrl. If needed feature is missing,
you need to instead use wxGenericComboCtrl, which however may lack
native look and feel (but otherwise sports identical API).
\wxheading{Return value}
Value returned is a combination of following flags:
\twocolwidtha{8cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{{\tt wxComboCtrlFeatures::MovableButton}}{Button can
be on either side of the control.}
\twocolitem{{\tt wxComboCtrlFeatures::BitmapButton}}{Button may
be replaced with bitmap.}
\twocolitem{{\tt wxComboCtrlFeatures::ButtonSpacing}}{Button can
have spacing.}
\twocolitem{{\tt wxComboCtrlFeatures::TextIndent}}{SetTextIndent
works.}
\twocolitem{{\tt wxComboCtrlFeatures::PaintControl}}{Combo control
itself can be custom painted.}
\twocolitem{{\tt wxComboCtrlFeatures::PaintWritable}}{A variable-
width area in front of writable combo control's textctrl can
be custom painted.}
\twocolitem{{\tt wxComboCtrlFeatures::Borderless}}{wxBORDER\_NONE window style works.}
\twocolitem{{\tt wxComboCtrlFeatures::All}}{All of the
above.}
\end{twocollist}
\membersection{wxComboCtrl::GetInsertionPoint}\label{wxcomboctrlgetinsertionpoint}
\constfunc{long}{GetInsertionPoint}{\void}
Returns the insertion point for the combo control's text field.
\textbf{Note:} Under wxMSW, this function always returns $0$ if the combo control
doesn't have the focus.
\membersection{wxComboCtrl::IsPopupWindowState}\label{wxcomboctrlispopupwindowstate}
\constfunc{bool}{IsPopupWindowState}{\param{int }{state}}
Returns \true if the popup window is in the given state.
Possible values are:
\twocolwidtha{8cm}%
\begin{twocollist}\itemsep=0pt
\twocolitem{{\tt wxComboCtrl::Hidden}}{Popup window is hidden.}
\twocolitem{{\tt wxComboCtrl::Animating}}{Popup window is being shown, but the
popup animation has not yet finished.}
\twocolitem{{\tt wxComboCtrl::Visible}}{Popup window is fully visible.}
\end{twocollist}
\membersection{wxComboCtrl::GetLastPosition}\label{wxcomboctrlgetlastposition}
\constfunc{long}{GetLastPosition}{\void}
Returns the last position in the combo control text field.
\membersection{wxComboCtrl::GetPopupControl}\label{wxcomboctrlgetpopupcontrol}
\func{wxComboPopup*}{GetPopupControl}{\void}
Returns current popup interface that has been set with SetPopupControl.
\membersection{wxComboCtrl::GetPopupWindow}\label{wxcomboctrlgetpopupwindow}
\constfunc{wxWindow*}{GetPopupWindow}{\void}
Returns popup window containing the popup control.
\membersection{wxComboCtrl::GetTextCtrl}\label{wxcomboctrlgettextctrl}
\constfunc{wxTextCtrl*}{GetTextCtrl}{\void}
Get the text control which is part of the combo control.
\membersection{wxComboCtrl::GetTextIndent}\label{wxcomboctrlgettextindent}
\constfunc{wxCoord}{GetTextIndent}{\void}
Returns actual indentation in pixels.
\membersection{wxComboCtrl::GetTextRect}\label{wxcomboctrlgettextrect}
\constfunc{const wxRect\&}{GetTextRect}{\void}
Returns area covered by the text field (includes everything except
borders and the dropdown button).
\membersection{wxComboCtrl::GetValue}\label{wxcomboctrlgetvalue}
\constfunc{wxString}{GetValue}{\void}
Returns text representation of the current value. For writable
combo control it always returns the value in the text field.
\membersection{wxComboCtrl::HidePopup}\label{wxcomboctrlhidepopup}
\func{void}{HidePopup}{\void}
Dismisses the popup window.
\membersection{wxComboCtrl::IsPopupShown}\label{wxcomboctrlispopupshown}
\constfunc{bool}{IsPopupShown}{\void}
Returns \true if the popup is currently shown
\membersection{wxComboCtrl::OnButtonClick}\label{wxcomboctrlonbuttonclick}
\func{void}{OnButtonClick}{\void}
Implement in a derived class to define what happens on
dropdown button click.
Default action is to show the popup.
\textbf{Note:} If you implement this to do something else than
show the popup, you must then also implement
\helpref{DoSetPopupControl}{wxcomboctrldosetpopupcontrol} to always
return NULL.
\membersection{wxComboCtrl::Paste}\label{wxcomboctrlpaste}
\func{void}{Paste}{\void}
Pastes text from the clipboard to the text field.
\membersection{wxComboCtrl::Remove}\label{wxcomboctrlremove}
\func{void}{Remove}{\param{long }{from}, \param{long }{to}}
Removes the text between the two positions in the combo control text field.
\wxheading{Parameters}
\docparam{from}{The first position.}
\docparam{to}{The last position.}
\membersection{wxComboCtrl::Replace}\label{wxcomboctrlreplace}
\func{void}{Replace}{\param{long }{from}, \param{long }{to}, \param{const wxString\& }{value}}
Replaces the text between two positions with the given text, in the combo control text field.
\wxheading{Parameters}
\docparam{from}{The first position.}
\docparam{to}{The second position.}
\docparam{text}{The text to insert.}
\membersection{wxComboCtrl::SetButtonBitmaps}\label{wxcomboctrlsetbuttonbitmaps}
\func{void}{SetButtonBitmaps}{\param{const wxBitmap\& }{bmpNormal}, \param{bool }{pushButtonBg = false}, \param{const wxBitmap\& }{bmpPressed = wxNullBitmap}, \param{const wxBitmap\& }{bmpHover = wxNullBitmap}, \param{const wxBitmap\& }{bmpDisabled = wxNullBitmap}}
Sets custom dropdown button graphics.
\wxheading{Parameters}
\docparam{bmpNormal}{Default button image.}
\docparam{pushButtonBg}{If \true, blank push button background is painted
below the image.}
\docparam{bmpPressed}{Depressed button image.}
\docparam{bmpHover}{Button image when mouse hovers above it. This
should be ignored on platforms and themes that do not generally draw
different kind of button on mouse hover.}
\docparam{bmpDisabled}{Disabled button image.}
\membersection{wxComboCtrl::SetButtonPosition}\label{wxcomboctrlsetbuttonposition}
\func{void}{SetButtonPosition}{\param{int }{width = -1}, \param{int }{height = -1}, \param{int }{side = wxRIGHT}, \param{int }{spacingX = 0}}
Sets size and position of dropdown button.
\wxheading{Parameters}
\docparam{width}{Button width. Value <= $0$ specifies default.}
\docparam{height}{Button height. Value <= $0$ specifies default.}
\docparam{side}{Indicates which side the button will be placed.
Value can be {\tt wxLEFT} or {\tt wxRIGHT}.}
\docparam{spacingX}{Horizontal spacing around the button. Default is $0$.}
\membersection{wxComboCtrl::SetCustomPaintWidth}\label{wxcomboctrlsetcustompaintwidth}
\func{void}{SetCustomPaintWidth}{\param{int }{width}}
Set width, in pixels, of custom painted area in control without {\tt wxCB\_READONLY}
style. In read-only \helpref{wxOwnerDrawnComboBox}{wxownerdrawncombobox}, this is used
to indicate area that is not covered by the focus rectangle.
\membersection{wxComboCtrl::SetInsertionPoint}\label{wxcomboctrlsetinsertionpoint}
\func{void}{SetInsertionPoint}{\param{long }{pos}}
Sets the insertion point in the text field.
\wxheading{Parameters}
\docparam{pos}{The new insertion point.}
\membersection{wxComboCtrl::SetInsertionPointEnd}\label{wxcomboctrlsetinsertionpointend}
\func{void}{SetInsertionPointEnd}{\void}
Sets the insertion point at the end of the combo control text field.
\membersection{wxComboCtrl::SetPopupAnchor}\label{wxcomboctrlsetpopupanchor}
\func{void}{SetPopupAnchor}{\param{int }{anchorSide}}
Set side of the control to which the popup will align itself. Valid values are
{\tt wxLEFT}, {\tt wxRIGHT} and $0$. The default value $0$ means that the most appropriate
side is used (which, currently, is always {\tt wxLEFT}).
\membersection{wxComboCtrl::SetPopupControl}\label{wxcomboctrlsetpopupcontrol}
\func{void}{SetPopupControl}{\param{wxComboPopup* }{popup}}
Set popup interface class derived from wxComboPopup.
This method should be called as soon as possible after the control
has been created, unless \helpref{OnButtonClick}{wxcomboctrlonbuttonclick}
has been overridden.
\membersection{wxComboCtrl::SetPopupExtents}\label{wxcomboctrlsetpopupextents}
\func{void}{SetPopupExtents}{\param{int }{extLeft}, \param{int }{extRight}}
Extends popup size horizontally, relative to the edges of the combo control.
\wxheading{Parameters}
\docparam{extLeft}{How many pixel to extend beyond the left edge of the
control. Default is $0$.}
\docparam{extRight}{How many pixel to extend beyond the right edge of the
control. Default is $0$.}
\wxheading{Remarks}
Popup minimum width may override arguments.
It is up to the popup to fully take this into account.
\membersection{wxComboCtrl::SetPopupMaxHeight}\label{wxcomboctrlsetpopupmaxheight}
\func{void}{SetPopupMaxHeight}{\param{int }{height}}
Sets preferred maximum height of the popup.
\wxheading{Remarks}
Value -1 indicates the default.
Also, popup implementation may choose to ignore this.
\membersection{wxComboCtrl::SetPopupMinWidth}\label{wxcomboctrlsetpopupminwidth}
\func{void}{SetPopupMinWidth}{\param{int }{width}}
Sets minimum width of the popup. If wider than combo control, it will extend to the left.
\wxheading{Remarks}
Value -1 indicates the default.
Also, popup implementation may choose to ignore this.
\membersection{wxComboCtrl::SetSelection}\label{wxcomboctrlsetselection}
\func{void}{SetSelection}{\param{long }{from}, \param{long }{to}}
Selects the text between the two positions, in the combo control text field.
\wxheading{Parameters}
\docparam{from}{The first position.}
\docparam{to}{The second position.}
\membersection{wxComboCtrl::SetText}\label{wxcomboctrlsettext}
\func{void}{SetText}{\param{const wxString\& }{value}}
Sets the text for the text field without affecting the
popup. Thus, unlike \helpref{SetValue}{wxcomboctrlsetvalue}, it works
equally well with combo control using {\tt wxCB\_READONLY} style.
\membersection{wxComboCtrl::SetTextIndent}\label{wxcomboctrlsettextindent}
\func{void}{SetTextIndent}{\param{int }{indent}}
This will set the space in pixels between left edge of the control and the
text, regardless whether control is read-only or not. Value -1 can be
given to indicate platform default.
\membersection{wxComboCtrl::SetValue}\label{wxcomboctrlsetvalue}
\func{void}{SetValue}{\param{const wxString\& }{value}}
Sets the text for the combo control text field.
{\bf NB:} For a combo control with {\tt wxCB\_READONLY} style the
string must be accepted by the popup (for instance, exist in the dropdown
list), otherwise the call to SetValue() is ignored
\membersection{wxComboCtrl::SetValueWithEvent}\label{wxcomboctrlsetvaluewithevent}
\func{void}{SetValueWithEvent}{\param{const wxString\& }{value}, \param{bool }{withEvent = true}}
Same as SetValue, but also sends wxCommandEvent of type wxEVT\_COMMAND\_TEXT\_UPDATED
if {\tt withEvent} is \true.
\membersection{wxComboCtrl::ShowPopup}\label{wxcomboctrlshowpopup}
\func{void}{ShowPopup}{\void}
Show the popup.
\membersection{wxComboCtrl::Undo}\label{wxcomboctrlundo}
\func{void}{Undo}{\void}
Undoes the last edit in the text field. Windows only.
\membersection{wxComboCtrl::UseAltPopupWindow}\label{wxcomboctrlusealtpopupwindow}
\func{void}{UseAltPopupWindow}{\param{bool }{enable = true}}
Enable or disable usage of an alternative popup window, which guarantees
ability to focus the popup control, and allows common native controls to
function normally. This alternative popup window is usually a wxDialog,
and as such, when it is shown, its parent top-level window will appear
as if the focus has been lost from it.

View File

@@ -1,188 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: combopopup.tex
%% Purpose: wxComboPopup docs
%% Author: Jaakko Salli
%% Modified by:
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) Jaakko Salli
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxComboPopup}}\label{wxcombopopup}
In order to use a custom popup with \helpref{wxComboCtrl}{wxcomboctrl},
an interface class must be derived from wxComboPopup. For more information
how to use it, see \helpref{Setting Custom Popup for wxComboCtrl}{wxcomboctrl}.
\wxheading{Include files}
<wx/combo.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxComboCtrl}{wxcomboctrl}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxComboPopup::wxComboPopup}\label{wxcombopopupwxcombopopup}
\func{}{wxComboPopup}{\void}
Default constructor. It is recommended that internal variables
are prepared in \helpref{Init}{wxcombopopupinit} instead
(because \helpref{m\_combo}{wxcombopopupmcombo} is not valid in constructor).
\membersection{wxComboPopup::m\_combo}\label{wxcombopopupmcombo}
\member{wxComboCtrl}{m\_combo}
Parent \helpref{wxComboCtrl}{wxcomboctrl}. This is parameter has
been prepared before \helpref{Init}{wxcombopopupinit} is called.
\membersection{wxComboPopup::Create}\label{wxcombopopupcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}}
The derived class must implement this to create the popup control.
\wxheading{Return value}
\true if the call succeeded, \false otherwise.
\membersection{wxComboPopup::Dismiss}\label{wxcombopopupdismiss}
\func{void}{Dismiss}{\void}
Utility function that hides the popup.
\membersection{wxComboPopup::GetAdjustedSize}\label{wxcombopopupgetadjustedsize}
\func{wxSize}{GetAdjustedSize}{\param{int }{minWidth}, \param{int }{prefHeight}, \param{int }{maxHeight}}
The derived class may implement this to return adjusted size
for the popup control, according to the variables given.
\wxheading{Parameters}
\docparam{minWidth}{Preferred minimum width.}
\docparam{prefHeight}{Preferred height. May be -1 to indicate
no preference.}
\docparam{maxWidth}{Max height for window, as limited by
screen size.}
\wxheading{Remarks}
Called each time popup is about to be shown.
\membersection{wxComboPopup::GetControl}\label{wxcombopopupgetcontrol}
\func{wxWindow*}{GetControl}{\void}
The derived class must implement this to return pointer
to the associated control created in \helpref{Create}{wxcombopopupcreate}.
\membersection{wxComboPopup::GetStringValue}\label{wxcombopopupgetstringvalue}
\constfunc{wxString}{GetStringValue}{\void}
The derived class must implement this to return
string representation of the value.
\membersection{wxComboPopup::Init}\label{wxcombopopupinit}
\func{void}{Init}{\void}
The derived class must implement this to initialize
its internal variables. This method is called immediately
after construction finishes. \helpref{m\_combo}{wxcombopopupmcombo}
member variable has been initialized before the call.
\membersection{wxComboPopup::IsCreated}\label{wxcombopopupiscreated}
\constfunc{bool}{IsCreated}{\void}
Utility method that returns \true if Create has been called.
Useful in conjunction with \helpref{LazyCreate}{wxcombopopuplazycreate}.
\membersection{wxComboPopup::LazyCreate}\label{wxcombopopuplazycreate}
\func{bool}{LazyCreate}{\void}
The derived class may implement this to return
\true if it wants to delay call to \helpref{Create}{wxcombopopupcreate}
until the popup is shown for the first time. It is more
efficient, but on the other hand it is often more convenient
to have the control created immediately.
\wxheading{Remarks}
Base implementation returns \false.
\membersection{wxComboPopup::OnComboDoubleClick}\label{wxcombopopuponcombodoubleclick}
\func{void}{OnComboDoubleClick}{\void}
The derived class may implement this to do something
when the parent \helpref{wxComboCtrl}{wxcomboctrl} gets double-clicked.
\membersection{wxComboPopup::OnComboKeyEvent}\label{wxcombopopuponcombokeyevent}
\func{void}{OnComboKeyEvent}{\param{wxKeyEvent\& }{event}}
The derived class may implement this to receive
key events from the parent \helpref{wxComboCtrl}{wxcomboctrl}.
Events not handled should be skipped, as usual.
\membersection{wxComboPopup::OnDismiss}\label{wxcombopopupondismiss}
\func{void}{OnDismiss}{\void}
The derived class may implement this to do
special processing when popup is hidden.
\membersection{wxComboPopup::OnPopup}\label{wxcombopopuponpopup}
\func{void}{OnPopup}{\void}
The derived class may implement this to do
special processing when popup is shown.
\membersection{wxComboPopup::PaintComboControl}\label{wxcombopopuppaintcombocontrol}
\func{void}{PaintComboControl}{\param{wxDC\& }{dc}, \param{const wxRect\& }{rect}}
The derived class may implement this to paint
the parent \helpref{wxComboCtrl}{wxcomboctrl}.
Default implementation draws value as string.
\membersection{wxComboPopup::SetStringValue}\label{wxcombopopupsetstringvalue}
\func{void}{SetStringValue}{\param{const wxString\& }{value}}
The derived class must implement this to receive
string value changes from \helpref{wxComboCtrl}{wxcomboctrl}.

View File

@@ -1,93 +0,0 @@
\section{\class{wxCommand}}\label{wxcommand}
wxCommand is a base class for modelling an application command,
which is an action usually performed by selecting a menu item, pressing
a toolbar button or any other means provided by the application to
change the data or view.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cmdproc.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\overview{Overview}{wxcommandoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCommand::wxCommand}\label{wxcommandctor}
\func{}{wxCommand}{\param{bool}{ canUndo = false}, \param{const wxString\& }{name = NULL}}
Constructor. wxCommand is an abstract class, so you will need to derive
a new class and call this constructor from your own constructor.
{\it canUndo} tells the command processor whether this command is undo-able. You
can achieve the same functionality by overriding the CanUndo member function (if for example
the criteria for undoability is context-dependent).
{\it name} must be supplied for the command processor to display the command name
in the application's edit menu.
\membersection{wxCommand::\destruct{wxCommand}}\label{wxcommanddtor}
\func{}{\destruct{wxCommand}}{\void}
Destructor.
\membersection{wxCommand::CanUndo}\label{wxcommandcanundo}
\func{bool}{CanUndo}{\void}
Returns true if the command can be undone, false otherwise.
\membersection{wxCommand::Do}\label{wxcommanddo}
\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}\label{wxcommandgetname}
\func{wxString}{GetName}{\void}
Returns the command name.
\membersection{wxCommand::Undo}\label{wxcommandundo}
\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,215 +0,0 @@
\section{\class{wxCondition}}\label{wxcondition}
wxCondition variables correspond to pthread conditions or to Win32 event
objects. They may be used in a multithreaded application to wait until the
given condition becomes true which happens when the condition becomes signaled.
For example, if a worker thread is doing some long task and another thread has
to wait until it is finished, the latter thread will wait on the condition
object and the worker thread will signal it on exit (this example is not
perfect because in this particular case it would be much better to just
\helpref{Wait()}{wxthreadwait} for the worker thread, but if there are several
worker threads it already makes much more sense).
Note that a call to \helpref{Signal()}{wxconditionsignal} may happen before the
other thread calls \helpref{Wait()}{wxconditionwait} and, just as with the
pthread conditions, the signal is then lost and so if you want to be sure that
you don't miss it you must keep the mutex associated with the condition
initially locked and lock it again before calling
\helpref{Signal()}{wxconditionsignal}. Of course, this means that this call is
going to block until \helpref{Wait()}{wxconditionwait} is called by another
thread.
\wxheading{Example}
This example shows how a main thread may launch a worker thread which starts
running and then waits until the main thread signals it to continue:
\begin{verbatim}
class MySignallingThread : public wxThread
{
public:
MySignallingThread(wxMutex *mutex, wxCondition *condition)
{
m_mutex = mutex;
m_condition = condition;
Create();
}
virtual ExitCode Entry()
{
... do our job ...
// tell the other(s) thread(s) that we're about to terminate: we must
// lock the mutex first or we might signal the condition before the
// waiting threads start waiting on it!
wxMutexLocker lock(*m_mutex);
m_condition->Broadcast(); // same as Signal() here -- one waiter only
return 0;
}
private:
wxCondition *m_condition;
wxMutex *m_mutex;
};
int main()
{
wxMutex mutex;
wxCondition condition(mutex);
// the mutex should be initially locked
mutex.Lock();
// create and run the thread but notice that it won't be able to
// exit (and signal its exit) before we unlock the mutex below
MySignallingThread *thread = new MySignallingThread(&mutex, &condition);
thread->Run();
// wait for the thread termination: Wait() atomically unlocks the mutex
// which allows the thread to continue and starts waiting
condition.Wait();
// now we can exit
return 0;
}
\end{verbatim}
Of course, here it would be much better to simply use a joinable thread and
call \helpref{wxThread::Wait}{wxthreadwait} on it, but this example does
illustrate the importance of properly locking the mutex when using
wxCondition.
\wxheading{Constants}
The following return codes are returned by wxCondition member functions:
\begin{verbatim}
enum wxCondError
{
wxCOND_NO_ERROR = 0, // successful completion
wxCOND_INVALID, // object hasn't been initialized successfully
wxCOND_TIMEOUT, // WaitTimeout() has timed out
wxCOND_MISC_ERROR // some other error
};
\end{verbatim}
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/thread.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{wxThread}{wxthread}, \helpref{wxMutex}{wxmutex}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCondition::wxCondition}\label{wxconditionctor}
\func{}{wxCondition}{\param{wxMutex\& }{mutex}}
Default and only constructor. The {\it mutex} must be locked by the caller
before calling \helpref{Wait}{wxconditionwait} function.
Use \helpref{IsOk}{wxconditionisok} to check if the object was successfully
initialized.
\membersection{wxCondition::\destruct{wxCondition}}\label{wxconditiondtor}
\func{}{\destruct{wxCondition}}{\void}
Destroys the wxCondition object. The destructor is not virtual so this class
should not be used polymorphically.
\membersection{wxCondition::Broadcast}\label{wxconditionbroadcast}
\func{void}{Broadcast}{\void}
Broadcasts to all waiting threads, waking all of them up. Note that this method
may be called whether the mutex associated with this condition is locked or
not.
\wxheading{See also}
\helpref{wxCondition::Signal}{wxconditionsignal}
\membersection{wxCondition::IsOk}\label{wxconditionisok}
\constfunc{bool}{IsOk}{\void}
Returns {\tt true} if the object had been initialized successfully, {\tt false}
if an error occurred.
\membersection{wxCondition::Signal}\label{wxconditionsignal}
\func{void}{Signal}{\void}
Signals the object waking up at most one thread. If several threads are waiting
on the same condition, the exact thread which is woken up is undefined. If no
threads are waiting, the signal is lost and the condition would have to be
signalled again to wake up any thread which may start waiting on it later.
Note that this method may be called whether the mutex associated with this
condition is locked or not.
\wxheading{See also}
\helpref{wxCondition::Broadcast}{wxconditionbroadcast}
\membersection{wxCondition::Wait}\label{wxconditionwait}
\func{wxCondError}{Wait}{\void}
Waits until the condition is signalled.
This method atomically releases the lock on the mutex associated with this
condition (this is why it must be locked prior to calling Wait) and puts the
thread to sleep until \helpref{Signal}{wxconditionsignal} or
\helpref{Broadcast}{wxconditionbroadcast} is called. It then locks the mutex
again and returns.
Note that even if \helpref{Signal}{wxconditionsignal} had been called before
Wait without waking up any thread, the thread would still wait for another one
and so it is important to ensure that the condition will be signalled after
Wait or the thread may sleep forever.
\wxheading{Return value}
Returns {\tt wxCOND\_NO\_ERROR} on success, another value if an error occurred.
\wxheading{See also}
\helpref{WaitTimeout}{wxconditionwaittimeout}
\membersection{wxCondition::WaitTimeout}\label{wxconditionwaittimeout}
\func{wxCondError}{WaitTimeout}{\param{unsigned long}{ milliseconds}}
Waits until the condition is signalled or the timeout has elapsed.
This method is identical to \helpref{Wait}{wxconditionwait} except that it
returns, with the return code of {\tt wxCOND\_TIMEOUT} as soon as the given
timeout expires.
\wxheading{Parameters}
\docparam{milliseconds}{Timeout in milliseconds}
\wxheading{Return value}
Returns {\tt wxCOND\_NO\_ERROR} if the condition was signalled,
{\tt wxCOND\_TIMEOUT} if the timeout elapsed before this happened or another
error code from wxCondError enum.

View File

@@ -1,865 +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: \helpref{wxFileConfig}{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, wxWidgets provides a typedef wxConfig
which is mapped onto the native wxConfigBase implementation on the given
platform: i.e. wxRegConfig under Win32 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}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/config.h> (to let wxWidgets choose a wxConfig class for your platform)\\
<wx/confbase.h> (base config class)\\
<wx/fileconf.h> (wxFileConfig class)\\
<wx/msw/regconf.h> (wxRegConfig 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->ReadLong("/LastRun/CalculatedValues/MaxValue", 17);
...
...
...
// at the end of the program we would save everything back
config->Write("LastPrompt", str);
config->Write("/LastRun/CalculatedValues/MaxValue", value);
// the changes will be written back automatically
delete config;
\end{verbatim}
This basic example, of course, doesn't show all wxConfig features, such as
enumerating, testing for existence and deleting the entries and groups of
entries in the config file, its abilities to automatically store the default
values or expand the environment variables on the fly. However, the main idea
is that using this class is easy and that it should normally do what you
expect it to.
NB: in the documentation of this class, the words "config file" also mean
"registry hive" for wxRegConfig and, generally speaking, might mean any
physical storage where a wxConfigBase-derived class stores its data.
\latexignore{\rtfignore{\wxheading{Function groups}}}
\membersection{Static functions}\label{wxconfigstaticfunctions}
These functions deal with the "default" config object. Although its usage is
not at all mandatory it may be convenient to use a global config object
instead of creating and deleting the local config objects each time you need
one (especially because creating a wxFileConfig object might be a time
consuming operation). In this case, you may create this global config object
in the very start of the program and {\it Set()} it as the default. Then, from
anywhere in your program, you may access it using the {\it Get()} function.
This global wxConfig object will be deleted by wxWidgets automatically if it
exists. Note that this implies that if you do delete this object yourself
(usually in \helpref{wxApp::OnExit}{wxapponexit}) you must use {\it Set(NULL)}
to prevent wxWidgets from deleting it the second time.
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 wxWidgets
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 the ability to use wxConfig class.
\helpref{Set}{wxconfigbaseset}\\
\helpref{Get}{wxconfigbaseget}\\
\helpref{Create}{wxconfigbasecreate}\\
\helpref{DontCreateOnDemand}{wxconfigbasedontcreateondemand}
\membersection{Constructor and destructor}\label{congigconstructordestructor}
\helpref{wxConfigBase}{wxconfigbasector}\\
\helpref{\destruct{wxConfigBase}}{wxconfigbasedtor}
\membersection{Path management}\label{configpathmanagement}
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->ReadLong("Subgroup/SubgroupEntry", 0) == 3 );
// use absolute path: it is allowed, too
wxASSERT( conf->ReadLong("/RootEntry", 0) == 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->ReadLong("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}\label{configenumeration}
The functions in this section allow to enumerate all entries and groups in the
config file. All functions here return \false when there are no more items.
You must pass the same index to GetNext and GetFirst (don't modify it).
Please note that it is {\bf not} the index of the current item (you will have
some great surprises with wxRegConfig if you assume this) and you shouldn't
even look at it: it is just a "cookie" which stores the state of the
enumeration. It can't be stored inside the class because it would prevent you
from running several enumerations simultaneously, that's why you must pass it
explicitly.
Having said all this, enumerating the config entries/groups is very simple:
\begin{verbatim}
wxConfigBase *config = ...;
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}\label{configtestsofexistence}
\helpref{HasGroup}{wxconfigbasehasgroup}\\
\helpref{HasEntry}{wxconfigbasehasentry}\\
\helpref{Exists}{wxconfigbaseexists}\\
\helpref{GetEntryType}{wxconfigbasegetentrytype}
\membersection{Miscellaneous functions}\label{configmiscellaneous}
\helpref{GetAppName}{wxconfigbasegetappname}\\
\helpref{GetVendorName}{wxconfigbasegetvendorname}\\
\helpref{SetUmask}{wxfileconfigsetumask}
\membersection{Key access}\label{configkeyaccess}
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, supported types of data are:
\helpref{wxString}{wxstring}, {\it long}, {\it double}, {\it bool},
\helpref{wxColour}{wxcolour} and any other types,
for which functions \helpref{wxToString}{wxtostring}
and \helpref{wxFromString}{wxfromstring} are defined.
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}\label{configrenaming}
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}\label{configdeleting}
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}\label{configoptions}
Some aspects of wxConfigBase behaviour can be changed during run-time. The
first of them is the expansion of environment variables in the string values
read from the config file: for example, if you have the following in your
config file:
\begin{verbatim}
# config file for my program
UserData = $HOME/data
# the following syntax is valud only under Windows
UserData = %windir%\\data.dat
\end{verbatim}
% $ % help EMACS syntax highlighting...
the call to {\tt config->Read("UserData")} will return something like
{\tt "/home/zeitlin/data"} if you're lucky enough to run a Linux system ;-)
Although this feature is very useful, it may be annoying if you read a value
which containts '\$' or '\%' symbols (\% is used for environment variables
expansion under Windows) which are not used for environment variable
expansion. In this situation you may call SetExpandEnvVars(false) just before
reading this value and SetExpandEnvVars(true) just after. Another solution
would be to prefix the offending symbols with a backslash.
The following functions control this option:
\helpref{IsExpandingEnvVars}{wxconfigbaseisexpandingenvvars}\\
\helpref{SetExpandEnvVars}{wxconfigbasesetexpandenvvars}\\
\helpref{SetRecordDefaults}{wxconfigbasesetrecorddefaults}\\
\helpref{IsRecordingDefaults}{wxconfigbaseisrecordingdefaults}
%%%%% MEMBERS HERE %%%%%
\helponly{\insertatlevel{2}{
\wxheading{Members}
}}
\membersection{wxConfigBase::wxConfigBase}\label{wxconfigbasector}
\func{}{wxConfigBase}{\param{const wxString\& }{appName = wxEmptyString},
\param{const wxString\& }{vendorName = wxEmptyString},
\param{const wxString\& }{localFilename = wxEmptyString},
\param{const wxString\& }{globalFilename = wxEmptyString},
\param{long}{ style = 0},
\param{const wxMBConv\&}{ conv = wxConvAuto()}}
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 implementations. For wxFileConfig, these styles
determine whether a local or global config file is created or used: if
wxCONFIG\_USE\_GLOBAL\_FILE is used, then settings are read from the global
config file and if wxCONFIG\_USE\_LOCAL\_FILE is used, settings are read from
and written to local config file (if they are both set, global file is read
first, then local file, overwriting global settings). 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 wxRegConfig, thie GLOBAL flag refers to HKLM
key while LOCAL one is for the usual HKCU one.
For wxFileConfig you can also add wxCONFIG\_USE\_RELATIVE\_PATH by logically
or'ing it to either of the \_FILE options to tell wxFileConfig to use relative
instead of absolute paths.
On non-VMS Unix systems, the default local configuration file is \tt{~/.appname}.
However, this path may be also used as user data directory
(see \helpref{wxStandardPaths::GetUserDataDir}{wxstandardpathsgetuserdatadir}) if
the application has several data files. In this case wxCONFIG\_USE\_SUBDIR
flag, which changes the default local configuration file to \tt{~/.appname/appname}
should be used. Notice that this flag is ignored if \textit{localFilename} is
provided. \newsince{2.8.2}
For wxFileConfig, you can also add wxCONFIG\_USE\_NO\_ESCAPE\_CHARACTERS which
will turn off character escaping for the values of entries stored in the config
file: for example a {\it foo} key with some backslash characters will be stored
as {\tt foo=C:$\backslash$mydir} instead of the usual storage of {\tt
foo=C:$\backslash\backslash$mydir}.
The wxCONFIG\_USE\_NO\_ESCAPE\_CHARACTERS style can be helpful if your config
file must be read or written to by a non-wxWidgets program (which might not
understand the escape characters). Note, however, that if
wxCONFIG\_USE\_NO\_ESCAPE\_CHARACTERS style is used, it is is now
your application's responsibility to ensure that there is no newline or
other illegal characters in a value, before writing that value to the file.}
\docparam{conv}{This parameter is only used by wxFileConfig when compiled
in Unicode mode. It specifies the encoding in which the configuration file
is written.}
\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 "accidental" creation of a new config object.
\membersection{wxConfigBase::DeleteAll}\label{wxconfigbasedeleteall}
\func{bool}{DeleteAll}{\void}
Delete the whole underlying object (disk file, registry key, ...). Primarly
for use by uninstallation 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). If the current path is under the group
being deleted it is changed to its deepest still existing component. E.g. if
the current path is \texttt{/A/B/C/D} and the group \texttt{C} is deleted the
path becomes \texttt{/A/B}.
\membersection{wxConfigBase::Exists}\label{wxconfigbaseexists}
\constfunc{bool}{Exists}{\param{wxString\& }{strName}}
returns \true if either a group or an entry with a given name exists
\membersection{wxConfigBase::Flush}\label{wxconfigbaseflush}
\func{bool}{Flush}{\param{bool }{bCurrentOnly = false}}
permanently writes all changes (otherwise, they're only written from object's
destructor)
\membersection{wxConfigBase::Get}\label{wxconfigbaseget}
\func{static wxConfigBase *}{Get}{\param{bool }{CreateOnDemand = true}}
Get the current config object. If there is no current object and
{\it CreateOnDemand} is true, creates one
(using {\it Create}) unless DontCreateOnDemand was called previously.
\membersection{wxConfigBase::GetAppName}\label{wxconfigbasegetappname}
\constfunc{wxString}{GetAppName}{\void}
Returns the application name.
\membersection{wxConfigBase::GetEntryType}\label{wxconfigbasegetentrytype}
\constfunc{enum wxConfigBase::EntryType}{GetEntryType}{\param{const wxString\& }{name}}
Returns the type of the given entry or {\it Unknown} if the entry doesn't
exist. This function should be used to decide which version of Read() should
be used because some of wxConfig implementations will complain about type
mismatch otherwise: e.g., an attempt to read a string value from an integer
key with wxRegConfig will fail.
The result is an element of enum EntryType:
\begin{verbatim}
enum EntryType
{
Type_Unknown,
Type_String,
Type_Boolean,
Type_Integer,
Type_Float
};
\end{verbatim}
\membersection{wxConfigBase::GetFirstGroup}\label{wxconfigbasegetfirstgroup}
\constfunc{bool}{GetFirstGroup}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the first group.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method takes no arguments and returns a 3-element
list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetFirstEntry}\label{wxconfigbasegetfirstentry}
\constfunc{bool}{GetFirstEntry}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the first entry.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method takes no arguments and returns a 3-element
list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetNextGroup}\label{wxconfigbasegetnextgroup}
\constfunc{bool}{GetNextGroup}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the next group.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method only takes the {\tt index} parameter
and returns a 3-element list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetNextEntry}\label{wxconfigbasegetnextentry}
\constfunc{bool}{GetNextEntry}{\param{wxString\& }{str}, \param{long\&}{ index}}
Gets the next entry.
\pythonnote{The wxPython version of this method returns a 3-tuple
consisting of the continue flag, the value string, and the index for
the next call.}
\perlnote{In wxPerl this method only takes the {\tt index} parameter
and returns a 3-element list {\tt ( continue, str, index )}.}
\membersection{wxConfigBase::GetNumberOfEntries}\label{wxconfigbasegetnumberofentries}
\constfunc{uint }{GetNumberOfEntries}{\param{bool }{bRecursive = false}}
\membersection{wxConfigBase::GetNumberOfGroups}\label{wxconfigbasegetnumberofgroups}
\constfunc{uint}{GetNumberOfGroups}{\param{bool }{bRecursive = false}}
Get number of entries/subgroups in the current group, with or without its
subgroups.
\membersection{wxConfigBase::GetPath}\label{wxconfigbasegetpath}
\constfunc{const wxString\&}{GetPath}{\void}
Retrieve the current path (always as absolute path).
\membersection{wxConfigBase::GetVendorName}\label{wxconfigbasegetvendorname}
\constfunc{wxString}{GetVendorName}{\void}
Returns the vendor name.
\membersection{wxConfigBase::HasEntry}\label{wxconfigbasehasentry}
\constfunc{bool}{HasEntry}{\param{wxString\& }{strName}}
returns \true if the entry by this name exists
\membersection{wxConfigBase::HasGroup}\label{wxconfigbasehasgroup}
\constfunc{bool}{HasGroup}{\param{const wxString\& }{strName}}
returns \true if the group by this name exists
\membersection{wxConfigBase::IsExpandingEnvVars}\label{wxconfigbaseisexpandingenvvars}
\constfunc{bool}{IsExpandingEnvVars}{\void}
Returns \true if we are expanding environment variables in key values.
\membersection{wxConfigBase::IsRecordingDefaults}\label{wxconfigbaseisrecordingdefaults}
\constfunc{bool}{IsRecordingDefaults}{\void}
Returns \true if we are writing defaults back to the config file.
\membersection{wxConfigBase::Read}\label{wxconfigbaseread}
\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ str}}
Read a string from the key, returning \true if the value was read. If the key
was not found, {\it str} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{key}, \param{wxString*}{ str}, \param{const wxString\& }{defaultVal}}
Read a string from the key. The default value is returned if the key was not
found.
Returns \true if value was really read, \false if the default was used.
\constfunc{wxString}{Read}{\param{const wxString\& }{key}, \param{const
wxString\& }{defaultVal}}
Another version of {\it Read()}, returning the string value directly.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{long*}{ l}}
Reads a long value, returning \true if the value was found. If the value was
not found, {\it l} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{long*}{ l},
\param{long}{ defaultVal}}
Reads a long value, returning \true if the value was found. If the value was
not found, {\it defaultVal} is used instead.
\constfunc{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.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{wxMemoryBuffer*}{ buf}}
Reads a binary block, returning \true if the value was found. If the value was
not found, {\it buf} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{T*}{ value}}
Reads a value of type T, for which function
\helpref{wxFromString}{wxfromstring} is defined,
returning \true if the value was found.
If the value was not found, {\it value} is not changed.
\constfunc{bool}{Read}{\param{const wxString\& }{ key}, \param{T*}{ value},
\param{T const\& }{ defaultVal}}
Reads a value of type T, for which function
\helpref{wxFromString}{wxfromstring} is defined,
returning \true if the value was found.
If the value was not found, {\it defaultVal} is used instead.
bool Read(const wxString& key, T* value) const;
\pythonnote{In place of a single overloaded method name, wxPython
implements the following methods:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Read(key, default="")}}{Returns a string.}
\twocolitem{{\bf ReadInt(key, default=0)}}{Returns an int.}
\twocolitem{{\bf ReadFloat(key, default=0.0)}}{Returns a floating point number.}
\end{twocollist}}
}
\perlnote{In place of a single overloaded method, wxPerl uses:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Read(key, default="")}}{Returns a string}
\twocolitem{{\bf ReadInt(key, default=0)}}{Returns an integer}
\twocolitem{{\bf ReadFloat(key, default=0.0)}}{Returns a floating point number}
\twocolitem{{\bf ReadBool(key, default=0)}}{Returns a boolean}
\end{twocollist}
}}
\membersection{wxConfigBase::ReadBool}\label{wxconfigbasereadbool}
\constfunc{long }{ReadBool}{\param{const wxString\& }{key}, \param{bool}{ defaultVal}}
Reads a bool value from the key and returns it. {\it defaultVal} is returned
if the key is not found.
\membersection{wxConfigBase::ReadDouble}\label{wxconfigbasereaddouble}
\constfunc{long }{ReadDouble}{\param{const wxString\& }{key}, \param{double}{ defaultVal}}
Reads a double value from the key and returns it. {\it defaultVal} is returned
if the key is not found.
\membersection{wxConfigBase::ReadLong}\label{wxconfigbasereadlong}
\constfunc{long }{ReadLong}{\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.
\membersection{wxConfigBase::ReadObject}\label{wxconfigbasereadobject}
\constfunc{T }{ReadObject}{\param{const wxString\& }{key}, \param{T const&}{ defaultVal}}
Reads a value of type T, for which function
\helpref{wxFromString}{wxfromstring} is defined, from the key and returns it.
{\it defaultVal} is returned if the key is not found.
\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 {\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 {\it oldName} doesn't exist or if {\it newName} already
exists.
\membersection{wxConfigBase::Set}\label{wxconfigbaseset}
\func{static wxConfigBase *}{Set}{\param{wxConfigBase *}{pConfig}}
Sets the config object as the current one, returns the pointer to the previous
current object (both the parameter and returned value may be NULL)
\membersection{wxConfigBase::SetExpandEnvVars}\label{wxconfigbasesetexpandenvvars}
\func{void}{SetExpandEnvVars }{\param{bool }{bDoIt = true}}
Determine whether we wish to expand environment variables in key values.
\membersection{wxConfigBase::SetPath}\label{wxconfigbasesetpath}
\func{void}{SetPath}{\param{const wxString\& }{strPath}}
Set current path: if the first character is '/', it is the absolute path,
otherwise it is a relative path. '..' is supported. If strPath doesn't
exist it is created.
\membersection{wxConfigBase::SetRecordDefaults}\label{wxconfigbasesetrecorddefaults}
\func{void}{SetRecordDefaults}{\param{bool }{bDoIt = true}}
Sets whether defaults are recorded to the config file whenever an attempt to
read the value which is not present in it is done.
If on (default is off) all default values for the settings used by the program
are written back to the config file. This allows the user to see what config
options may be changed and is probably useful only for wxFileConfig.
\membersection{wxConfigBase::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}}
\func{bool}{Write}{\param{const wxString\& }{ key}, \param{const wxMemoryBuffer\&}{ buf}}
\func{bool}{Write}{\param{const wxString\& }{ key}, \param{const T\&}{ buf}}
These functions write the specified value to the config file and return \true
on success. In the last one, function \helpref{wxToString}{wxtostring} must be
defined for type {\it T}.
\pythonnote{In place of a single overloaded method name, wxPython
implements the following methods:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Write(key, value)}}{Writes a string.}
\twocolitem{{\bf WriteInt(key, value)}}{Writes an int.}
\twocolitem{{\bf WriteFloat(key, value)}}{Writes a floating point number.}
\end{twocollist}}
}
\perlnote{In place of a single overloaded method, wxPerl uses:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf Write(key, value)}}{Writes a string}
\twocolitem{{\bf WriteInt(key, value)}}{Writes an integer}
\twocolitem{{\bf WriteFloat(key, value)}}{Writes a floating point number}
\twocolitem{{\bf WriteBool(key, value)}}{Writes a boolean}
\end{twocollist}
}}

View File

@@ -1,13 +0,0 @@
\chapter{Constants}\label{constants}
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}
This chapter describes the constants defined by wxWidgets.
\input cppconst.tex
\input wxusedef.tex
\input stdevtid.tex
\input keycode.tex
\input keymod.tex
\input langcodes.tex
\input stockitems.tex

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,69 +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{Library}
\helpref{wxCore}{librarieslist}
\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}
\constfunc{wxString}{GetLabel}{\void}
Returns the control's text.
Note that the returned string contains the mnemonics (\texttt{\&} characters) if
any, use \helpref{wxControl::GetLabelText}{wxcontrolgetlabeltext} if they are
undesired.
\membersection{wxControl::GetLabelText}\label{wxcontrolgetlabeltext}
\constfunc{const wxString\&}{GetLabelText}{\void}
\func{static wxString}{GetLabelText}{\param{const wxString\& }{label}}
Returns the control's label, or the given \arg{label} string for the static
version, without the mnemonics characters.
\membersection{wxControl::SetLabel}\label{wxcontrolsetlabel}
\func{void}{SetLabel}{\param{const wxString\& }{label}}
Sets the item's text.
The \texttt{\&} characters in the \arg{label} are special and indicate that the
following character is a mnemonic for this control and can be used to activate
it from the keyboard (typically by using \textit{Alt} key in combination with
it). To insert a literal ampersand character, you need to double it, i.e. use
\texttt{"\&\&"}.

View File

@@ -1,115 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: convauto.tex
%% Purpose: wxConvAuto documentation
%% Author: Vadim Zeitlin
%% Created: 2007-08-26
%% RCS-ID: $Id:$
%% Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwidgets.org>
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxConvAuto}}\label{wxconvauto}
This class implements a Unicode to/from multibyte converter capable of
automatically recognizing the encoding of the multibyte text on input. The
logic used is very simple: the class uses the BOM (byte order mark) if it's
present and tries to interpret the input as UTF-8 otherwise. If this fails, the
input is interpreted as being in the default multibyte encoding which can be
specified in the constructor of a wxConvAuto instance and, in turn, defaults to
the value of \helpref{GetFallbackEncoding}{wxconvautogetdefaultmbencoding} if
not explicitly given.
For the conversion from Unicode to multibyte, the same encoding as was
previously used for multibyte to Unicode conversion is reused. If there had
been no previous multibyte to Unicode conversion, UTF-8 is used by default.
Notice that once the multibyte encoding is automatically detected, it doesn't
change any more, i.e. it is entirely determined by the first use of wxConvAuto
object in the multibyte-to-Unicode direction. However creating a copy of
wxConvAuto object, either via the usual copy constructor or assignment
operator, or using \helpref{Clone}{wxmbconvclone} method, resets the
automatically detected encoding so that the new copy will try to detect the
encoding of the input on first use.
This class is used by default in wxWidgets classes and functions reading text
from files such as \helpref{wxFile}{wxfile}, \helpref{wxFFile}{wxffile},
\helpref{wxTextFile}{wxtextfile}, \helpref{wxFileConfig}{wxfileconfig} and
various stream classes so the encoding set with its
\helpref{SetFallbackEncoding}{wxconvautosetdefaultmbencoding} method will
affect how these classes treat input files. In particular, use this method
to change the fall-back multibyte encoding used to interpret the contents of
the files whose contents isn't valid UTF-8 or to disallow it completely.
\wxheading{Derived from}
\helpref{wxMBConv}{wxmbconv}
\wxheading{Include files}
<wx/convauto.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{wxMBConv classes overview}{mbconvclasses}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxConvAuto::wxConvAuto}\label{wxconvautowxconvauto}
\func{}{wxConvAuto}{\param{wxFontEncoding }{enc = wxFONTENCODING\_DEFAULT}}
Constructs a new wxConvAuto instance. The object will try to detect the input
of the multibyte text given to its \helpref{ToWChar}{wxmbconvtowchar} method
automatically but if the automatic detection of Unicode encodings fails, the
fall-back encoding \arg{enc} will be used to interpret it as multibyte text.
The default value of this parameter, \texttt{wxFONTENCODING\_DEFAULT} means
that the global default value which can be set using
\helpref{SetFallbackEncoding}{wxconvautosetdefaultmbencoding} method should be
used. As with that method, passing \texttt{wxFONTENCODING\_MAX} inhibits using
this encoding completely so the input multibyte text will always be interpreted
as UTF-8 in the absence of BOM and the conversion will fail if the input
doesn't form valid UTF-8 sequence. Another special value is
\texttt{wxFONTENCODING\_SYSTEM} which means to use the encoding currently used
on the user system, i.e. the encoding returned by
\helpref{wxLocale::GetSystemEncoding}{wxlocalegetsystemencoding}. Any other
encoding will be used as is, e.g. passing \texttt{wxFONTENCODING\_ISO8859\_1}
ensures that non-UTF-8 input will be treated as latin1.
\membersection{wxConvAuto::DisableFallbackEncoding}\label{wxconvautodisablefallbackencoding}
\func{static void}{DisableFallbackEncoding}{\void}
Disable the use of the fall back encoding: if the input doesn't have a BOM and
is not valid UTF-8, the conversion will fail.
\membersection{wxConvAuto::GetFallbackEncoding}\label{wxconvautogetdefaultmbencoding}
\func{static wxFontEncoding}{GetFallbackEncoding}{\void}
Returns the encoding used by default by wxConvAuto if no other encoding is
explicitly specified in constructor. By default, returns
\texttt{wxFONTENCODING\_ISO8859\_1} but can be changed using
\helpref{SetFallbackEncoding}{wxconvautosetdefaultmbencoding} method.
\membersection{wxConvAuto::SetFallbackEncoding}\label{wxconvautosetdefaultmbencoding}
\func{static void}{SetFallbackEncoding}{\param{wxFontEncoding }{enc}}
Changes the encoding used by default by wxConvAuto if no other encoding is
explicitly specified in constructor. The default value, which can be retrieved
using \helpref{GetFallbackEncoding}{wxconvautogetdefaultmbencoding}, is
\texttt{wxFONTENCODING\_ISO8859\_1}.
Special values of \texttt{wxFONTENCODING\_SYSTEM} or
\texttt{wxFONTENCODING\_MAX} can be used for \arg{enc} parameter to use the
encoding of the current user locale as fall back or not use any encoding for
fall back at all, respectively (just as with the similar constructor
parameter). However \texttt{wxFONTENCODING\_DEFAULT} value cannot be used here.

View File

@@ -1,50 +0,0 @@
% -----------------------------------------------------------------------------
% wxCountingOutputStream
% -----------------------------------------------------------------------------
\section{\class{wxCountingOutputStream}}\label{wxcountingoutputstream}
wxCountingOutputStream is a specialized output stream which does not write any data anywhere,
instead it counts how many bytes would get written if this were a normal 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>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\latexignore{\rtfignore{\wxheading{Members}}}
% -----------
% ctor & dtor
% -----------
\membersection{wxCountingOutputStream::wxCountingOutputStream}\label{wxcountingoutputstreamctor}
\func{}{wxCountingOutputStream}{\void}
Creates a wxCountingOutputStream object.
\membersection{wxCountingOutputStream::\destruct{wxCountingOutputStream}}\label{wxcountingoutputstreamdtor}
\func{}{\destruct{wxCountingOutputStream}}{\void}
Destructor.
\membersection{wxCountingOutputStream::GetSize}\label{wxcountingoutputstreamgetsize}
\constfunc{size\_t}{GetSize}{\void}
Returns the current size of the stream.

View File

@@ -1,230 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: cppconst.tex
%% Purpose: Preprocessor symbols
%% Author: Vadim Zeitlin
%% Created: 2002-08-22
%% RCS-ID: $Id$
%% Copyright: (c) 2002-2006 wxWidgets
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Preprocessor symbols defined by wxWidgets}\label{cppconst}
These are preprocessor symbols used in the wxWidgets source, grouped
by category (and sorted by alphabetical order inside each category). All of
these macros except for the \texttt{wxUSE\_XXX} variety is defined if the
corresponding condition is true and undefined if it isn't, so they should be
always tested using \texttt{#ifdef} and not \texttt{#if}.
\subsection{GUI system}\label{guisystemconst}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_WINDOWS\_\_}{any Windows, you may also use \_\_WXMSW\_\_}
\twocolitem{\_\_WIN16\_\_}{Win16 API (not supported since wxWidgets 2.6)}
\twocolitem{\_\_WIN32\_\_}{Win32 API}
\twocolitem{\_\_WXBASE\_\_}{Only wxBase, no GUI features (same as \texttt{wxUSE\_GUI} $== 0$)}
\twocolitem{\_\_WXCOCOA\_\_}{OS X using Cocoa API}
\twocolitem{\_\_WXDFB\_\_}{wxUniversal using DirectFB}
\twocolitem{\_\_WXWINCE\_\_}{Windows CE}
\twocolitem{\_\_WXGTK\_\_}{GTK+}
\twocolitem{\_\_WXGTK12\_\_}{GTK+ 1.2 or higher}
\twocolitem{\_\_WXGTK20\_\_}{GTK+ 2.0 or higher}
\twocolitem{\_\_WXGTK24\_\_}{GTK+ 2.4 or higher}
\twocolitem{\_\_WXGTK26\_\_}{GTK+ 2.6 or higher}
\twocolitem{\_\_WXGTK210\_\_}{GTK+ 2.10 or higher}
\twocolitem{\_\_WXMOTIF\_\_}{Motif}
\twocolitem{\_\_WXMOTIF20\_\_}{Motif 2.0 or higher}
\twocolitem{\_\_WXMAC\_\_}{Mac OS all targets}
\twocolitem{\_\_WXMAC\_CLASSIC\_\_}{MacOS for Classic}
\twocolitem{\_\_WXMAC\_CARBON\_\_}{MacOS for Carbon CFM (running under Classic or OSX) or true OS X Mach-O Builds}
\twocolitem{\_\_WXMAC\_OSX\_\_}{MacOS X Carbon Mach-O Builds}
\twocolitem{\_\_WXMGL\_\_}{SciTech Soft MGL (\_\_WXUNIVERSAL\_\_ will be also
defined)}
\twocolitem{\_\_WXMSW\_\_}{Any Windows}
\twocolitem{\_\_WXOSX\_\_}{Any Mac OS X port (either Carbon or Cocoa)}
\twocolitem{\_\_WXPALMOS\_\_}{PalmOS}
\twocolitem{\_\_WXPM\_\_}{OS/2 native Presentation Manager}
\twocolitem{\_\_WXSTUBS\_\_}{Stubbed version ('template' wxWin implementation)}
\twocolitem{\_\_WXXT\_\_}{Xt; mutually exclusive with WX\_MOTIF, not
implemented in wxWidgets 2.x}
\twocolitem{\_\_WXX11\_\_}{wxX11 (\_\_WXUNIVERSAL\_\_ will be also defined)}
\twocolitem{\_\_WXWINE\_\_}{WINE (i.e. WIN32 on Unix)}
\twocolitem{\_\_WXUNIVERSAL\_\_}{wxUniversal port, always defined in addition
to one of the symbols above so this should be tested first.}
\twocolitem{\_\_X\_\_}{any X11-based GUI toolkit except GTK+}
\end{twocollist}
There are two wxWidgets ports to Mac OS. One of them, wxMac, exists in two versions: Classic and
Carbon. The Classic version is the only one to work on Mac OS version 8. The
Carbon version may be built either as CFM or Mach-O (binary format, like ELF)
and the former may run under OS 9 while the latter only runs under OS X.
Finally, there is a new Cocoa port which can only be used under OS X. To
summarize:
\begin{itemize}
\item If you want to test for all Mac platforms, classic and OS X, you
should test both \texttt{\_\_WXMAC\_\_} and \texttt{\_\_WXCOCOA\_\_}.
\item If you want to test for any GUI Mac port under OS X, use
\texttt{\_\_WXOSX\_\_}.
\item If you want to test for any port under Mac OS X, including, for
example, wxGTK and also wxBase, use \texttt{\_\_DARWIN\_\_} (see below).
\end{itemize}
The convention is to use the \texttt{\_\_WX} prefix for these
symbols, although this has not always been followed.
\subsection{Operating systems}\label{osconst}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_APPLE\_\_}{any Mac OS version}
\twocolitem{\_\_AIX\_\_}{AIX}
\twocolitem{\_\_BSD\_\_}{Any *BSD system}
\twocolitem{\_\_CYGWIN\_\_}{Cygwin: Unix on Win32}
\twocolitem{\_\_DARWIN\_\_}{Mac OS X using the BSD Unix C library (as opposed to using the Metrowerks MSL C/C++ library)}
\twocolitem{\_\_DATA\_GENERAL\_\_}{DG-UX}
\twocolitem{\_\_DOS\_GENERAL\_\_}{DOS (used with wxMGL only)}
\twocolitem{\_\_FREEBSD\_\_}{FreeBSD}
\twocolitem{\_\_HPUX\_\_}{HP-UX (Unix)}
\twocolitem{\_\_GNU\_\_}{GNU Hurd}
\twocolitem{\_\_LINUX\_\_}{Linux}
\twocolitem{\_\_MACH\_\_}{Mach-O Architecture (Mac OS X only builds)}
\twocolitem{\_\_OSF\_\_}{OSF/1}
\twocolitem{\_\_PALMOS\_\_}{PalmOS}
\twocolitem{\_\_SGI\_\_}{IRIX}
\twocolitem{\_\_SOLARIS\_\_}{Solaris}
\twocolitem{\_\_SUN\_\_}{Any Sun}
\twocolitem{\_\_SUNOS\_\_}{Sun OS}
\twocolitem{\_\_SVR4\_\_}{SystemV R4}
\twocolitem{\_\_SYSV\_\_}{SystemV generic}
\twocolitem{\_\_ULTRIX\_\_}{Ultrix}
\twocolitem{\_\_UNIX\_\_}{any Unix}
\twocolitem{\_\_UNIX\_LIKE\_\_}{Unix, BeOS or VMS}
\twocolitem{\_\_VMS\_\_}{VMS}
\twocolitem{\_\_WINDOWS\_\_}{any Windows}
\twocolitem{\_\_WINE\_\_}{Wine}
\end{twocollist}
\subsection{Hardware architectures (CPU)}\label{cpuconst}
Note that not all of these symbols are always defined, it depends on the
compiler used.
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_ALPHA\_\_}{DEC Alpha architecture}
\twocolitem{\_\_INTEL\_\_}{Intel i386 or compatible}
\twocolitem{\_\_IA64\_\_}{Intel 64 bit architecture}
\twocolitem{\_\_POWERPC\_\_}{Motorola Power PC}
\end{twocollist}
\subsection{Hardware type}\label{hardwareconst}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_SMARTPHONE\_\_}{Generic mobile devices with phone buttons and a small display}
\twocolitem{\_\_PDA\_\_}{Personal digital assistant, usually with touch screen}
\twocolitem{\_\_HANDHELD\_\_}{Small but powerful computer, usually with a keyboard}
\twocolitem{\_\_POCKETPC\_\_}{Microsoft-powered PocketPC devices with touch-screen}
\twocolitem{\_\_WINCE\_STANDARDSDK\_\_}{Microsoft-powered Windows CE devices, for generic Windows CE applications}
\twocolitem{\_\_WINCE\_NET\_\_}{Microsoft-powered Windows CE .NET devices (\_WIN32\_WCE is 400 or greater)}
\twocolitem{WIN32\_PLATFORM\_WFSP}{Microsoft-powered smartphone}
\end{twocollist}
\subsection{Compilers}\label{compilerconst}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_BORLANDC\_\_}{Borland C++. The value of the macro corresponds
to the compiler version: $500$ is $5.0$.}
\twocolitem{\_\_DJGPP\_\_}{DJGPP}
\twocolitem{\_\_DIGITALMARS\_\_}{Digital Mars}
\twocolitem{\_\_GNUG\_\_}{Gnu C++ on any platform, see also
\helpref{wxCHECK\_GCC\_VERSION}{wxcheckgccversion}}
\twocolitem{\_\_GNUWIN32\_\_}{Gnu-Win32 compiler, see also
\helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}}
\twocolitem{\_\_MINGW32\_\_}{MinGW}
\twocolitem{\_\_MWERKS\_\_}{CodeWarrior MetroWerks compiler}
\twocolitem{\_\_SUNCC\_\_}{Sun CC, see also \helpref{wxCHECK\_SUNCC\_VERSION}{wxchecksunccversion}}
\twocolitem{\_\_SYMANTECC\_\_}{Symantec C++}
\twocolitem{\_\_VISAGECPP\_\_}{IBM Visual Age (OS/2)}
\twocolitem{\_\_VISUALC\_\_}{Microsoft Visual C++, see also
\helpref{wxCHECK\_VISUALC\_VERSION}{wxcheckvisualcversion}. The value of this
macro corresponds to the compiler version: $1020$ for $4.2$ (the first supported
version), $1100$ for $5.0$, $1200$ for $6.0$ and so on. For convenience, the
symbols \_\_VISUALCn\_\_ are also defined for each major compiler version from
5 to 9, i.e. you can use tests such \texttt{#ifdef \_\_VISUALC7\_\_} to test
for compiler version being precisely 7.}
\twocolitem{\_\_XLC\_\_}{AIX compiler}
\twocolitem{\_\_WATCOMC\_\_}{Watcom C++. The value of this macro corresponds to
the compiler version, $1100$ is $11.0$ and $1200$ is OpenWatcom.}
\twocolitem{\_WIN32\_WCE}{Windows CE version}
\end{twocollist}
\subsection{Feature tests}\label{featuretests}
Some library features may not be always available even if they were selected by
the user. To make it possible to check if this is the case, the library
predefines the symbols in the form \texttt{wxHAS\_FEATURE}. Unlike
\texttt{wxUSE\_FEATURE} symbols which are defined by the library user (directly
in \texttt{setup.h} or by running configure script) and which must be always
defined as either $0$ or $1$, the \texttt{wxHAS} symbols are only defined if
the corresponding feature is available and not defined at all otherwise.
Currently the following symbols exist:
\begin{twocollist}\itemsep=0pt
\twocolitem{wxHAS\_LARGE\_FILES}{Defined if \helpref{wxFile}{wxfile} supports
files more than 4GB in size.}
\twocolitem{wxHAS\_LARGE\_FFILES}{Defined if \helpref{wxFFile}{wxffile}
supports files more than 4GB in size.}
\twocolitem{wxHAS\_POWER\_EVENTS}{Defined if
\helpref{wxPowerEvent}{wxpowerevent} are ever generated on the current platform.}
\twocolitem{wxHAS\_RADIO\_MENU\_ITEMS}{Defined if the current port supports
\helpref{radio menu items}{wxmenuappendradioitem}.}
\twocolitem{wxHAS\_RAW\_KEY\_CODES}{Defined if
\helpref{raw key codes}{wxkeyeventgetrawkeycode} are supported.}
\twocolitem{wxHAS\_REGEX\_ADVANCED}{Defined if advanced syntax is available in
\helpref{wxRegEx}{wxregex}.}
\twocolitem{wxHAS\_TASK\_BAR\_ICON}{Defined if
\helpref{wxTaskBarIcon}{wxtaskbaricon} is available on the current platform.}
\end{twocollist}
\subsection{Miscellaneous}\label{miscellaneousconst}
\begin{twocollist}\itemsep=0pt
\twocolitem{\_\_WXWINDOWS\_\_}{always defined in wxWidgets applications, see
also \helpref{wxCHECK\_VERSION}{wxcheckversion}}
\twocolitem{\_\_WXDEBUG\_\_}{defined in debug mode, undefined in release mode}
\twocolitem{wxUSE\_XXX}{if defined as $1$, feature XXX is active, see the
\helpref{complete list}{wxusedef} (the symbols of this form are always defined,
use \#if and not \#ifdef to test for them)}
\twocolitem{WX\_PRECOMP}{is defined if precompiled headers (PCH) are in use. In
this case, \texttt{wx/wxprec.h} includes \texttt{wx/wx.h} which, in turn,
includes a number of wxWidgets headers thus making it unnecessary to include
them explicitly. However if this is not defined, you do need to include them
and so the usual idiom which allows to support both cases is to first include
\texttt{wx/wxprec.h} and then, inside \texttt{#ifndef WX\_PRECOMP}, individual
headers you need.}
\twocolitem{\_UNICODE and UNICODE}{both are defined if wxUSE\_UNICODE is set to $1$}
\twocolitem{wxUSE\_GUI}{this particular feature test macro is defined to $1$
when compiling or using the library with the GUI features activated, if it is
defined as $0$, only wxBase is available.}
\twocolitem{wxUSE\_BASE}{only used by wxWidgets internally (defined as $1$ when
building wxBase code, either as a standalone library or as part of the
monolithic wxWidgets library, defined as $0$ when building GUI library only)}
\twocolitem{wxNO\_RTTI}{is defined if the compiler RTTI support has been switched off}
\twocolitem{wxNO\_EXCEPTIONS}{is defined if the compiler support for C++
exceptions has been switched off}
\twocolitem{wxNO\_THREADS}{if this macro is defined, the compilation options
don't include compiler flags needed for multithreaded code generation. This
implies that wxUSE\_THREADS is $0$ and also that other (non-wx-based) threading
packages cannot be used neither.}
\twocolitem{WXMAKINGDLL\_XXX}{used internally and defined when building the
library \texttt{XXX} as a DLL; when a monolithic wxWidgets build is used only a
single \texttt{WXMAKINGDLL} symbol is defined}
\twocolitem{WXUSINGDLL}{defined when compiling code which uses wxWidgets as a
DLL/shared library}
\twocolitem{WXBUILDING}{defined when building wxWidgets itself, whether as a
static or shared library}
\end{twocollist}

View File

@@ -1,43 +0,0 @@
\section{\class{wxWindowCreateEvent}}\label{wxwindowcreateevent}
This event is sent just after the actual window associated with a wxWindow object
has been created. Since it is derived from wxCommandEvent, the event propagates up
the window hierarchy.
\wxheading{Derived from}
\helpref{wxCommandEvent}{wxevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/event.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{Event table macros}
To process a window creation event, use this event handler macro to direct input to a member
function that takes a wxWindowCreateEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_WINDOW\_CREATE(func)}}{Process a wxEVT\_CREATE event.}
\end{twocollist}%
\wxheading{See also}
\helpref{Event handling overview}{eventhandlingoverview},\rtfsp
\helpref{wxWindowDestroyEvent}{wxwindowdestroyevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxWindowCreateEvent::wxWindowCreateEvent}\label{wxwindowcreateeventctor}
\func{}{wxWindowCreateEvent}{\param{wxWindow* }{win = NULL}}
Constructor.

View File

@@ -1,62 +0,0 @@
\section{\class{wxCriticalSection}}\label{wxcriticalsection}
A critical section object is used for exactly the same purpose as
\helpref{mutexes}{wxmutex}. The only difference is that under Windows platform
critical sections are only visible inside one process, while mutexes may be
shared between processes, so using critical sections is slightly more
efficient. The terminology is also slightly different: mutex may be locked (or
acquired) and unlocked (or released) while critical section is entered and left
by the program.
Finally, you should try to use
\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker} class whenever
possible instead of directly using wxCriticalSection for the same reasons
\helpref{wxMutexLocker}{wxmutexlocker} is preferrable to
\helpref{wxMutex}{wxmutex} - please see wxMutex for an example.
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/thread.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{wxThread}{wxthread}, \helpref{wxCondition}{wxcondition},
\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCriticalSection::wxCriticalSection}\label{wxcriticalsectionctor}
\func{}{wxCriticalSection}{\void}
Default constructor initializes critical section object.
\membersection{wxCriticalSection::\destruct{wxCriticalSection}}\label{wxcriticalsectiondtor}
\func{}{\destruct{wxCriticalSection}}{\void}
Destructor frees the resources.
\membersection{wxCriticalSection::Enter}\label{wxcriticalsectionenter}
\func{void }{Enter}{\void}
Enter the critical section (same as locking a mutex). There is no error return
for this function. After entering the critical section protecting some global
data the thread running in critical section may safely use/modify it.
\membersection{wxCriticalSection::Leave}\label{wxcriticalsectionleave}
\func{void }{Leave}{\void}
Leave the critical section allowing other threads use the global data protected
by it. There is no error return for this function.

View File

@@ -1,67 +0,0 @@
\section{\class{wxCriticalSectionLocker}}\label{wxcriticalsectionlocker}
This is a small helper class to be used with \helpref{wxCriticalSection}{wxcriticalsection}
objects. A wxCriticalSectionLocker enters the critical section in the
constructor and leaves it in the destructor making it much more difficult to
forget to leave a critical section (which, in general, will lead to serious
and difficult to debug problems).
Example of using it:
\begin{verbatim}
void Set Foo()
{
// gs_critSect is some (global) critical section guarding access to the
// object "foo"
wxCriticalSectionLocker locker(gs_critSect);
if ( ... )
{
// do something
...
return;
}
// do something else
...
return;
}
\end{verbatim}
Without wxCriticalSectionLocker, you would need to remember to manually leave
the critical section before each {\tt return}.
\wxheading{Derived from}
None.
\wxheading{Include files}
<wx/thread.h>
\wxheading{Library}
\helpref{wxBase}{librarieslist}
\wxheading{See also}
\helpref{wxCriticalSection}{wxcriticalsection},
\helpref{wxMutexLocker}{wxmutexlocker}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxCriticalSectionLocker::wxCriticalSectionLocker}\label{wxcriticalsectionlockerctor}
\func{}{wxCriticalSectionLocker}{\param{wxCriticalSection\& }{criticalsection}}
Constructs a wxCriticalSectionLocker object associated with given
{\it criticalsection} and enters it.
\membersection{wxCriticalSectionLocker::\destruct{wxCriticalSectionLocker}}\label{wxcriticalsectionlockerdtor}
\func{}{\destruct{wxCriticalSectionLocker}}{\void}
Destructor leaves the critical section.

View File

@@ -1,75 +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{Library}
\helpref{wxBase}{librarieslist}
\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}}
\func{}{wxCSConv}{\param{wxFontEncoding }{encoding}}
Constructor. You may specify either the name of the character set you want to
convert from/to or an encoding constant. If the character set name (or the
encoding) is not recognized, ISO 8859-1 is used as fall back.
\membersection{wxCSConv::\destruct{wxCSConv}}\label{wxcsconvdtor}
\func{}{\destruct{wxCSConv}}{\void}
Destructor frees any resources needed to perform the conversion.
\membersection{wxCSConv::IsOk}\label{wxcsconvisok}
\constfunc{bool}{IsOk}{\void}
Returns \true if the charset (or the encoding) given at constructor is really
available to use. Returns \false if ISO 8859-1 will be used instead.
Note this does \emph{not} mean that a given string will be correctly converted.
A malformed string may still make conversion functions return \texttt{wxCONV\_FAILED}.
\newsince{2.8.2}
\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 length of string written to 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 length of string written to destination buffer.

View File

@@ -1,141 +0,0 @@
\section{\class{wxContextHelp}}\label{wxcontexthelp}
This class changes the cursor to a query and puts the application into a 'context-sensitive help mode'.
When the user left-clicks on a window within the specified window, a wxEVT\_HELP event is
sent to that control, and the application may respond to it by popping up some help.
For example:
\begin{verbatim}
wxContextHelp contextHelp(myWindow);
\end{verbatim}
There are a couple of ways to invoke this behaviour implicitly:
\begin{itemize}
\item Use the wxDIALOG\_EX\_CONTEXTHELP style for a dialog (Windows only). This will put a question mark
in the titlebar, and Windows will put the application into context-sensitive help mode automatically,
with further programming.
\item Create a \helpref{wxContextHelpButton}{wxcontexthelpbutton}, whose predefined behaviour is to create a context help object.
Normally you will write your application so that this button is only added to a dialog for non-Windows platforms
(use wxDIALOG\_EX\_CONTEXTHELP on Windows).
\end{itemize}
Note that on Mac OS X, the cursor does not change when in context-sensitive
help mode.
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cshelp.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxHelpEvent}{wxhelpevent},
\helpref{wxHelpController}{wxhelpcontroller},
\helpref{wxContextHelpButton}{wxcontexthelpbutton}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxContextHelp::wxContextHelp}\label{wxcontexthelpctor}
\func{}{wxContextHelp}{\param{wxWindow*}{ window = NULL}, \param{bool}{ doNow = true}}
Constructs a context help object, calling \helpref{BeginContextHelp}{wxcontexthelpbegincontexthelp} if\rtfsp
{\it doNow} is true (the default).
If {\it window} is NULL, the top window is used.
\membersection{wxContextHelp::\destruct{wxContextHelp}}\label{wxcontexthelpdtor}
\func{}{\destruct{wxContextHelp}}{\void}
Destroys the context help object.
\membersection{wxContextHelp::BeginContextHelp}\label{wxcontexthelpbegincontexthelp}
\func{bool}{BeginContextHelp}{\param{wxWindow*}{ window = NULL}}
Puts the application into context-sensitive help mode. {\it window} is the window
which will be used to catch events; if NULL, the top window will be used.
Returns true if the application was successfully put into context-sensitive help mode.
This function only returns when the event loop has finished.
\membersection{wxContextHelp::EndContextHelp}\label{wxcontexthelpendcontexthelp}
\func{bool}{EndContextHelp}{\void}
Ends context-sensitive help mode. Not normally called by the application.
\section{\class{wxContextHelpButton}}\label{wxcontexthelpbutton}
Instances of this class may be used to add a question mark button that when pressed, puts the
application into context-help mode. It does this by creating a \helpref{wxContextHelp}{wxcontexthelp} object which itself
generates a wxEVT\_HELP event when the user clicks on a window.
On Windows, you may add a question-mark icon to a dialog by use of the wxDIALOG\_EX\_CONTEXTHELP extra style, but
on other platforms you will have to add a button explicitly, usually next to OK, Cancel or similar buttons.
\wxheading{Derived from}
\helpref{wxBitmapButton}{wxbitmapbutton}\\
\helpref{wxButton}{wxbutton}\\
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/cshelp.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{wxBitmapButton}{wxbitmapbutton}, \helpref{wxContextHelp}{wxcontexthelp}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxContextHelpButton::wxContextHelpButton}\label{wxcontexthelpbuttonconstr}
\func{}{wxContextHelpButton}{\void}
Default constructor.
\func{}{wxContextHelpButton}{
\param{wxWindow* }{parent},
\param{wxWindowID }{id = wxID\_CONTEXT\_HELP},
\param{const wxPoint\& }{pos = wxDefaultPosition},
\param{const wxSize\& }{size = wxDefaultSize},
\param{long }{style = wxBU\_AUTODRAW}}
Constructor, creating and showing a context help button.
\wxheading{Parameters}
\docparam{parent}{Parent window. Must not be NULL.}
\docparam{id}{Button identifier. Defaults to wxID\_CONTEXT\_HELP.}
\docparam{pos}{Button position.}
\docparam{size}{Button size. If the default size (-1, -1) is specified then the button is sized
appropriately for the question mark bitmap.}
\docparam{style}{Window style.}
\wxheading{Remarks}
Normally you need pass only the parent window to the constructor, and use the defaults for the remaining parameters.

View File

@@ -1,449 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: ctrlsub.tex
%% Purpose: wxControlWithItems documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 01.01.03
%% RCS-ID: $Id$
%% Copyright: (c) 2003 Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxControlWithItems}}\label{wxcontrolwithitems}
This class is an abstract base class for some wxWidgets controls which contain
several items, such as \helpref{wxListBox}{wxlistbox} and
\helpref{wxCheckListBox}{wxchecklistbox} derived from it,
\helpref{wxChoice}{wxchoice} and \helpref{wxComboBox}{wxcombobox}.
It defines the methods for accessing the controls items and although each of
the derived classes implements them differently, they still all conform to the
same interface.
The items in a wxControlWithItems have (non-empty) string labels and,
optionally, client data associated with them. Client data may be of two
different kinds: either simple untyped ({\tt void *}) pointers which are simply
stored by the control but not used in any way by it, or typed pointers
({\tt wxClientData *}) which are owned by the control meaning that the typed
client data (and only it) will be deleted when an item is
\helpref{deleted}{wxcontrolwithitemsdelete} or the entire control is
\helpref{cleared}{wxcontrolwithitemsclear} (which also happens when it is
destroyed). Finally note that in the same control all items must have client
data of the same type (typed or untyped), if any. This type is determined by
the first call to \helpref{Append}{wxcontrolwithitemsappend} (the version with
client data pointer) or \helpref{SetClientData}{wxcontrolwithitemssetclientdata}.
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/ctrlsub.h> but usually never included directly
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxControlWithItems::Append}\label{wxcontrolwithitemsappend}
\func{int}{Append}{\param{const wxString\& }{ item}}
Adds the item to the end of the list box.
\func{int}{Append}{\param{const wxString\& }{ item}, \param{void *}{clientData}}
\func{int}{Append}{\param{const wxString\& }{ item}, \param{wxClientData *}{clientData}}
Adds the item to the end of the list box, associating the given, typed or
untyped, client data pointer with the item.
\func{void}{Append}{\param{const wxArrayString\& }{strings}}
\func{void}{Append}{\param{unsigned int }{n},\param{const wxString* }{strings}}
\func{void}{Append}{\param{unsigned int }{n},\param{const wxString* }{strings}, \param{void **}{clientData}}
\func{void}{Append}{\param{unsigned int }{n},\param{const wxString* }{strings}, \param{wxClientData **}{clientData}}
Appends several items at once to the control. Notice that calling this method
is usually much faster than appending them one by one if you need to add a lot
of items.
\wxheading{Parameters}
\docparam{item}{String to add.}
\docparam{stringsArray}{Contains items to append to the control.}
\docparam{strings}{Array of strings of size \arg{n}.}
\docparam{n}{Number of items in the \arg{strings} array.}
\docparam{clientData}{Array of client data pointers of size \arg{n} to associate with the new items.}
\wxheading{Return value}
When appending a single item, the return value is the index of the newly added
item which may be different from the last one if the control is sorted (e.g.
has {\tt wxLB\_SORT} or {\tt wxCB\_SORT} style).
\membersection{wxControlWithItems::Clear}\label{wxcontrolwithitemsclear}
\func{void}{Clear}{\void}
Removes all items from the control.
{\it Clear()} also deletes the client data of the existing items if it is owned
by the control.
\membersection{wxControlWithItems::Delete}\label{wxcontrolwithitemsdelete}
\func{void}{Delete}{\param{unsigned int}{ n}}
Deletes an item from the control. The client data associated with the item
will be also deleted if it is owned by the control.
Note that it is an error (signalled by an assert failure in debug builds) to
remove an item with the index negative or greater or equal than the number of
items in the control.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\wxheading{See also}
\helpref{Clear}{wxcontrolwithitemsclear}
\membersection{wxControlWithItems::FindString}\label{wxcontrolwithitemsfindstring}
\func{int}{FindString}{\param{const wxString\& }{string}, \param{bool}{ caseSensitive = false}}
Finds an item whose label matches the given string.
\wxheading{Parameters}
\docparam{string}{String to find.}
\docparam{caseSensitive}{Whether search is case sensitive (default is not).}
\wxheading{Return value}
The zero-based position of the item, or {\tt wxNOT\_FOUND} if the string was
not found.
\membersection{wxControlWithItems::GetClientData}\label{wxcontrolwithitemsgetclientdata}
\constfunc{void *}{GetClientData}{\param{unsigned int}{ n}}
Returns a pointer to the client data associated with the given item (if any).
It is an error to call this function for a control which doesn't have untyped
client data at all although it is ok to call it even if the given item doesn't
have any client data associated with it (but other items do).
\wxheading{Parameters}
\docparam{n}{The zero-based position of the item.}
\wxheading{Return value}
A pointer to the client data, or {\tt NULL} if not present.
\membersection{wxControlWithItems::GetClientObject}\label{wxcontrolwithitemsgetclientobject}
\constfunc{wxClientData *}{GetClientObject}{\param{unsigned int}{ n}}
Returns a pointer to the client data associated with the given item (if any).
It is an error to call this function for a control which doesn't have typed
client data at all although it is ok to call it even if the given item doesn't
have any client data associated with it (but other items do).
\wxheading{Parameters}
\docparam{n}{The zero-based position of the item.}
\wxheading{Return value}
A pointer to the client data, or {\tt NULL} if not present.
\membersection{wxControlWithItems::GetCount}\label{wxcontrolwithitemsgetcount}
\constfunc{unsigned int}{GetCount}{\void}
Returns the number of items in the control.
\wxheading{See also}
\helpref{IsEmpty}{wxcontrolwithitemsisempty}
\membersection{wxControlWithItems::GetSelection}\label{wxcontrolwithitemsgetselection}
\constfunc{int}{GetSelection}{\void}
Returns the index of the selected item or {\tt wxNOT\_FOUND} if no item is
selected.
\wxheading{Return value}
The position of the current selection.
\wxheading{Remarks}
This method can be used with single selection list boxes only, you should use
\helpref{wxListBox::GetSelections}{wxlistboxgetselections} for the list boxes
with {\tt wxLB\_MULTIPLE} style.
\wxheading{See also}
\helpref{SetSelection}{wxcontrolwithitemssetselection},\rtfsp
\helpref{GetStringSelection}{wxcontrolwithitemsgetstringselection}
\membersection{wxControlWithItems::GetString}\label{wxcontrolwithitemsgetstring}
\constfunc{wxString}{GetString}{\param{unsigned int}{ n}}
Returns the label of the item with the given index.
\wxheading{Parameters}
\docparam{n}{The zero-based index.}
\wxheading{Return value}
The label of the item or an empty string if the position was invalid.
\membersection{wxControlWithItems::GetStrings}\label{wxcontrolwithitemsgetstrings}
\constfunc{wxArrayString}{GetStrings}{\void}
Returns the array of the labels of all items in the control.
\membersection{wxControlWithItems::GetStringSelection}\label{wxcontrolwithitemsgetstringselection}
\constfunc{wxString}{GetStringSelection}{\void}
Returns the label of the selected item or an empty string if no item is
selected.
\wxheading{See also}
\helpref{GetSelection}{wxcontrolwithitemsgetselection}
\membersection{wxControlWithItems::Insert}\label{wxcontrolwithitemsinsert}
\func{int}{Insert}{\param{const wxString\& }{ item}, \param{unsigned int }{pos}}
Inserts the item into the list before pos.
Not valid for {\tt wxLB\_SORT} or {\tt wxCB\_SORT} styles, use Append instead.
\func{int}{Insert}{\param{const wxString\& }{ item}, \param{unsigned int }{pos}, \param{void *}{clientData}}
\func{int}{Insert}{\param{const wxString\& }{ item}, \param{unsigned int }{pos}, \param{wxClientData *}{clientData}}
Inserts the item into the list before pos, associating the given, typed or
untyped, client data pointer with the item.
Not valid for {\tt wxLB\_SORT} or {\tt wxCB\_SORT} styles, use Append instead.
\func{void}{Insert}{\param{const wxArrayString\& }{strings}, \param{unsigned int }{pos}}
\func{void}{Insert}{\param{const wxArrayString\& }{strings}, \param{unsigned int }{pos}}
\func{void}{Insert}{\param{unsigned int }{n},\param{const wxString* }{strings}, \param{unsigned int }{pos}}
\func{void}{Insert}{\param{unsigned int }{n},\param{const wxString* }{strings}, \param{unsigned int }{pos}, \param{void **}{clientData}}
\func{void}{Insert}{\param{unsigned int }{n},\param{const wxString* }{strings}, \param{unsigned int }{pos}, \param{wxClientData **}{clientData}}
Inserts several items at once into the control. Notice that calling this method
is usually much faster than inserting them one by one if you need to insert a lot
of items.
\wxheading{Parameters}
\docparam{item}{String to add.}
\docparam{pos}{Position to insert item before, zero based.}
\docparam{stringsArray}{Contains items to insert into the control content}
\docparam{strings}{Array of strings of size \arg{n}.}
\docparam{n}{Number of items in the \arg{strings} array.}
\docparam{clientData}{Array of client data pointers of size \arg{n} to associate with the new items.}
\wxheading{Return value}
The return value is the index of the newly inserted item. If the insertion failed
for some reason, -1 is returned.
\membersection{wxControlWithItems::IsEmpty}\label{wxcontrolwithitemsisempty}
\constfunc{bool}{IsEmpty}{\void}
Returns {\tt true} if the control is empty or {\tt false} if it has some items.
\wxheading{See also}
\helpref{GetCount}{wxcontrolwithitemsgetcount}
\membersection{wxControlWithItems::Select}\label{wxcontrolwithitemsselect}
\func{void}{Select}{\param{int}{ n}}
This is the same as \helpref{SetSelection}{wxcontrolwithitemssetselection} and
exists only because it is slightly more natural for controls which support
multiple selection.
\membersection{wxControlWithItems::Set}\label{wxcontrolwithitemsset}
\func{int}{Set}{\param{const wxString\& }{ item}}
\func{int}{Set}{\param{const wxString\& }{ item}, \param{void *}{clientData}}
\func{int}{Set}{\param{const wxString\& }{ item}, \param{wxClientData *}{clientData}}
Replace control items with the (only) item specified, associating the typed or
untyped client data pointer with it if given.
\func{void}{Set}{\param{const wxArrayString\& }{stringsArray}}
\func{void}{Set}{\param{unsigned int }{n},\param{const wxString* }{strings}}
\func{void}{Set}{\param{unsigned int }{n},\param{const wxString* }{strings}, \param{void **}{clientData}}
\func{void}{Set}{\param{unsigned int }{n},\param{const wxString* }{strings}, \param{wxClientData **}{clientData}}
Replaces the current control contents with the given items. Notice that calling
this method is much faster than appending the items one by one if you need to
append a lot of them.
\wxheading{Parameters}
\docparam{item}{The single item to insert into the control.}
\docparam{stringsArray}{Contains items to set as control content.}
\docparam{strings}{Raw C++ array of strings. Only used in conjunction with 'n'.}
\docparam{n}{Number of items passed in 'strings'. Only used in conjunction with 'strings'.}
\docparam{clientData}{Client data to associate with the item(s).}
\wxheading{Return value}
When the control is sorted (e.g. has {\tt wxLB\_SORT} or {\tt wxCB\_SORT} style)
the return value could be different from (GetCount() - 1).
When setting a single item to the container, the return value is the index of the
newly added item which may be different from the last one if the control is sorted
(e.g. has {\tt wxLB\_SORT} or {\tt wxCB\_SORT} style).
By default this method subsequently calls \helpref{Clear}{wxcontrolwithitemsclear}
and \helpref{Append}{wxcontrolwithitemsappend}.
\membersection{wxControlWithItems::SetClientData}\label{wxcontrolwithitemssetclientdata}
\func{void}{SetClientData}{\param{unsigned int}{ n}, \param{void *}{data}}
Associates the given untyped client data pointer with the given item. Note that
it is an error to call this function if any typed client data pointers had been
associated with the control items before.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\docparam{data}{The client data to associate with the item.}
\membersection{wxControlWithItems::SetClientObject}\label{wxcontrolwithitemssetclientobject}
\func{void}{SetClientObject}{\param{unsigned int}{ n}, \param{wxClientData *}{data}}
Associates the given typed client data pointer with the given item: the
{\it data} object will be deleted when the item is deleted (either explicitly
by using \helpref{Deletes}{wxcontrolwithitemsdelete} or implicitly when the
control itself is destroyed).
Note that it is an error to call this function if any untyped client data
pointers had been associated with the control items before.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\docparam{data}{The client data to associate with the item.}
\membersection{wxControlWithItems::SetSelection}\label{wxcontrolwithitemssetselection}
\func{void}{SetSelection}{\param{int}{ n}}
Sets the selection to the given item \arg{n} or removes the selection entirely
if \arg{n} $==$ {\tt wxNOT\_FOUND}.
Note that this does not cause any command events to be emitted nor does it
deselect any other items in the controls which support multiple selections.
\wxheading{Parameters}
\docparam{n}{The string position to select, starting from zero.}
\wxheading{See also}
\helpref{SetString}{wxcontrolwithitemssetstring},\rtfsp
\helpref{SetStringSelection}{wxcontrolwithitemssetstringselection}
\membersection{wxControlWithItems::SetString}\label{wxcontrolwithitemssetstring}
\func{void}{SetString}{\param{unsigned int}{ n}, \param{const wxString\& }{ string}}
Sets the label for the given item.
\wxheading{Parameters}
\docparam{n}{The zero-based item index.}
\docparam{string}{The label to set.}
\membersection{wxControlWithItems::SetStringSelection}\label{wxcontrolwithitemssetstringselection}
\func{bool}{SetStringSelection}{\param{const wxString\& }{ string}}
Selects the item with the specified string in the control. This doesn't cause
any command events to be emitted.
\wxheading{Parameters}
\docparam{string}{The string to select.}
\wxheading{Return value}
\true if the specified string has been selected, \false if it wasn't found in
the control.
\wxheading{See also}
\helpref{SetSelection}{wxcontrolwithitemssetselection}

View File

@@ -1,262 +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 wxWidgets convention is to set the cursor for a window, as in X,
rather than to set it globally as in MS Windows, although a
global \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{Library}
\helpref{wxCore}{librarieslist}
\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{wxcursorctor}
\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},
\param{wxColour*}{ fg=NULL}, \param{wxColour*}{ bg=NULL}}
Constructs a cursor by passing an array of bits (Motif and GTK+ only). {\it maskBits} is used only under
Motif and GTK+. The parameters {\it fg} and {\it bg} are only present on GTK+, and force the
cursor to use particular background and foreground colours.
If either {\it hotSpotX} or {\it hotSpotY} is -1, the hotspot will be the centre of the cursor image (Motif only).
\func{}{wxCursor}{\param{const wxString\& }{cursorName}, \param{long }{type}, \param{int }{hotSpotX=0}, \param{int }{hotSpotY=0}}
Constructs a cursor by passing a string resource name or filename.
On MacOS when specifying a string resource name, first the color cursors 'crsr' and then the black/white cursors 'CURS' in the resource chain are scanned through.
{\it hotSpotX} and {\it hotSpotY} are currently only used under Windows when loading from an
icon file, to specify the cursor hotspot relative to the top left of the image.
\func{}{wxCursor}{\param{int}{ cursorId}}
Constructs a cursor using a cursor identifier.
\func{}{wxCursor}{\param{const wxImage\&}{ image}}
Constructs a cursor from a wxImage. If cursor are monochrome on the current
platform, colors with the RGB elements all greater than 127 will be foreground,
colors less than this background. The mask (if any) will be used to specify the
transparent area.
In wxMSW the foreground will be white and the background black. If the cursor
is larger than 32x32 it is resized.
In wxGTK, colour cursors and alpha channel are supported (starting from GTK+
2.2). Otherwise the two most frequent colors will be used for foreground and
background. In any case, the cursor will be displayed at the size of the image.
In wxMac, if the cursor is larger than 16x16 it is resized and currently only
shown as black/white (mask respected).
\func{}{wxCursor}{\param{const wxCursor\&}{ cursor}}
Copy constructor, uses \helpref{reference counting}{trefcount}.
\wxheading{Parameters}
\docparam{bits}{An array of bits.}
\docparam{maskBits}{Bits for a mask bitmap.}
\docparam{width}{Cursor width.}
\docparam{height}{Cursor height.}
\docparam{hotSpotX}{Hotspot x coordinate.}
\docparam{hotSpotY}{Hotspot y coordinate.}
\docparam{type}{Icon type to load. Under Motif, {\it type} defaults to {\bf wxBITMAP\_TYPE\_XBM}. Under Windows,
it defaults to {\bf wxBITMAP\_TYPE\_CUR\_RESOURCE}. Under MacOS, it defaults to {\bf wxBITMAP\_TYPE\_MACCURSOR\_RESOURCE}.
Under X, the permitted cursor types are:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
\end{twocollist}
Under Windows, the permitted types are:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_CUR}}{Load a cursor from a .cur cursor file (only if USE\_RESOURCE\_LOADING\_IN\_MSW
is enabled in setup.h).}
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_CUR\_RESOURCE}}{Load a Windows resource (as specified in the .rc file).}
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_ICO}}{Load a cursor from a .ico icon file (only if USE\_RESOURCE\_LOADING\_IN\_MSW
is enabled in setup.h). Specify {\it hotSpotX} and {\it hotSpotY}.}
\end{twocollist}}
\docparam{cursorId}{A stock cursor identifier. May be one of:
\twocolwidtha{6cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxCURSOR\_ARROW}}{A standard arrow cursor.}
\twocolitem{{\bf wxCURSOR\_RIGHT\_ARROW}}{A standard arrow cursor
pointing to the right.}
\twocolitem{{\bf wxCURSOR\_BLANK}}{Transparent cursor.}
\twocolitem{{\bf wxCURSOR\_BULLSEYE}}{Bullseye cursor.}
\twocolitem{{\bf wxCURSOR\_CHAR}}{Rectangular character cursor.}
\twocolitem{{\bf wxCURSOR\_CROSS}}{A cross cursor.}
\twocolitem{{\bf wxCURSOR\_HAND}}{A hand cursor.}
\twocolitem{{\bf wxCURSOR\_IBEAM}}{An I-beam cursor (vertical line).}
\twocolitem{{\bf wxCURSOR\_LEFT\_BUTTON}}{Represents a mouse with the left button depressed.}
\twocolitem{{\bf wxCURSOR\_MAGNIFIER}}{A magnifier icon.}
\twocolitem{{\bf wxCURSOR\_MIDDLE\_BUTTON}}{Represents a mouse with the middle button depressed.}
\twocolitem{{\bf wxCURSOR\_NO\_ENTRY}}{A no-entry sign cursor.}
\twocolitem{{\bf wxCURSOR\_PAINT\_BRUSH}}{A paintbrush cursor.}
\twocolitem{{\bf wxCURSOR\_PENCIL}}{A pencil cursor.}
\twocolitem{{\bf wxCURSOR\_POINT\_LEFT}}{A cursor that points left.}
\twocolitem{{\bf wxCURSOR\_POINT\_RIGHT}}{A cursor that points right.}
\twocolitem{{\bf wxCURSOR\_QUESTION\_ARROW}}{An arrow and question mark.}
\twocolitem{{\bf wxCURSOR\_RIGHT\_BUTTON}}{Represents a mouse with the right button depressed.}
\twocolitem{{\bf wxCURSOR\_SIZENESW}}{A sizing cursor pointing NE-SW.}
\twocolitem{{\bf wxCURSOR\_SIZENS}}{A sizing cursor pointing N-S.}
\twocolitem{{\bf wxCURSOR\_SIZENWSE}}{A sizing cursor pointing NW-SE.}
\twocolitem{{\bf wxCURSOR\_SIZEWE}}{A sizing cursor pointing W-E.}
\twocolitem{{\bf wxCURSOR\_SIZING}}{A general sizing cursor.}
\twocolitem{{\bf wxCURSOR\_SPRAYCAN}}{A spraycan cursor.}
\twocolitem{{\bf wxCURSOR\_WAIT}}{A wait cursor.}
\twocolitem{{\bf wxCURSOR\_WATCH}}{A watch cursor.}
\twocolitem{{\bf wxCURSOR\_ARROWWAIT}}{A cursor with both an arrow and
an hourglass, (windows.)}
\end{twocollist}\twocolwidtha{5cm}
Note that not all cursors are available on all platforms.}
\docparam{cursor}{Pointer or reference to a cursor to copy.}
\pythonnote{Constructors supported by wxPython are:\par
\indented{2cm}{\begin{twocollist}
\twocolitem{{\bf wxCursor(name, flags, hotSpotX=0,
hotSpotY=0)}}{Constructs a cursor from a filename}
\twocolitem{{\bf wxStockCursor(id)}}{Constructs a stock cursor }
\end{twocollist}}
}
\perlnote{Constructors supported by wxPerl are:\par
\begin{itemize}
\item{Wx::Cursor->new( name, type, hotSpotX = 0, hotSpotY = 0 )}
\item{Wx::Cursor->new( id )}
\item{Wx::Cursor->new( image )}
\item{Wx::Cursor->newData( bits, width, height, hotSpotX = -1, hotSpotY = -1, maskBits = 0 )}
\end{itemize}
}
\wxheading{Example}
The following is an example of creating a
cursor from 32x32 bitmap data ({\tt down\_bits}) and a mask
({\tt down\_mask}) where 1 is black and 0 is white for
the bits, and 1 is opaque and 0 is transparent for
the mask. It works on Windows and GTK+.
\begin{verbatim}
static char down_bits[] = { 255, 255, 255, 255, 31,
255, 255, 255, 31, 255, 255, 255, 31, 255, 255, 255,
31, 255, 255, 255, 31, 255, 255, 255, 31, 255, 255,
255, 31, 255, 255, 255, 31, 255, 255, 255, 25, 243,
255, 255, 19, 249, 255, 255, 7, 252, 255, 255, 15, 254,
255, 255, 31, 255, 255, 255, 191, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255 };
static char down_mask[] = { 240, 1, 0, 0, 240, 1,
0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 240, 1,
0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 255, 31, 0, 0, 255,
31, 0, 0, 254, 15, 0, 0, 252, 7, 0, 0, 248, 3, 0, 0,
240, 1, 0, 0, 224, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0 };
#ifdef __WXMSW__
wxBitmap down_bitmap(down_bits, 32, 32);
wxBitmap down_mask_bitmap(down_mask, 32, 32);
down_bitmap.SetMask(new wxMask(down_mask_bitmap));
wxImage down_image = down_bitmap.ConvertToImage();
down_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 6);
down_image.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 14);
wxCursor down_cursor = wxCursor(down_image);
#else
wxCursor down_cursor = wxCursor(down_bits, 32, 32,
6, 14, down_mask, wxWHITE, wxBLACK);
#endif
\end{verbatim}
\membersection{wxCursor::\destruct{wxCursor}}\label{wxcursordtor}
\func{}{\destruct{wxCursor}}{\void}
Destroys the cursor.
See \helpref{reference-counted object destruction}{refcountdestruct} for more info.
A cursor can be reused for more
than one window, and does not get destroyed when the window is
destroyed. wxWidgets destroys all cursors on application exit, although
it is best to clean them up explicitly.
\membersection{wxCursor::IsOk}\label{wxcursorisok}
\constfunc{bool}{IsOk}{\void}
Returns true if cursor data is present.
\membersection{wxCursor::operator $=$}\label{wxcursorassignment}
\func{wxCursor\&}{operator $=$}{\param{const wxCursor\& }{cursor}}
Assignment operator, using \helpref{reference counting}{trefcount}.

View File

@@ -1,114 +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{Library}
\helpref{wxCore}{librarieslist}
\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}
\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.
\pythonnote{This method expects a string in wxPython. You can pass
nearly any object by pickling it first.}
\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.
\pythonnote{This method expects a string in wxPython. You can pass
nearly any object by pickling it first.}

View File

@@ -1,126 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dataform.tex
%% Purpose: wxDataFormat documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 03.11.99
%% RCS-ID: $Id$
%% Copyright: (c) Vadim Zeitlin
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxDataFormat}}\label{wxdataformat}
A wxDataFormat is an encapsulation of a platform-specific format handle which
is used by the system for the clipboard and drag and drop operations. The
applications are usually only interested in, for example, pasting data from the
clipboard only if the data is in a format the program understands and a data
format is something which uniquely identifies this format.
On the system level, a data format is usually just a number ({\tt CLIPFORMAT}
under Windows or {\tt Atom} under X11, for example) and the standard formats
are, indeed, just numbers which can be implicitly converted to wxDataFormat.
The standard formats are:
\begin{twocollist}\itemsep=1cm
\twocolitem{wxDF\_INVALID}{An invalid format - used as default argument for
functions taking a wxDataFormat argument sometimes}
\twocolitem{wxDF\_TEXT}{Text format (wxString)}
\twocolitem{wxDF\_BITMAP}{A bitmap (wxBitmap)}
\twocolitem{wxDF\_METAFILE}{A metafile (wxMetafile, Windows only)}
\twocolitem{wxDF\_FILENAME}{A list of filenames}
\twocolitem{wxDF\_HTML}{An HTML string. This is only valid when passed to wxSetClipboardData
when compiled with Visual C++ in non-Unicode mode}
\end{twocollist}
As mentioned above, these standard formats may be passed to any function taking
wxDataFormat argument because wxDataFormat has an implicit conversion from
them (or, to be precise from the type {\tt wxDataFormat::NativeFormat} which is
the type used by the underlying platform for data formats).
Aside the standard formats, the application may also use custom formats which
are identified by their names (strings) and not numeric identifiers. Although
internally custom format must be created (or {\it registered}) first, you
shouldn't care about it because it is done automatically the first time the
wxDataFormat object corresponding to a given format name is created. The only
implication of this is that you should avoid having global wxDataFormat objects
with non-default constructor because their constructors are executed before the
program has time to perform all necessary initialisations and so an attempt to
do clipboard format registration at this time will usually lead to a crash!
\wxheading{Virtual functions to override}
None
\wxheading{Derived from}
None
\wxheading{See also}
\helpref{Clipboard and drag and drop overview}{wxdndoverview},
\helpref{DnD sample}{samplednd},
\helpref{wxDataObject}{wxdataobject}
\wxheading{Include files}
<wx/dataobj.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataFormat::wxDataFormat}\label{wxdataformatwxdataformatdef}
\func{}{wxDataFormat}{\param{NativeFormat}{ format = wxDF\_INVALID}}
Constructs a data format object for one of the standard data formats or an
empty data object (use \helpref{SetType}{wxdataformatsettype} or
\helpref{SetId}{wxdataformatsetid} later in this case)
\perlnote{In wxPerl this function is named {\tt newNative}.}
\membersection{wxDataFormat::wxDataFormat}\label{wxdataformatwxdataformat}
\func{}{wxDataFormat}{\param{const wxChar }{*format}}
Constructs a data format object for a custom format identified by its name
{\it format}.
\perlnote{In wxPerl this function is named {\tt newUser}.}
\membersection{wxDataFormat::operator $==$}\label{wxdataformatoperatoreq}
\constfunc{bool}{operator $==$}{\param{const wxDataFormat\&}{ format}}
Returns true if the formats are equal.
\membersection{wxDataFormat::operator $!=$}\label{wxdataformatoperatorneq}
\constfunc{bool}{operator $!=$}{\param{const wxDataFormat\&}{ format}}
Returns true if the formats are different.
\membersection{wxDataFormat::GetId}\label{wxdataformatgetid}
\constfunc{wxString}{GetId}{\void}
Returns the name of a custom format (this function will fail for a standard
format).
\membersection{wxDataFormat::GetType}\label{wxdataformatgettype}
\constfunc{NativeFormat}{GetType}{\void}
Returns the platform-specific number identifying the format.
\membersection{wxDataFormat::SetId}\label{wxdataformatsetid}
\func{void}{SetId}{\param{const wxChar }{*format}}
Sets the format to be the custom format identified by the given name.
\membersection{wxDataFormat::SetType}\label{wxdataformatsettype}
\func{void}{SetType}{\param{NativeFormat}{ format}}
Sets the format to the given value, which should be one of wxDF\_XXX constants.

View File

@@ -1,205 +0,0 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: dataobj.tex
%% Purpose: wxDataObject documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 18.10.99
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets 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 'dumb' data containers such as memory
buffers or files. Being 'smart' here means that the data object itself should
know what data formats it supports and how to render itself in each of
its supported formats.
A supported format, incidentally, is exactly the format in which the data can
be requested from a data object or from which the data object may be set. In
the general case, an object may support different formats on 'input' and
'output', i.e. it may be able to render itself in a given format but not be
created from data on this format or vice versa. wxDataObject defines an
enumeration type
\begin{verbatim}
enum Direction
{
Get = 0x01, // format is supported by GetDataHere()
Set = 0x02 // format is supported by SetData()
};
\end{verbatim}
which distinguishes between them. See
\helpref{wxDataFormat}{wxdataformat} documentation for more about formats.
Not surprisingly, being 'smart' comes at a price of added complexity. This is
reasonable for the situations when you really need to support multiple formats,
but may be annoying if you only want to do something simple like cut and paste
text.
To provide a solution for both cases, wxWidgets 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 a wxDataObject that does support multiple formats
because it achieves this by simply holding several wxDataObjectSimple objects.
So, you have several solutions when you need a wxDataObject class (and you need
one as soon as you want to transfer data via the clipboard or drag and drop):
\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 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 clipboard and
drag and drop, nor OLE data transfer, copy any data until another application
actually requests the data. This is in contrast to the 'feel' offered to the
user of a program who would normally think that the data resides in the
clipboard after having pressed 'Copy' - in reality it is only declared to be
available.
There are several predefined data object classes derived from
wxDataObjectSimple: \helpref{wxFileDataObject}{wxfiledataobject},
\helpref{wxTextDataObject}{wxtextdataobject},
\helpref{wxBitmapDataObject}{wxbitmapdataobject} and
\helpref{wxURLDataObject}{wxurldataobject}
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 a mime-type string literal, such as
"application/word" or "image/png". These strings are used as they are under
Unix (so far only GTK+) to identify a format and are translated into their
Windows equivalent under Win32 (using the OLE IDataObject for data exchange to
and from the clipboard and for drag and drop). Note that the format string
translation under Windows is not yet finished.
\pythonnote{At this time this class is not directly usable from wxPython.
Derive a class from \helpref{wxPyDataObjectSimple}{wxdataobjectsimple}
instead.}
\perlnote{This class is not currently usable from wxPerl; you may
use \helpref{Wx::PlDataObjectSimple}{wxdataobjectsimple} instead.}
\wxheading{Virtual functions to override}
Each class derived directly from wxDataObject must override and implement all
of its functions which are pure virtual in the base class.
The data objects which only render their data or only set it (i.e. work in
only one direction), should return 0 from
\helpref{GetFormatCount}{wxdataobjectgetformatcount}.
\wxheading{Derived from}
None
\wxheading{Include files}
<wx/dataobj.h>
\wxheading{Library}
\helpref{wxCore}{librarieslist}
\wxheading{See also}
\helpref{Clipboard and drag and drop overview}{wxdndoverview},
\helpref{DnD sample}{samplednd},
\helpref{wxFileDataObject}{wxfiledataobject},
\helpref{wxTextDataObject}{wxtextdataobject},
\helpref{wxBitmapDataObject}{wxbitmapdataobject},
\helpref{wxCustomDataObject}{wxcustomdataobject},
\helpref{wxDropTarget}{wxdroptarget},
\helpref{wxDropSource}{wxdropsource},
\helpref{wxTextDropTarget}{wxtextdroptarget},
\helpref{wxFileDropTarget}{wxfiledroptarget}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataObject::wxDataObject}\label{wxdataobjectwxdataobject}
\func{}{wxDataObject}{\void}
Constructor.
\membersection{wxDataObject::\destruct{wxDataObject}}\label{wxdataobjectdtor}
\func{}{\destruct{wxDataObject}}{\void}
Destructor.
\membersection{wxDataObject::GetAllFormats}\label{wxdataobjectgetallformats}
\constfunc{virtual void}{GetAllFormats}{ \param{wxDataFormat *}{formats}, \param{Direction}{ dir = Get}}
Copy all supported formats in the given direction to the array pointed to by
{\it formats}. There is enough space for GetFormatCount(dir) formats in it.
\perlnote{In wxPerl this method only takes the {\tt dir} parameter.
In scalar context it returns the first format,
in list context it returns a list containing all the supported formats.}
\membersection{wxDataObject::GetDataHere}\label{wxdataobjectgetdatahere}
\constfunc{virtual bool}{GetDataHere}{\param{const wxDataFormat\&}{ format}, \param{void }{*buf} }
The method will write the data of the format {\it format} in the buffer {\it
buf} and return true on success, false on failure.
\membersection{wxDataObject::GetDataSize}\label{wxdataobjectgetdatasize}
\constfunc{virtual size\_t}{GetDataSize}{\param{const wxDataFormat\&}{ format} }
Returns the data size of the given format {\it format}.
\membersection{wxDataObject::GetFormatCount}\label{wxdataobjectgetformatcount}
\constfunc{virtual size\_t}{GetFormatCount}{\param{Direction}{ dir = Get}}
Returns the number of available formats for rendering or setting the data.
\membersection{wxDataObject::GetPreferredFormat}\label{wxdataobjectgetpreferredformat}
\constfunc{virtual wxDataFormat}{GetPreferredFormat}{\param{Direction}{ dir = Get}}
Returns the preferred format for either rendering the data (if {\it dir} is {\tt Get},
its default value) or for setting it. Usually this will be the
native format of the wxDataObject.
\membersection{wxDataObject::SetData}\label{wxdataobjectsetdata}
\func{virtual bool}{SetData}{ \param{const wxDataFormat\&}{ format}, \param{size\_t}{ len}, \param{const void }{*buf} }
Set the data in the format {\it format} of the length {\it len} provided in the
buffer {\it buf}.
Returns true on success, false on failure.

View File

@@ -1,159 +0,0 @@
\section{\class{wxDataViewColumn}}\label{wxdataviewcolumn}
This class represents a column in a \helpref{wxDataViewCtrl}{wxdataviewctrl}.
One wxDataViewColumn is bound to one column in the data model,
to which the wxDataViewCtrl has been associated.
An instance of \helpref{wxDataViewRenderer}{wxdataviewrenderer} is used by
this class to render its data.
\wxheading{Constants}
These flags define behaviour of the column:
{\small
\begin{verbatim}
enum wxDataViewColumnFlags
{
wxDATAVIEW_COL_RESIZABLE = 1, // the user can resize the column
wxDATAVIEW_COL_SORTABLE = 2, // same as SetSortable()
wxDATAVIEW_COL_REORDERABLE = 4, // column can be reordered
wxDATAVIEW_COL_HIDDEN = 8 // column is hidden
};
\end{verbatim}
}
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dataview.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataViewColumn::wxDataViewColumn}\label{wxdataviewcolumnwxdataviewcolumn}
\func{}{wxDataViewColumn}{\param{const wxString\& }{title}, \param{wxDataViewRenderer* }{renderer}, \param{unsigned int }{model\_column}, \param{int }{width = wxDVC\_DEFAULT\_WIDTH}, \param{wxAlignment }{align = wxALIGN\_CENTRE}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
\func{}{wxDataViewColumn}{\param{const wxBitmap\& }{bitmap}, \param{wxDataViewRenderer* }{renderer}, \param{unsigned int }{model\_column}, \param{int }{width = wxDVC\_DEFAULT\_WIDTH}, \param{wxAlignment }{align = wxALIGN\_CENTRE}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
Constructors.
\membersection{wxDataViewColumn::\destruct{wxDataViewColumn}}\label{wxdataviewcolumndtor}
\func{}{\destruct{wxDataViewColumn}}{\void}
Destructor.
\membersection{wxDataViewColumn::GetBitmap}\label{wxdataviewcolumngetbitmap}
\func{const wxBitmap\&}{GetBitmap}{\void}
Returns the bitmap in the header of the column, if any.
\membersection{wxDataViewColumn::GetModelColumn}\label{wxdataviewcolumngetmodelcolumn}
\func{unsigned int}{GetModelColumn}{\void}
Returns the index of the column of the model, which this
wxDataViewColumn is displaying.
\membersection{wxDataViewColumn::GetOwner}\label{wxdataviewcolumngetowner}
\func{wxDataViewCtrl*}{GetOwner}{\void}
Returns the owning \helpref{wxDataViewCtrl}{wxdataviewctrl}.
\membersection{wxDataViewColumn::GetRenderer}\label{wxdataviewcolumngetrenderer}
\func{wxDataViewRenderer*}{GetRenderer}{\void}
Returns the renderer of this wxDataViewColumn.
See also \helpref{wxDataViewRenderer}{wxdataviewrenderer}.
\membersection{wxDataViewColumn::GetReorderable}\label{wxdataviewcolumngetreorderable}
\func{bool}{GetReorderable}{\void}
Returns true if the column is reorderable.
\membersection{wxDataViewColumn::GetSortable}\label{wxdataviewcolumngetsortable}
\func{bool}{GetSortable}{\void}
Returns true if the column is sortable.
See \helpref{SetSortable}{wxdataviewcolumnsetsortable}
\membersection{wxDataViewColumn::GetWidth}\label{wxdataviewcolumngetwidth}
\func{int}{GetWidth}{\void}
Returns the width of the column.
\membersection{wxDataViewColumn::IsSortOrderAscending}\label{wxdataviewcolumnissortorderascending}
\func{bool}{IsSortOrderAscending}{\void}
Returns true, if the sort order is ascending.
See also \helpref{SetSortOrder}{wxdataviewcolumnsetsortorder}
\membersection{wxDataViewColumn::SetAlignment}\label{wxdataviewcolumnsetalignment}
\func{void}{SetAlignment}{\param{wxAlignment }{align}}
Set the alignment of the column header.
\membersection{wxDataViewColumn::SetBitmap}\label{wxdataviewcolumnsetbitmap}
\func{void}{SetBitmap}{\param{const wxBitmap\& }{bitmap}}
Set the bitmap of the column header.
\membersection{wxDataViewColumn::SetReorderable}\label{wxdataviewcolumnsetreorderable}
\func{void}{SetReorderable}{\param{bool }{reorderable}}
Indicate wether the column can be reordered by the
user using the mouse. This is typically implemented
visually by dragging the header button around.
\membersection{wxDataViewColumn::SetSortOrder}\label{wxdataviewcolumnsetsortorder}
\func{void}{SetSortOrder}{\param{bool }{ascending}}
Indicate the sort order if the implementation of the
wxDataViewCtrl supports it, most commonly by showing
a little arrow.
\membersection{wxDataViewColumn::SetSortable}\label{wxdataviewcolumnsetsortable}
\func{void}{SetSortable}{\param{bool }{sortable}}
Indicate that the column is sortable. This does
not show any sorting indicate yet, but it does
make the column header clickable. Call
\helpref{SetSortOrder}{wxdataviewcolumnsetsortorder}
afterwards to actually make the sort indicator appear.
If {\it sortable} is false, the column header is
no longer clickable and the sort indicator (little
arrow) will disappear.
\membersection{wxDataViewColumn::SetTitle}\label{wxdataviewcolumnsettitle}
\func{void}{SetTitle}{\param{const wxString\& }{title}}
Set the title of the column header to {\it title}.

View File

@@ -1,339 +0,0 @@
\section{\class{wxDataViewCtrl}}\label{wxdataviewctrl}
wxDataViewCtrl is a control to display data either
in a tree like fashion or in a tabular form or both.
If you only need to display a simple tree structure
with an API more like the older wxTreeCtrl class,
then the specialized \helpref{wxDataViewTreeCtrl}{wxdataviewtreectrl}
can be used.
A \helpref{wxDataViewItem}{wxdataviewitem} is used
to represent a (visible) item in the control.
Unlike \helpref{wxListCtrl}{wxlistctrl} wxDataViewCtrl doesn't
get its data from the user through virtual functions or by
setting it directly. Instead you need to write your own
\helpref{wxDataViewModel}{wxdataviewmodel} and associate
it with this control. Then you need to add a number of
\helpref{wxDataViewColumn}{wxdataviewcolumn} to this control to
define what each column shall display. Each wxDataViewColumn
in turn owns 1 instance of a
\helpref{wxDataViewRenderer}{wxdataviewrenderer} to render its
cells. A number of standard renderers for rendering text, dates,
images, toggle, a progress bar etc. are provided. Additionally,
the user can write custom renderes deriving from
\helpref{wxDataViewCustomRenderer}{wxdataviewcustomrenderer}
for displaying anything.
All data transfer from the control to the model and the user
code is done through \helpref{wxVariant}{wxvariant} which can
be extended to support more data formats as necessary.
Accordingly, all type information uses the strings returned
from \helpref{wxVariant::GetType}{wxvariantgettype}.
\wxheading{Window styles}
\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxDV\_SINGLE}}{Single selection mode. This is the default.}
\twocolitem{\windowstyle{wxDV\_MULTIPLE}}{Multiple selection mode.}
\twocolitem{\windowstyle{wxDV\_ROW\_LINES}}{Use alternating colours for rows if supported by platform and theme.}
\twocolitem{\windowstyle{wxDV\_HORIZ\_RULES}}{Display fine rules between row if supported.}
\twocolitem{\windowstyle{wxDV\_VERT\_RULES}}{Display fine rules between columns is supported.}
\end{twocollist}
\wxheading{Event handling}
To process input from a dataview control, use the following event handler
macros to direct input to member functions that take a
\helpref{wxDataViewEvent}{wxdataviewevent} argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_DATAVIEW\_SELECTION\_CHANGED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_SELECTION\_CHANGED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_ACTIVATED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_ACTIVATED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_EDITING\_STARTED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_EDITING\_STARTED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_EDITING\_DONE(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_EDITING\_DONE event.}
\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_COLLAPSING(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_COLLAPSING event.}
\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_COLLAPSED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_COLLAPSED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_EXPANDING(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_EXPANDING event.}
\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_EXPANDED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_EXPANDED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_VALUE\_CHANGED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_VALUE\_CHANGED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_CONTEXT\_MENU(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_CONTEXT\_MENU event.}
\twocolitem{{\bf EVT\_DATAVIEW\_COLUMN\_HEADER\_CLICK(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_COLUMN\_HEADER\_CLICKED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_COLUMN\_HEADER\_RIGHT\_CLICK(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_COLUMN\_HEADER\_RIGHT\_CLICKED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_COLUMN\_HEADER\_SORTED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_COLUMN\_HEADER\_SORTED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_COLUMN\_REORDERED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_COLUMN\_REORDERED event.}
\end{twocollist}
\wxheading{Derived from}
\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dataview.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataViewCtrl::wxDataViewCtrl}\label{wxdataviewctrlwxdataviewctrl}
\func{}{wxDataViewCtrl}{\void}
\func{}{wxDataViewCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}}
Constructor. Calls \helpref{Create}{wxdataviewctrlcreate}.
\membersection{wxDataViewCtrl::\destruct{wxDataViewCtrl}}\label{wxdataviewctrldtor}
\func{}{\destruct{wxDataViewCtrl}}{\void}
Destructor.
\membersection{wxDataViewCtrl::AppendColumn}\label{wxdataviewctrlappendcolumn}
\func{virtual bool}{AppendColumn}{\param{wxDataViewColumn* }{col}}
Add a \helpref{wxDataViewColumn}{wxdataviewcolumn} to the control. Returns
{\it true} on success.
Note that there is a number of short cut methods which implicitly create
a \helpref{wxDataViewColumn}{wxdataviewcolumn} and a
\helpref{wxDataViewRenderer}{wxdataviewrenderer} for it (see below).
\membersection{wxDataViewCtrl::AppendBitmapColumn}\label{wxdataviewctrlappendbitmapcolumn}
\func{wxDataViewColumn*}{AppendBitmapColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}, \param{wxAlignment }{align = wxALIGN\_CENTER}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
\func{wxDataViewColumn*}{AppendBitmapColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}, \param{wxAlignment }{align = wxALIGN\_CENTER}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
Appends a column for rendering a bitmap. Returns the wxDataViewColumn
created in the function or NULL on failure.
\membersection{wxDataViewCtrl::AppendDateColumn}\label{wxdataviewctrlappenddatecolumn}
\func{wxDataViewColumn*}{AppendDateColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_ACTIVATABLE}, \param{int }{width = -1}, \param{wxAlignment }{align = wxALIGN\_CENTER}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
\func{wxDataViewColumn*}{AppendDateColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_ACTIVATABLE}, \param{int }{width = -1}, \param{wxAlignment }{align = wxALIGN\_CENTER}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
Appends a column for rendering a date. Returns the wxDataViewColumn
created in the function or NULL on failure.
\membersection{wxDataViewCtrl::AppendProgressColumn}\label{wxdataviewctrlappendprogresscolumn}
\func{wxDataViewColumn*}{AppendProgressColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 80}, \param{wxAlignment }{align = wxALIGN\_CENTER}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
\func{wxDataViewColumn*}{AppendProgressColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 80}, \param{wxAlignment }{align = wxALIGN\_CENTER}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
Appends a column for rendering a progress indicator. Returns the wxDataViewColumn
created in the function or NULL on failure.
\membersection{wxDataViewCtrl::AppendIconTextColumn}\label{wxdataviewctrlappendicontextcolumn}
\func{wxDataViewColumn*}{AppendIconTextColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}, \param{wxAlignment }{align = wxALIGN\_LEFT}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
\func{wxDataViewColumn*}{AppendIconTextColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}, \param{wxAlignment }{align = wxALIGN\_LEFT}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
Appends a column for rendering text with an icon. Returns the wxDataViewColumn
created in the function or NULL on failure. This uses the
\helpref{wxDataViewIconTextRenderer}{wxdataviewicontextrenderer}.
\membersection{wxDataViewCtrl::AppendTextColumn}\label{wxdataviewctrlappendtextcolumn}
\func{wxDataViewColumn*}{AppendTextColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}, \param{wxAlignment }{align = wxALIGN\_LEFT}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
\func{wxDataViewColumn*}{AppendTextColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}, \param{wxAlignment }{align = wxALIGN\_LEFT}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
Appends a column for rendering text. Returns the wxDataViewColumn
created in the function or NULL on failure.
\membersection{wxDataViewCtrl::AppendToggleColumn}\label{wxdataviewctrlappendtogglecolumn}
\func{wxDataViewColumn*}{AppendToggleColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 30}, \param{wxAlignment }{align = wxALIGN\_CENTER}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
\func{wxDataViewColumn*}{AppendToggleColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 30}, \param{wxAlignment }{align = wxALIGN\_CENTER}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
Appends a column for rendering a toggle. Returns the wxDataViewColumn
created in the function or NULL on failure.
\membersection{wxDataViewCtrl::AssociateModel}\label{wxdataviewctrlassociatemodel}
\func{virtual bool}{AssociateModel}{\param{wxDataViewModel* }{model}}
Associates a \helpref{wxDataViewModel}{wxdataviewmodel} with the
control. This increases the reference count of the model by 1.
\membersection{wxDataViewCtrl::Create}\label{wxdataviewctrlcreate}
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}}
Create the control. Useful for two step creation.
\membersection{wxDataViewCtrl::ClearColumns}\label{wxdataviewctrlclearcolumns}
\func{virtual bool}{ClearColumns}{\void}
Removes all columns.
\membersection{wxDataViewCtrl::ClearSelection}\label{wxdataviewctrlclearselection}
\func{void}{ClearSelection}{\void}
Unselects all rows.
\membersection{wxDataViewCtrl::Collapse}\label{wxdataviewctrlcollapse}
\func{void}{Collapse}{\param{const wxDataViewItem \& }{item}}
Collapses the item.
\membersection{wxDataViewCtrl::DeleteColumn}\label{wxdataviewctrldeletecolumn}
\func{virtual bool}{DeleteColumn}{\param{const wxDataViewColumn* }{column}}
Deletes given column.
\membersection{wxDataViewCtrl::Expand}\label{wxdataviewctrlexpand}
\func{void}{Expand}{\param{const wxDataViewItem \& }{item}}
Expands the item.
\membersection{wxDataViewCtrl::GetColumn}\label{wxdataviewctrlgetcolumn}
\constfunc{virtual wxDataViewColumn*}{GetColumn}{\param{unsigned int }{pos}}
Returns pointer to the column. {\it pos} refers to the
position in the control which may change after reordering
columns by the user.
\membersection{wxDataViewCtrl::GetColumnCount}\label{wxdataviewctrlgetcolumncount}
\constfunc{virtual unsigned int}{GetColumnCount}{\void}
Returns the number of columns.
\membersection{wxDataViewCtrl::GetColumnPosition}\label{wxdataviewctrlgetcolumnposition}
\constfunc{virtual int}{GetColumnPosition}{\param{const wxDataViewColumn* }{column}}
Returns the position of the column or -1 if not found in the control.
\membersection{wxDataViewCtrl::EnsureVisible}\label{wxdataviewctrlensurevisible}
\func{void}{EnsureVisible}{\param{const wxDataViewItem \& }{item}, \param{const wxDataViewColumn* }{column = NULL}}
Call this to ensure that the given item is visible.
\membersection{wxDataViewCtrl::GetExpanderColumn}\label{wxdataviewctrlgetexpandercolumn}
\constfunc{wxDataViewColumn *}{GetExpanderColumn}{\void}
Returns column containing the expanders.
\membersection{wxDataViewCtrl::GetIndent}\label{wxdataviewctrlgetindent}
\constfunc{int}{GetIndent}{\void}
Returns indentation.
\membersection{wxDataViewCtrl::GetItemRect}\label{wxdataviewctrlgetitemrect}
\constfunc{wxRect}{GetItemRect}{\param{const wxDataViewItem\& }{item}, \param{const wxDataViewColumn *}{col = NULL}}
Returns item rect.
\membersection{wxDataViewCtrl::GetModel}\label{wxdataviewctrlgetmodel}
\constfunc{virtual wxDataViewModel*}{GetModel}{\void}
Returns pointer to the data model associated with the
control (if any).
\membersection{wxDataViewCtrl::GetSelection}\label{wxdataviewctrlgetselection}
\constfunc{wxDataViewItem}{GetSelection}{\void}
Returns first selected item or an invalid item if none is selected.
\membersection{wxDataViewCtrl::GetSelections}\label{wxdataviewctrlgetselections}
\constfunc{int}{GetSelections}{\param{wxDataViewItemArray \& }{sel}}
Fills {\it sel} with currently selected items and returns
their number.
\membersection{wxDataViewCtrl::GetSortingColumn}\label{wxdataviewctrlgetsortingcolumn}
\constfunc{virtual wxDataViewColumn*}{GetSortingColumn}{\void}
Returns the wxDataViewColumn currently responsible for sorting
or NULL if none has been selected.
\membersection{wxDataViewCtrl::HitTest}\label{wxdataviewctrlhittest}
\constfunc{void}{HitTest}{\param{const wxPoint\& }{point}, \param{wxDataViewItem\& }{item}, \param{wxDataViewColumn *\&}{col}}
Hittest.
\membersection{wxDataViewCtrl::IsSelected}\label{wxdataviewctrlisselected}
\constfunc{bool}{IsSelected}{\param{const wxDataViewItem \& }{item}}
Return true if the item is selected.
\membersection{wxDataViewCtrl::Select}\label{wxdataviewctrlselect}
\func{void}{Select}{\param{const wxDataViewItem \& }{item}}
Select the given item.
\membersection{wxDataViewCtrl::SelectAll}\label{wxdataviewctrlselectall}
\func{void}{SelectAll}{\void}
Select all items.
\membersection{wxDataViewCtrl::SetExpanderColumn}\label{wxdataviewctrlsetexpandercolumn}
\func{void}{SetExpanderColumn}{\param{wxDataViewColumn *}{col}}
Set which column shall contain the tree-like expanders.
\membersection{wxDataViewCtrl::SetIndent}\label{wxdataviewctrlsetindent}
\func{void}{SetIndent}{\param{int }{indent}}
Sets the indendation.
\membersection{wxDataViewCtrl::SetSelections}\label{wxdataviewctrlsetselections}
\func{void}{SetSelections}{\param{const wxDataViewItemArray \& }{sel}}
Sets the selection to the array of wxDataViewItems.
\membersection{wxDataViewCtrl::Unselect}\label{wxdataviewctrlunselect}
\func{void}{Unselect}{\param{const wxDataViewItem \& }{item}}
Unselect the given item.
\membersection{wxDataViewCtrl::UnselectAll}\label{wxdataviewctrlunselectall}
\func{void}{UnselectAll}{\void}
Unselect all item. This method only has effect if multiple
selections are allowed.

View File

@@ -1,99 +0,0 @@
\section{\class{wxDataViewEvent}}\label{wxdataviewevent}
wxDataViewEvent - the event class for the wxDataViewCtrl notifications
\wxheading{Derived from}
\helpref{wxNotifyEvent}{wxnotifyevent}\\
\helpref{wxCommandEvent}{wxcommandevent}\\
\helpref{wxEvent}{wxevent}\\
\helpref{wxObject}{wxobject}
\wxheading{Include files}
<wx/dataview.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataViewEvent::wxDataViewEvent}\label{wxdatavieweventwxdataviewevent}
\func{}{wxDataViewEvent}{\param{wxEventType }{commandType = wxEVT\_NULL}, \param{int }{winid = 0}}
\func{}{wxDataViewEvent}{\param{const wxDataViewEvent\& }{event}}
\membersection{wxDataViewEvent::Clone}\label{wxdatavieweventclone}
\constfunc{wxEvent*}{Clone}{\void}
Used to clone the event.
\membersection{wxDataViewEvent::GetColumn}\label{wxdatavieweventgetcolumn}
\constfunc{int}{GetColumn}{\void}
Returns the position of the column in the control or -1
if no column field was set by the event emitter.
\membersection{wxDataViewEvent::GetDataViewColumn}\label{wxdatavieweventgetdataviewcolumn}
\func{wxDataViewColumn*}{GetDataViewColumn}{\void}
Returns a pointer to the wxDataViewColumn from which
the event was emitted or NULL.
\membersection{wxDataViewEvent::GetModel}\label{wxdatavieweventgetmodel}
\constfunc{wxDataViewModel*}{GetModel}{\void}
Returns the wxDataViewModel associated with the event.
\membersection{wxDataViewEvent::GetPosition}\label{wxdatavieweventgetposition}
\constfunc{wxPoint}{GetPosition}{\void}
Returns a the position of a context menu event in screen coordinates.
\membersection{wxDataViewEvent::GetValue}\label{wxdatavieweventgetvalue}
\constfunc{const wxVariant\&}{GetValue}{\void}
Returns a reference to a value.
\membersection{wxDataViewEvent::SetColumn}\label{wxdatavieweventsetcolumn}
\func{void}{SetColumn}{\param{int }{col}}
\membersection{wxDataViewEvent::SetDataViewColumn}\label{wxdatavieweventsetdataviewcolumn}
\func{void}{SetDataViewColumn}{\param{wxDataViewColumn* }{col}}
For wxEVT\_DATAVIEW\_COLUMN\_HEADER\_CLICKED only.
\membersection{wxDataViewEvent::SetModel}\label{wxdatavieweventsetmodel}
\func{void}{SetModel}{\param{wxDataViewModel* }{model}}
\membersection{wxDataViewEvent::SetValue}\label{wxdatavieweventsetvalue}
\func{void}{SetValue}{\param{const wxVariant\& }{value}}

View File

@@ -1,134 +0,0 @@
\section{\class{wxDataViewIndexListModel}}\label{wxdataviewindexlistmodel}
wxDataViewIndexListModel is a specialized data model which lets
you address an item by its position (row) rather than its
wxDataViewItem (which you can obtain from this class).
This model also provides its own
\helpref{Compare}{wxdataviewindexlistmodelcompare} method
which sorts the model's data by the index.
This model is special in the it is implemented differently under OS X
and other platforms. Under OS X a wxDataViewItem is always persistent
and this is also the case for this class. Under other platforms, the
meaning of a wxDataViewItem is changed to reflect a row number for
wxDataViewIndexListModel. The consequence of this is that
wxDataViewIndexListModel can be used as a virtual model with an
almost infinate number of items on platforms other than OS X.
\wxheading{Derived from}
\helpref{wxDataViewModel}{wxdataviewmodel}
\wxheading{Include files}
<dataview.h>
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataViewIndexListModel::wxDataViewIndexListModel}\label{wxdataviewindexlistmodelwxdataviewindexlistmodel}
\func{}{wxDataViewIndexListModel}{\param{unsigned int }{initial\_size = 0}}
Constructor.
\membersection{wxDataViewIndexListModel::\destruct{wxDataViewIndexListModel}}\label{wxdataviewindexlistmodeldtor}
\func{}{\destruct{wxDataViewIndexListModel}}{\void}
Destructor.
\membersection{wxDataViewIndexListModel::Compare}\label{wxdataviewindexlistmodelcompare}
\func{int}{Compare}{\param{const wxDataViewItem\& }{item1}, \param{const wxDataViewItem\& }{item2}, \param{unsigned int }{column}, \param{bool }{ascending}}
Compare method that sorts the items by their index.
\membersection{wxDataViewIndexListModel::GetAttr}\label{wxdataviewindexlistmodelgetattr}
\func{bool}{GetAttr}{\param{unsigned int }{row}, \param{unsigned int }{col}, \param{wxDataViewItemAttr\& }{attr}}
Oberride this to indicate that the row has special font attributes.
This only affects the
\helpref{wxDataViewTextRendererText}{wxdataviewtextrendererattr} renderer.
See also \helpref{wxDataViewItemAttr}{wxdataviewitemattr}.
\membersection{wxDataViewIndexListModel::GetItem}\label{wxdataviewindexlistmodelgetitem}
\constfunc{wxDataViewItem}{GetItem}{\param{unsigned int }{row}}
Returns the wxDataViewItem at the given {\it row}.
\membersection{wxDataViewIndexListModel::GetRow}\label{wxdataviewindexlistmodelgetrow}
\constfunc{unsigned int}{GetRow}{\param{const wxDataViewItem\& }{item}}
Returns the position of given {\it item}.
\membersection{wxDataViewIndexListModel::GetValue}\label{wxdataviewindexlistmodelgetvalue}
\constfunc{void}{GetValue}{\param{wxVariant\& }{variant}, \param{unsigned int }{row}, \param{unsigned int }{col}}
Override this to allow getting values from the model.
\membersection{wxDataViewIndexListModel::Reset}\label{wxdataviewindexlistmodelreset}
\func{void}{Reset}{\param{unsigned int }{new\_size}}
Call this after if the data has to be read again from
the model. This is useful after major changes when
calling the methods below (possibly thousands of times)
doesn't make sense.
\membersection{wxDataViewIndexListModel::RowAppended}\label{wxdataviewindexlistmodelrowappended}
\func{void}{RowAppended}{\void}
Call this after a row has been appended to the model.
\membersection{wxDataViewIndexListModel::RowChanged}\label{wxdataviewindexlistmodelrowchanged}
\func{void}{RowChanged}{\param{unsigned int }{row}}
Call this after a row has been changed.
\membersection{wxDataViewIndexListModel::RowDeleted}\label{wxdataviewindexlistmodelrowdeleted}
\func{void}{RowDeleted}{\param{unsigned int }{row}}
Call this after a row has been deleted.
\membersection{wxDataViewIndexListModel::RowsDeleted}\label{wxdataviewindexlistmodelrowdeleted}
\func{void}{RowsDeleted}{\param{const wxArrayInt &}{rows}}
Call this after rows have been deleted. The array will internally
get copied and sorted in descending order so that the rows with
the highest position will be deleted first.
\membersection{wxDataViewIndexListModel::RowInserted}\label{wxdataviewindexlistmodelrowinserted}
\func{void}{RowInserted}{\param{unsigned int }{before}}
Call this after a row has been inserted at the given position.
\membersection{wxDataViewIndexListModel::RowPrepended}\label{wxdataviewindexlistmodelrowprepended}
\func{void}{RowPrepended}{\void}
Call this after a row has been prepended to the model.
\membersection{wxDataViewIndexListModel::RowValueChanged}\label{wxdataviewindexlistmodelrowvaluechanged}
\func{void}{RowValueChanged}{\param{unsigned int }{row}, \param{unsigned int }{col}}
Call this after a value has been changed.
\membersection{wxDataViewIndexListModel::SetValue}\label{wxdataviewindexlistmodelsetvalue}
\func{bool}{SetValue}{\param{const wxVariant\& }{variant}, \param{unsigned int }{row}, \param{unsigned int }{col}}
Called in order to set a value in the model.

View File

@@ -1,59 +0,0 @@
\section{\class{wxDataViewItem}}\label{wxdataviewitem}
wxDataViewItem is a small opaque class that represents an
item in a \helpref{wxDataViewCtrl}{wxdataviewctrl} in a
persistent way, i.e. indepent of the position of the
item in the control or changes to its contents. It must
hold a unique ID of type {\it void*} in its only field
and can be converted to a from it.
If the ID is {\it NULL} the wxDataViewItem is invalid and
\helpref{IsOk}{wxdataviewitemisok} will return {\it false}
which used in many places in the API of wxDataViewCtrl
to indicate that e.g. no item was found. An ID of NULL
is also used to indicate the invisible root. Examples
for this are
\helpref{wxDataViewModel::GetParent}{wxdataviewmodelgetparent} and
\helpref{wxDataViewModel::GetChildren}{wxdataviewmodelgetchildren}.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<dataview.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\membersection{wxDataViewItem::wxDataViewItem}\label{wxdataviewitemwxdataviewitem}
\func{}{wxDataViewItem}{\param{void* }{id = NULL}}
Constructor.
\func{}{wxDataViewItem}{\param{const wxDataViewItem\& }{item}}
\membersection{wxDataViewItem::GetID}\label{wxdataviewitemgetid}
\constfunc{void*}{GetID}{\void}
Returns the ID.
\membersection{wxDataViewItem::IsOk}\label{wxdataviewitemisok}
\constfunc{bool}{IsOk}{\void}
Returns true if the ID is not {\it NULL}.
\membersection{wxDataViewItem::void*}\label{wxdataviewitemvoid}
\constfunc{operator const}{void*}{\void}
Converts to {\it void*}.

View File

@@ -1,54 +0,0 @@
\section{\class{wxDataViewItemAttr}}\label{wxdataviewitemattr}
This class is used to indicate to a \helpref{wxDataViewCtrl}{wxdataviewctrl}
that a certain \helpref{Item}{wxdataviewitem} has extra font attributes
for its renderer. For this, it is required to override
\helpref{wxDataViewModel::GetAttr}{wxdataviewmodelgetattr}.
Attributes are currently only supported by
\helpref{wxDataViewTextRendererText}{wxdataviewtextrendererattr}.
\wxheading{Derived from}
No base class
\wxheading{Include files}
<wx/dataview.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\wxheading{Data structures}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataViewItemAttr::wxDataViewItemAttr}\label{wxdataviewitemattrwxdataviewitemattr}
\func{}{wxDataViewItemAttr}{\void}
Constructor.
\membersection{wxDataViewItemAttr::SetBold}\label{wxdataviewitemattrsetbold}
\func{void}{SetBold}{\param{bool }{set}}
Call this to indicate that the item shall be displayed in bold text.
\membersection{wxDataViewItemAttr::SetColour}\label{wxdataviewitemattrsetcolour}
\func{void}{SetColour}{\param{const wxColour\& }{colour}}
Call this to indicate that the item shall be displayed with
that colour.
\membersection{wxDataViewItemAttr::SetItalic}\label{wxdataviewitemattrsetitalic}
\func{void}{SetItalic}{\param{bool }{set}}
Call this to indicate that the item shall be displayed in italic text.

View File

@@ -1,312 +0,0 @@
\section{\class{wxDataViewModel}}\label{wxdataviewmodel}
wxDataViewModel is the base class for all data model to be
displayed by a \helpref{wxDataViewCtrl}{wxdataviewctrl}.
All other models derive from it and must implement its
pure virtual functions in order to define a complete
data model. In detail, you need to override
\helpref{IsContainer}{wxdataviewmodeliscontainer},
\helpref{GetParent}{wxdataviewmodelgetparent},
\helpref{GetChildren}{wxdataviewmodelgetchildren},
\helpref{GetColumnCount}{wxdataviewmodelgetcolumncount},
\helpref{GetColumnType}{wxdataviewmodelgetcolumntype} and
\helpref{GetValue}{wxdataviewmodelgetvalue} in order to
define the data model which acts as an interface between
your actual data and the wxDataViewCtrl. Since you will
usually also allow the wxDataViewCtrl to change your data
through its graphical interface, you will also have to override
\helpref{SetValue}{wxdataviewmodelsetvalue} which the
wxDataViewCtrl will call when a change to some data has been
commited.
wxDataViewModel (as indeed the entire wxDataViewCtrl
code) is using \helpref{wxVariant}{wxvariant} to store data and
its type in a generic way. wxVariant can be extended to contain
almost any data without changes to the original class.
The data that is presented through this data model is expected
to change at run-time. You need to inform the data model when
a change happened. Depending on what happened you need to call
one of the following methods:
\helpref{ValueChanged}{wxdataviewmodelvaluechanged},
\helpref{ItemAdded}{wxdataviewmodelitemadded},
\helpref{ItemDeleted}{wxdataviewmodelitemdeleted},
\helpref{ItemChanged}{wxdataviewmodelitemchanged},
\helpref{Cleared}{wxdataviewmodelcleared}. There are
plural forms for notification of addition, change
or removal of several item at once. See
\helpref{ItemsAdded}{wxdataviewmodelitemsadded},
\helpref{ItemsDeleted}{wxdataviewmodelitemsdeleted},
\helpref{ItemsChanged}{wxdataviewmodelitemschanged}.
Note that wxDataViewModel does not define the position or
index of any item in the control because different controls
might display the same data differently. wxDataViewModel does
provide a \helpref{Compare}{wxdataviewmodelcompare} method
which the wxDataViewCtrl may use to sort the data either
in conjunction with a column header or without (see
\helpref{HasDefaultCompare}{wxdataviewmodelhasdefaultcompare}).
This class maintains a list of
\helpref{wxDataViewModelNotifier}{wxdataviewmodelnotifier}
which link this class to the specific implementations on the
supported platforms so that e.g. calling
\helpref{ValueChanged}{wxdataviewmodelvaluechanged}
on this model will just call
\helpref{wxDataViewModelNotifier::ValueChanged}{wxdataviewmodelnotifiervaluechanged}
for each notifier that has been added. You can also add
your own notifier in order to get informed about any changes
to the data in the list model.
Currently wxWidgets provides the following models apart
from the base model:
\helpref{wxDataViewIndexListModel}{wxdataviewindexlistmodel},
\helpref{wxDataViewTreeStore}{wxdataviewtreestore}.
Note that wxDataViewModel is reference counted, derives from
\helpref{wxObjectRefData}{wxobjectrefdata} and cannot be deleted
directly as it can be shared by several wxDataViewCtrls. This
implies that you need to decrease the reference count after
associating the model with a control like this:
{\small%
\begin{verbatim}
wxDataViewCtrl *musicCtrl = new wxDataViewCtrl( this, ID_MUSIC_CTRL );
wxDataViewModel *musicModel = new MyMusicModel;
m_musicCtrl->AssociateModel( musicModel );
musicModel->DecRef(); // avoid memory leak !!
// add columns now
\end{verbatim}
}%
\wxheading{Derived from}
\helpref{wxObjectRefData}{wxobjectrefdata}
\wxheading{Include files}
<wx/dataview.h>
\wxheading{Library}
\helpref{wxAdv}{librarieslist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxDataViewModel::wxDataViewModel}\label{wxdataviewmodelwxdataviewmodel}
\func{}{wxDataViewModel}{\void}
Constructor.
\membersection{wxDataViewModel::\destruct{wxDataViewModel}}\label{wxdataviewmodeldtor}
\func{}{\destruct{wxDataViewModel}}{\void}
Destructor. This should not be called directly. Use DecRef() instead.
\membersection{wxDataViewModel::AddNotifier}\label{wxdataviewmodeladdnotifier}
\func{void}{AddNotifier}{\param{wxDataViewModelNotifier* }{notifier}}
Adds a \helpref{wxDataViewModelNotifier}{wxdataviewmodelnotifier}
to the model.
\membersection{wxDataViewModel::Cleared}\label{wxdataviewmodelcleared}
\func{virtual bool}{Cleared}{\void}
Called to inform the model that all data has been cleared. The
control will reread the data from the model again.
\membersection{wxDataViewModel::Compare}\label{wxdataviewmodelcompare}
\func{virtual int}{Compare}{\param{const wxDataViewItem\& }{item1}, \param{const wxDataViewItem\& }{item2}, \param{unsigned int }{column}, \param{bool }{ascending}}
The compare function to be used by control. The default compare function
sorts by container and other items separately and in ascending order.
Override this for a different sorting behaviour.
See also \helpref{HasDefaultCompare}{wxdataviewmodelhasdefaultcompare}.
\membersection{wxDataViewModel::GetAttr}\label{wxdataviewmodelgetattr}
\func{bool}{GetAttr}{\param{const wxDataViewItem\& }{item}, \param{unsigned int }{col}, \param{wxDataViewItemAttr\& }{attr}}
Oberride this to indicate that the item has special font attributes.
This only affects the
\helpref{wxDataViewTextRendererText}{wxdataviewtextrendererattr} renderer.
See also \helpref{wxDataViewItemAttr}{wxdataviewitemattr}.
\membersection{wxDataViewModel::GetColumnCount}\label{wxdataviewmodelgetcolumncount}
\constfunc{virtual unsigned int}{GetColumnCount}{\void}
Override this to indicate the number of columns in the model.
\membersection{wxDataViewModel::GetColumnType}\label{wxdataviewmodelgetcolumntype}
\constfunc{virtual wxString}{GetColumnType}{\param{unsigned int }{col}}
Override this to indicate what type of data is stored in the
column specified by {\it col}. This should return a string
indicating the type of data as reported by \helpref{wxVariant}{wxvariant}.
\membersection{wxDataViewModel::GetChildren}\label{wxdataviewmodelgetchildren}
\constfunc{virtual unsigned int}{GetChildren}{\param{const wxDataViewItem\& }{item}, \param{wxDataViewItemArray\& }{children} }
Override this so the control can query the child items of
an item. Returns the number of items.
\membersection{wxDataViewModel::GetParent}\label{wxdataviewmodelgetparent}
\constfunc{virtual wxDataViewItem}{GetParent}{\param{const wxDataViewItem\& }{item}}
Override this to indicate which wxDataViewItem representing the parent
of {\it item} or an invalid wxDataViewItem if the the root item is
the parent item.
\membersection{wxDataViewModel::GetValue}\label{wxdataviewmodelgetvalue}
\constfunc{virtual void}{GetValue}{\param{wxVariant\& }{variant}, \param{const wxDataViewItem\& }{item}, \param{unsigned int }{col}}
Override this to indicate the value of {\it item}
A \helpref{wxVariant}{wxvariant} is used to store the data.
\membersection{wxDataViewModel::HasContainerColumns}\label{wxdataviewmodelhascontainercolumns}
\constfunc{virtual bool}{HasContainerColumns}{\param{const wxDataViewItem\& }{item}}
Override this method to indicate if a container item merely
acts as a headline (or for categorisation) or if it also
acts a normal item with entries for futher columns. By
default returns {\it false}.
\membersection{wxDataViewModel::HasDefaultCompare}\label{wxdataviewmodelhasdefaultcompare}
\constfunc{virtual bool}{HasDefaultCompare}{\void}
Override this to indicate that the model provides a default compare
function that the control should use if no wxDataViewColumn has been
chosen for sorting. Usually, the user clicks on a column header for
sorting, the data will be sorted alphanumerically. If any other
order (e.g. by index or order of appearance) is required, then this
should be used. See also \helpref{wxDataViewIndexListModel}{wxdataviewindexlistmodel}
for a model which makes use of this.
\membersection{wxDataViewModel::IsContainer}\label{wxdataviewmodeliscontainer}
\constfunc{virtual bool}{IsContainer}{\param{const wxDataViewItem\& }{item}}
Override this to indicate of {\it item} is a container, i.e. if
it can have child items.
\membersection{wxDataViewModel::ItemAdded}\label{wxdataviewmodelitemadded}
\func{virtual bool}{ItemAdded}{\param{const wxDataViewItem\& }{parent}, \param{const wxDataViewItem\& }{item}}
Call this to inform the model that an item has been added
to the data.
\membersection{wxDataViewModel::ItemChanged}\label{wxdataviewmodelitemchanged}
\func{virtual bool}{ItemChanged}{\param{const wxDataViewItem\& }{item}}
Call this to inform the model that an item has changed.
This will eventually emit a wxEVT\_DATAVIEW\_ITEM\_VALUE\_CHANGED
event (in which the column fields will not be set) to the user.
\membersection{wxDataViewModel::ItemDeleted}\label{wxdataviewmodelitemdeleted}
\func{virtual bool}{ItemDeleted}{\param{const wxDataViewItem\& }{parent}, \param{const wxDataViewItem\& }{item}}
Call this to inform the model that an item has been deleted from the data.
\membersection{wxDataViewModel::ItemsAdded}\label{wxdataviewmodelitemsadded}
\func{virtual bool}{ItemsAdded}{\param{const wxDataViewItem\& }{parent}, \param{const wxDataViewItemArray\& }{items}}
Call this to inform the model that several items have been added
to the data.
\membersection{wxDataViewModel::ItemsChanged}\label{wxdataviewmodelitemschanged}
\func{virtual bool}{ItemsChanged}{\param{const wxDataViewItemArray\& }{items}}
Call this to inform the model that several items have changed.
This will eventually emit wxEVT\_DATAVIEW\_ITEM\_VALUE\_CHANGED
events (in which the column fields will not be set) to the user.
\membersection{wxDataViewModel::ItemsDeleted}\label{wxdataviewmodelitemsdeleted}
\func{virtual bool}{ItemsDeleted}{\param{const wxDataViewItem\& }{parent}, \param{const wxDataViewItemArray\& }{items}}
Call this to inform the model that several items have been deleted.
\membersection{wxDataViewModel::RemoveNotifier}\label{wxdataviewmodelremovenotifier}
\func{void}{RemoveNotifier}{\param{wxDataViewModelNotifier* }{notifier}}
Remove the {\it notifier} from the list of notifiers.
\membersection{wxDataViewModel::Resort}\label{wxdataviewmodelresort}
\func{virtual void}{Resort}{\void}
Call this to initiate a resort after the sort function has
been changed.
\membersection{wxDataViewModel::SetValue}\label{wxdataviewmodelsetvalue}
\func{virtual bool}{SetValue}{\param{const wxVariant\& }{variant}, \param{const wxDataViewItem\& }{item}, \param{unsigned int }{col}}
This gets called in order to set a value in the data model.
The most common scenario is that the wxDataViewCtrl calls
this method after the user changed some data in the view.
Afterwards \helpref{ValueChanged}{wxdataviewmodelvaluechanged}
has to be called!
\membersection{wxDataViewModel::ValueChanged}\label{wxdataviewmodelvaluechanged}
\func{virtual bool}{ValueChanged}{\param{const wxDataViewItem\& }{item}, \param{unsigned int }{col}}
Call this to inform this model that a value in the model has
been changed. This is also called from wxDataViewCtrl's
internal editing code, e.g. when editing a text field
in the control.
This will eventually emit a wxEVT\_DATAVIEW\_ITEM\_VALUE\_CHANGED
event to the user.

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