I've now added the documentation files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
BIN
docs/latex/porting/back.gif
Normal file
After Width: | Height: | Size: 225 B |
BIN
docs/latex/porting/books.bmp
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
docs/latex/porting/books.gif
Normal file
After Width: | Height: | Size: 433 B |
BIN
docs/latex/porting/bullet.bmp
Normal file
After Width: | Height: | Size: 198 B |
BIN
docs/latex/porting/contents.gif
Normal file
After Width: | Height: | Size: 231 B |
BIN
docs/latex/porting/forward.gif
Normal file
After Width: | Height: | Size: 164 B |
17
docs/latex/porting/porting.hpj
Normal file
@ -0,0 +1,17 @@
|
||||
[OPTIONS]
|
||||
BMROOT=d:\wx2\docs/latex/porting ; Assume that bitmaps are where the source is
|
||||
TITLE=wxWindows Porting Guide
|
||||
CONTENTS=Contents
|
||||
COMPRESS=HIGH
|
||||
|
||||
[FILES]
|
||||
porting.rtf
|
||||
|
||||
[CONFIG]
|
||||
CreateButton("Up", "&Up", "JumpId(`porting.hlp', `Contents')")
|
||||
BrowseButtons()
|
||||
|
||||
[MAP]
|
||||
|
||||
[BITMAPS]
|
||||
|
390
docs/latex/porting/porting.tex
Normal file
@ -0,0 +1,390 @@
|
||||
\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}
|
||||
\newcommand{\indexit}[1]{#1\index{#1}}%
|
||||
\newcommand{\pipe}[0]{$\|$\ }%
|
||||
\definecolour{black}{0}{0}{0}%
|
||||
\definecolour{cyan}{0}{255}{255}%
|
||||
\definecolour{green}{0}{255}{0}%
|
||||
\definecolour{magenta}{255}{0}{255}%
|
||||
\definecolour{red}{255}{0}{0}%
|
||||
\definecolour{blue}{0}{0}{200}%
|
||||
\definecolour{yellow}{255}{255}{0}%
|
||||
\definecolour{white}{255}{255}{255}%
|
||||
\input psbox.tex
|
||||
\parskip=10pt
|
||||
\parindent=0pt
|
||||
\title{Guide to porting applications from wxWindows 1.xx to 2.0}
|
||||
\author{Julian Smart}
|
||||
\date{October 1997}
|
||||
\makeindex
|
||||
\begin{document}
|
||||
\maketitle
|
||||
\pagestyle{fancyplain}
|
||||
\bibliographystyle{plain}
|
||||
\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
\pagenumbering{roman}
|
||||
\tableofcontents
|
||||
%
|
||||
\chapter{About this document}\label{about}
|
||||
\pagenumbering{arabic}%
|
||||
\setheader{{\it Porting guide}}{}{}{}{}{{\it Porting guide}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
|
||||
This document gives guidelines and tips for porting applications from
|
||||
version 1.xx of wxWindows to version 2.0.
|
||||
|
||||
The first section offers tips for writing 1.xx applications in a way to
|
||||
minimize porting time. The following sections detail the changes and
|
||||
how you can modify your application to be 2.0-compliant.
|
||||
|
||||
You may be worrying that porting to 2.0 will be a lot of work,
|
||||
particularly if you have only recently started using 1.xx. In fact,
|
||||
the wxWindows 2.0 API has far more in common with 1.xx than it has differences.
|
||||
With backward compatibility mode on, much of the conversion can be
|
||||
done gradually. The main challenges are doing without the default
|
||||
panel item layout, and the lack of automatic labels in some controls.
|
||||
However, if you already use resource files (.wxr), or application-specific positioning,
|
||||
or constraints, then even this will be quite painless.
|
||||
|
||||
So please don't be freaked out by the jump to 2.0! For one thing, 1.xx is still available
|
||||
and will be supported by the user community for some time. And when you have
|
||||
changed to 2.0, we hope that you will appreciate the benefits in terms
|
||||
of greater flexibility, better user interface aesthetics, improved C++ conformance,
|
||||
improved compilation speed, and many other enhancements. The revised architecture
|
||||
of 2.0 will ensure that wxWindows can continue to evolve for the forseeable
|
||||
future.
|
||||
|
||||
{\it Please note that this document is a work in progress.}
|
||||
|
||||
\chapter{Preparing for version 2.0}\label{preparing}
|
||||
|
||||
Even before compiling with version 2.0, there's also a lot you can do right now to make porting
|
||||
relatively simple. Here are a few tips.
|
||||
|
||||
\begin{itemize}
|
||||
\item {\bf Use constraints or .wxr resources} for layout, rather than the default layout scheme.
|
||||
Constraints should be the same in 2.0, and resources will be translated.
|
||||
\item {\bf Use separate wxMessage items} instead of labels for wxText, wxMultiText,
|
||||
wxChoice, wxComboBox. These labels will disappear in 2.0. Use separate
|
||||
wxMessages whether you're creating controls programmatically or using
|
||||
the dialog editor. The future dialog editor will be able to translate
|
||||
from old to new more accurately if labels are separated out.
|
||||
\item {\bf Parameterise functions that use wxDC} or derivatives, i.e. make the wxDC
|
||||
an argument to all functions that do drawing. Minimise the use of
|
||||
wxWindow::GetDC and definitely don't store wxDCs long-term
|
||||
because in 2.0, you can't use GetDC() and wxDCs are not persistent.
|
||||
You will use wxClientDC, wxPaintDC stack objects instead. Minimising
|
||||
the use of GetDC() will ensure that there are very few places you
|
||||
have to change drawing code for 2.0.
|
||||
\item {\bf Don't set GDI objects} (wxPen, wxBrush etc.) in windows or wxCanvasDCs before they're
|
||||
needed (e.g. in constructors) - do so within your drawing routine instead. In
|
||||
2.0, these settings will only take effect between the construction and destruction
|
||||
of temporary wxClient/PaintDC objects.
|
||||
\item {\bf Don't rely} on arguments to wxDC functions being floating point - they will
|
||||
be 32-bit integers in 2.0.
|
||||
\item {\bf Don't use the wxCanvas member functions} that duplicate wxDC functions, such as SetPen and DrawLine, since
|
||||
they are going.
|
||||
\item {\bf Using member callbacks} called from global callback functions will make the transition
|
||||
easier - see the FAQ
|
||||
for some notes on using member functions for callbacks. wxWindows 2.0 will banish global
|
||||
callback functions (and OnMenuCommand), and nearly all event handling will be done by functions taking a single event argument.
|
||||
So in future you will have code like:
|
||||
|
||||
{\small\begin{verbatim}
|
||||
void MyFrame::OnOK(wxCommandEvent& event)
|
||||
{
|
||||
...
|
||||
}
|
||||
\end{verbatim}
|
||||
}%
|
||||
|
||||
You may find that writing the extra code to call a member function isn't worth it at this stage,
|
||||
but the option is there.
|
||||
\item {\bf Use wxString wherever possible.} 2.0 will replace char * with wxString
|
||||
in most cases, and if you use wxString to receive strings returned from
|
||||
wxWindows functions (except when you need to save the pointer if deallocation is required), there should
|
||||
be no conversion problems later on.
|
||||
\item Be aware that under Windows, {\bf font sizes will change} to match standard Windows
|
||||
font sizes (for example, a 12-point font will appear bigger than before). Write your application
|
||||
to be flexible where fonts are concerned.
|
||||
Don't rely on fonts being similarly-sized across platforms, as they were (by chance) between
|
||||
Windows and X under wxWindows 1.66. Yes, this is not easy... but I think it's better to conform to the
|
||||
standards of each platform, and currently the size difference makes it difficult to
|
||||
conform to Windows UI standards. You may eventually wish to build in a global 'fudge-factor' to compensate
|
||||
for size differences. The old font sizing will still be available via wx\_setup.h, so do not panic...
|
||||
\item {\bf Consider dropping wxForm usage}: an alternative is to be found in utils/wxprop.
|
||||
wxPropertyFormView can be used in a wxForm-like way, except that you specify a pre-constructed panel
|
||||
or dialog; or you can use a wxPropertyListView to show attributes in a scrolling list - you don't even need
|
||||
to lay panel items out.
|
||||
|
||||
Because wxForm uses a number of features to be dropped in wxWindows 2.0, it cannot be
|
||||
supported in the future, at least in its present state.
|
||||
\item {\bf When creating a wxListBox}, put the wxLB\_SINGLE, wxLB\_MULTIPLE, wxLB\_EXTENDED styles in the window style parameter, and put
|
||||
zero in the {\it multiple} parameter. The {\it multiple} parameter will be removed in 2.0.
|
||||
\item {\bf For MDI applications}, don't reply on MDI being run-time-switchable in the way that the
|
||||
MDI sample is. In wxWindows 2.0, MDI functionality is separated into distinct classes.
|
||||
\end{itemize}
|
||||
|
||||
\chapter{The new event system}\label{eventsystem}
|
||||
|
||||
The way that events are handled has been radically changed in wxWindows 2.0. Please
|
||||
read the topic `Event handling overview' in the wxWindows 2.0 manual for background
|
||||
on this.
|
||||
|
||||
\section{Callbacks}
|
||||
|
||||
Instead of callbacks for panel items, menu command events, control commands and other events are directed to
|
||||
the originating window, or an ancestor, or an event handler that has been plugged into the window
|
||||
or its ancestor. Event handlers always have one argument, a derivative of wxEvent.
|
||||
|
||||
For menubar commands, the {\bf OnMenuCommand} member function will be replaced by a series of separate member functions,
|
||||
each of which responds to a particular command. You need to add these (non-virtual) functions to your
|
||||
frame class, add a DECLARE\_EVENT\_TABLE entry to the class, and then add an event table to
|
||||
your implementation file, as a BEGIN\_EVENT\_TABLE and END\_EVENT\_TABLE block. The
|
||||
individual event mapping macros will be of the form:
|
||||
|
||||
\begin{verbatim}
|
||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(MYAPP_NEW, MyFrame::OnNew)
|
||||
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
|
||||
END_EVENT_TABLE()
|
||||
\end{verbatim}
|
||||
|
||||
Control commands, such as button commands, can be routed to a derived button class,
|
||||
the parent window, or even the frame. Here, you use a function of the form EVT\_BUTTON(id, func).
|
||||
Similar macros exist for other control commands.
|
||||
|
||||
\section{Other events}
|
||||
|
||||
To intercept other events, you used to override virtual functions, such as OnSize. Now, while you can use
|
||||
the OnSize name for such event handlers (or any other name of your choice), it has only a single argument
|
||||
(wxSizeEvent) and must again be `mapped' using the EVT\_SIZE macro. The same goes for all other events,
|
||||
including OnClose (although in fact you can still use the old, virtual form of OnClose for the time being).
|
||||
|
||||
\chapter{Class hierarchy}\label{classhierarchy}
|
||||
|
||||
The class hierarchy has changed somewhat. wxToolBar and wxButtonBar
|
||||
classes have been split into several classes, and are derived from wxControl (which was
|
||||
called wxItem). wxPanel derives from wxWindow instead of from wxCanvas, which has
|
||||
disappeared in favour of wxScrolledWindow (since all windows are now effectively canvases
|
||||
which can be drawn into). The status bar has become a class in its own right, wxStatusBar.
|
||||
|
||||
There are new MDI classes so that wxFrame does not have to be overloaded with this
|
||||
functionality.
|
||||
|
||||
There are new device context classes, with wxPanelDC and wxCanvasDC disappearing.
|
||||
See \helpref{Device contexts and painting}{dc}.
|
||||
|
||||
\chapter{GDI objects}\label{gdiobjects}
|
||||
|
||||
These objects - instances of classes such as wxPen, wxBrush, wxBitmap (but not wxColour) -
|
||||
are now implemented with reference-counting. This makes assignment a very cheap operation,
|
||||
and also means that management of the resource is largely automatic. You now pass {\it references} to
|
||||
objects to functions such as wxDC::SetPen. The device context does not store a copy of the pen
|
||||
itself, but takes a copy of it (via reference counting), and the object's data gets freed up
|
||||
when the reference count goes to zero. The application does not have to worry so much about
|
||||
who the object belongs to: it can pass the reference, then destroy the object without
|
||||
leaving a dangling pointer inside the device context.
|
||||
|
||||
For the purposes of code migration, you can use the old style of object management - maintaining
|
||||
pointers to GDI objects, and using the FindOrCreate... functions. However, it is preferable to
|
||||
keep this explicit management to a minimum, instead creating objects on the fly as needed, on the stack,
|
||||
unless this causes too much of an overhead in your application.
|
||||
|
||||
At a minimum, you will have to make sure that calls to SetPen, SetBrush etc. work. Some compilers
|
||||
will do the conversion from pointer to reference automatically (via a constructor in the GDI
|
||||
class) but you cannot rely on this being true for all compilers. Also, where you pass NULL to these
|
||||
functions, you will need to either cast to the appropriate reference type, or instead
|
||||
use an identifier such as wxNullPen or wxNullBrush.
|
||||
|
||||
\chapter{Dialogs and controls}\label{dialogscontrols}
|
||||
|
||||
\wxheading{Labels}
|
||||
|
||||
Most controls no longer have labels and values as they used to in 1.xx. Instead, labels
|
||||
should be created separately using wxStaticText (the new name for wxMessage). This will
|
||||
need some reworking of dialogs, unfortunately; programmatic dialog creation that doesn't
|
||||
use constraints will be especially hard-hit. Perhaps take this opportunity to make more
|
||||
use of dialog resources or constraints. Or consider using the wxPropertyListView class
|
||||
which can do away with dialog layout issues altogether by presenting a list of editable
|
||||
properties.
|
||||
|
||||
\wxheading{Constructors}
|
||||
|
||||
All window constructors have two main changes, apart from the label issue mentioned above.
|
||||
Windows now have integer identifiers; and position and size are now passed as wxPoint and
|
||||
wxSize objects. In addition, some windows have a wxValidator argument. wxWindows 2.0 may provide
|
||||
old-style constructors in WXWIN\_COMPATIBILITY mode for limited backward compatibility.
|
||||
|
||||
\wxheading{Show versus ShowModal}
|
||||
|
||||
If you have used or overridden the {\bf wxDialog::Show} function in the past, you may find
|
||||
that modal dialogs no longer work as expected. This is because the function for modal showing
|
||||
is now {\bf wxDialog:ShowModal}. This is part of a more fundamental change in which a
|
||||
control may tell the dialog that it caused the dismissal of a dialog, by
|
||||
calling {\bf wxDialog::EndModal} or {\bf wxWindow::SetReturnCode}. Using this
|
||||
information, {\bf ShowModal} now returns the id of the control that caused dismissal,
|
||||
giving greater feedback to the application than just TRUE or FALSE.
|
||||
|
||||
If you overrode or called {\bf wxDialog::Show}, use {\bf ShowModal} and test for a returned identifier,
|
||||
commonly wxID\_OK or wxID\_CANCEL.
|
||||
|
||||
\wxheading{wxItem}
|
||||
|
||||
This is renamed wxControl.
|
||||
|
||||
\wxheading{wxText, wxMultiText and wxTextWindow}
|
||||
|
||||
These classes no longer exist and are replaced by the single class wxTextCtrl.
|
||||
Multi-line text items are created using the wxTE\_MULTILINE style.
|
||||
|
||||
\wxheading{wxButton}
|
||||
|
||||
Bitmap buttons are now a separate class, instead of being part of wxBitmap.
|
||||
|
||||
\wxheading{wxMessage}
|
||||
|
||||
Bitmap messages are now a separate class, wxStaticBitmap, and wxMessage
|
||||
is renamed wxStaticText.
|
||||
|
||||
\wxheading{wxGroupBox}
|
||||
|
||||
wxGroupBox is renamed wxStaticBox.
|
||||
|
||||
\wxheading{wxForm}
|
||||
|
||||
Note that wxForm is no longer supported in wxWindows 2.0. Consider using the wxPropertyForm class
|
||||
instead, which takes standard dialogs and panels and associates controls with property objects.
|
||||
You may also find that the new validation method, combined with dialog resources, is easier
|
||||
and more flexible than using wxForm.
|
||||
|
||||
\chapter{Device contexts and painting}\label{dc}
|
||||
|
||||
In wxWindows 2.0, device contexts are used for drawing into, as per 1.xx, but the way
|
||||
they are accessed and constructed is a bit different.
|
||||
|
||||
You no longer use {\bf GetDC} to access device contexts for panels, dialogs and canvases.
|
||||
Instead, you create a temporary device context, which means that any window or control can be drawn
|
||||
into. The sort of device context you create depends on where your code is called from. If
|
||||
painting within an {\bf OnPaint} handler, you create a wxPaintDC. If not within an {\bf OnPaint} handler,
|
||||
you use a wxClientDC or wxWindowDC. You can still parameterise your drawing code so that it
|
||||
doesn't have to worry about what sort of device context to create - it uses the DC it is passed
|
||||
from other parts of the program.
|
||||
|
||||
You {\bf must } create a wxPaintDC if you define an OnPaint handler, even if you do not
|
||||
actually use this device context, or painting will not work correctly under Windows.
|
||||
|
||||
If you used device context functions with wxPoint or wxIntPoint before, please note
|
||||
that wxPoint now contains integer members, and there is a new class wxRealPoint. wxIntPoint
|
||||
no longer exists.
|
||||
|
||||
\chapter{Miscellaneous}
|
||||
|
||||
\section{Strings}
|
||||
|
||||
wxString has replaced char* in the majority of cases. For passing strings into functions,
|
||||
this should not normally require you to change your code if the syntax is otherwise the
|
||||
same. This is because C++ will automatically convert a char* or const char* to a wxString by virtue
|
||||
of appropriate wxString constructors.
|
||||
|
||||
However, when a wxString is returned from a function in wxWindows 2.0 where a char* was
|
||||
returned in wxWindows 1.xx, your application will need to be changed. Usually you can
|
||||
simplify your application's allocation and deallocation of memory for the returned string,
|
||||
and simply assign the result to a wxString object. For example, replace this:
|
||||
|
||||
{\small\begin{verbatim}
|
||||
char* s = wxFunctionThatReturnsString();
|
||||
s = copystring(s); // Take a copy in case it's temporary
|
||||
.... // Do something with it
|
||||
delete[] s;
|
||||
\end{verbatim}
|
||||
}
|
||||
|
||||
with this:
|
||||
|
||||
{\small\begin{verbatim}
|
||||
wxString s = wxFunctionThatReturnsString();
|
||||
.... // Do something with it
|
||||
\end{verbatim}
|
||||
}
|
||||
|
||||
To indicate an empty return value or a problem, a function may return either the
|
||||
empty string (``") or a null string. You can check for a null string with wxString::IsNull().
|
||||
|
||||
\section{Use of const}
|
||||
|
||||
The {\bf const} keyword is now used to denote constant functions that do not affect the
|
||||
object, and for function arguments to denote that the object passed cannot be changed.
|
||||
|
||||
This should not affect your application except for where you are overriding virtual functions
|
||||
which now have a different signature. If functions are not being called which were previously,
|
||||
check whether there is a parameter mismatch (or function type mismatch) involving consts.
|
||||
|
||||
Try to use the {\bf const} keyword in your own code where possible.
|
||||
|
||||
\chapter{Backward compatibility}\label{compat}
|
||||
|
||||
Some wxWindows 1.xx functionality has been left to ease the transition to 2.0. This functionality
|
||||
(usually) only works if you compile with WXWIN\_COMPATIBILITY set to 1.
|
||||
|
||||
TODO
|
||||
|
||||
OnMenuCommand, OnSize, OnActivate, OnPaint, others?? can all be prefixed with Old (e.g. OldOnMenuCommand)
|
||||
and will work as before. You are encouraged to convert your code to the new forms, but
|
||||
this will allow you to get your applications up and running a little more quickly.
|
||||
|
||||
OnClose can be used as-is without an 'Old' prefix, but officially the OnCloseWindow event table handler should be
|
||||
used instead.
|
||||
|
||||
\chapter{Quick reference}\label{quickreference}
|
||||
|
||||
This section allows you to quickly find features that
|
||||
need to be converted.
|
||||
|
||||
TODO
|
||||
|
||||
\section{OnActivate}
|
||||
|
||||
Rename to OldOnActivate, or replace arguments with one wxActivateEvent\& argument.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Backward compatibility}{compat}
|
||||
|
||||
\section{OnClose}
|
||||
|
||||
This can either remain the same as before, or you can add an OnCloseWindow event
|
||||
handler using an EVT\_CLOSE event table entry.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Backward compatibility}{compat}
|
||||
|
||||
\section{OnMenuCommand}
|
||||
|
||||
Rename to OldOnMenuCommand, or replace with a series of functions, one for
|
||||
each case of your old switch statement. Create an event table for your frame
|
||||
containing EVT\_MENU macros, and insert DECLARE\_EVENT\_TABLE() in your frame class.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Backward compatibility}{compat}
|
||||
|
||||
\section{OnSize}
|
||||
|
||||
Rename to OldOnSize, or replace arguments with one wxSizeEvent\& argument.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Backward compatibility}{compat}
|
||||
|
||||
\section{wxDialog::Show}
|
||||
|
||||
If you used {\bf Show} to show a modal dialog, or to override the standard
|
||||
modal dialog {\bf Show}, use {\bf ShowModal} instead.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Dialogs and controls}{dialogscontrols}
|
||||
|
||||
\end{document}
|
28
docs/latex/porting/tex2rtf.ini
Normal file
@ -0,0 +1,28 @@
|
||||
;;; Tex2RTF initialisation file for 16-bit Winhelp
|
||||
runTwice = yes
|
||||
titleFontSize = 12
|
||||
authorFontSize = 10
|
||||
authorFontSize = 10
|
||||
chapterFontSize = 12
|
||||
sectionFontSize = 12
|
||||
subsectionFontSize = 12
|
||||
contentsDepth = 2
|
||||
headerRule = yes
|
||||
footerRule = yes
|
||||
useHeadingStyles = yes
|
||||
listItemIndent=40
|
||||
generateHPJ = yes
|
||||
htmlBrowseButtons = bitmap
|
||||
winHelpContents = yes
|
||||
winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
|
||||
winHelpTitle = "wxWindows Porting Guide"
|
||||
truncateFilenames = yes
|
||||
combineSubSections = yes
|
||||
\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}}
|
||||
\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
|
||||
\sethotspotcolour{on}\sethotspotunderline{on}}
|
||||
\docparam [2]{\parskip{0}{\it #1}\par\parskip{10}\indented{1cm}{#2}}
|
||||
\wxheading [1]{{\bf \fcol{blue}{#1}}}
|
||||
\const [0] {{\bf const}}
|
||||
\constfunc [3] {{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
|
||||
|
289
docs/latex/porting/texhelp.sty
Normal file
@ -0,0 +1,289 @@
|
||||
% LaTeX style file
|
||||
% Name: texhelp.sty
|
||||
% Author: Julian Smart
|
||||
%
|
||||
% Purpose
|
||||
% -------
|
||||
% Style file to enable the simultaneous preparation of printed LaTeX and on-line
|
||||
% hypertext manuals.
|
||||
% Use in conjunction with Tex2RTF (see Tex2RTF documentation).
|
||||
%
|
||||
% Note that if a non-ASCII character starts a newline and there should be a space
|
||||
% between the last word on the previous line and the first word on this line,
|
||||
% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
|
||||
% in all other formats.
|
||||
%
|
||||
% Julian Smart
|
||||
% Artificial Intelligence Applications Institute
|
||||
%
|
||||
%
|
||||
% ============== C++/CLIPS Documentation Facilities ==============
|
||||
%
|
||||
% Each class definition should be typeset with e.g.
|
||||
%
|
||||
% \section{\class{Name}: Parent}
|
||||
%
|
||||
% followed by a description of the class.
|
||||
% Each member should follow:
|
||||
%
|
||||
% \membersection{wxName::Member}
|
||||
%
|
||||
% with a description of what this member does.
|
||||
% Then, one (or more if overloaded) member (function) in detail:
|
||||
%
|
||||
% \func{return type}{name}{args}
|
||||
% or
|
||||
% \member{type}{name}
|
||||
%
|
||||
% where args is a list of \param{type}{name}, ...
|
||||
|
||||
% Function, e.g.
|
||||
% e.g. to typeset
|
||||
%
|
||||
% void DoIt(char *string);
|
||||
%
|
||||
% write:
|
||||
%
|
||||
% \func{void}{DoIt}{\param{char *}{string}}
|
||||
%
|
||||
|
||||
\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\it #1} {\bf #2}\index{#2}}(#3)}
|
||||
|
||||
% For function/type definition where the name is a pointer,
|
||||
% e.g. to typeset
|
||||
%
|
||||
% typedef void (*wxFunction)(wxObject&)
|
||||
%
|
||||
% write:
|
||||
%
|
||||
% \pfunc{typedef void}{wxFunction}{param{wxObject&}}
|
||||
|
||||
\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\it #1} ({\bf *#2})\index{#2}}(#3)}
|
||||
|
||||
% Use an ordinary \section command for class name definitions.
|
||||
|
||||
% This is used for a member, such as wxBitmap: GetDepth
|
||||
\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
|
||||
|
||||
% CLIPS function
|
||||
\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
|
||||
{{\bf #1} ({\bf #2}\index{#2}}#3)}
|
||||
|
||||
\newcommand{\clipssection}[1]{\chapter{#1}}
|
||||
|
||||
% This is used for a CLIPS function name
|
||||
\newcommand{\functionsection}[1]{\subsection*{#1}}
|
||||
|
||||
% Member: a type and a name
|
||||
\newcommand{\member}[2]{{\bf #1 \it #2}}
|
||||
|
||||
% C++ Parameter: a type and a name (no intervening space)
|
||||
\newcommand{\param}[2]{{\it #1}{\bf #2}}
|
||||
|
||||
% CLIPS Parameter: a type and a name (one intervening space)
|
||||
\newcommand{\cparam}[2]{{\bf #1} {\it #2}}
|
||||
|
||||
% Class: puts in index
|
||||
\newcommand{\class}[1]{#1\index{#1}}
|
||||
|
||||
% Void type
|
||||
\newcommand{\void}{{\it void}}
|
||||
|
||||
% Typeset destructor
|
||||
\newcommand{\destruct}[1]{{$\sim$}#1}
|
||||
|
||||
% Typeset insert/extract operators
|
||||
\newcommand{\cinsert}{$<<$}
|
||||
\newcommand{\cextract}{$>>$}
|
||||
|
||||
|
||||
% =================== Hypertext facilities ===================
|
||||
%
|
||||
% To insert hyperlinks (or references, in Latex), \label the sections
|
||||
% or membersections \label{ref-label} immediately after the section, on the same line,
|
||||
% and use \helpref{text-to-show}{ref-label} to make a reference.
|
||||
%
|
||||
|
||||
% Type text with section reference
|
||||
\newcommand{\helpref}[2]{{\it #1} (p.\ \pageref{#2}) }
|
||||
|
||||
% Type text with URL in verbatim mode
|
||||
\newcommand{\urlref}[2]{#1 (\verb$#2$)}
|
||||
|
||||
% Don't typeset section number in LaTeX
|
||||
\newcommand{\helprefn}[2]{{\it #1}}
|
||||
|
||||
% Like helpref, but popup text in WinHelp instead of hyperlinked
|
||||
\newcommand{\popref}[2]{{\it #1}}
|
||||
|
||||
% Like footnote, but popup text.
|
||||
\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
|
||||
|
||||
% =================== On-line help specific macros ===================
|
||||
%
|
||||
|
||||
% Global document font size/family, help only.
|
||||
\newcommand{\helpfontsize}[1]{}
|
||||
\newcommand{\helpfontfamily}[1]{}
|
||||
|
||||
% Ignore in all on-line help
|
||||
\newcommand{\helpignore}[1]{#1}
|
||||
% Only print in all on-line help
|
||||
\newcommand{\helponly}[1]{}
|
||||
|
||||
% Ignore in LaTeX
|
||||
\newcommand{\latexignore}[1]{}
|
||||
% Only print in LaTeX
|
||||
\newcommand{\latexonly}[1]{#1}
|
||||
|
||||
% Ignore in linear RTF
|
||||
\newcommand{\rtfignore}[1]{#1}
|
||||
% Only print in linear RTF
|
||||
\newcommand{\rtfonly}[1]{}
|
||||
|
||||
% Ignore in WinHelp RTF
|
||||
\newcommand{\winhelpignore}[1]{#1}
|
||||
% Only print in WinHelp RTF
|
||||
\newcommand{\winhelponly}[1]{}
|
||||
|
||||
% Ignore in wxHelp
|
||||
\newcommand{\xlpignore}[1]{#1}
|
||||
% Only print in wxHelp
|
||||
\newcommand{\xlponly}[1]{}
|
||||
|
||||
% Ignore in HTML
|
||||
\newcommand{\htmlignore}[1]{#1}
|
||||
% Only print in HTML
|
||||
\newcommand{\htmlonly}[1]{}
|
||||
|
||||
% Input a file only for help system (binder thickness is not a limitation
|
||||
% in help systems!)
|
||||
\newcommand{\helpinput}[1]{}
|
||||
|
||||
\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
|
||||
|
||||
% =================== Miscellaneous macros ===================
|
||||
%
|
||||
% Headings consistent with generated ones
|
||||
\newcommand{\myheading}[1]{\vspace*{25pt}
|
||||
\begin{flushleft}
|
||||
{\LARGE \bf #1}
|
||||
\end{flushleft}
|
||||
\vskip 20pt
|
||||
}
|
||||
|
||||
% Heading with entry in contents page.
|
||||
\newcommand{\chapterheading}[1]{\myheading{#1}
|
||||
\addcontentsline{toc}{chapter}{#1}}
|
||||
|
||||
\newcommand{\sectionheading}[1]{\myheading{#1}
|
||||
\addcontentsline{toc}{section}{#1}}
|
||||
|
||||
% Glossary environment
|
||||
\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
|
||||
|
||||
% Glossary entry
|
||||
\newcommand{\gloss}[1]{\item[#1]\index{#1}}
|
||||
|
||||
% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
|
||||
\newcommand{\image}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Image, left aligned (HTML)
|
||||
\newcommand{\imager}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Image, right aligned (HTML)
|
||||
\newcommand{\imagel}[2]{\psboxto(#1){#2}}
|
||||
|
||||
% Imagemap: principally for HTML only. In Latex,
|
||||
% acts like \image.
|
||||
\newcommand{\imagemap}[3]{\psboxto(#1){#2}}
|
||||
|
||||
% Headers and footers
|
||||
% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
|
||||
% {OddPageLeft}{OddPageCentre}{OddPageRight}
|
||||
\newcommand{\setheader}[6]{
|
||||
\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
|
||||
\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
|
||||
\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
|
||||
}
|
||||
|
||||
% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
|
||||
% {OddPageLeft}{OddPageCentre}{OddPageRight}
|
||||
\newcommand{\setfooter}[6]{
|
||||
\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
|
||||
\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
|
||||
\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
|
||||
}
|
||||
|
||||
% Needed for telling RTF where margin paragraph should go
|
||||
% in mirrored margins mode.
|
||||
\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
|
||||
\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
|
||||
|
||||
% Environment for two-column table popular in WinHelp and manuals.
|
||||
\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
|
||||
\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
|
||||
\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
|
||||
|
||||
\twocolwidtha{3cm}
|
||||
\twocolwidthb{8.5cm}
|
||||
\twocolspacing{2}
|
||||
|
||||
\newcommand{\twocolitem}[2]{#1 & #2\\}
|
||||
\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
|
||||
|
||||
\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
|
||||
{\end{tabular}\renewcommand{\arraystretch}{1}}
|
||||
|
||||
% Specifying table rows for RTF compatibility
|
||||
\newcommand{\row}[1]{#1\\}
|
||||
|
||||
% Use for the last ruled row for correct RTF generation.
|
||||
\newcommand{\ruledrow}[1]{#1\\\hline}
|
||||
|
||||
% Indentation environment. Arg1 is left margin size
|
||||
\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
|
||||
{\end{list}}
|
||||
|
||||
% Framed box of text, normal formatting.
|
||||
\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
|
||||
% Double-framed box of text.
|
||||
\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
|
||||
|
||||
% WITHDRAWN -- can't do in RTF, easily.
|
||||
% Framed box of text, horizontally centred. Ragged right within box.
|
||||
% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
|
||||
% Double-framed box of text, horizontally centred. Ragged right within box.
|
||||
% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
|
||||
|
||||
% toocomplex environment: simply prints the argument in LaTeX,
|
||||
% comes out verbatim in all generated formats.
|
||||
\newenvironment{toocomplex}{}{}
|
||||
|
||||
% Colour: dummy commands since LaTeX doesn't support colour.
|
||||
% \definecolour{name}{red}{blue}{green}
|
||||
% \fcol{name}{text} ; Foreground
|
||||
% \bcol{name}{text} ; Background
|
||||
\newcommand{\definecolour}[4]{}
|
||||
\newcommand{\definecolor}[4]{}
|
||||
\newcommand{\fcol}[2]{#2}
|
||||
\newcommand{\bcol}[2]{#2}
|
||||
\newcommand{\sethotspotcolour}[1]{}
|
||||
\newcommand{\sethotspotunderline}[1]{}
|
||||
\newcommand{\settransparency}[1]{}
|
||||
\newcommand{\backslashraw}[0]{}
|
||||
\newcommand{\lbraceraw}[0]{}
|
||||
\newcommand{\rbraceraw}[0]{}
|
||||
\newcommand{\registered}[0]{(r)}
|
||||
\newcommand{\background}[1]{}
|
||||
\newcommand{\textcolour}[1]{}
|
||||
\newcommand{\overview}[2]{See \helpref{#1}{#2}.}
|
||||
\newcommand{\docparam}[2]{{\it #1}\begin{list}{}{\leftmargin=1cm}\item[]
|
||||
#2%
|
||||
\end{list}}
|
||||
\newcommand{\wxheading}[1]{{\bf #1}}
|
||||
\newcommand{\const}[0]{{\bf const}}
|
||||
\newcommand{\constfunc}[3]{{\bf #1} {\bf #2}(#3) {\bf const}\index{#2}}
|
||||
|
BIN
docs/latex/porting/up.gif
Normal file
After Width: | Height: | Size: 137 B |
56
docs/latex/wx/activevt.tex
Normal file
@ -0,0 +1,56 @@
|
||||
\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{Event table macros}
|
||||
|
||||
To process an activate event, use these event handler macros to direct input to a member
|
||||
function that takes a wxActivateEvent argument.
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_ACTIVATE(func)}}{Process a wxEVT\_ACTIVATE event.}
|
||||
\twocolitem{{\bf EVT\_ACTIVATE\_APP(func)}}{Process a wxEVT\_ACTIVATE\_APP event.}
|
||||
\end{twocollist}%
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
A top-level window (a dialog or frame) receives an activate event when is
|
||||
being activated or deactivated. This is indicated visually by the title
|
||||
bar changing colour, and a subwindow gaining the keyboard focus.
|
||||
|
||||
An application is activated or deactivated when one of its frames becomes activated,
|
||||
or a frame becomes inactivate resulting in all application frames being inactive. (Windows only)
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::OnActivate}{wxwindowonactivate},\rtfsp
|
||||
\helpref{wxApp::OnActivate}{wxapponactivate},\rtfsp
|
||||
\helpref{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxActivateEvent::wxActivateEvent}
|
||||
|
||||
\func{}{wxActivateEvent}{\param{WXTYPE }{eventType = 0}, \param{int }{id = 0}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxActivateEvent::m\_active}
|
||||
|
||||
\member{bool}{m\_active}
|
||||
|
||||
TRUE if the window or application was activated.
|
||||
|
||||
\membersection{wxActivateEvent::GetActive}\label{wxactivateeventgetactive}
|
||||
|
||||
\constfunc{bool}{GetActive}{\void}
|
||||
|
||||
Returns TRUE if the application or window is being activated, FALSE otherwise.
|
||||
|
395
docs/latex/wx/app.tex
Normal file
@ -0,0 +1,395 @@
|
||||
\section{\class{wxApp}}\label{wxapp}
|
||||
|
||||
The {\bf wxApp} class represents the application itself. It is used
|
||||
to:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item set and get application-wide properties;
|
||||
\item implement the windowing system message or event loop;
|
||||
\item initiate application processing via \helpref{wxApp::OnInit}{wxapponinit};
|
||||
\item allow default processing of events not handled by other
|
||||
objects in the application.
|
||||
\end{itemize}
|
||||
|
||||
You should use the macro IMPLEMENT\_APP(appClass) in your application implementation
|
||||
file to tell wxWindows how to create an instance of your application class.
|
||||
|
||||
Use DECLARE\_APP(appClass) in a header file if you want the wxGetApp function (which returns
|
||||
a reference to your application object) to be visible to other files.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp overview}{wxappoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxApp::wxApp}
|
||||
|
||||
\func{void}{wxApp}{\param{int}{ language = wxLANGUAGE\_ENGLISH}}
|
||||
|
||||
Constructor. Called implicitly with a definition of a wxApp object.
|
||||
|
||||
The argument is a language identifier; this is an experimental
|
||||
feature and will be expanded and documented in future versions.
|
||||
|
||||
TODO: completely rewrite the language stuff.
|
||||
|
||||
\membersection{wxApp::\destruct{wxApp}}
|
||||
|
||||
\func{void}{\destruct{wxApp}}{\void}
|
||||
|
||||
Destructor. Will be called implicitly on program exit if the wxApp
|
||||
object is created on the stack.
|
||||
|
||||
\membersection{wxApp::argc}\label{wxappargc}
|
||||
|
||||
\member{int}{argc}
|
||||
|
||||
Number of command line arguments (after environment-specific processing).
|
||||
|
||||
\membersection{wxApp::argv}\label{wxappargv}
|
||||
|
||||
\member{char **}{argv}
|
||||
|
||||
Command line arguments (after environment-specific processing).
|
||||
|
||||
\membersection{wxApp::CreateLogTarget}\label{wxappcreatelogtarget}
|
||||
|
||||
\func{virtual wxLog*}{CreateLogTarget}{\void}
|
||||
|
||||
Creates a wxLog class for the application to use for logging errors. The default
|
||||
implementation returns a new wxLogGui class.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxLog}{wxlog}
|
||||
|
||||
\membersection{wxApp::Dispatch}\label{wxappdispatch}
|
||||
|
||||
\func{void}{Dispatch}{\void}
|
||||
|
||||
Dispatches the next event in the windowing system event queue.
|
||||
|
||||
This can be used for programming event loops, e.g.
|
||||
|
||||
\begin{verbatim}
|
||||
while (app.Pending())
|
||||
Dispatch();
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::Pending}{wxapppending}
|
||||
|
||||
\membersection{wxApp::GetAppName}\label{wxappgetappname}
|
||||
|
||||
\constfunc{wxString}{GetAppName}{\void}
|
||||
|
||||
Returns the application name.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
wxWindows sets this to a reasonable default before
|
||||
calling \helpref{wxApp::OnInit}{wxapponinit}, but the application can reset it at will.
|
||||
|
||||
\membersection{wxApp::GetAuto3D}\label{wxappgetauto3d}
|
||||
|
||||
\constfunc{bool}{GetAuto3D}{\void}
|
||||
|
||||
Returns TRUE if 3D control mode is on, FALSE otherwise.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::SetAuto3D}{wxappsetauto3d}
|
||||
|
||||
\membersection{wxApp::GetClassName}\label{wxappgetclassname}
|
||||
|
||||
\constfunc{wxString}{GetClassName}{\void}
|
||||
|
||||
Gets the class name of the application. The class name may be used in a platform specific
|
||||
manner to refer to the application.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::SetClassName}{wxappsetclassname}
|
||||
|
||||
\membersection{wxApp::GetExitOnDelete}\label{wxappgetexitondelete}
|
||||
|
||||
\constfunc{bool}{GetExitOnDelete}{\void}
|
||||
|
||||
Returns TRUE if the application will exit when the top-level window is deleted, FALSE
|
||||
otherwise.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::SetExitOnDelete}{wxappsetexitondelete}
|
||||
|
||||
\membersection{wxApp::GetPrintMode}\label{wxappgetprintmode}
|
||||
|
||||
\constfunc{bool}{GetPrintMode}{\void}
|
||||
|
||||
Returns the print mode: see \helpref{wxApp::SetPrintMode}{wxappsetprintmode}.
|
||||
|
||||
\membersection{wxApp::GetTopWindow}\label{wxappgettopwindow}
|
||||
|
||||
\constfunc{wxWindow *}{GetTopWindow}{\void}
|
||||
|
||||
Returns a pointer to the top window.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::SetTopWindow}{wxappsettopwindow}
|
||||
|
||||
\membersection{wxApp::ExitMainLoop}\label{wxappexitmainloop}
|
||||
|
||||
\func{void}{ExitMainLoop}{\void}
|
||||
|
||||
Call this to explicitly exit the main message (event) loop.
|
||||
You should normally exit the main loop (and the application) by deleting
|
||||
the top window.
|
||||
|
||||
\membersection{wxApp::Initialized}\label{wxappinitialized}
|
||||
|
||||
\func{bool}{Initialized}{\void}
|
||||
|
||||
Returns TRUE if the application has been initialized (i.e. if\rtfsp
|
||||
\helpref{wxApp::OnInit}{wxapponinit} has returned successfully). This can be useful for error
|
||||
message routines to determine which method of output is best for the
|
||||
current state of the program (some windowing systems may not like
|
||||
dialogs to pop up before the main loop has been entered).
|
||||
|
||||
\membersection{wxApp::MainLoop}\label{wxappmainloop}
|
||||
|
||||
\func{int}{MainLoop}{\void}
|
||||
|
||||
Called by wxWindows on creation of the application. Override this if you wish
|
||||
to provide your own (environment-dependent) main loop.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns 0 under X, and the wParam of the WM\_QUIT message under Windows.
|
||||
|
||||
\membersection{wxApp::OnActivate}\label{wxapponactivate}
|
||||
|
||||
\func{void}{OnActivate}{\param{wxActivateEvent\& }{event}}
|
||||
|
||||
Provide this member function to know whether the application is being
|
||||
activated or deactivated (Windows only).
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::OnActivate}{wxwindowonactivate}, \helpref{wxActivateEvent}{wxactivateevent}
|
||||
|
||||
\membersection{wxApp::OnExit}\label{wxapponexit}
|
||||
|
||||
\func{int}{OnExit}{\void}
|
||||
|
||||
Provide this member function for any processing which needs to be done as
|
||||
the application is about to exit.
|
||||
|
||||
\membersection{wxApp::OnCharHook}\label{wxapponcharhook}
|
||||
|
||||
\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}}
|
||||
|
||||
This event handler function is called (under Windows only) to allow the window to intercept keyboard events
|
||||
before they are processed by child windows.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{event}{The keypress event.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Use the wxEVT\_CHAR\_HOOK macro in your event table.
|
||||
|
||||
If you use this member, you can selectively consume keypress events by calling\rtfsp
|
||||
\helpref{wxEvent::Skip}{wxeventskip} for characters the application is not interested in.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnChar}{wxwindowonchar},\rtfsp
|
||||
\helpref{wxWindow::OnCharHook}{wxwindowoncharhook}, \helpref{wxDialog::OnCharHook}{wxdialogoncharhook}
|
||||
|
||||
\membersection{wxApp::OnIdle}\label{wxapponidle}
|
||||
|
||||
\func{void}{OnIdle}{\param{wxIdleEvent\& }{event}}
|
||||
|
||||
Override this member function for any processing which needs to be done
|
||||
when the application is idle. You should call wxApp::OnIdle from your own function,
|
||||
since this forwards OnIdle events to windows and also performs garbage collection for
|
||||
windows whose destruction has been delayed.
|
||||
|
||||
wxWindows' strategy for OnIdle processing is as follows. After pending user interface events for an
|
||||
application have all been processed, wxWindows sends an OnIdle event to the application object. wxApp::OnIdle itself
|
||||
sends an OnIdle event to each application window, allowing windows to do idle processing such as updating
|
||||
their appearance. If either wxApp::OnIdle or a window OnIdle function requested more time, by
|
||||
caling \helpref{wxIdleEvent::ReqestMore}{wxidleeventrequestmore}, wxWindows will send another OnIdle
|
||||
event to the application event. 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::OnInit}\label{wxapponinit}
|
||||
|
||||
\func{bool}{OnInit}{\void}
|
||||
|
||||
This must be provided by the application, and will usually create the
|
||||
application's main window, calling \helpref{wxApp::SetTopWindow}{wxappsettopwindow}.
|
||||
|
||||
Return TRUE to continue processing, FALSE to exit the application.
|
||||
|
||||
\membersection{wxApp::Pending}\label{wxapppending}
|
||||
|
||||
\func{bool}{Pending}{\void}
|
||||
|
||||
Returns TRUE if unprocessed events are in the window system event queue
|
||||
(MS Windows and Motif).
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::Dispatch}{wxappdispatch}
|
||||
|
||||
\membersection{wxApp::ProcessMessage}\label{wxappprocessmessage}
|
||||
|
||||
\func{bool}{ProcessMessage}{\param{MSG *}{msg}}
|
||||
|
||||
Windows-only function for processing a message. This function
|
||||
is called from the main message loop, checking for windows that
|
||||
may wish to process it. The function returns TRUE if the message
|
||||
was processed, FALSE otherwise. If you use wxWindows with another class
|
||||
library with its own message loop, you should make sure that this
|
||||
function is called to allow wxWindows to receive messages. For example,
|
||||
to allow co-existance with the Microsoft Foundation Classes, override
|
||||
the PreTranslateMessage function:
|
||||
|
||||
\begin{verbatim}
|
||||
// Provide wxWindows message loop compatibility
|
||||
BOOL CTheApp::PreTranslateMessage(MSG *msg)
|
||||
{
|
||||
if (wxTheApp && wxTheApp->ProcessMessage(msg))
|
||||
return TRUE;
|
||||
else
|
||||
return CWinApp::PreTranslateMessage(msg);
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxApp::SendIdleEvents}\label{wxappsendidleevents}
|
||||
|
||||
\func{bool}{SendIdleEvents}{\void}
|
||||
|
||||
Sends idle events to all top-level windows.
|
||||
|
||||
\func{bool}{SendIdleEvents}{\param{wxWindow*}{ win}}
|
||||
|
||||
Sends idle events to a window and its children.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
These functions poll the top-level windows, and their children, for idle event processing.
|
||||
If TRUE is returned, more OnIdle processing is requested by one or more window.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::OnIdle}{wxapponidle}, \helpref{wxWindow::OnIdle}{wxwindowonidle}, \helpref{wxIdleEvent}{wxidleevent}
|
||||
|
||||
\membersection{wxApp::SetAppName}\label{wxappsetappname}
|
||||
|
||||
\func{void}{SetAppName}{\param{const wxString\& }{name}}
|
||||
|
||||
Sets the name of the application. The name may be used in dialogs
|
||||
(for example by the document/view framework). A default name is set by
|
||||
wxWindows.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::GetAppName}{wxappgetappname}
|
||||
|
||||
\membersection{wxApp::SetAuto3D}\label{wxappsetauto3d}
|
||||
|
||||
\func{void}{SetAuto3D}{\param{const bool}{ auto3D}}
|
||||
|
||||
Switches automatic 3D controls on or off.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{auto3D}{If TRUE, all controls will be created with 3D appearances unless
|
||||
overridden for a control or dialog. The default is TRUE}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This has an effect on Windows only.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::GetAuto3D}{wxappgetauto3d}
|
||||
|
||||
\membersection{wxApp::SetClassName}\label{wxappsetclassname}
|
||||
|
||||
\func{void}{SetClassName}{\param{const wxString\& }{name}}
|
||||
|
||||
Sets the class name of the application. This may be used in a platform specific
|
||||
manner to refer to the application.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::GetClassName}{wxappgetclassname}
|
||||
|
||||
\membersection{wxApp::SetExitOnDelete}\label{wxappsetexitondelete}
|
||||
|
||||
\func{void}{SetExitOnDelete}{\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{Remarks}
|
||||
|
||||
Currently, setting this to FALSE only has an effect under Windows.
|
||||
|
||||
\membersection{wxApp::SetPrintMode}\label{wxappsetprintmode}
|
||||
|
||||
\func{void}{SetPrintMode}{\param{int}{ mode}}
|
||||
|
||||
Sets the print mode determining what printing facilities will be
|
||||
used by the printing framework.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{mode}{This can be one of:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxPRINT\_WINDOWS}}{Under Windows, use Windows printing (wxPrinterDC). This is the
|
||||
default under Windows.}
|
||||
\twocolitem{{\bf wxPRINT\_POSTSCRIPT}}{Use PostScript printing (wxPostScriptDC). This is the
|
||||
default for non-Windows platforms.}
|
||||
\end{twocollist}
|
||||
}%
|
||||
|
||||
\membersection{wxApp::SetTopWindow}\label{wxappsettopwindow}
|
||||
|
||||
\func{void}{SetTopWindow}{\param{wxWindow* }{window}}
|
||||
|
||||
Sets the `top' window. You should normally call this from within \helpref{wxApp::OnInit}{wxapponinit} to
|
||||
let wxWindows know which is the main window.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{window}{The new top window.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::GetTopWindow}{wxappgettopwindow}, \helpref{wxApp::OnInit}{wxapponinit}
|
||||
|
BIN
docs/latex/wx/back.gif
Normal file
After Width: | Height: | Size: 225 B |
223
docs/latex/wx/bbutton.tex
Normal file
@ -0,0 +1,223 @@
|
||||
\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{Remarks}
|
||||
|
||||
A bitmap button can be supplied with a single bitmap, and wxWindows will draw
|
||||
all button states using this bitmap. If the application needs more control, additional bitmaps for
|
||||
the selected state, unpressed focussed state, and greyed-out state may be supplied.
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxBU\_AUTODRAW}}{If
|
||||
this is specified, the button will be drawn automatically using the label bitmap only, providing
|
||||
a 3D-look border. If this style is not specified, the button will be drawn without borders and using all
|
||||
provided bitmaps.}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxButton}{wxbutton}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxBitmapButton::wxBitmapButton}\label{wxbitmapbuttonconstr}
|
||||
|
||||
\func{}{wxBitmapButton}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxBitmapButton}{\param{wxWindow* }{parent}, \param{const wxWindowID}{ id}, \param{const wxBitmap\& }{bitmap},\rtfsp
|
||||
\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
||||
\param{const long}{ style = wxBU\_AUTODRAW}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}}
|
||||
|
||||
Constructor, creating and showing a button.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{Parent window. Must not be NULL.}
|
||||
|
||||
\docparam{id}{Button identifier. A value of -1 indicates a default value.}
|
||||
|
||||
\docparam{bitmap}{Bitmap to be displayed.}
|
||||
|
||||
\docparam{pos}{Button position.}
|
||||
|
||||
\docparam{size}{Button size. If the default size (-1, -1) is specified then the button is sized
|
||||
appropriately for the bitmap.}
|
||||
|
||||
\docparam{style}{Window style. See \helpref{wxBitmapButton}{wxbitmapbutton}.}
|
||||
|
||||
\docparam{validator}{Window validator.}
|
||||
|
||||
\docparam{name}{Window name.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The {\it bitmap} parameter is normally the only bitmap you need to provide, and wxWindows will
|
||||
draw the button correctly in its different states. If you want more control, call
|
||||
any of the functions \helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled}.
|
||||
|
||||
Note that the bitmap passed is smaller than the actual button created.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapButton::Create}{wxbitmapbuttoncreate}, \helpref{wxValidator}{wxvalidator}
|
||||
|
||||
\membersection{wxBitmapButton::\destruct{wxBitmapButton}}
|
||||
|
||||
\func{}{\destruct{wxBitmapButton}}{\void}
|
||||
|
||||
Destructor, destroying the button.
|
||||
|
||||
\membersection{wxBitmapButton::Create}\label{wxbitmapbuttoncreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID}{ id}, \param{const wxBitmap\& }{bitmap},\rtfsp
|
||||
\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
||||
\param{const long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}}
|
||||
|
||||
Button creation function for two-step creation. For more details, see \helpref{wxBitmapButton::wxBitmapButton}{wxbitmapbuttonconstr}.
|
||||
|
||||
\membersection{wxBitmapButton::GetBitmapDisabled}\label{wxbitmapbuttongetbitmapdisabled}
|
||||
|
||||
\constfunc{wxBitmap\&}{GetBitmapLabel}{\void}
|
||||
|
||||
Returns the bitmap for the disabled state.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
A reference to the disabled state bitmap.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled}
|
||||
|
||||
\membersection{wxBitmapButton::GetBitmapFocus}\label{wxbitmapbuttongetbitmapfocus}
|
||||
|
||||
\constfunc{wxBitmap\&}{GetBitmapFocus}{\void}
|
||||
|
||||
Returns the bitmap for the focussed state.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
A reference to the focussed state bitmap.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus}
|
||||
|
||||
\membersection{wxBitmapButton::GetBitmapLabel}\label{wxbitmapbuttongetbitmaplabel}
|
||||
|
||||
\constfunc{wxBitmap\&}{GetBitmapLabel}{\void}
|
||||
|
||||
Returns the label bitmap (the one passed to the constructor).
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
A reference to the button's label bitmap.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel}
|
||||
|
||||
\membersection{wxBitmapButton::GetBitmapSelected}\label{wxbitmapbuttongetbitmapselected}
|
||||
|
||||
\constfunc{wxBitmap\&}{GetBitmapSelected}{\void}
|
||||
|
||||
Returns the bitmap for the selected state.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
A reference to the selected state bitmap.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected}
|
||||
|
||||
\membersection{wxBitmapButton::SetBitmapDisabled}\label{wxbitmapbuttonsetbitmapdisabled}
|
||||
|
||||
\func{void}{SetBitmapDisabled}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Sets the bitmap for the disabled button appearance.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{The bitmap to set.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapButton::GetBitmapDisabled}{wxbitmapbuttongetbitmapdisabled},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus}
|
||||
|
||||
\membersection{wxBitmapButton::SetBitmapFocus}\label{wxbitmapbuttonsetbitmapfocus}
|
||||
|
||||
\func{void}{SetBitmapFocus}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Sets the bitmap for the button appearance when it has the keyboard focus.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{The bitmap to set.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapButton::GetBitmapFocus}{wxbitmapbuttongetbitmapfocus},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapSelected}{wxbitmapbuttonsetbitmapselected},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled}
|
||||
|
||||
\membersection{wxBitmapButton::SetBitmapLabel}\label{wxbitmapbuttonsetbitmaplabel}
|
||||
|
||||
\func{void}{SetBitmapLabel}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Sets the bitmap label for the button.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{The bitmap label to set.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This is the bitmap used for the unselected state, and for all other states
|
||||
if no other bitmaps are provided.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapButton::GetBitmapLabel}{wxbitmapbuttongetbitmaplabel}
|
||||
|
||||
\membersection{wxBitmapButton::SetBitmapSelected}\label{wxbitmapbuttonsetbitmapselected}
|
||||
|
||||
\func{void}{SetBitmapSelected}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Sets the bitmap for the selected (depressed) button appearance.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{The bitmap to set.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapButton::GetBitmapSelected}{wxbitmapbuttongetbitmapselected},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapLabel}{wxbitmapbuttonsetbitmaplabel},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapFocus}{wxbitmapbuttonsetbitmapfocus},\rtfsp
|
||||
\helpref{wxBitmapButton::SetBitmapDisabled}{wxbitmapbuttonsetbitmapdisabled}
|
||||
|
683
docs/latex/wx/bitmap.tex
Normal file
@ -0,0 +1,683 @@
|
||||
\section{\class{wxBitmap}}\label{wxbitmap}
|
||||
|
||||
%\overview{Overview}{wxbitmapoverview}
|
||||
%
|
||||
This class encapsulates the concept of a platform-dependent bitmap,
|
||||
either monochrome or colour.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxGDIObject}{wxgdiobject}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap overview}{wxbitmapoverview}, \helpref{wxDC::Blit}{wxdcblit}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}, \helpref{wxMemoryDC}{wxmemorydc}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxBitmap::wxBitmap}\label{wxbitmapconstr}
|
||||
|
||||
\func{}{wxBitmap}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxBitmap}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
\func{}{wxBitmap}{\param{const wxBitmap* }{bitmap}}
|
||||
|
||||
Copy constructors.
|
||||
|
||||
\func{}{wxBitmap}{\param{void*}{ data}, \param{const int}{ type}, \param{const int}{ width}, \param{const int}{ height}, \param{const int}{ depth = -1}}
|
||||
|
||||
Creates a bitmap from the given data, which can be of arbitrary type.
|
||||
|
||||
\func{}{wxBitmap}{\param{const char}{ bits[]}, \param{const int}{ width}, \param{const int}{ height}\\
|
||||
\param{const int}{ depth = 1}}
|
||||
|
||||
Creates a bitmap from an array of bits.
|
||||
|
||||
\func{}{wxBitmap}{\param{const int}{ width}, \param{const int}{ height}, \param{const int}{ depth = -1}}
|
||||
|
||||
Creates a new bitmap.
|
||||
|
||||
\func{}{wxBitmap}{\param{const char**}{ bits}}
|
||||
|
||||
Creates a bitmap from XPM data.
|
||||
|
||||
\func{}{wxBitmap}{\param{const wxString\& }{name}, \param{const long}{ type}}
|
||||
|
||||
Loads a bitmap from a file or resource.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bits}{Specifies an array of pixel values.}
|
||||
|
||||
\docparam{width}{Specifies the width of the bitmap.}
|
||||
|
||||
\docparam{height}{Specifies the height of the bitmap.}
|
||||
|
||||
\docparam{depth}{Specifies the depth of the bitmap. If this is omitted, the display depth of the
|
||||
screen is used.}
|
||||
|
||||
\docparam{name}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X.
|
||||
Its meaning is determined by the {\it flags} parameter.}
|
||||
|
||||
\docparam{type}{May be one of the following:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP}}}{Load a Windows bitmap file.}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP\_RESOURCE}}}{Load a Windows bitmap from the resource database.}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_GIF}}}{Load a GIF bitmap file.}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XBM}}}{Load an X bitmap file.}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XPM}}}{Load an XPM bitmap file.}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_RESOURCE}}}{Load a Windows resource name.}
|
||||
\end{twocollist}
|
||||
|
||||
The validity of these flags depends on the platform and wxWindows configuration.
|
||||
If all possible wxWindows settings are used, the Windows platform supports BMP, BMP\_RESOURCE,
|
||||
XPM\_DATA, and XPM. Under X, the available formats are BMP, GIF, XBM, and XPM.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The first form constructs a bitmap object with no data; an assignment or another member function such as Create
|
||||
or LoadFile must be called subsequently.
|
||||
|
||||
The second and third forms provide copy constructors. Note that these do not copy the
|
||||
bitmap data, but instead a pointer to the data, keeping a reference count. They are therefore
|
||||
very efficient operations.
|
||||
|
||||
The fourth form constructs a bitmap from data whose type and value depends on
|
||||
the value of the {\it type} argument.
|
||||
|
||||
The fifth form constructs a (usually monochrome) bitmap from an array of pixel values, under both
|
||||
X and Windows.
|
||||
|
||||
The sixth form constructs a new bitmap.
|
||||
|
||||
The seventh form constructs a bitmap from pixmap (XPM) data, if wxWindows has been configured
|
||||
to incorporate this feature.
|
||||
|
||||
To use this constructor, you must first include an XPM file. For
|
||||
example, assuming that the file {\tt mybitmap.xpm} contains an XPM array
|
||||
of character pointers called mybitmap:
|
||||
|
||||
\begin{verbatim}
|
||||
#include "mybitmap.xpm"
|
||||
|
||||
...
|
||||
|
||||
wxBitmap *bitmap = new wxBitmap(mybitmap);
|
||||
\end{verbatim}
|
||||
|
||||
The eighth form constructs a bitmap from a file or resource. {\it name} can refer
|
||||
to a resource name under MS Windows, or a filename under MS Windows and X.
|
||||
|
||||
Under Windows, {\it type} defaults to wxBITMAP\_TYPE\_BMP\_RESOURCE.
|
||||
Under X, {\it type} defaults to wxBITMAP\_TYPE\_XBM.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}
|
||||
|
||||
\membersection{wxBitmap::\destruct{wxBitmap}}
|
||||
|
||||
\func{}{\destruct{wxBitmap}}{\void}
|
||||
|
||||
Destroys the wxBitmap object and possibly the underlying bitmap data.
|
||||
Because reference counting is used, the bitmap may not actually be
|
||||
destroyed at this point - only when the reference count is zero will the
|
||||
data be deleted.
|
||||
|
||||
If the application omits to delete the bitmap explicitly, the bitmap will be
|
||||
destroyed automatically by wxWindows when the application exits.
|
||||
|
||||
Do not delete a bitmap that is selected into a memory device context.
|
||||
|
||||
\membersection{wxBitmap::AddHandler}\label{wxbitmapaddhandler}
|
||||
|
||||
\func{static void}{AddHandler}{\param{wxBitmapHandler*}{ handler}}
|
||||
|
||||
Adds a handler to the end of the static list of format handlers.
|
||||
|
||||
\docparam{handler}{A new bitmap format handler object. There is usually only one instance
|
||||
of a given handler class in an application session.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapHandler}{wxbitmaphandler}
|
||||
|
||||
\membersection{wxBitmap::CleanUpHandlers}
|
||||
|
||||
\func{static void}{CleanUpHandlers}{\void}
|
||||
|
||||
Deletes all bitmap handlers.
|
||||
|
||||
This function is called by wxWindows on exit.
|
||||
|
||||
\membersection{wxBitmap::Create}
|
||||
|
||||
\func{virtual bool}{Create}{\param{const int}{ width}, \param{const int}{ height}, \param{const int}{ depth = -1}}
|
||||
|
||||
Creates a fresh bitmap. If the final argument is omitted, the display depth of
|
||||
the screen is used.
|
||||
|
||||
\func{virtual bool}{Create}{\param{void*}{ data}, \param{const int}{ type}, \param{const int}{ width}, \param{const int}{ height}, \param{const int}{ depth = -1}}
|
||||
|
||||
Creates a bitmap from the given data, which can be of arbitrary type.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{width}{The width of the bitmap in pixels.}
|
||||
|
||||
\docparam{height}{The height of the bitmap in pixels.}
|
||||
|
||||
\docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.}
|
||||
|
||||
\docparam{data}{Data whose type depends on the value of {\it type}.}
|
||||
|
||||
\docparam{type}{A bitmap type identifier - see \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for a list
|
||||
of possible values.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the call succeeded, FALSE otherwise.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The first form works on all platforms. The portability of the second form depends on the
|
||||
type of data.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap::wxBitmap}{wxbitmapconstr}
|
||||
|
||||
\membersection{wxBitmap::FindHandler}
|
||||
|
||||
\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{name}}
|
||||
|
||||
Finds the handler with the given name.
|
||||
|
||||
\func{static wxBitmapHandler*}{FindHandler}{\param{const wxString\& }{extension}, \param{long}{ bitmapType}}
|
||||
|
||||
Finds the handler associated with the given extension and type.
|
||||
|
||||
\func{static wxBitmapHandler*}{FindHandler}{\param{long }{bitmapType}}
|
||||
|
||||
Finds the handler associated with the given bitmap type.
|
||||
|
||||
\docparam{name}{The handler name.}
|
||||
|
||||
\docparam{extension}{The file extension, such as ``bmp".}
|
||||
|
||||
\docparam{bitmapType}{The bitmap type, such as wxBITMAP\_TYPE\_BMP.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
A pointer to the handler if found, NULL otherwise.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapHandler}{wxbitmaphandler}
|
||||
|
||||
\membersection{wxBitmap::GetDepth}
|
||||
|
||||
\constfunc{int}{GetDepth}{\void}
|
||||
|
||||
Gets the colour depth of the bitmap. A value of 1 indicates a
|
||||
monochrome bitmap.
|
||||
|
||||
\membersection{wxBitmap::GetHandlers}
|
||||
|
||||
\func{static wxList\&}{GetHandlers}{\void}
|
||||
|
||||
Returns the static list of bitmap format handlers.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapHandler}{wxbitmaphandler}
|
||||
|
||||
\membersection{wxBitmap::GetHeight}\label{wxbitmapgetheight}
|
||||
|
||||
\constfunc{int}{GetHeight}{\void}
|
||||
|
||||
Gets the height of the bitmap in pixels.
|
||||
|
||||
\membersection{wxBitmap::GetPalette}\label{wxbitmapgetpalette}
|
||||
|
||||
\constfunc{wxPalette*}{GetPalette}{\void}
|
||||
|
||||
Gets the associated palette (if any) which may have been loaded from a file
|
||||
or set for the bitmap.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxPalette}{wxpalette}
|
||||
|
||||
\membersection{wxBitmap::GetMask}\label{wxbitmapgetmask}
|
||||
|
||||
\constfunc{wxMask*}{GetMask}{\void}
|
||||
|
||||
Gets the associated mask if any) which may have been loaded from a file
|
||||
or set for the bitmap.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap::SetMask}{wxbitmapsetmask}, \helpref{wxMask}{wxmask}
|
||||
|
||||
\membersection{wxBitmap::GetWidth}\label{wxbitmapgetwidth}
|
||||
|
||||
\constfunc{int}{GetWidth}{\void}
|
||||
|
||||
Gets the width of the bitmap in pixels.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap::GetHeight}{wxbitmapgetheight}
|
||||
|
||||
\membersection{wxBitmap::InitStandardHandlers}
|
||||
|
||||
\func{static void}{InitStandardHandlers}{\void}
|
||||
|
||||
Adds the standard bitmap format handlers, which, depending on wxWindows
|
||||
configuration, can be handlers for Windows bitmap, Windows bitmap resource, and XPM.
|
||||
|
||||
This function is called by wxWindows on startup.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapHandler}{wxbitmaphandler}
|
||||
|
||||
\membersection{wxBitmap::InsertHandler}
|
||||
|
||||
\func{static void}{InsertHandler}{\param{wxBitmapHandler*}{ handler}}
|
||||
|
||||
Adds a handler at the start of the static list of format handlers.
|
||||
|
||||
\docparam{handler}{A new bitmap format handler object. There is usually only one instance
|
||||
of a given handler class in an application session.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapHandler}{wxbitmaphandler}
|
||||
|
||||
\membersection{wxBitmap::LoadFile}\label{wxbitmaploadfile}
|
||||
|
||||
\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{const long}{ type}}
|
||||
|
||||
Loads a bitmap from a file or resource.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{name}{Either a filename or a Windows resource name.
|
||||
The meaning of {\it name} is determined by the {\it type} parameter.}
|
||||
|
||||
\docparam{type}{One of the following values:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Load a Windows bitmap file.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_BMP\_RESOURCE}}{Load a Windows bitmap from the resource database.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.}
|
||||
\end{twocollist}
|
||||
|
||||
The validity of these flags depends on the platform and wxWindows configuration.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the operation succeeded, FALSE otherwise.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
A palette may be associated with the bitmap if one exists (especially for
|
||||
colour Windows bitmaps), and if the code supports it. You can check
|
||||
if one has been created by using the \helpref{GetPalette}{wxbitmapgetpalette} member.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}
|
||||
|
||||
\membersection{wxBitmap::Ok}\label{wxbitmapok}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
Returns TRUE if bitmap data is present.
|
||||
|
||||
\membersection{wxBitmap::RemoveHandler}
|
||||
|
||||
\func{static bool}{RemoveHandler}{\param{const wxString\& }{name}}
|
||||
|
||||
Finds the handler with the given name, and removes it. The handler
|
||||
is not deleted.
|
||||
|
||||
\docparam{name}{The handler name.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the handler was found and removed, FALSE otherwise.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapHandler}{wxbitmaphandler}
|
||||
|
||||
\membersection{wxBitmap::SaveFile}\label{wxbitmapsavefile}
|
||||
|
||||
\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
|
||||
|
||||
Saves a bitmap in the named file.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
|
||||
|
||||
\docparam{type}{One of the following values:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Save a Windows bitmap file.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Save a GIF bitmap file.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Save an X bitmap file.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Save an XPM bitmap file.}
|
||||
\end{twocollist}
|
||||
|
||||
The validity of these flags depends on the platform and wxWindows configuration.}
|
||||
|
||||
\docparam{palette}{An optional palette used for saving the bitmap. TODO: this parameter should
|
||||
probably be eliminated; instead the app should set the palette before saving.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the operation succeeded, FALSE otherwise.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Depending on how wxWindows has been configured, not all formats may be available.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}
|
||||
|
||||
\membersection{wxBitmap::SetDepth}\label{wxbitmapsetdepth}
|
||||
|
||||
\func{void}{SetDepth}{\param{int }{depth}}
|
||||
|
||||
Sets the depth member (does not affect the bitmap data).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{depth}{Bitmap depth.}
|
||||
|
||||
\membersection{wxBitmap::SetHeight}\label{wxbitmapsetheight}
|
||||
|
||||
\func{void}{SetHeight}{\param{int }{height}}
|
||||
|
||||
Sets the height member (does not affect the bitmap data).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{height}{Bitmap height in pixels.}
|
||||
|
||||
\membersection{wxBitmap::SetMask}\label{wxbitmapsetmask}
|
||||
|
||||
\func{void}{SetMask}{\param{wxMask* }{mask}}
|
||||
|
||||
Sets the mask for this bitmap.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The bitmap object owns the mask once this has been called.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap::GetMask}{wxbitmapgetmask}, \helpref{wxMask}{wxmask}
|
||||
|
||||
\membersection{wxBitmap::SetOk}
|
||||
|
||||
\func{void}{SetOk}{\param{int }{isOk}}
|
||||
|
||||
Sets the validity member (does not affect the bitmap data).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{isOk}{Validity flag.}
|
||||
|
||||
\membersection{wxBitmap::SetPalette}\label{wxbitmapsetpalette}
|
||||
|
||||
\func{void}{SetPalette}{\param{wxPalette* }{palette}}
|
||||
|
||||
Sets the associated palette: it will be deleted in the wxBitmap
|
||||
destructor, so if you do not wish it to be deleted automatically,
|
||||
reset the palette to NULL before the bitmap is deleted.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{palette}{The palette to set.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The bitmap object owns the palette once this has been called.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxPalette}{wxpalette}
|
||||
|
||||
\membersection{wxBitmap::SetWidth}
|
||||
|
||||
\func{void}{SetWidth}{\param{int }{width}}
|
||||
|
||||
Sets the width member (does not affect the bitmap data).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{width}{Bitmap width in pixels.}
|
||||
|
||||
\membersection{wxBitmap::operator $=$}
|
||||
|
||||
\func{wxBitmap\& }{operator $=$}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Assignment operator. This operator does not copy any data, but instead
|
||||
passes a pointer to the data in {\it bitmap} and increments a reference
|
||||
counter. It is a fast operation.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{Bitmap to assign.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns 'this' object.
|
||||
|
||||
\membersection{wxBitmap::operator $==$}
|
||||
|
||||
\func{bool}{operator $==$}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Equality operator. This operator tests whether the internal data pointers are
|
||||
equal (a fast test).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{Bitmap to compare with 'this'}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns TRUE if the bitmaps were effectively equal, FALSE otherwise.
|
||||
|
||||
\membersection{wxBitmap::operator $!=$}
|
||||
|
||||
\func{bool}{operator $!=$}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Inequality operator. This operator tests whether the internal data pointers are
|
||||
unequal (a fast test).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{Bitmap to compare with 'this'}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns TRUE if the bitmaps were unequal, FALSE otherwise.
|
||||
|
||||
\section{\class{wxBitmapHandler}}\label{wxbitmaphandler}
|
||||
|
||||
\overview{Overview}{wxbitmapoverview}
|
||||
|
||||
This is the base class for implementing bitmap file loading/saving, and bitmap creation from data.
|
||||
It is used within wxBitmap and is not normally seen by the application.
|
||||
|
||||
If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler
|
||||
and add the handler using \helpref{wxBitmap::AddHandler}{wxbitmapaddhandler} in your
|
||||
application initialisation.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxCursor}{wxcursor}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxBitmapHandler::wxBitmapHandler}\label{wxbitmaphandlerconstr}
|
||||
|
||||
\func{}{wxBitmapHandler}{\void}
|
||||
|
||||
Default constructor. In your own default constructor, initialise the members
|
||||
m\_name, m\_extension and m\_type.
|
||||
|
||||
\membersection{wxBitmapHandler::\destruct{wxBitmapHandler}}
|
||||
|
||||
\func{}{\destruct{wxBitmapHandler}}{\void}
|
||||
|
||||
Destroys the wxBitmapHandler object.
|
||||
|
||||
\membersection{wxBitmapHandler::Create}
|
||||
|
||||
\func{virtual bool}{Create}{\param{wxBitmap* }{bitmap}, \param{void*}{ data}, \param{const int}{ type}, \param{const int}{ width}, \param{const int}{ height}, \param{const int}{ depth = -1}}
|
||||
|
||||
Creates a bitmap from the given data, which can be of arbitrary type. The wxBitmap object {\it bitmap} is
|
||||
manipulated by this function.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{The wxBitmap object.}
|
||||
|
||||
\docparam{width}{The width of the bitmap in pixels.}
|
||||
|
||||
\docparam{height}{The height of the bitmap in pixels.}
|
||||
|
||||
\docparam{depth}{The depth of the bitmap in pixels. If this is -1, the screen depth is used.}
|
||||
|
||||
\docparam{data}{Data whose type depends on the value of {\it type}.}
|
||||
|
||||
\docparam{type}{A bitmap type identifier - see \helpref{wxBitmapHandler::wxBitmapHandler}{wxbitmapconstr} for a list
|
||||
of possible values.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the call succeeded, FALSE otherwise (the default).
|
||||
|
||||
\membersection{wxBitmapHandler::GetName}
|
||||
|
||||
\constfunc{wxString}{GetName}{\void}
|
||||
|
||||
Gets the name of this handler.
|
||||
|
||||
\membersection{wxBitmapHandler::GetExtension}
|
||||
|
||||
\constfunc{wxString}{GetExtension}{\void}
|
||||
|
||||
Gets the file extension associated with this handler.
|
||||
|
||||
\membersection{wxBitmapHandler::GetType}
|
||||
|
||||
\constfunc{long}{GetType}{\void}
|
||||
|
||||
Gets the bitmap type associated with this handler.
|
||||
|
||||
\membersection{wxBitmapHandler::LoadFile}\label{wxbitmaphandlerloadfile}
|
||||
|
||||
\func{bool}{LoadFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\&}{ name}, \param{const long}{ type}}
|
||||
|
||||
Loads a bitmap from a file or resource, putting the resulting data into {\it bitmap}.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{The bitmap object which is to be affected by this operation.}
|
||||
|
||||
\docparam{name}{Either a filename or a Windows resource name.
|
||||
The meaning of {\it name} is determined by the {\it type} parameter.}
|
||||
|
||||
\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the operation succeeded, FALSE otherwise.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
|
||||
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
|
||||
\helpref{wxBitmapHandler::SaveFile}{wxbitmaphandlersavefile}
|
||||
|
||||
\membersection{wxBitmapHandler::SaveFile}\label{wxbitmaphandlersavefile}
|
||||
|
||||
\func{bool}{SaveFile}{\param{wxBitmap* }{bitmap}, \param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
|
||||
|
||||
Saves a bitmap in the named file.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{The bitmap object which is to be affected by this operation.}
|
||||
|
||||
\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.}
|
||||
|
||||
\docparam{type}{See \helpref{wxBitmap::wxBitmap}{wxbitmapconstr} for values this can take.}
|
||||
|
||||
\docparam{palette}{An optional palette used for saving the bitmap. 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{See also}
|
||||
|
||||
\helpref{wxBitmap::LoadFile}{wxbitmaploadfile}\\
|
||||
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}\\
|
||||
\helpref{wxBitmapHandler::LoadFile}{wxbitmaphandlerloadfile}
|
||||
|
||||
\membersection{wxBitmapHandler::SetName}
|
||||
|
||||
\func{void}{SetName}{\param{const wxString\& }{name}}
|
||||
|
||||
Sets the handler name.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{name}{Handler name.}
|
||||
|
||||
\membersection{wxBitmapHandler::SetExtension}
|
||||
|
||||
\func{void}{SetExtension}{\param{const wxString\& }{extension}}
|
||||
|
||||
Sets the handler extension.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{extension}{Handler extension.}
|
||||
|
||||
\membersection{wxBitmapHandler::SetType}
|
||||
|
||||
\func{void}{SetType}{\param{long }{type}}
|
||||
|
||||
Sets the handler type.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{name}{Handler type.}
|
||||
|
||||
|
924
docs/latex/wx/body.tex
Normal file
@ -0,0 +1,924 @@
|
||||
\chapter{Introduction}\label{introduction}
|
||||
\pagenumbering{arabic}%
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
|
||||
\section{What is wxWindows?}
|
||||
|
||||
wxWindows is a C++ framework providing GUI (Graphical User
|
||||
Interface) and other facilities on more than one platform. It currently
|
||||
supports subsets of Motif, Xt and MS Windows (16-bit, Windows 95 and Windows NT).
|
||||
|
||||
wxWindows was originally developed at the Artificial Intelligence
|
||||
Applications Institute, University of Edinburgh, for internal use.
|
||||
wxWindows has been released into the public domain in the hope
|
||||
that others will also find it useful. Version 2.0 is written and
|
||||
maintained by Julian Smart and Markus Holzem, with support from users.
|
||||
|
||||
This manual discusses wxWindows in the context of multi-platform
|
||||
development.\helpignore{For more detail on the wxWindows version 2.0 API
|
||||
(Application Programming Interface) please refer to the separate
|
||||
wxWindows reference manual.}
|
||||
|
||||
Please note that in the following, ``MS Windows" often refers to all
|
||||
platforms related to Microsoft Windows, including 16-bit and 32-bit
|
||||
variants, unless otherwise stated. All trademarks are acknowledged.
|
||||
|
||||
\section{Why another cross-platform development tool?}
|
||||
|
||||
wxWindows was developed to provide a cheap and flexible way to maximize
|
||||
investment in GUI application development. While a number of commercial
|
||||
class libraries already exist 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}
|
||||
|
||||
As public domain software and a project open to everyone, wxWindows has
|
||||
benefited from comments, ideas, bug fixes, enhancements and the sheer
|
||||
enthusiasm of users, especially via the Internet. This gives wxWindows a
|
||||
certain advantage over its commercial brothers, and 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.
|
||||
|
||||
In writing wxWindows, completeness has sometimes been traded for
|
||||
portability and simplicity of programming. Version 2.0 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 and MFC.
|
||||
|
||||
wxWindows 2.0 currently maps to two native APIs: Motif and
|
||||
MS Windows. An Xt port is also in preparation.
|
||||
|
||||
The importance of using a platform-independent class library cannot be
|
||||
overstated, since GUI application development is very time-consuming,
|
||||
and sustained popularity of particular GUIs cannot be guaranteed.
|
||||
Code can very quickly become obsolete if it addresses the wrong
|
||||
platform or audience. wxWindows helps to insulate the programmer from
|
||||
these winds of change. Although wxWindows may not be suitable for
|
||||
every application, it provides access to most of the functionality a
|
||||
GUI program normally requires, plus some extras such as form
|
||||
construction, interprocess communication and PostScript output, and
|
||||
can of course be extended as needs dictate. As a bonus, it provides
|
||||
a cleaner programming interface than the native
|
||||
APIs. Programmers may find it worthwhile to use wxWindows even if they
|
||||
are developing on only one platform.
|
||||
|
||||
It is impossible to sum up the functionality of wxWindows in a few paragraphs, but
|
||||
here are some of the benefits:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item Low cost (free, in fact!)
|
||||
\item You get the source.
|
||||
\item Several example programs.
|
||||
\item Over 200 pages of printable and on-line documentation.
|
||||
\item Simple-to-use, object-oriented API.
|
||||
\item Graphics calls include splines, polylines, rounded rectangles, etc.
|
||||
\item Constraint-based layout option.
|
||||
\item Print/preview and document/view architectures.
|
||||
\item Status line facility, toolbar
|
||||
\item Easy, object-oriented interprocess comms (DDE subset) under UNIX and
|
||||
MS Windows.
|
||||
\item Encapsulated PostScript generation under UNIX, normal MS Windows printing on the
|
||||
PC.
|
||||
\item MDI support under Windows.
|
||||
\item Can be used to create DLLs under Windows, dynamic libraries on the Sun.
|
||||
\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 Hypertext help facility, with an API for invocation from applications.
|
||||
\item Dialog Editor for building dialogs.
|
||||
\end{itemize}
|
||||
|
||||
\section{Changes from version 1.xx}\label{versionchanges}
|
||||
|
||||
These are a few of the major differences between versions 1.xx and 2.0.
|
||||
|
||||
Removals:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item XView is no longer supported;
|
||||
\item Mac is not yet supported;
|
||||
\item all controls (panel items) no longer have labels attached to them;
|
||||
\item wxForm removed;
|
||||
\item wxCanvasDC, wxPanelDC removed (replaced by wxClientDC, wxWindowDC, wxPaintDC which
|
||||
can be used for any window);
|
||||
\item wxMultiText, wxTextWindow, wxText removed and replaced by wxTextCtrl;
|
||||
\item classes no longer divided into generic and platform-specific parts, for efficiency.
|
||||
\end{itemize}
|
||||
|
||||
Additions and changes:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item class hierarchy changed, and restrictions about subwindow nesting lifted;
|
||||
\item header files reorganised to conform to normal C++ standards;
|
||||
\item classes less dependent on each another, to reduce executable size;
|
||||
\item wxString used instead of char* wherever possible;
|
||||
\item the number of separate but mandatory utilities reduced;
|
||||
\item the event system has been overhauled, with
|
||||
virtual functions and callbacks being replaced with MFC-like event tables;
|
||||
\item new controls, such as wxTreeCtrl, wxListCtrl, wxSpinButton;
|
||||
\item less inconsistency about what events can be handled, so for example
|
||||
mouse clicks or key presses on controls can now be intercepted;
|
||||
\item the status bar is now a separate class, wxStatusBar, and is
|
||||
implemented in generic wxWindows code;
|
||||
\item some renaming of controls for greater consistency;
|
||||
\item wxBitmap has the notion of bitmap handlers to allow for extension to new formats
|
||||
without ifdefing;
|
||||
\item new dialogs: wxPageSetupDialog, wxFileDialog, wxDirDialog,
|
||||
wxMessageDialog, wxSingleChoiceDialog, wxTextEntryDialog;
|
||||
\item GDI objects are reference-counted and are now passed to most functions
|
||||
by reference, making memory management far easier;
|
||||
\item wxSystemSettings class allows querying for various system-wide properties
|
||||
such as dialog font, colours, user interface element sizes, and so on;
|
||||
\item better platform look and feel conformance;
|
||||
\item toolbar functionality now separated out into a family of classes with the
|
||||
same API;
|
||||
\item device contexts are no longer accessed using wxWindow::GetDC - they are created
|
||||
temporarily with the window as an argument;
|
||||
\item events from sliders and scrollbars can be handled more flexibly;
|
||||
\item the handling of window close events has been changed in line with the new
|
||||
event system, but backward {\bf OnClose} compatibility has been retained;
|
||||
\item the concept of {\it validator} has been added to allow much easier coding of
|
||||
the relationship between controls and application data;
|
||||
\item the documentation has been revised, with more cross-referencing.
|
||||
\end{itemize}
|
||||
|
||||
Platform-specific changes:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item The Windows header file (windows.h) is no longer included by wxWindows headers;
|
||||
\item wx.dll supported under Visual C++;
|
||||
\item the full range of Windows 95 window decorations are supported, such as modal frame
|
||||
borders;
|
||||
\item MDI classes brought out of wxFrame into separate classes, and made more flexible.
|
||||
\end{itemize}
|
||||
|
||||
\section{wxWindows requirements}\label{requirements}
|
||||
|
||||
To make use of wxWindows, you currently need one or both of the
|
||||
following setups.
|
||||
|
||||
(a) PC:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item A 486 or higher PC running MS Windows.
|
||||
\item One of Microsoft Visual C++, Borland C++, Watcom C++, MetroWerks C++,
|
||||
Symantec C++, GNU-WIN32.
|
||||
\item At least 30 MB of disk space.
|
||||
\end{enumerate}
|
||||
|
||||
(b) UNIX:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item Almost any C++ compiler, including GNU C++.
|
||||
\item Almost any UNIX workstation (VMS is supported too) and Motif 1.2 or higher (not necessary
|
||||
for the Xt version)
|
||||
\item At least 30 MB of disk space.
|
||||
\end{enumerate}
|
||||
|
||||
\section{Availability and location of wxWindows}
|
||||
|
||||
wxWindows is currently available from the Artificial Intelligence
|
||||
Applications Institute by anonymous FTP and World Wide Web:
|
||||
|
||||
\begin{verbatim}
|
||||
ftp://ftp.aiai.ed.ac.uk/pub/packages/wxwin
|
||||
http://web.ukonline.co.uk/julian.smart/wxwin
|
||||
\end{verbatim}
|
||||
|
||||
\section{Acknowledgments}
|
||||
|
||||
Thanks are due to the AIAI for being willing to release wxWindows into
|
||||
the public domain, and to our patient wives Harriet and Tanja.
|
||||
|
||||
The Internet has been an essential prop when coming up against tricky
|
||||
problems. Thanks to those who answered our
|
||||
queries or submitted bug fixes and enhancements; wxWindows is very
|
||||
much a team effort.
|
||||
|
||||
Hermann Dunkel contributed XPM support; Arthur Seaton wrote the memory
|
||||
checking code; Olaf Klein and Patrick Halke wrote the ODBC classes;
|
||||
Harri Pasanen and Robin Dunn wrote wxPython and contributed to the
|
||||
wxExtend library.
|
||||
|
||||
Markus Holzem write the Xt port. Jonathan Tonberg, Bill Hale,
|
||||
Cecil Coupe, Thomaso Paoletti, Thomas Fettig, and others slaved away
|
||||
writing the Mac port. Keith Gary Boyce ported wxWindows to the free
|
||||
GNU-WIN32 compiler, refusing to give up when shortcuts were suggested.
|
||||
|
||||
Many thanks also to: Timothy Peters, Jamshid Afshar, Patrick Albert, C. Buckley,
|
||||
Robin Corbet, Harco de Hilster, Josep Fortiana, Torsten Liermann, Tatu
|
||||
M\"{a}nnist\"{o}, Ian Perrigo, Giordano Pezzoli, Petr Smilauer, Neil Smith,
|
||||
Kari Syst\"{a}, Jyrki Tuomi, Edward Zimmermann, Ian Brown, and many
|
||||
others.
|
||||
|
||||
`Graphplace', the basis for the wxGraphLayout library, is copyright Dr. Jos
|
||||
T.J. van Eijndhoven of Eindhoven University of Technology. The code has
|
||||
been used in wxGraphLayout with his permission.
|
||||
|
||||
We also acknowledge the author of XFIG, the excellent UNIX drawing tool,
|
||||
from the source of which we have borrowed some spline drawing code.
|
||||
His copyright is included below.
|
||||
|
||||
{\it XFig2.1 is copyright (c) 1985 by Supoj Sutanthavibul. Permission to
|
||||
use, copy, modify, distribute, and sell this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided
|
||||
that the above copyright notice appear in all copies and that both that
|
||||
copyright notice and this permission notice appear in supporting
|
||||
documentation, and that the name of M.I.T. not be used in advertising or
|
||||
publicity pertaining to distribution of the software without specific,
|
||||
written prior permission. M.I.T. makes no representations about the
|
||||
suitability of this software for any purpose. It is provided ``as is''
|
||||
without express or implied warranty.}
|
||||
|
||||
\chapter{Multi-platform development with wxWindows}\label{multiplat}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
|
||||
This chapter describes the practical details of using wxWindows. Please
|
||||
see the file install.txt for up-to-date installation instructions, and
|
||||
changes.txt for differences between versions.
|
||||
|
||||
\section{Include files}
|
||||
|
||||
The main include file is {\tt "wx.h"}; this includes the most commonly
|
||||
used modules of wxWindows.
|
||||
|
||||
To save on compilation time, include only those header files relevant to the
|
||||
source file. If you are using precompiled headers, you should include
|
||||
the following section before any other includes:
|
||||
|
||||
\begin{verbatim}
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx_prec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
... include minimum set of files necessary here ...
|
||||
#endif
|
||||
|
||||
... now your other include files ...
|
||||
\end{verbatim}
|
||||
|
||||
The file {\tt "wx\_prec.h"} includes {\tt "wx.h"}. Although this incantation
|
||||
may seem quirky, it is in fact the end result of a lot of experimentation,
|
||||
and several Windows compilers to use precompilation (those tested are Microsoft Visual C++, Borland C++
|
||||
and Watcom C++).
|
||||
|
||||
Borland precompilation is largely automatic. Visual C++ requires specification of {\tt "wx\_prec.h"} as
|
||||
the file to use for precompilation. Watcom C++ is automatic apart from the specification of
|
||||
the .pch file. Watcom C++ is strange in requiring the precompiled header to be used only for
|
||||
object files compiled in the same directory as that in which the precompiled header was created.
|
||||
Therefore, the wxWindows Watcom C++ makefiles go through hoops deleting and recreating
|
||||
a single precompiled header file for each module, thus preventing an accumulation of many
|
||||
multi-megabyte .pch files.
|
||||
|
||||
\section{Libraries}
|
||||
|
||||
Under UNIX, use the library libwx\_motif.a
|
||||
(Motif). Under Windows, use the library wx.lib for stand-alone Windows
|
||||
applications, or wxdll.lib for creating DLLs.
|
||||
|
||||
\section{Configuration}
|
||||
|
||||
The following lists the options configurable in the file
|
||||
\rtfsp{\tt include/base/wx\_setup.h.} 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.
|
||||
|
||||
\subsection{General features}
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{USE\_CLIPBOARD}{If 1, clipboard code is compiled (Windows only).}
|
||||
\twocolitem{USE\_CONSTRAINTS}{If 1, the constaint-based window layout system is compiled.}
|
||||
\twocolitem{USE\_DOC\_VIEW\_ARCHITECTURE}{If 1, wxDocument, wxView and related classes are compiled.}
|
||||
\twocolitem{USE\_DYNAMIC\_CLASSES}{If 1, the run-time class macros and classes are compiled. Recommended,
|
||||
and necessary for the document/view framework.}
|
||||
\twocolitem{USE\_EXTENDED\_STATICS}{If 1, wxStaticItem code is compiled for enhanced panel decorative items.
|
||||
Not rigorously tested, and not documented.}
|
||||
\twocolitem{USE\_HELP}{If 1, interface to help system is compiled.}
|
||||
\twocolitem{USE\_GAUGE}{If 1, the wxGauge class compiled.}
|
||||
\twocolitem{USE\_GLOBAL\_MEMORY\_OPERATORS}{If 1, redefines global new and delete operators to be compatible
|
||||
with the extended arguments of the debugging wxObject new and delete operators. If this causes problems
|
||||
for your compiler, set to 0.}
|
||||
\twocolitem{USE\_GNU\_WXSTRING}{If 1, the enhanced GNU wxString and regular expression class are compiled
|
||||
in place of the normal wxString class. See contrib/wxstring for details.}
|
||||
\twocolitem{USE\_IMAGE\_LOADING\_IN\_MSW}{Use code to allow dynamic .BMP loading
|
||||
under MS Windows.}
|
||||
\twocolitem{USE\_IMAGE\_LOADING\_IN\_X}{Use code in utils/image to allow dynamic .BMP/.GIF loading
|
||||
under X.}
|
||||
\twocolitem{USE\_RESOURCE\_LOADING\_IN\_MSW}{Use code to allow dynamic .ICO/.CUR loading
|
||||
under MS Windows.}
|
||||
\twocolitem{USE\_IPC}{If 1, interprocess communication code is compiled.}
|
||||
\twocolitem{USE\_MEMORY\_TRACING}{If 1, enables debugging versions of wxObject::new and wxObject::delete
|
||||
if the value of DEBUG is defined to more than 0.}
|
||||
\twocolitem{USE\_METAFILE}{If 1, Windows Metafile code is compiled.}
|
||||
\twocolitem{USE\_PANEL\_IN\_PANEL}{If 1, experimental panel-in-panel code is used
|
||||
for common dialog boxes. Not recommended, since tab traversal can suffer.}
|
||||
\twocolitem{USE\_POSTSCRIPT}{If 1, PostScript code is compiled.}
|
||||
\twocolitem{USE\_POSTSCRIPT\_ARCHITECTURE\_IN\_MSW}{Set to 1 to enable the printing architecture
|
||||
to make use of either native Windows printing facilities, or the wxPostScriptDC class depending
|
||||
on the wxApp::SetPrintMode setting.}
|
||||
\twocolitem{USE\_PRINTING\_ARCHITECTURE}{If 1, wxPrinter, wxPrintout and related classes are compiled
|
||||
for the print/preview framework.}
|
||||
\twocolitem{USE\_RESOURCES}{If 1, win.ini or .Xdefaults-style resource read/write code is compiled.}
|
||||
\twocolitem{USE\_SCROLLBAR}{If 1, wxScrollBar class is compiled. Not rigorously tested, and not documented.}
|
||||
\twocolitem{USE\_SPLINES}{If 1, spline code is compiled.}
|
||||
\twocolitem{USE\_TOOLBAR}{If 1, the wxToolBar class is compiled.}
|
||||
\twocolitem{USE\_TYPEDEFS}{If 1, a typedef will be used for wxPoint instead of
|
||||
a class declaration, to reduce overhead and avoid a Microsoft C++ memory bug.}
|
||||
\twocolitem{USE\_VLBOX}{If 1, wxVirtListBox code is compiled for a virtual listbox item.
|
||||
Not rigorously tested, and not documented.}
|
||||
\twocolitem{USE\_WX\_RESOURCES}{If 1, wxWindows resource file (.WXR) code is compiled.}
|
||||
\twocolitem{USE\_XFIG\_SPLINE\_CODE}{If 1, XFig-derived code is used for spline
|
||||
drawing. If 0, AIAI code is used, which is slower.}
|
||||
\twocolitem{USE\_XPM\_IN\_X}{If 1, XPM (colour pixmap) facilities will be compiled and used
|
||||
in wxBitmap under X.}
|
||||
\twocolitem{USE\_XPM\_IN\_MSW}{If 1, XPM (colour pixmap) facilities will be compiled and used
|
||||
in wxBitmap under MS Windows.}
|
||||
\end{twocollist}
|
||||
|
||||
\subsection{X features}
|
||||
|
||||
\begin{twocollist}
|
||||
\twocolitem{DEFAULT\_FILE\_SELECTOR\_SIZE}{Let Motif choose the size of
|
||||
XmFileSelectionBox. Otherwise, size is 500x600.}
|
||||
\twocolitem{PIXEL0\_DISABLE}{Define to disallow allocation of pixel 0 (wxXOR problem).}
|
||||
\twocolitem{USE\_GADGETS}{Use gadgets where possible rather than Widgets for items.
|
||||
Default is to use Gadgets.}
|
||||
\twocolitem{USE\_BUTTON\_GADGET}{Use gadgets for buttons. This can intefere with
|
||||
default button selection, so the default is zero.}
|
||||
\end{twocollist}
|
||||
|
||||
\subsection{Windows and NT features}
|
||||
|
||||
\begin{twocollist}
|
||||
\twocolitem{CTL3D}{CTL3D should only be used for 16-bit Windows programs.
|
||||
On Windows 95 and NT, native 3D effects are used. If you want to
|
||||
use it and don't already have CTL3D installed, copy the files in
|
||||
contrib/ctl3d to appropriate places (ctl3dv2.lib/ctl3d32.lib into your compiler lib
|
||||
directory, ctl3d.h into an include directory, and ctl3dv2.dll into
|
||||
windows/system). You may need to find a compiler-specific version of ctl3dv2.lib
|
||||
or ctl3d32.lib. Define CTL3D to be 1 in wx\_setup.h and link your executables with ctl3dv2.lib
|
||||
or ctl3d32.lib.}
|
||||
\twocolitem{USE\_ITSY\_BITSY}{If 1, compiles in code to support tiny window titlebars.}
|
||||
\twocolitem{USE\_ODBC}{If 1, compiles wxDatabase and wxRecordSet classes for ODBC
|
||||
access. Requires sql.h, sqlext.h files if set to 1 (see topic on database support).}
|
||||
\end{twocollist}
|
||||
|
||||
\section{Makefiles}
|
||||
|
||||
At the moment there is no attempt to make UNIX makefiles and
|
||||
PC makefiles compatible, i.e. one makefile is required for
|
||||
each environment.
|
||||
|
||||
Sample makefiles for UNIX (suffix .UNX), MS C++ (suffix .DOS and .NT), Borland
|
||||
C++ (.BCC) and Symantec C++ (.SC) are included for the library, demos
|
||||
and utilities. The NT, Borland and Symantec makefiles cannot be
|
||||
guaranteed to be up-to-date since the author does not have
|
||||
these compilers.
|
||||
|
||||
The controlling makefile for wxWindows is in the platform-specific
|
||||
directory, such as {\tt src/msw} or {\tt src/x}. This makefile will
|
||||
recursively execute the makefile in {\tt src/base}.
|
||||
|
||||
\subsection{Windows makefiles}
|
||||
|
||||
For Microsoft C++, normally it is only necessary to type {\tt nmake -f
|
||||
makefile.dos} (or an alias or batch file which does this). By default,
|
||||
binaries are made with debugging information, and no optimization. Use
|
||||
FINAL=1 on the command line to remove debugging information (this only
|
||||
really necessary at the link stage), and DLL=1 to make a DLL version of
|
||||
the library, if building a library.
|
||||
|
||||
\subsection{UNIX makefiles}
|
||||
|
||||
TODO.
|
||||
|
||||
Debugging information is included by default; you may add DEBUG= as an
|
||||
argument to make to compile without it, or use the UNIX {\bf strip}
|
||||
command to remove debugging information from an executable.
|
||||
|
||||
\normalbox{{\it Important note:} Most compiler flags are kept centrally in
|
||||
src/make.env, which is included by all other makefiles. This is the
|
||||
file to edit to tailor wxWindows compilation to your environment.}
|
||||
|
||||
\section{Windows-specific files}
|
||||
|
||||
wxWindows application compilation under MS Windows requires at least two
|
||||
extra files, resource and module definition files.
|
||||
|
||||
\subsection{Resource file}\label{resources}
|
||||
|
||||
The least that must be defined in the Windows resource file (extension RC)
|
||||
is the following statement:
|
||||
|
||||
\begin{verbatim}
|
||||
rcinclude wx.rc
|
||||
\end{verbatim}
|
||||
|
||||
which includes essential internal wxWindows definitions. The resource script
|
||||
may also contain references to icons, cursors, etc., for example:
|
||||
|
||||
\begin{verbatim}
|
||||
wxicon icon wx.ico
|
||||
\end{verbatim}
|
||||
|
||||
The icon can then be referenced by name when creating a frame icon. See
|
||||
the MS Windows SDK documentation.
|
||||
|
||||
\normalbox{Note: include wx.rc {\it after} any ICON statements
|
||||
so programs that search your executable for icons (such
|
||||
as the Program Manager) find your application icon first.}
|
||||
|
||||
\subsection{Module definition file}
|
||||
|
||||
A module definition file (extension DEF) looks like the following:
|
||||
|
||||
\begin{verbatim}
|
||||
NAME Hello
|
||||
DESCRIPTION 'Hello'
|
||||
EXETYPE WINDOWS
|
||||
STUB 'WINSTUB.EXE'
|
||||
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||
DATA PRELOAD MOVEABLE MULTIPLE
|
||||
HEAPSIZE 1024
|
||||
STACKSIZE 8192
|
||||
\end{verbatim}
|
||||
|
||||
The only lines which will usually have to be changed per application are
|
||||
NAME and DESCRIPTION.
|
||||
|
||||
\section{Memory models and memory allocation}\label{memorymodels}
|
||||
|
||||
Under UNIX, memory allocation isn't a problem. Under Windows, the only
|
||||
really viable way to go is to use the large model, which uses the global
|
||||
heap instead of the local heap for memory allocation. Unless more than
|
||||
one read-write data segment is used,% (see \helpref{large data}{largedata}
|
||||
large model programs may still have multiple instances under MS
|
||||
C/C++ 7. Microsoft give the following guidelines for producing
|
||||
multiple-instance large model programs:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item Do not use {\tt /ND} to name extra data segments unless the segment is READONLY.
|
||||
\item Use the .DEF file to mark extra data segments READONLY.
|
||||
\item Do not use \_\_far or FAR to mark data items.
|
||||
\item Use {\tt /PACKDATA} to combine data segments.
|
||||
\item Use {\tt /Gt65500 /Gx} to force all data into the default data segment.
|
||||
\end{itemize}
|
||||
|
||||
Even with the single-instance limitation, the productivity benefit is
|
||||
worth it in the majority of cases. Note that some other multi-platform
|
||||
class libraries also have this restriction. (If more than one instance
|
||||
really is required, create several copies of the program with different
|
||||
names.)
|
||||
|
||||
Having chosen the large model, just use C++ `new', `delete' (and if
|
||||
necessary `malloc' and `free') in the normal way. The only restrictions
|
||||
now encountered are a maximum of 64 KB for a single program segment and
|
||||
for a single data item, unless huge model is selected.
|
||||
|
||||
For Borland users, use the data threshold switch, and the following is
|
||||
also recommended:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item Check ``Automatic Far Data Segments"
|
||||
\item Check ``Put Constant Strings into Code Segment"
|
||||
\end{itemize}
|
||||
|
||||
See also the Frequently Asked Questions document for further details
|
||||
on using Borland with wxWindows.
|
||||
|
||||
\subsection{Allocating and deleting wxWindows objects}
|
||||
|
||||
In general, classes derived from wxWindow must dynamically allocated
|
||||
with {\it new} and deleted with {\it delete}. If you delete a window,
|
||||
all of its children and descendants will be automatically deleted,
|
||||
so you don't need to delete these descendants explicitly.
|
||||
|
||||
Don't statically create a window unless you know that the window
|
||||
cannot be deleted dynamically. Modal dialogs, such as those used
|
||||
in the {\tt dialogs} sample, can usually be created statically,
|
||||
if you know that the OK or Cancel button does not destroy the dialog.
|
||||
|
||||
Most drawing objects, such as wxPen, wxBrush, wxFont, and wxBitmap, should be
|
||||
created dynamically. They are cleaned up automatically on program exit.
|
||||
wxColourMap is an exception to this rule (currently). In particular,
|
||||
do not attempt to create these objects globally before OnInit() has a chance
|
||||
to be called, because wxWindows might not have done essential internal initialisation
|
||||
(including creation of lists containing all instances of wxPen, wxBrush etc.)
|
||||
|
||||
If you decide to allocate a C++ array of objects (such as wxBitmap) that may
|
||||
be cleaned up by wxWindows, make sure you delete the array explicitly
|
||||
before wxWindows has a chance to do so on exit, since calling {\it delete} on
|
||||
array members will cause memory problems.
|
||||
|
||||
wxColour can be created statically: it is not automatically cleaned
|
||||
up and is unlikely to be shared between other objects; it is lightweight
|
||||
enough for copies to be made.
|
||||
|
||||
Beware of deleting objects such as a wxPen or wxBitmap if they are still in use.
|
||||
Windows is particularly sensitive to this: so make sure you
|
||||
make calls like wxDC::SetPen(NULL) or wxDC::SelectObject(NULL) 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{Dynamic Link Libraries}
|
||||
|
||||
wxWindows may be used to produce DLLs which run under MS Windows. Note that
|
||||
this is not the same thing as having wxWindows as a DLL, which is not
|
||||
currently possible. For Microsoft C++, use the makefile with the argument DLL=1 to produce
|
||||
a version of the wxWindows library which may be used in a DLL application.
|
||||
There is a bug in Microsoft C++ which makes the compiler complain about returned floats,
|
||||
which goes away when the {\tt /Os} option is used, which is why that flag is
|
||||
set in the makefile.
|
||||
|
||||
For making wxWindows as a Sun dynamic library, there are comments in the
|
||||
UNIX makefile for the appropriate flags for AT\&T C++. Sorry, I haven't
|
||||
investigated the flags needed for other compilers.
|
||||
|
||||
\section{Conditional compilation}
|
||||
|
||||
One of the purposes of wxWindows is to reduce the need for conditional
|
||||
compilation in source code, which can be messy and confusing to follow.
|
||||
However, sometimes it is necessary to incorporate platform-specific
|
||||
features (such as metafile use under MS Windows). The following identifiers
|
||||
may be used for this purpose, along with any user-supplied ones:
|
||||
|
||||
\begin{itemize}
|
||||
\item {\tt wx\_x} - for code which should work under any X toolkit
|
||||
\item {\tt wx\_motif} - for code which should work under Motif only
|
||||
\item {\tt wx\_msw} - for code which should work under Microsoft Windows only
|
||||
\item {\tt wx\_xt} - for code which should work under Xt only
|
||||
\end{itemize}
|
||||
|
||||
For example:
|
||||
|
||||
\begin{verbatim}
|
||||
...
|
||||
#ifdef wx_x
|
||||
(void)wxMessageBox("Sorry, metafiles not available under X.");
|
||||
#endif
|
||||
#ifdef wx_msw
|
||||
wxMetaFileDC dc;
|
||||
DrawIt(dc);
|
||||
wxMetaFile *mf = dc.Close();
|
||||
mf->SetClipboard();
|
||||
delete mf;
|
||||
#endif
|
||||
...
|
||||
\end{verbatim}
|
||||
|
||||
\section{Building on-line help}
|
||||
|
||||
wxWindows has its own help system from version 1.30: wxHelp. It can be
|
||||
used to view the wxWindows class library reference, and also to provide
|
||||
on-line help for your wxWindows applications. The API, made accessible
|
||||
by including {\tt wx\_help.h}, allows you to load files and display
|
||||
specific sections, using DDE to communicate between the application and
|
||||
wxHelp.
|
||||
|
||||
wxHelp files can be marked up by hand from ASCII files within wxHelp,
|
||||
or may be generated from other files, as is the case with the wxWindows
|
||||
documentation.
|
||||
|
||||
It is possible to use the platform-specific help
|
||||
system (e.g. WinHelp) instead of wxHelp.
|
||||
|
||||
See {\tt install.txt}, the wxHelp documentation (in {\tt
|
||||
utils/wxhelp/docs}) and \helpref{wxHelp}{wxhelp} for further details.
|
||||
|
||||
\section{C++ issues}
|
||||
|
||||
There are cases where a C++ program will compile and run fine under one
|
||||
environment, and then fail to compile using a different compiler. Some
|
||||
caveats are given below, from experience with the GNU C++ compiler (GCC)
|
||||
and MS C/C++ compiler version 7.
|
||||
|
||||
\subsection{Templates}
|
||||
|
||||
wxWindows does not use templates for two main reasons: one, it is a
|
||||
notoriously unportable feature, and two, the author is irrationally
|
||||
suspicious of them and prefers to use casts. More compilers are
|
||||
now implementing templates, and so it will probably be safe to use
|
||||
them soon without fear of portability problems.
|
||||
|
||||
\subsection{Precompiled headers}
|
||||
|
||||
Some compilers, such as Borland C++ and Microsoft C++, support
|
||||
precompiled headers. This can save a great deal of compiling time. The
|
||||
recommended approach is to precompile {\tt ``wx.h''}, using this
|
||||
precompiled header for compiling both wxWindows itself and any
|
||||
wxWindows applications. For Windows compilers, two dummy source files
|
||||
are provided (one for normal applications and one for creating DLLs)
|
||||
to allow initial creation of the precompiled header.
|
||||
|
||||
However, there are several downsides to using precompiled headers. One
|
||||
is that to take advantage of the facility, you often need to include
|
||||
more header files than would normally be the case. This means that
|
||||
changing a header file will cause more recompilations (in the case of
|
||||
wxWindows, everything needs to be recompiled since everything includes
|
||||
{\tt ``wx.h''}!)
|
||||
|
||||
A related problem is that for compilers that don't have precompiled
|
||||
headers, including a lot of header files slows down compilation
|
||||
considerably. For this reason, you will find (in the common
|
||||
X and Windows parts of the library) conditional
|
||||
compilation that under UNIX, includes a minimal set of headers;
|
||||
and when using Visual C++, includes {\tt wx.h}. This should help provide
|
||||
the optimal compilation for each compiler, although it is
|
||||
biassed towards the precompiled headers facility available
|
||||
in Microsoft C++.
|
||||
|
||||
\section{File handling}
|
||||
|
||||
When building an application which may be used under different
|
||||
environments, one difficulty is coping with documents which may be
|
||||
moved to different directories on other machines. Saving a file which
|
||||
has pointers to full pathnames is going to be inherently unportable. One
|
||||
approach is to store filenames on their own, with no directory
|
||||
information. The application searches through a number of locally
|
||||
defined directories to find the file. To support this, the class {\bf
|
||||
wxPathList} makes adding directories and searching for files easy, and
|
||||
the global function {\bf FileNameFromPath} allows the application to
|
||||
strip off the filename from the path if the filename must be stored.
|
||||
This has undesirable ramifications for people who have documents of the
|
||||
same name in different directories.
|
||||
|
||||
As regards the limitations of DOS 8+3 single-case filenames versus
|
||||
unrestricted UNIX filenames, the best solution is to use DOS filenames
|
||||
for your application, and also for document filenames {\it if} the user
|
||||
is likely to be switching platforms regularly. Obviously this latter
|
||||
choice is up to the application user to decide. Some programs (such as
|
||||
YACC and LEX) generate filenames incompatible with DOS; the best
|
||||
solution here is to have your UNIX makefile rename the generated files
|
||||
to something more compatible before transferring the source to DOS.
|
||||
Transferring DOS files to UNIX is no problem, of course, apart from EOL
|
||||
conversion for which there should be a utility available (such as
|
||||
dos2unix).
|
||||
|
||||
See also the File Functions section of the reference manual for
|
||||
descriptions of miscellaneous file handling functions.
|
||||
|
||||
\chapter{Utilities supplied with wxWindows}\label{utilities}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
|
||||
A number of `extras' are supplied with wxWindows, to complement
|
||||
the GUI functionality in the main class library. These are found
|
||||
below the utils directory and usually have their own source, library
|
||||
and documentation directories. For larger user-contributed packages,
|
||||
see the directory /pub/packages/wxwin/contrib.
|
||||
|
||||
\section{wxHelp}\label{wxhelp}
|
||||
|
||||
wxHelp is a stand-alone program, written using wxWindows,
|
||||
for displaying hypertext help. It is necessary since not all target
|
||||
systems (notably X) supply an adequate
|
||||
standard for on-line help. wxHelp is modelled on the MS Windows help
|
||||
system, with contents, search and browse buttons, but does not reformat
|
||||
text to suit the size of window, as WinHelp does, and its input files
|
||||
are uncompressed ASCII with some embedded font commands and an .xlp
|
||||
extension. Most wxWindows documentation (user manuals and class
|
||||
references) is supplied in wxHelp format, and also in Windows Help
|
||||
format.
|
||||
|
||||
Note that an application can be programmed to use Windows Help under
|
||||
MS Windows, and wxHelp under X. An alternative help viewer under X is
|
||||
Mosaic, a World Wide Web viewer that uses HTML as its native hypertext
|
||||
format. However, this is not currently integrated with wxWindows
|
||||
applications.
|
||||
|
||||
wxHelp works in two modes---edit and end-user. In edit mode, an ASCII
|
||||
file may be marked up with different fonts and colours, and divided into
|
||||
sections. In end-user mode, no editing is possible, and the user browses
|
||||
principally by clicking on highlighted blocks.
|
||||
|
||||
When an application invokes wxHelp, subsequent sections, blocks or
|
||||
files may be viewed using the same instance of wxHelp since the two
|
||||
programs are linked using wxWindows interprocess communication
|
||||
facilities. When the application exits, that application's instance of
|
||||
wxHelp may be made to exit also. See the {\bf wxHelpInstance} entry in the
|
||||
reference section for how an application controls wxHelp.
|
||||
|
||||
\section{Tex2RTF}\label{textortf}
|
||||
|
||||
Supplied with wxWindows is a utility called Tex2RTF for converting\rtfsp
|
||||
\LaTeX\ manuals to the following formats:
|
||||
|
||||
\begin{description}
|
||||
\item[wxHelp]
|
||||
wxWindows help system format (XLP).
|
||||
\item[Linear RTF]
|
||||
Rich Text Format suitable for importing into a word processor.
|
||||
\item[Windows Help RTF]
|
||||
Rich Text Format suitable for compiling into a WinHelp HLP file with the
|
||||
help compiler.
|
||||
\item[HTML]
|
||||
HTML is the native format for Mosaic, the main hypertext viewer for
|
||||
the World Wide Web. Since it is freely available it is a good candidate
|
||||
for being the wxWindows help system under X, as an alternative to wxHelp.
|
||||
\end{description}
|
||||
|
||||
Tex2RTF is used for the wxWindows manuals and can be used independently
|
||||
by authors wishing to create on-line and printed manuals from the same\rtfsp
|
||||
\LaTeX\ source. Please see the separate documentation for Tex2RTF.
|
||||
|
||||
\section{wxTreeLayout}
|
||||
|
||||
This is a simple class library for drawing trees in a reasonably pretty
|
||||
fashion. It provides only minimal default drawing capabilities, since
|
||||
the algorithm is meant to be used for implementing custom tree-based
|
||||
tools.
|
||||
|
||||
Directed graphs may also be drawn using this library, if cycles are
|
||||
removed before the nodes and arcs are passed to the algorithm.
|
||||
|
||||
Tree displays are used in many applications: directory browsers,
|
||||
hypertext systems, class browsers, and decision trees are a few
|
||||
possibilities.
|
||||
|
||||
See the separate manual and the directory utils/wxtree.
|
||||
|
||||
\section{wxGraphLayout}
|
||||
|
||||
The wxGraphLayout class is based on a tool called `graphplace' by Dr.
|
||||
Jos T.J. van Eijndhoven of Eindhoven University of Technology. Given a
|
||||
(possibly cyclic) directed graph, it does its best to lay out the nodes
|
||||
in a sensible manner. There are many applications (such as diagramming)
|
||||
where it is required to display a graph with no human intervention. Even
|
||||
if manual repositioning is later required, this algorithm can make a good
|
||||
first attempt.
|
||||
|
||||
See the separate manual and the directory utils/wxgraph.
|
||||
|
||||
\section{wxImage}\label{wximage}
|
||||
|
||||
This is a collection of GIF/BMP/XBM bitmap loading and displaying
|
||||
routines for X.
|
||||
|
||||
\section{MFUTILS}\label{mfutils}
|
||||
|
||||
A very modest step towards reading Windows metafiles on the
|
||||
any platform. Julian Smart's ClockWorks program demonstrates
|
||||
how extremely simple metafiles may be read and displayed (in this
|
||||
case, to be used as clock hands).
|
||||
|
||||
\section{Colours}\label{coloursampler}
|
||||
|
||||
A colour sampler for viewing colours and their names on each
|
||||
platform.
|
||||
|
||||
%
|
||||
\chapter{Tutorial}\label{tutorial}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
|
||||
To be written.
|
||||
|
||||
\chapter{Programming strategies}\label{strategies}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
|
||||
This chapter is intended to list strategies that may be useful when
|
||||
writing and debugging wxWindows programs. If you have any good tips,
|
||||
please submit them for inclusion here.
|
||||
|
||||
\section{Strategies for reducing programming errors}
|
||||
|
||||
\subsection{Use ASSERT}
|
||||
|
||||
Although I haven't done this myself within wxWindows, it is good
|
||||
practice to use ASSERT statements liberally, that check for conditions that
|
||||
should or should not hold, and print out appropriate error messages.
|
||||
These can be compiled out of a non-debugging version of wxWindows
|
||||
and your application. Using ASSERT is an example of `defensive programming':
|
||||
it can alert you to problems later on.
|
||||
|
||||
\subsection{Use wxString in preference to character arrays}
|
||||
|
||||
Using wxString can be much safer and more convenient than using char *.
|
||||
Again, I haven't practised what I'm preaching, but I'm now trying to use
|
||||
wxString wherever possible. You can reduce the possibility of memory
|
||||
leaks substantially, and it's much more convenient to use the overloaded
|
||||
operators than functions such as strcmp. wxString won't add a significant
|
||||
overhead to your program; the overhead is compensated for by easier
|
||||
manipulation (which means less code).
|
||||
|
||||
The same goes for other data types: use classes wherever possible.
|
||||
|
||||
\section{Strategies for portability}
|
||||
|
||||
\subsection{Use relative positioning or constraints}
|
||||
|
||||
Don't use absolute panel item positioning if you can avoid it. Different GUIs have
|
||||
very differently sized panel items. Consider using the constraint system, although this
|
||||
can be complex to program. If you needs are simple, the default relative positioning
|
||||
behaviour may be adequate (using default position values and wxPanel::NewLine).
|
||||
|
||||
Alternatively, you could use alternative .wrc (wxWindows resource files) on different
|
||||
platforms, with slightly different dimensions in each. Or space your panel items out
|
||||
to avoid problems.
|
||||
|
||||
\subsection{Use wxWindows resource files}
|
||||
|
||||
Use .wrc (wxWindows resource files) where possible, because they can be easily changed
|
||||
independently of source code. Bitmap resources can be set up to load different
|
||||
kinds of bitmap depending on platform (see the section on resource files).
|
||||
|
||||
\section{Strategies for debugging}
|
||||
|
||||
\subsection{Positive thinking}
|
||||
|
||||
It's common to blow up the problem in one's imagination, so that it seems to threaten
|
||||
weeks, months or even years of work. The problem you face may seem insurmountable:
|
||||
but almost never is. Once you have been programming for some time, you will be able
|
||||
to remember similar incidents that threw you into the depths of despair. But
|
||||
remember, you always solved the problem, somehow!
|
||||
|
||||
Perseverance is often the key, even though a seemingly trivial problem
|
||||
can take an apparently inordinate amount of time to solve. In the end,
|
||||
you will probably wonder why you worried so much. That's not to say it
|
||||
isn't painful at the time. Try not to worry -- there are many more important
|
||||
things in life.
|
||||
|
||||
\subsection{Simplify the problem}
|
||||
|
||||
Reduce the code exhibiting the problem to the smallest program possible
|
||||
that exhibits the problem. If it is not possible to reduce a large and
|
||||
complex program to a very small program, then try to ensure your code
|
||||
doesn't hide the problem (you may have attempted to minimize the problem
|
||||
in some way: but now you want to expose it).
|
||||
|
||||
With luck, you can add a small amount of code that causes the program
|
||||
to go from functioning to non-functioning state. This should give a clue
|
||||
to the problem. In some cases though, such as memory leaks or wrong
|
||||
deallocation, this can still give totally spurious results!
|
||||
|
||||
\subsection{Genetic mutation}
|
||||
|
||||
If we had sophisticated genetic algorithm tools that could be applied
|
||||
to programming, we could use them. Until then, a common -- if rather irrational --
|
||||
technique is to just make arbitrary changes to the code until something
|
||||
different happens. You may have an intuition why a change will make a difference;
|
||||
otherwise, just try altering the order of code, comment lines out, anything
|
||||
to get over an impasse. Obviously, this is usually a last resort.
|
||||
|
||||
\subsection{Use a debugger}
|
||||
|
||||
This sounds like facetious advice, but it's surprising how often people
|
||||
don't use a debugger. Often it's an overhead to install or learn how to
|
||||
use a debugger, but it really is essential for anything but the most
|
||||
trivial programs. Some platforms don't allow for debugging, such
|
||||
as WIN32s under Windows 3.x. In this case, you might be advised to
|
||||
debug under 16-bit Windows and when you're confident, compile for
|
||||
WIN32s. In fact WIN32s can be very strict about bad memory handling,
|
||||
so testing out under WIN32s is a good thing to do even if you're
|
||||
not going to distribute this version. (Unless you've got a good memory checking,
|
||||
utility, of course!) Tracking bugs under WIN32s can involve a lot of debug message
|
||||
insertion and relinking, so make sure your compiler has a fast linker
|
||||
(e.g. Watcom, Symantec).
|
||||
|
||||
\subsection{Use tracing code}
|
||||
|
||||
You can use wxDebugMsg statements (or the wxDebugStreamBuf class) to
|
||||
output to a debugging window such as DBWIN under Windows, or standard
|
||||
error under X. If compiling in DEBUG mode, you can use TRACE statements
|
||||
that will be compiled out of the final build of your application.
|
||||
|
||||
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 wxObject::Dump and the wxDebugContext class}
|
||||
|
||||
It's good practice to implement the Dump member function for all
|
||||
classes derived from wxObject. You can then make use of wxDebugContext
|
||||
to dump out information on all objects in the program, if DEBUG is
|
||||
defined to be more than zero. You can use wxDebugContext to check for
|
||||
memory leaks and corrupt memory. See the debugging topic in the
|
||||
reference manual for more information.
|
||||
|
||||
\subsection{Check Windows debug messages}
|
||||
|
||||
Under Windows, it's worth running your program with DBWIN running or
|
||||
some other program that shows Windows-generated debug messages. It's
|
||||
possible it'll show invalid handles being used. You may have fun seeing
|
||||
what commercial programs cause these normally hidden errors! Microsoft
|
||||
recommend using the debugging version of Windows, which shows up even
|
||||
more problems. However, I doubt it's worth the hassle for most
|
||||
applications. wxWindows is designed to minimize the possibility of such
|
||||
errors, but they can still happen occasionally, slipping through unnoticed
|
||||
because they are not severe enough to cause a crash.
|
BIN
docs/latex/wx/book1.bmp
Normal file
After Width: | Height: | Size: 566 B |
BIN
docs/latex/wx/books.bmp
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
docs/latex/wx/books.gif
Normal file
After Width: | Height: | Size: 438 B |
343
docs/latex/wx/brush.tex
Normal file
@ -0,0 +1,343 @@
|
||||
\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{Remarks}
|
||||
|
||||
On a monochrome display, wxWindows shows
|
||||
all brushes as white unless the colour is really black.
|
||||
|
||||
Do not initialize objects on the stack before the program commences,
|
||||
since other required structures may not have been set up yet. Instead,
|
||||
define global pointers to objects and create them in \helpref{wxApp::OnInit}{wxapponinit} or
|
||||
when required.
|
||||
|
||||
An application may wish to create brushes with different
|
||||
characteristics dynamically, and there is the consequent danger that a
|
||||
large number of duplicate brushes will be created. Therefore an
|
||||
application may wish to get a pointer to a brush by using the global
|
||||
list of brushes {\bf wxTheBrushList}, and calling the member function
|
||||
\rtfsp{\bf FindOrCreateBrush}.
|
||||
|
||||
wxBrush uses a reference counting system, so assignments between brushes are very
|
||||
cheap. You can therefore use actual wxBrush objects instead of pointers without
|
||||
efficiency problems. Bear in mind, though, that changing a brush's properties may
|
||||
affect another brush which has been involved in an assignment with the first brush,
|
||||
because of the way internal brush data is shared.
|
||||
|
||||
TODO: an overview for wxBrush.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBrushList}{wxbrushlist}, \helpref{wxDC}{wxdc}, \helpref{wxDC::SetBrush}{wxdcsetbrush}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxBrush::wxBrush}
|
||||
|
||||
\func{}{wxBrush}{\void}
|
||||
|
||||
Default constructor. The brush will be uninitialised, and \helpref{wxBrush::Ok}{wxbrushok} will
|
||||
return FALSE.
|
||||
|
||||
\func{}{wxBrush}{\param{const wxColour\&}{ colour}, \param{const int}{ style}}
|
||||
|
||||
Constructs a brush from a colour object and style.
|
||||
|
||||
\func{}{wxBrush}{\param{const wxString\& }{colourName}, \param{const int}{ style}}
|
||||
|
||||
Constructs a brush from a colour name and style.
|
||||
|
||||
\func{}{wxBrush}{\param{const wxBitmap\& }{stippleBitmap}}
|
||||
|
||||
Constructs a stippled brush using a bitmap.
|
||||
|
||||
\func{}{wxBrush}{\param{const wxBrush\&}{ brush}}
|
||||
|
||||
Copy constructor. This uses reference counting so is a cheap operation.
|
||||
|
||||
\func{}{wxBrush}{\param{const wxBrush*}{ brush}}
|
||||
|
||||
Copy constructor. This uses reference counting so is a cheap operation.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{colour}{Colour object.}
|
||||
|
||||
\docparam{colourName}{Colour name. The name will be looked up in the colour database.}
|
||||
|
||||
\docparam{style}{One of:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxTRANSPARENT}}{Transparent (no fill).}
|
||||
\twocolitem{{\bf wxSOLID}}{Solid.}
|
||||
\twocolitem{{\bf wxBDIAGONAL\_HATCH}}{Backward diagonal hatch.}
|
||||
\twocolitem{{\bf wxCROSSDIAG\_HATCH}}{Cross-diagonal hatch.}
|
||||
\twocolitem{{\bf wxFDIAGONAL\_HATCH}}{Forward diagonal hatch.}
|
||||
\twocolitem{{\bf wxCROSS\_HATCH}}{Cross hatch.}
|
||||
\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.}
|
||||
\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.}
|
||||
\end{twocollist}}
|
||||
|
||||
\docparam{brush}{Pointer or reference to a brush to copy.}
|
||||
|
||||
\docparam{stippleBitmap}{A bitmap to use for stippling.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
If a stipple brush is created, the brush style will be set to wxSTIPPLE.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBrushList}{wxbrushlist}, \helpref{wxColour}{wxcolour}, \helpref{wxColourDatabase}{wxcolourdatabase}
|
||||
|
||||
\membersection{wxBrush::\destruct{wxBrush}}
|
||||
|
||||
\func{void}{\destruct{wxBrush}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The destructor may not delete the underlying brush object of the native windowing
|
||||
system, since wxBrush uses a reference counting system for efficiency.
|
||||
|
||||
Although all remaining brushes are deleted when the application exits,
|
||||
the application should try to clean up all brushes itself. This is because
|
||||
wxWindows cannot know if a pointer to the brush object is stored in an
|
||||
application data structure, and there is a risk of double deletion.
|
||||
|
||||
\membersection{wxBrush::GetColour}\label{wxbrushgetcolour}
|
||||
|
||||
\constfunc{wxColour\&}{GetColour}{\void}
|
||||
|
||||
Returns a reference to the brush colour.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBrush::SetColour}{wxbrushsetcolour}
|
||||
|
||||
\membersection{wxBrush::GetStipple}\label{wxbrushgetstipple}
|
||||
|
||||
\constfunc{wxBitmap *}{GetStipple}{\void}
|
||||
|
||||
Gets a pointer to the stipple bitmap. If the brush does not have a wxSTIPPLE style,
|
||||
this bitmap may be non-NULL but uninitialised (\helpref{wxBitmap::Ok}{wxbitmapok} returns FALSE).
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBrush::SetStipple}{wxbrushsetstipple}
|
||||
|
||||
\membersection{wxBrush::GetStyle}\label{wxbrushgetstyle}
|
||||
|
||||
\constfunc{int}{GetStyle}{\void}
|
||||
|
||||
Returns the brush style, one of:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxTRANSPARENT}}{Transparent (no fill).}
|
||||
\twocolitem{{\bf wxSOLID}}{Solid.}
|
||||
\twocolitem{{\bf wxBDIAGONAL\_HATCH}}{Backward diagonal hatch.}
|
||||
\twocolitem{{\bf wxCROSSDIAG\_HATCH}}{Cross-diagonal hatch.}
|
||||
\twocolitem{{\bf wxFDIAGONAL\_HATCH}}{Forward diagonal hatch.}
|
||||
\twocolitem{{\bf wxCROSS\_HATCH}}{Cross hatch.}
|
||||
\twocolitem{{\bf wxHORIZONTAL\_HATCH}}{Horizontal hatch.}
|
||||
\twocolitem{{\bf wxVERTICAL\_HATCH}}{Vertical hatch.}
|
||||
\twocolitem{{\bf wxSTIPPLE}}{Stippled using a bitmap.}
|
||||
\end{twocollist}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBrush::SetStyle}{wxbrushsetstyle}, \helpref{wxBrush::SetColour}{wxbrushsetcolour},\rtfsp
|
||||
\helpref{wxBrush::SetStipple}{wxbrushsetstipple}
|
||||
|
||||
\membersection{wxBrush::Ok}\label{wxbrushok}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
Returns TRUE if the brush is initialised. It will return FALSE if the default
|
||||
constructor has been used (for example, the brush is a member of a class, or
|
||||
NULL has been assigned to it).
|
||||
|
||||
\membersection{wxBrush::SetColour}\label{wxbrushsetcolour}
|
||||
|
||||
\func{void}{SetColour}{\param{wxColour\& }{colour}}
|
||||
|
||||
Sets the brush colour using a reference to a colour object.
|
||||
|
||||
\func{void}{SetColour}{\param{const wxString\& }{colourName}}
|
||||
|
||||
Sets the brush colour using a colour name from the colour database.
|
||||
|
||||
\func{void}{SetColour}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}}
|
||||
|
||||
Sets the brush colour using red, green and blue values.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBrush::GetColour}{wxbrushgetcolour}
|
||||
|
||||
\membersection{wxBrush::SetStipple}\label{wxbrushsetstipple}
|
||||
|
||||
\func{void}{SetStipple}{\param{const wxBitmap\&}{ bitmap}}
|
||||
|
||||
Sets the stipple bitmap.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{The bitmap to use for stippling.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The style will be set to wxSTIPPLE.
|
||||
|
||||
Note that there is a big difference between stippling in X and Windows.
|
||||
On X, the stipple is a mask between the wxBitmap and current colour.
|
||||
On Windows, the current colour is ignored, and the bitmap colour is used.
|
||||
However, for pre-defined modes like wxCROSS\_HATCH, the behaviour is the
|
||||
same for both platforms.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap}{wxbitmap}
|
||||
|
||||
\membersection{wxBrush::SetStyle}\label{wxbrushsetstyle}
|
||||
|
||||
\func{void}{SetStyle}{\param{const 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.}
|
||||
\end{twocollist}}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBrush::GetStyle}{wxbrushgetstyle}
|
||||
|
||||
\membersection{wxBrush::operator $=$}\label{wxbrushassignment}
|
||||
|
||||
\func{wxBrush\&}{operator $=$}{\param{const wxBrush\& }{brush}}
|
||||
|
||||
Assignment operator, using reference counting. Returns a reference
|
||||
to `this'.
|
||||
|
||||
\membersection{wxBrush::operator $==$}\label{wxbrushequals}
|
||||
|
||||
\func{bool}{operator $==$}{\param{const wxBrush\& }{brush}}
|
||||
|
||||
Equality operator. Two brushes are equal if they contain pointers
|
||||
to the same underlying brush data. It does not compare each attribute,
|
||||
so two independently-created brushes using the same parameters will
|
||||
fail the test.
|
||||
|
||||
\membersection{wxBrush::operator $!=$}\label{wxbrushnotequals}
|
||||
|
||||
\func{bool}{operator $!=$}{\param{const wxBrush\& }{brush}}
|
||||
|
||||
Inequality operator. Two brushes are not equal if they contain pointers
|
||||
to different underlying brush data. It does not compare each attribute.
|
||||
|
||||
\section{\class{wxBrushList}}\label{wxbrushlist}
|
||||
|
||||
A brush list is a list containing all brushes which have been created.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxList}{wxlist}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
There is only one instance of this class: {\bf wxTheBrushList}. Use
|
||||
this object to search for a previously created brush of the desired
|
||||
type and create it if not already found. In some windowing systems,
|
||||
the brush may be a scarce resource, so it can pay to reuse old
|
||||
resources if possible. When an application finishes, all brushes will
|
||||
be deleted and their resources freed, eliminating the possibility of
|
||||
`memory leaks'. However, it is best not to rely on this automatic
|
||||
cleanup because it can lead to double deletion in some circumstances.
|
||||
|
||||
There are two mechanisms in recent versions of wxWindows which make the
|
||||
brush list less useful than it once was. Under Windows, scarce resources
|
||||
are cleaned up internally if they are not being used. Also, a referencing
|
||||
counting mechanism applied to all GDI objects means that some sharing
|
||||
of underlying resources is possible. You don't have to keep track of pointers,
|
||||
working out when it is safe delete a brush, because the referencing counting does
|
||||
it for you. For example, you can set a brush in a device context, and then
|
||||
immediately delete the brush you passed, because the brush is `copied'.
|
||||
|
||||
So you may find it easier to ignore the brush list, and instead create
|
||||
and copy brushes as you see fit. If your Windows resource meter suggests
|
||||
your application is using too many resources, you can resort to using
|
||||
GDI lists to share objects explicitly.
|
||||
|
||||
The only compelling use for the brush list is for wxWindows to keep
|
||||
track of brushes in order to clean them up on exit. It is also kept for
|
||||
backward compatibility with earlier versions of wxWindows.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBrush}{wxbrush}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxBrushList::wxBrushList}\label{wxbrushlistconstr}
|
||||
|
||||
\func{void}{wxBrushList}{\void}
|
||||
|
||||
Constructor. The application should not construct its own brush list:
|
||||
use the object pointer {\bf wxTheBrushList}.
|
||||
|
||||
\membersection{wxBrushList::AddBrush}\label{wxbrushlistaddbrush}
|
||||
|
||||
\func{void}{AddBrush}{\param{wxBrush *}{brush}}
|
||||
|
||||
Used internally by wxWindows to add a brush to the list.
|
||||
|
||||
\membersection{wxBrushList::FindOrCreateBrush}\label{wxbrushlistfindorcreatebrush}
|
||||
|
||||
\func{wxBrush *}{FindOrCreateBrush}{\param{const wxColour\& }{colour}, \param{const int}{ style}}
|
||||
|
||||
Finds a brush with the specified attributes and returns it, else creates a new brush, adds it
|
||||
to the brush list, and returns it.
|
||||
|
||||
\func{wxBrush *}{FindOrCreateBrush}{\param{const wxString\& }{colourName}, \param{const int}{ style}}
|
||||
|
||||
Finds a brush with the specified attributes and returns it, else creates a new brush, adds it
|
||||
to the brush list, and returns it.
|
||||
|
||||
Finds a brush of the given specification, or creates one and adds it to the list.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{colour}{Colour object.}
|
||||
|
||||
\docparam{colourName}{Colour name, which should be in the colour database.}
|
||||
|
||||
\docparam{style}{Brush style. See \helpref{wxBrush::SetStyle}{wxbrushsetstyle} for a list of styles.}
|
||||
|
||||
\membersection{wxBrushList::RemoveBrush}\label{wxbrushlistremovebrush}
|
||||
|
||||
\func{void}{RemoveBrush}{\param{wxBrush *}{brush}}
|
||||
|
||||
Used by wxWindows to remove a brush from the list.
|
||||
|
||||
|
BIN
docs/latex/wx/bullet.bmp
Normal file
After Width: | Height: | Size: 198 B |
126
docs/latex/wx/button.tex
Normal file
@ -0,0 +1,126 @@
|
||||
\section{\class{wxButton}}\label{wxbutton}
|
||||
|
||||
A button is a control that contains a text string,
|
||||
and is one of the commonest elements of a GUI. It may be placed on a
|
||||
\rtfsp\helpref{dialog box}{wxdialog} or \helpref{panel}{wxpanel}, or indeed
|
||||
almost any other window.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxControl}{wxcontrol}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
There are no special styles for wxButton.
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmapButton}{wxbitmapbutton}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxButton::wxButton}\label{wxbuttonconstr}
|
||||
|
||||
\func{}{wxButton}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxButton}{\param{wxWindow* }{parent}, \param{const wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
|
||||
\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
||||
\param{const long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}}
|
||||
|
||||
Constructor, creating and showing a button.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{Parent window. Must not be NULL.}
|
||||
|
||||
\docparam{id}{Button identifier. A value of -1 indicates a default value.}
|
||||
|
||||
\docparam{label}{Text to be displayed on the button.}
|
||||
|
||||
\docparam{pos}{Button position.}
|
||||
|
||||
\docparam{size}{Button size. If the default size (-1, -1) is specified then the button is sized
|
||||
appropriately for the text.}
|
||||
|
||||
\docparam{style}{Window style. See \helpref{wxButton}{wxbutton}.}
|
||||
|
||||
\docparam{validator}{Window validator.}
|
||||
|
||||
\docparam{name}{Window name.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxButton::Create}{wxbuttoncreate}, \helpref{wxValidator}{wxvalidator}
|
||||
|
||||
\membersection{wxButton::\destruct{wxButton}}
|
||||
|
||||
\func{}{\destruct{wxButton}}{\void}
|
||||
|
||||
Destructor, destroying the button.
|
||||
|
||||
\membersection{wxButton::Create}\label{wxbuttoncreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID}{ id}, \param{const wxString\& }{label},\rtfsp
|
||||
\param{const wxPoint\& }{pos}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
||||
\param{const long}{ style = 0}, \param{const wxValidator\& }{validator}, \param{const wxString\& }{name = ``button"}}
|
||||
|
||||
Button creation function for two-step creation. For more details, see \helpref{wxButton::wxButton}{wxbuttonconstr}.
|
||||
|
||||
\membersection{wxButton::GetLabel}\label{wxbuttongetlabel}
|
||||
|
||||
\constfunc{wxString}{GetLabel}{\void}
|
||||
|
||||
Returns the string label for the button.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The button's label.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxButton::SetLabel}{wxbuttonsetlabel}
|
||||
|
||||
\membersection{wxButton::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, \helpref{wxWindow::OnDefaultAction}{wxwindowondefaultaction}\rtfsp
|
||||
and \helpref{wxWindow::GetDefaultItem}{wxwindowgetdefaultitem}.
|
||||
|
||||
Note that under Motif, calling this function immediately after
|
||||
creation of a button and before the creation of other buttons
|
||||
will cause misalignment of the row of buttons, since default
|
||||
buttons are larger. To get around this, call {\it SetDefault}\rtfsp
|
||||
after you have created a row of buttons: wxWindows will
|
||||
then set the size of all buttons currently on the panel to
|
||||
the same size.
|
||||
|
||||
\membersection{wxButton::SetLabel}\label{wxbuttonsetlabel}
|
||||
|
||||
\func{void}{SetLabel}{\param{const wxString\& }{label}}
|
||||
|
||||
Sets the string label for the button.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{label}{The label to set.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxButton::GetLabel}{wxbuttongetlabel}
|
||||
|
334
docs/latex/wx/category.tex
Normal file
@ -0,0 +1,334 @@
|
||||
\chapter{Classes by category}\label{classesbycat}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
|
||||
A classification of wxWindows classes by category.
|
||||
\twocolwidtha{5cm}
|
||||
|
||||
{\large {\bf Managed windows}}
|
||||
|
||||
There are several types of window that are directly controlled by the
|
||||
window manager (such as MS Windows, or the Motif Window Manager).
|
||||
Frames may contain windows, and dialog boxes may directly contain controls.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxDialog}{wxdialog}}{Dialog box}
|
||||
\twocolitem{\helpref{wxFrame}{wxframe}}{Normal frame}
|
||||
\twocolitem{\helpref{wxMDIParentFrame}{wxmdiparentframe}}{MDI parent frame}
|
||||
\twocolitem{\helpref{wxMDIChildFrame}{wxmdichildframe}}{MDI child frame}
|
||||
\twocolitem{\helpref{wxMiniFrame}{wxminiframe}}{A frame with a small title bar}
|
||||
\twocolitem{\helpref{wxTabbedDialog}{wxtabbeddialog}}{Tabbed dialog}
|
||||
\end{twocollist}
|
||||
|
||||
See also {\bf Common dialogs}.
|
||||
|
||||
{\large {\bf Miscellaneous windows}}
|
||||
|
||||
The following are a variety of windows that are derived from wxWindow.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxGrid}{wxgrid}}{A grid (table) window}
|
||||
\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{wxSplitterWindow}{wxsplitterwindow}}{Window which can be split vertically or horizontally}
|
||||
\twocolitem{\helpref{wxStatusBar}{wxstatusbar}}{Implements the status bar on a frame}
|
||||
\twocolitem{\helpref{wxStatusBar95}{wxstatusbar95}}{Implements a Windows 95 status bar on a frame}
|
||||
\twocolitem{\helpref{wxTabbedPanel}{wxtabbedpanel}}{Tabbed panel}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Toolbar classes}}
|
||||
|
||||
\overview{Overview}{wxtoolbaroverview}
|
||||
|
||||
These are the toolbar classes.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxToolBarBase}{wxtoolbarbase}}{Toolbar base class}
|
||||
\twocolitem{\helpref{wxToolBarSimple}{wxtoolbarsimple}}{A simple, cross-platform toolbar class}
|
||||
\twocolitem{\helpref{wxToolBarMSW}{wxtoolbarmsw}}{A Windows-only toolbar class}
|
||||
\twocolitem{\helpref{wxToolBar95}{wxtoolbar95}}{A Windows 95-only toolbar class}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Common dialogs}}
|
||||
|
||||
\overview{Overview}{commondialogsoverview}
|
||||
|
||||
Common dialogs are ready-made dialog classes which are frequently used
|
||||
in an application.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxDialog}{wxdialog}}{Base class for common dialogs}
|
||||
\twocolitem{\helpref{wxColourDialog}{wxcolourdialog}}{Colour chooser dialog}
|
||||
\twocolitem{\helpref{wxDirDialog}{wxdirdialog}}{Directory selector dialog}
|
||||
\twocolitem{\helpref{wxFileDialog}{wxfiledialog}}{File selector dialog}
|
||||
\twocolitem{\helpref{wxMultipleChoiceDialog}{wxmultiplechoicedialog}}{Dialog to get one or more selections from a list}
|
||||
\twocolitem{\helpref{wxSingleChoiceDialog}{wxsinglechoicedialog}}{Dialog to get a single selection from a list and return the string}
|
||||
\twocolitem{\helpref{wxTextEntryDialog}{wxtextentrydialog}}{Dialog to get a single line of text from the user}
|
||||
\twocolitem{\helpref{wxFontDialog}{wxfontdialog}}{Font chooser dialog}
|
||||
\twocolitem{\helpref{wxPageSetupDialog}{wxpagesetupdialog}}{Standard page setup dialog}
|
||||
\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print dialog}
|
||||
\twocolitem{\helpref{wxMessageDialog}{wxmessagedialog}}{Simple message box dialog}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Controls}}
|
||||
|
||||
Typically, these are small windows which provide interaction with the user. Controls
|
||||
that are not static can have \helpref{validators}{wxvalidator} associated with them.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxControl}{wxcontrol}}{The base class for controls}
|
||||
\twocolitem{\helpref{wxButton}{wxbutton}}{Push button control, displaying text}
|
||||
\twocolitem{\helpref{wxBitmapButton}{wxbitmapbutton}}{Push button control, displaying a bitmap}
|
||||
\twocolitem{\helpref{wxCheckBox}{wxcheckbox}}{Checkbox control}
|
||||
\twocolitem{\helpref{wxCheckListBox}{wxchecklistbox}}{A listbox with a checkbox to the left of each item}
|
||||
\twocolitem{\helpref{wxChoice}{wxchoice}}{Choice control (a combobox without the editable area)}
|
||||
\twocolitem{\helpref{wxComboBox}{wxcombobox}}{A choice with an editable area}
|
||||
\twocolitem{\helpref{wxGauge}{wxgauge}}{A control to represent a varying quantity, such as time remaining}
|
||||
\twocolitem{\helpref{wxStaticBox}{wxstaticbox}}{A static, or group box for visually grouping related controls}
|
||||
\twocolitem{\helpref{wxListBox}{wxlistbox}}{A list of strings for single or multiple selection}
|
||||
\twocolitem{\helpref{wxListCtrl}{wxlistctrl}}{A control for displaying lists of strings and/or icons, plus a multicolumn report view}
|
||||
\twocolitem{\helpref{wxTabCtrl}{wxtabctrl}}{Manages several tabs}
|
||||
\twocolitem{\helpref{wxTextCtrl}{wxtextctrl}}{Single or multline text editing control}
|
||||
\twocolitem{\helpref{wxTreeCtrl}{wxtreectrl}}{Tree (hierachy) control}
|
||||
\twocolitem{\helpref{wxScrollBar}{wxscrollbar}}{Scrollbar control}
|
||||
\twocolitem{\helpref{wxSpinButton}{wxspinbutton}}{A spin or `up-down' control}
|
||||
\twocolitem{\helpref{wxStaticText}{wxstatictext}}{One or more lines of non-editable text}
|
||||
\twocolitem{\helpref{wxStaticBitmap}{wxstaticbitmap}}{A control to display a bitmap}
|
||||
\twocolitem{\helpref{wxRadioBox}{wxradiobox}}{A group of radio buttons}
|
||||
\twocolitem{\helpref{wxRadioButton}{wxradiobutton}}{A round button to be used with others in a mutually exclusive way}
|
||||
\twocolitem{\helpref{wxSlider}{wxslider}}{A slider that can be dragged by the user}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Menus}}
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxMenu}{wxmenu}}{Displays a series of menu items for selection}
|
||||
\twocolitem{\helpref{wxMenuBar}{wxmenubar}}{Contains a series of menus for use with a frame}
|
||||
\twocolitem{\helpref{wxMenuItem}{wxmenuitem}}{Represents a single menu item}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Window layout}}
|
||||
|
||||
\overview{Overview}{constraintsoverview}
|
||||
|
||||
These are the classes relevant to automated window layout.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}}{Represents a single constraint dimension}
|
||||
\twocolitem{\helpref{wxLayoutConstraints}{wxlayoutconstraints}}{Represents the constraints for a window class}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Device contexts}}
|
||||
|
||||
\overview{Overview}{dcoverview}
|
||||
|
||||
Device contexts are surfaces that may be drawn on, and provide an
|
||||
abstraction that allows parameterisation of your drawing code
|
||||
by passing different device contexts.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxClientDC}{wxclientdc}}{A device context to access the client area outside {\bf OnPaint} events}
|
||||
\twocolitem{\helpref{wxPaintDC}{wxpaintdc}}{A device context to access the client area inside {\bf OnPaint} events}
|
||||
\twocolitem{\helpref{wxWindowDC}{wxwindowdc}}{A device context to access the non-client area}
|
||||
\twocolitem{\helpref{wxScreenDC}{wxscreendc}}{A device context to access the entire screen}
|
||||
\twocolitem{\helpref{wxDC}{wxdc}}{The device context base class}
|
||||
\twocolitem{\helpref{wxMemoryDC}{wxmemorydc}}{A device context for drawing into bitmaps}
|
||||
\twocolitem{\helpref{wxMetaFileDC}{wxmetafiledc}}{A device context for drawing into metafiles}
|
||||
\twocolitem{\helpref{wxPostScriptDC}{wxpostscriptdc}}{A device context for drawing into PostScript files}
|
||||
\twocolitem{\helpref{wxPrinterDC}{wxprinterdc}}{A device context for drawing to printers}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Graphics device interface}}
|
||||
|
||||
\overview{Bitmaps overview}{wxbitmapoverview}
|
||||
|
||||
These classes are related to drawing on device contexts and windows.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxColour}{wxcolour}}{Represents the red, blue and green elements of a colour}
|
||||
\twocolitem{\helpref{wxBitmap}{wxbitmap}}{Represents a bitmap}
|
||||
\twocolitem{\helpref{wxBrush}{wxbrush}}{Used for filling areas on a device context}
|
||||
\twocolitem{\helpref{wxBrushList}{wxbrushlist}}{The list of previously-created brushes}
|
||||
\twocolitem{\helpref{wxCursor}{wxcursor}}{A small, transparent bitmap representing the cursor}
|
||||
\twocolitem{\helpref{wxFont}{wxfont}}{Represents fonts}
|
||||
\twocolitem{\helpref{wxFontList}{wxfontlist}}{The list of previously-created fonts}
|
||||
\twocolitem{\helpref{wxIcon}{wxicon}}{A small, transparent bitmap for assigning to frames and drawing on device contexts}
|
||||
\twocolitem{\helpref{wxImageList}{wximagelist}}{A list of images, used with some controls}
|
||||
\twocolitem{\helpref{wxMask}{wxmask}}{Represents a mask to be used with a bitmap for transparent drawing}
|
||||
\twocolitem{\helpref{wxPen}{wxpen}}{Used for drawing lines on a device context}
|
||||
\twocolitem{\helpref{wxPenList}{wxpenlist}}{The list of previously-created pens}
|
||||
\twocolitem{\helpref{wxPalette}{wxpalette}}{Represents a table of indices into RGB values}
|
||||
\twocolitem{\helpref{wxRegion}{wxregion}}{Represents a simple or complex region on a window or device context}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Events}}
|
||||
|
||||
\overview{Overview}{eventhandlingoverview}
|
||||
|
||||
An event object contains information about a specific event. Event handlers
|
||||
(usually member functions) have a single, event argument.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxActivateEvent}{wxactivateevent}}{A window or application activation event}
|
||||
\twocolitem{\helpref{wxCloseEvent}{wxcloseevent}}{A close window or end session event}
|
||||
\twocolitem{\helpref{wxCommandEvent}{wxcommandevent}}{An event from a variety of standard controls}
|
||||
\twocolitem{\helpref{wxDropFilesEvent}{wxdropfilesevent}}{A drop files event}
|
||||
\twocolitem{\helpref{wxEraseEvent}{wxeraseevent}}{An erase background event}
|
||||
\twocolitem{\helpref{wxEvent}{wxevent}}{The event base class}
|
||||
\twocolitem{\helpref{wxFocusEvent}{wxfocusevent}}{A window focus event}
|
||||
\twocolitem{\helpref{wxKeyEvent}{wxkeyevent}}{A keypress event}
|
||||
\twocolitem{\helpref{wxIdleEvent}{wxidleevent}}{An idle event}
|
||||
\twocolitem{\helpref{wxInitDialogEvent}{wxinitdialogevent}}{A dialog initialisation event}
|
||||
\twocolitem{\helpref{wxJoystickEvent}{wxjoystickevent}}{A joystick event}
|
||||
\twocolitem{\helpref{wxListEvent}{wxlistevent}}{A list control event}
|
||||
\twocolitem{\helpref{wxMenuEvent}{wxmenuevent}}{A menu event}
|
||||
\twocolitem{\helpref{wxMouseEvent}{wxmouseevent}}{A mouse event}
|
||||
\twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{A move event}
|
||||
\twocolitem{\helpref{wxPaintEvent}{wxpaintevent}}{A paint event}
|
||||
%\twocolitem{\helpref{wxSessionEvent}{wxsessionevent}}{A session ending event}
|
||||
\twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{A size event}
|
||||
\twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{A system colour change event}
|
||||
\twocolitem{\helpref{wxTreeEvent}{wxtreeevent}}{A tree control event}
|
||||
\twocolitem{\helpref{wxUpdateUIEvent}{wxupdateuievent}}{A user interface update event}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Validators}}
|
||||
|
||||
These are the window validators, used for filtering and validating
|
||||
user input.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxValidator}{wxvalidator}}{Base validator class.}
|
||||
\twocolitem{\helpref{wxTextValidator}{wxtextvalidator}}{Text control validator class.}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Data structures}}
|
||||
|
||||
These are the data structure classes supported by wxWindows.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxExpr}{wxexpr}}{A class for flexible I/O}
|
||||
\twocolitem{\helpref{wxExprDatabase}{wxexprdatabase}}{A class for flexible I/O}
|
||||
\twocolitem{\helpref{wxDate}{wxdate}}{A class for date manipulation}
|
||||
\twocolitem{\helpref{wxHashTable}{wxhashtable}}{A simple hash table implementation}
|
||||
\twocolitem{\helpref{wxList}{wxlist}}{A simple linked list implementation}
|
||||
\twocolitem{\helpref{wxNode}{wxnode}}{Represents a node in the wxList implementation}
|
||||
\twocolitem{\helpref{wxObject}{wxobject}}{The root class for most wxWindows classes}
|
||||
\twocolitem{\helpref{wxPathList}{wxpathlist}}{A class to help search multiple paths}
|
||||
\twocolitem{\helpref{wxPoint}{wxpoint}}{Representation of a point}
|
||||
\twocolitem{\helpref{wxRect}{wxrect}}{A class representing a rectangle}
|
||||
\twocolitem{\helpref{wxRegion}{wxregion}}{A class representing a region}
|
||||
\twocolitem{\helpref{wxString}{wxstring}}{A string class}
|
||||
\twocolitem{\helpref{wxStringList}{wxstringlist}}{A class representing a list of strings}
|
||||
\twocolitem{\helpref{wxRealPoint}{wxrealpoint}}{Representation of a point using floating point numbers}
|
||||
\twocolitem{\helpref{wxSize}{wxsize}}{Representation of a size}
|
||||
\twocolitem{\helpref{wxTime}{wxtime}}{A class for time manipulation}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Run-time class information system}}
|
||||
|
||||
\overview{Overview}{runtimeclassoverview}
|
||||
|
||||
wxWindows supports run-time manipulation of class information, and dynamic
|
||||
creation of objects given class names.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxClassInfo}{wxclassinfo}}{Holds run-time class information}
|
||||
\twocolitem{\helpref{wxObject}{wxobject}}{Root class for classes with run-time information}
|
||||
\twocolitem{\helpref{Macros}{macros}}{Macros for manipulating run-time information}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Debugging features}}
|
||||
|
||||
\overview{Overview}{debuggingoverview}
|
||||
|
||||
wxWindows supports some aspects of debugging an application through
|
||||
classes, functions and macros.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxDebugContext}{wxdebugcontext}}{Provides various debugging facilities}
|
||||
\twocolitem{\helpref{wxDebugStreamBuf}{wxdebugstreambuf}}{A stream buffer writing to the debug stream}
|
||||
\twocolitem{\helpref{wxObject}{wxobject}}{Provides optional debugging versions of {\bf new} and {\bf delete}}
|
||||
\twocolitem{\helpref{wxTrace}{wxtrace}}{Tracing facility}
|
||||
\twocolitem{\helpref{wxTraceLevel}{wxtracelevel}}{Tracing facility with levels}
|
||||
\twocolitem{\helpref{WXDEBUG\_NEW}{debugnew}}{Use this macro to give further debugging information}
|
||||
\twocolitem{\helpref{WXTRACE}{trace}}{Trace macro}
|
||||
\twocolitem{\helpref{WXTRACELEVEL}{tracelevel}}{Trace macro with levels}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Interprocess communication}}
|
||||
|
||||
\overview{Overview}{ipcoverview}
|
||||
|
||||
wxWindows provides a simple interprocess communications facilities
|
||||
based on DDE.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxDDEClient}{wxddeclient}}{Represents a client}
|
||||
\twocolitem{\helpref{wxDDEConnection}{wxddeconnection}}{Represents the connection between a client and a server}
|
||||
\twocolitem{\helpref{wxDDEServer}{wxddeserver}}{Represents a server}
|
||||
%TODO: put this somewhere \twocolitem{\helpref{wxHelpInstance}{wxhelpinstance}}{A specialised client}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Document/view framework}}
|
||||
|
||||
\overview{Overview}{docviewoverview}
|
||||
|
||||
wxWindows supports a document/view framework which provides
|
||||
housekeeping for a document-centric application.
|
||||
|
||||
TODO: MDI frame classes for documents; make it unnecessary to convert
|
||||
between streams and files (overridable method that uses filenames instead of streams).
|
||||
|
||||
\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 veiw 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}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Printing framework}}
|
||||
|
||||
\overview{Overview}{printingoverview}
|
||||
|
||||
A printing and previewing framework is implemented to
|
||||
make it relatively straighforward to provide document printing
|
||||
facilities.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxPreviewFrame}{wxpreviewframe}}{Frame for displaying a print preview}
|
||||
\twocolitem{\helpref{wxPreviewCanvas}{wxpreviewcanvas}}{Canvas for displaying a print preview}
|
||||
\twocolitem{\helpref{wxPreviewControlBar}{wxpreviewcontrolbar}}{Standard control bar for a print preview}
|
||||
\twocolitem{\helpref{wxPrintData}{wxprintdata}}{Represents information about the document being printed}
|
||||
\twocolitem{\helpref{wxPrintDialog}{wxprintdialog}}{Standard print 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}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Database classes}}
|
||||
|
||||
\overview{Database classes overview}{odbcoverview}
|
||||
|
||||
wxWindows provides a set of classes for accessing Microsoft's ODBC (Open Database Connectivity)
|
||||
product.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxDatabase}{wxdatabase}}{Database class}
|
||||
\twocolitem{\helpref{wxQueryCol}{wxquerycol}}{Class representing a column}
|
||||
\twocolitem{\helpref{wxQueryField}{wxqueryfield}}{Class representing a field}
|
||||
\twocolitem{\helpref{wxRecordSet}{wxrecordset}}{Class representing one or more record}
|
||||
\end{twocollist}
|
||||
|
||||
{\large {\bf Miscellaneous}}
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\helpref{wxApp}{wxapp}}{Application class}
|
||||
\twocolitem{\helpref{wxTimer}{wxtimer}}{Timer class}
|
||||
\twocolitem{\helpref{wxSystemSettings}{wxsystemsettings}}{System settings class}
|
||||
\end{twocollist}
|
||||
|
||||
|
96
docs/latex/wx/checkbox.tex
Normal file
@ -0,0 +1,96 @@
|
||||
\section{\class{wxCheckBox}}\label{wxcheckbox}
|
||||
|
||||
A checkbox is a labelled box which is either on (checkmark is visible)
|
||||
or off (no checkmark).
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxControl}{wxcontrol}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
There are no special styles for wxCheckBox.
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxRadioButton}{wxradiobutton}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxCheckBox::wxCheckBox}\label{wxcheckboxconstr}
|
||||
|
||||
\func{}{wxCheckBox}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxCheckBox}{\param{wxWindow* }{parent}, \param{const wxWindowID}{ id},\rtfsp
|
||||
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
|
||||
\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
|
||||
|
||||
Constructor, creating and showing a checkbox.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{Parent window. Must not be NULL.}
|
||||
|
||||
\docparam{id}{Checkbox identifier. A value of -1 indicates a default value.}
|
||||
|
||||
\docparam{label}{Text to be displayed next to the checkbox.}
|
||||
|
||||
\docparam{pos}{Checkbox position. If the position (-1, -1) is specified then a default position is chosen.}
|
||||
|
||||
\docparam{size}{Checkbox size. If the default size (-1, -1) is specified then a default size is chosen.}
|
||||
|
||||
\docparam{style}{Window style. See \helpref{wxCheckBox}{wxcheckbox}.}
|
||||
|
||||
\docparam{validator}{Window validator.}
|
||||
|
||||
\docparam{name}{Window name.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxCheckBox::Create}{wxcheckboxcreate}, \helpref{wxValidator}{wxvalidator}
|
||||
|
||||
\membersection{wxCheckBox::\destruct{wxCheckBox}}
|
||||
|
||||
\func{}{\destruct{wxCheckBox}}{\void}
|
||||
|
||||
Destructor, destroying the checkbox.
|
||||
|
||||
\membersection{wxCheckBox::Create}\label{wxcheckboxcreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID}{ id},\rtfsp
|
||||
\param{const wxString\& }{label}, \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\& }{size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
|
||||
\param{const wxValidator\& }{val}, \param{const wxString\& }{name = ``checkBox"}}
|
||||
|
||||
Creates the checkbox for two-step construction. See \helpref{wxCheckBox::wxCheckBox}{wxcheckboxconstr}\rtfsp
|
||||
for details.
|
||||
|
||||
\membersection{wxCheckBox::GetValue}\label{wxcheckboxgetvalue}
|
||||
|
||||
\constfunc{bool}{GetValue}{\void}
|
||||
|
||||
Gets the state of the checkbox.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns TRUE if it is checked, FALSE otherwise.
|
||||
|
||||
\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
|
||||
|
||||
\func{void}{SetValue}{\param{const bool}{ state}}
|
||||
|
||||
Sets the checkbox to the given state.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{state}{If TRUE, the check is on, otherwise it is off.}
|
||||
|
||||
|
193
docs/latex/wx/choice.tex
Normal file
@ -0,0 +1,193 @@
|
||||
\section{\class{wxChoice}}\label{wxchoice}
|
||||
|
||||
A choice item is used to select one of a list of strings. Unlike a
|
||||
listbox, only the selection is visible until the user pulls down the
|
||||
menu of choices.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxControl}{wxcontrol}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
There are no special styles for wxChoice.
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxListBox}{wxlistbox}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxChoice::wxChoice}\label{wxchoiceconstr}
|
||||
|
||||
\func{}{wxChoice}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxChoice}{\param{wxWindow *}{parent}, \param{const wxWindowID}{ id},\rtfsp
|
||||
\param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp
|
||||
\param{const int}{ n}, \param{const wxString }{choices[]},\rtfsp
|
||||
\param{const 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}
|
||||
|
||||
\membersection{wxChoice::\destruct{wxChoice}}
|
||||
|
||||
\func{}{\destruct{wxChoice}}{\void}
|
||||
|
||||
Destructor, destroying the choice item.
|
||||
|
||||
\membersection{wxChoice::Append}\label{wxchoiceappend}
|
||||
|
||||
\func{void}{Append}{\param{const wxString\& }{ item}}
|
||||
|
||||
Adds the item to the end of the choice control.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{item}{String to add.}
|
||||
|
||||
\membersection{wxChoice::Clear}\label{wxchoiceclear}
|
||||
|
||||
\func{void}{Clear}{\void}
|
||||
|
||||
Clears the strings from the choice item.
|
||||
|
||||
\membersection{wxChoice::Create}\label{wxchoicecreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow *}{parent}, \param{const wxWindowID}{ id},\rtfsp
|
||||
\param{const wxPoint\& }{pos}, \param{const wxSize\&}{ size},\rtfsp
|
||||
\param{const int}{ n}, \param{const wxString }{choices[]},\rtfsp
|
||||
\param{const long}{ style = 0}, \param{const wxString\& }{name = ``choice"}}
|
||||
|
||||
Creates the choice for two-step construction. See \helpref{wxChoice::wxChoice}{wxchoiceconstr}.
|
||||
|
||||
\membersection{wxChoice::FindString}\label{wxchoicefindstring}
|
||||
|
||||
\constfunc{int}{FindString}{\param{const wxString\& }{string}}
|
||||
|
||||
Finds a choice matching the given string.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{string}{String to find.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns the position if found, or -1 if not found.
|
||||
|
||||
\membersection{wxChoice::GetColumns}\label{wxchoicegetcolumns}
|
||||
|
||||
\constfunc{int}{GetColumns}{\void}
|
||||
|
||||
Gets the number of columns in this choice item.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This is implemented for Motif only.
|
||||
|
||||
\membersection{wxChoice::GetSelection}\label{wxchoicegetselection}
|
||||
|
||||
\constfunc{int}{GetSelection}{\void}
|
||||
|
||||
Gets the id (position) of the selected string, or -1 if there is no selection.
|
||||
|
||||
\membersection{wxChoice::GetString}\label{wxchoicegetstring}
|
||||
|
||||
\constfunc{wxString}{GetString}{\param{const int}{ n}}
|
||||
|
||||
Returns the string at the given position.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based position.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The string at the given position, or the empty string if {\it n} is invalid.
|
||||
|
||||
\membersection{wxChoice::GetStringSelection}\label{wxchoicegetstringselection}
|
||||
|
||||
\constfunc{wxString}{GetStringSelection}{\void}
|
||||
|
||||
Gets the selected string, or the empty string if no string is selected.
|
||||
|
||||
\membersection{wxChoice::Number}\label{wxchoicenumber}
|
||||
|
||||
\constfunc{int}{Number}{\void}
|
||||
|
||||
Returns the number of strings in the choice control.
|
||||
|
||||
\membersection{wxChoice::SetColumns}\label{wxchoicesetcolumns}
|
||||
|
||||
\func{void}{SetColumns}{\param{const int}{ n = 1}}
|
||||
|
||||
Sets the number of columns in this choice item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{Number of columns.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This is implemented for Motif only.
|
||||
|
||||
\membersection{wxChoice::SetSelection}\label{wxchoicesetselection}
|
||||
|
||||
\func{void}{SetSelection}{\param{const int}{ n}}
|
||||
|
||||
Sets the choice by passing the desired string position.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The string position to select, starting from zero.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxChoice::SetStringSelection}{wxchoicesetstringselection}
|
||||
|
||||
\membersection{wxChoice::SetStringSelection}\label{wxchoicesetstringselection}
|
||||
|
||||
\func{void}{SetStringSelection}{\param{const wxString\& }{ string}}
|
||||
|
||||
Sets the choice by passing the desired string.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{string}{The string to select.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxChoice::SetSelection}{wxchoicesetselection}
|
||||
|
||||
|
76
docs/latex/wx/clasinfo.tex
Normal file
@ -0,0 +1,76 @@
|
||||
\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{See also}
|
||||
|
||||
\overview{Overview}{wxclassinfooverview}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxClassInfo::wxClassInfo}\label{wxclassinfoconstr}
|
||||
|
||||
\func{}{wxClassInfo}{\param{char* }{className}, \param{char* }{baseClass1}, \param{char* }{baseClass2},
|
||||
\param{int}{ size}, \param{wxObjectConstructorFn }{fn}}
|
||||
|
||||
Constructs a wxClassInfo object. The supplied macros implicitly construct objects of this
|
||||
class, so there is no need to create such objects explicitly in an application.
|
||||
|
||||
\membersection{wxClassInfo::CreateObject}
|
||||
|
||||
\func{wxObject*}{CreateObject}{\void}
|
||||
|
||||
Creates an object of the appropriate kind. Returns NULL if the class has not been declared
|
||||
dynamically createable (typically, it's an abstract class).
|
||||
|
||||
\membersection{wxClassInfo::FindClass}
|
||||
|
||||
\func{static wxClassInfo *}{FindClass}{\param{char* }{name}}
|
||||
|
||||
Finds the wxClassInfo object for a class of the given string name.
|
||||
|
||||
\membersection{wxClassInfo::GetBaseClassName1}
|
||||
|
||||
\constfunc{char*}{GetBaseClassName1}{\void}
|
||||
|
||||
Returns the name of the first base class (NULL if none).
|
||||
|
||||
\membersection{wxClassInfo::GetBaseClassName2}
|
||||
|
||||
\constfunc{char*}{GetBaseClassName2}{\void}
|
||||
|
||||
Returns the name of the second base class (NULL if none).
|
||||
|
||||
\membersection{wxClassInfo::GetClassName}
|
||||
|
||||
\constfunc{char *}{GetClassName}{\void}
|
||||
|
||||
Returns the string form of the class name.
|
||||
|
||||
\membersection{wxClassInfo::GetSize}
|
||||
|
||||
\constfunc{int}{GetSize}{\void}
|
||||
|
||||
Returns the size of the class.
|
||||
|
||||
\membersection{wxClassInfo::InitializeClasses}
|
||||
|
||||
\func{static void}{InitializeClasses}{\void}
|
||||
|
||||
Initializes pointers in the wxClassInfo objects for fast execution
|
||||
of IsKindOf. Called in base wxWindows library initialization.
|
||||
|
||||
\membersection{wxClassInfo::IsKindOf}\label{wxclassinfoiskindof}
|
||||
|
||||
\func{bool}{IsKindOf}{\param{wxClassInfo* }{info}}
|
||||
|
||||
Returns TRUE if this class is a kind of (inherits from) the given class.
|
||||
|
||||
|
163
docs/latex/wx/classes.tex
Normal file
@ -0,0 +1,163 @@
|
||||
\chapter{Alphabetical class reference}\label{classref}
|
||||
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
\pagenumbering{arabic}%
|
||||
%
|
||||
\begin{comment}
|
||||
\helpignore{\section{Class hierarchy}%
|
||||
|
||||
The GUI-specific wxWindows class hierarchy is shown in Figure 5.1.
|
||||
Many other, non-GUI classes have been omitted.
|
||||
|
||||
\vskip 1cm
|
||||
$$\image{14cm;0cm}{wxclass.ps}$$
|
||||
\vskip 1cm
|
||||
\centerline{Figure 5.1: wxWindows class hierarchy}
|
||||
|
||||
\newpage}%
|
||||
|
||||
\overview{Writing a wxWindows application: a rough guide}{roughguide}
|
||||
|
||||
\helponly{
|
||||
\sethotspotcolour{off}%
|
||||
\large{
|
||||
\helpref{Notes on using the reference}{referencenotes}\\
|
||||
\helpref{Guide to functions}{functions}
|
||||
\sethotspotcolour{on}%
|
||||
}}
|
||||
\end{comment}
|
||||
|
||||
\input activevt.tex
|
||||
\input app.tex
|
||||
\input button.tex
|
||||
\input bitmap.tex
|
||||
\input bbutton.tex
|
||||
\input brush.tex
|
||||
\input checkbox.tex
|
||||
\input choice.tex
|
||||
\input clasinfo.tex
|
||||
\input clientdc.tex
|
||||
\input clipbrd.tex
|
||||
\input closeevt.tex
|
||||
\input colour.tex
|
||||
\input colordlg.tex
|
||||
\input combobox.tex
|
||||
\input command.tex
|
||||
\input cmdevent.tex
|
||||
\input cmdproc.tex
|
||||
\input control.tex
|
||||
\input cursor.tex
|
||||
\input database.tex
|
||||
\input date.tex
|
||||
\input dc.tex
|
||||
\input ddeclint.tex
|
||||
\input ddeconn.tex
|
||||
\input ddeservr.tex
|
||||
\input debugcxt.tex
|
||||
\input dialog.tex
|
||||
\input dirdlg.tex
|
||||
\input document.tex
|
||||
\input docchfrm.tex
|
||||
\input docmanag.tex
|
||||
\input docprfrm.tex
|
||||
\input doctempl.tex
|
||||
\input dropevt.tex
|
||||
\input eraseevt.tex
|
||||
\input event.tex
|
||||
\input evthand.tex
|
||||
\input expr.tex
|
||||
\input file.tex
|
||||
\input filedlg.tex
|
||||
\input filehist.tex
|
||||
\input focusevt.tex
|
||||
\input font.tex
|
||||
\input fontdlg.tex
|
||||
\input fontlist.tex
|
||||
\input frame.tex
|
||||
\input gauge.tex
|
||||
\input gdiobj.tex
|
||||
\input grid.tex
|
||||
\input hash.tex
|
||||
\input helpinst.tex
|
||||
\input idleevt.tex
|
||||
\input icon.tex
|
||||
\input imaglist.tex
|
||||
\input ilayout.tex
|
||||
\input indlgevt.tex
|
||||
\input keyevent.tex
|
||||
\input layout.tex
|
||||
\input list.tex
|
||||
\input listbox.tex
|
||||
\input listctrl.tex
|
||||
\input listevt.tex
|
||||
\input mask.tex
|
||||
\input mdi.tex
|
||||
\input menu.tex
|
||||
\input menuitem.tex
|
||||
\input menuevt.tex
|
||||
\input memorydc.tex
|
||||
\input msgdlg.tex
|
||||
\input metafile.tex
|
||||
\input minifram.tex
|
||||
\input module.tex
|
||||
\input mouseevt.tex
|
||||
\input moveevt.tex
|
||||
\input mltchdlg.tex
|
||||
\input node.tex
|
||||
\input object.tex
|
||||
\input pagedlg.tex
|
||||
\input paintdc.tex
|
||||
\input paintevt.tex
|
||||
\input palette.tex
|
||||
\input panel.tex
|
||||
\input pantabv.tex
|
||||
\input pathlist.tex
|
||||
\input pen.tex
|
||||
\input point.tex
|
||||
\input prevwin.tex
|
||||
\input print.tex
|
||||
\input postscpt.tex
|
||||
\input query.tex
|
||||
\input realpoin.tex
|
||||
\input rect.tex
|
||||
\input recrdset.tex
|
||||
\input radiobox.tex
|
||||
\input radiobut.tex
|
||||
\input region.tex
|
||||
\input screendc.tex
|
||||
\input scrolbar.tex
|
||||
\input scrolevt.tex
|
||||
\input scrolwin.tex
|
||||
\input sngchdlg.tex
|
||||
\input size.tex
|
||||
\input sizeevt.tex
|
||||
\input slider.tex
|
||||
\input spinbutt.tex
|
||||
\input splitter.tex
|
||||
\input statbmp.tex
|
||||
\input statbox.tex
|
||||
\input stattext.tex
|
||||
\input statusbr.tex
|
||||
\input wxstring.tex
|
||||
\input strlist.tex
|
||||
\input sysclevt.tex
|
||||
\input settings.tex
|
||||
\input tab.tex
|
||||
\input text.tex
|
||||
\input textdlg.tex
|
||||
\input valtext.tex
|
||||
\input taskbar.tex
|
||||
\input time.tex
|
||||
\input timer.tex
|
||||
\input treectrl.tex
|
||||
\input treeevt.tex
|
||||
\input toolbar.tex
|
||||
\input upditer.tex
|
||||
\input upduievt.tex
|
||||
\input validatr.tex
|
||||
\input view.tex
|
||||
\input window.tex
|
||||
\input windowdc.tex
|
||||
|
||||
\input function.tex
|
||||
|
31
docs/latex/wx/clientdc.tex
Normal file
@ -0,0 +1,31 @@
|
||||
\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{wxDC}{wxdc}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDC}{wxdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPaintDC}{wxpaintdc},\rtfsp
|
||||
\helpref{wxWindowDC}{wxwindowdc}, \helpref{wxScreenDC}{wxscreendc}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxClientDC::wxClientDC}
|
||||
|
||||
\func{}{wxClientDC}{\param{wxWindow*}{ window}}
|
||||
|
||||
Constructor. Pass a pointer to the window on which you wish to paint.
|
||||
|
||||
|
||||
|
103
docs/latex/wx/clipbrd.tex
Normal file
@ -0,0 +1,103 @@
|
||||
\section{\class{wxClipboard}}\label{wxclipboard}
|
||||
|
||||
There is one wxClipboard object referenced by the pointer
|
||||
wxTheClipboard, initialized by calling \helpref{wxInitClipboard}{wxinitclipboard}.
|
||||
Under X, clipboard manipulation must be done by using this class, and
|
||||
such code will work under MS Windows also. Under MS Windows, you have the
|
||||
alternative of using the normal clipboard functions.
|
||||
|
||||
The documentation for this class will be expanded in due course. At present,
|
||||
wxClipboard is only used in the wxMediaWindow add-on library.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxClipboardClient}{wxclipboardclient}, \helpref{wxInitClipboard}{wxinitclipboard}.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxClipboard::GetClipboardClient}
|
||||
|
||||
\func{wxClipboardClient *}{GetClipboardClient}{\void}
|
||||
|
||||
Get the clipboard client directly. Will be NULL if clipboard data
|
||||
is a string, or if some other application owns the clipboard.
|
||||
This can be useful for shortcutting data translation, if the
|
||||
clipboard user can check for a specific client.
|
||||
|
||||
\membersection{wxClipboard::GetClipboardData}
|
||||
|
||||
\func{char*}{GetClipboardData}{\param{const wxString\& }{format}, \param{long *}{length}, \param{long}{ time}}
|
||||
|
||||
Get data from the clipboard.
|
||||
|
||||
\membersection{wxClipboard::GetClipboardString}
|
||||
|
||||
\func{wxString}{GetClipboardString}{\param{long}{ time}}
|
||||
|
||||
Get the data from the clipboard in the format ``TEXT".
|
||||
|
||||
\membersection{wxClipboard::SetClipboardClient}
|
||||
|
||||
\func{void}{SetClipboardClient}{\param{wxClipboardClient *}{client}, \param{long}{ time}}
|
||||
|
||||
Set the clipboard data owner.
|
||||
|
||||
\membersection{wxClipboard::SetClipboardString}
|
||||
|
||||
\func{void}{SetClipboardString}{\param{const wxString\& }{data}, \param{long}{ time}}
|
||||
|
||||
Set the clipboard string; does not require a client.
|
||||
|
||||
\section{\class{wxClipboardClient}}\label{wxclipboardclient}
|
||||
|
||||
Implemented under X and MS Windows, a clipboard client holds data
|
||||
belonging to the clipboard. For plain text, a client is not necessary.
|
||||
|
||||
wxClipboardClient is an abstract class for which the virtual functions
|
||||
BeingReplaced and GetData must be overridden.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxClipboard}{wxclipboard}, \helpref{wxInitClipboard}{wxinitclipboard}.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxClipboardClient::formats}
|
||||
|
||||
\member{wxStringList}{formats}
|
||||
|
||||
This list should be filled in with strings indicating the formats
|
||||
this client can provide. Almost all clients will provide``TEXT".
|
||||
Format names should be 4 characters long, so things will work
|
||||
out on the Macintosh.
|
||||
|
||||
\membersection{wxClipboardClient::BeingReplaced}
|
||||
|
||||
\func{void}{BeingReplaced}{\void}
|
||||
|
||||
This method is called when the client is losing the selection.
|
||||
|
||||
\membersection{wxClipboardClient::GetData}
|
||||
|
||||
\func{char*}{GetData}{\param{const wxString\& }{format}, \param{long *}{size}}
|
||||
|
||||
This method is called when someone wants the data this client is
|
||||
supplying to the clipboard.
|
||||
|
||||
{\it format} is a string indicating the
|
||||
format of the data - one of the strings from the ``formats"
|
||||
list.
|
||||
|
||||
{\it size} should be filled with the size of the resulting
|
||||
data. In the case of text, {\it size} does not count the
|
||||
NULL terminator.
|
||||
|
||||
|
57
docs/latex/wx/closeevt.tex
Normal file
@ -0,0 +1,57 @@
|
||||
\section{\class{wxCloseEvent}}\label{wxcloseevent}
|
||||
|
||||
This event class contains information about window and session close events.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvent}{wxevent}
|
||||
|
||||
\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.}
|
||||
\end{twocollist}%
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
|
||||
\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
|
||||
\helpref{Window deletion overview}{windowdeletionoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxCloseEvent::wxCloseEvent}
|
||||
|
||||
\func{}{wxCloseEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxCloseEvent::GetLoggingOff}\label{wxcloseeventgetloggingoff}
|
||||
|
||||
\constfunc{bool}{GetLoggingOff}{\void}
|
||||
|
||||
Returns TRUE if the user is logging off.
|
||||
|
||||
\membersection{wxCloseEvent::GetSessionEnding}\label{wxcloseeventgetsessionending}
|
||||
|
||||
\constfunc{bool}{GetSessionEnding}{\void}
|
||||
|
||||
Returns TRUE if the session is ending.
|
||||
|
||||
\membersection{wxCloseEvent::GetForce}\label{wxcloseeventgetforce}
|
||||
|
||||
\constfunc{void}{GetForce}{\void}
|
||||
|
||||
Returns TRUE if the application wishes to force the window to close.
|
||||
|
||||
\membersection{wxCloseEvent::Veto}\label{wxcloseeventveto}
|
||||
|
||||
\func{void}{Veto}{\void}
|
||||
|
||||
Call this from your event handler to veto a system shutdown.
|
||||
|
||||
|
177
docs/latex/wx/cmdevent.tex
Normal file
@ -0,0 +1,177 @@
|
||||
\section{\class{wxCommandEvent}}\label{wxcommandevent}
|
||||
|
||||
This event class contains information about command events, which originate from a variety of
|
||||
simple controls. More complex controls, such as \helpref{wxTreeCtrl}{wxtreectrl}, have separate command event classes.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvent}{wxevent}
|
||||
|
||||
\wxheading{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, cmd, func)}}{Process a command, supplying the window identifier,
|
||||
command event identifier, and member function.}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_RANGE(id1, id2, cmd, func)}}{Process a command for a range
|
||||
of window identifiers, supplying the minimum and maximum window identifiers,
|
||||
command event identifier, and member function.}
|
||||
\twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED command,
|
||||
which is generated by a wxButton control.}
|
||||
\twocolitem{{\bf EVT\_CHECKBOX(id, func)}}{Process a wxEVT\_COMMAND\_CHECKBOX\_CLICKED command,
|
||||
which is generated by a wxCheckBox control.}
|
||||
\twocolitem{{\bf EVT\_CHOICE(id, func)}}{Process a wxEVT\_COMMAND\_CHOICE\_SELECTED command,
|
||||
which is generated by a wxChoice control.}
|
||||
\twocolitem{{\bf EVT\_LISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_SELECTED command,
|
||||
which is generated by a wxListBox control.}
|
||||
\twocolitem{{\bf EVT\_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.}
|
||||
\twocolitem{{\bf EVT\_MENU(id, func)}}{Process a wxEVT\_COMMAND\_MENU\_SELECTED command,
|
||||
which is generated by a menu item.}
|
||||
\twocolitem{{\bf EVT\_MENU\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_MENU\_RANGE command,
|
||||
which is generated by a range of menu items.}
|
||||
\twocolitem{{\bf EVT\_SLIDER(id, func)}}{Process a wxEVT\_COMMAND\_SLIDER\_UPDATED command,
|
||||
which is generated by a wxSlider control.}
|
||||
\twocolitem{{\bf EVT\_RADIOBOX(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBOX\_SELECTED command,
|
||||
which is generated by a wxRadioBox control.}
|
||||
\twocolitem{{\bf EVT\_RADIOBUTTON(id, func)}}{Process a wxEVT\_COMMAND\_RADIOBUTTON\_SELECTED command,
|
||||
which is generated by a wxRadioButton control.}
|
||||
\twocolitem{{\bf EVT\_SCROLLBAR(id, func)}}{Process a wxEVT\_COMMAND\_SCROLLBAR\_UPDATED command,
|
||||
which is generated by a wxScrollBar control. This is provided for compatibility only;
|
||||
more specific scrollbar event macros should be used instead (see \helpref{wxScrollEvent}{wxscrollevent}).}
|
||||
\twocolitem{{\bf EVT\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED command,
|
||||
which is generated by a wxComboBox control.}
|
||||
\twocolitem{{\bf EVT\_TOOL(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED command,
|
||||
which is generated by a toobar button.}
|
||||
\twocolitem{{\bf EVT\_TOOL\_RCLICKED(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED command,
|
||||
which is generated by a toobar button.}
|
||||
\twocolitem{{\bf EVT\_TOOL\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_ENTER command,
|
||||
which is generated by a toobar button.}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_LEFT\_CLICK(id, func)}}{Process a wxEVT\_COMMAND\_LEFT\_CLICK command,
|
||||
which is generated by a control (Windows 95 and NT only).}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_LEFT\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LEFT\_DCLICK command,
|
||||
which is generated by a control (Windows 95 and NT only).}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_RIGHT\_CLICK(id, func)}}{Process a wxEVT\_COMMAND\_RIGHT\_CLICK command,
|
||||
which is generated by a control (Windows 95 and NT only).}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_SET\_FOCUS(id, func)}}{Process a wxEVT\_COMMAND\_SET\_FOCUS command,
|
||||
which is generated by a control (Windows 95 and NT only).}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_KILL\_FOCUS(id, func)}}{Process a wxEVT\_COMMAND\_KILL\_FOCUS command,
|
||||
which is generated by a control (Windows 95 and NT only).}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_ENTER command,
|
||||
which is generated by a control.}
|
||||
\end{twocollist}%
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxCommandEvent::m\_clientData}
|
||||
|
||||
\member{char*}{m\_clientData}
|
||||
|
||||
Contains a pointer to client data for listboxes and choices, if the event
|
||||
was a selection.
|
||||
|
||||
\membersection{wxCommandEvent::m\_commandInt}
|
||||
|
||||
\member{int}{m\_commandInt}
|
||||
|
||||
Contains an integer identifier corresponding to a listbox, choice or
|
||||
radiobox selection (only if the event was a selection, not a
|
||||
deselection), or a boolean value representing the value of a checkbox.
|
||||
|
||||
\membersection{wxCommandEvent::m\_commandString}
|
||||
|
||||
\member{char*}{m\_commandString}
|
||||
|
||||
Contains a string corresponding to a listbox or choice selection.
|
||||
|
||||
\membersection{wxCommandEvent::m\_extraLong}
|
||||
|
||||
\member{long}{m\_extraLong}
|
||||
|
||||
Extra information. If the event comes from a listbox selection, it is
|
||||
a boolean determining whether the event was a selection (TRUE) or a
|
||||
deselection (FALSE). A listbox deselection only occurs for
|
||||
multiple-selection boxes, and in this case the index and string values
|
||||
are indeterminate and the listbox must be examined by the application.
|
||||
|
||||
\membersection{wxCommandEvent::wxCommandEvent}
|
||||
|
||||
\func{}{wxCommandEvent}{\param{WXTYPE}{ commandEventType = 0}, \param{int}{ id = 0}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxCommandEvent::Checked}
|
||||
|
||||
\func{bool}{Checked}{\void}
|
||||
|
||||
Returns TRUE or FALSE for a checkbox selection event.
|
||||
|
||||
\membersection{wxCommandEvent::GetClientData}
|
||||
|
||||
\func{char*}{GetClientData}{\void}
|
||||
|
||||
Returns client data pointer for a listbox or choice selection event
|
||||
(not valid for a deselection).
|
||||
|
||||
\membersection{wxCommandEvent::GetExtraLong}
|
||||
|
||||
\func{long}{GetExtraLong}{\void}
|
||||
|
||||
Returns the {\bf m\_extraLong} member.
|
||||
|
||||
\membersection{wxCommandEvent::GetInt}
|
||||
|
||||
\func{int}{GetInt}{\void}
|
||||
|
||||
Returns the {\bf m\_commandInt} member.
|
||||
|
||||
\membersection{wxCommandEvent::GetSelection}
|
||||
|
||||
\func{int}{GetSelection}{\void}
|
||||
|
||||
Returns item index for a listbox or choice selection event (not valid for
|
||||
a deselection).
|
||||
|
||||
\membersection{wxCommandEvent::GetString}
|
||||
|
||||
\func{char*}{GetString}{\void}
|
||||
|
||||
Returns item string for a listbox or choice selection event (not valid for
|
||||
a deselection).
|
||||
|
||||
\membersection{wxCommandEvent::IsSelection}
|
||||
|
||||
\func{bool}{IsSelection}{\void}
|
||||
|
||||
For a listbox or choice event, returns TRUE if it is a selection, FALSE if it
|
||||
is a deselection.
|
||||
|
||||
\membersection{wxCommandEvent::SetClientData}
|
||||
|
||||
\func{void}{SetClientData}{\param{char*}{ clientData}}
|
||||
|
||||
Sets the client data for this event.
|
||||
|
||||
\membersection{wxCommandEvent::SetExtraLong}
|
||||
|
||||
\func{void}{SetExtraLong}{\param{int}{ extraLong}}
|
||||
|
||||
Sets the {\bf m\_extraLong} member.
|
||||
|
||||
\membersection{wxCommandEvent::SetInt}
|
||||
|
||||
\func{void}{SetInt}{\param{int}{ intCommand}}
|
||||
|
||||
Sets the {\bf m\_commandInt} member.
|
||||
|
||||
\membersection{wxCommandEvent::SetString}
|
||||
|
||||
\func{void}{SetString}{\param{char*}{ string}}
|
||||
|
||||
Sets the {\bf m\_commandString} member.
|
||||
|
106
docs/latex/wx/cmdproc.tex
Normal file
@ -0,0 +1,106 @@
|
||||
\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{See also}
|
||||
|
||||
\helpref{wxCommandProcessor overview}{wxcommandprocessoroverview}, \helpref{wxCommand}{wxcommand}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxCommandProcessor::wxCommandProcessor}
|
||||
|
||||
\func{}{wxCommandProcessor}{\param{int}{ maxCommands = 100}}
|
||||
|
||||
Constructor.
|
||||
|
||||
{\it maxCommands} defaults to a rather arbitrary 100, but can be set from 1 to any integer.
|
||||
If your wxCommand classes store a lot of data, you may wish the limit the number of
|
||||
commands stored to a smaller number.
|
||||
|
||||
\membersection{wxCommandProcessor::\destruct{wxCommandProcessor}}
|
||||
|
||||
\func{}{\destruct{wxCommandProcessor}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxCommandProcessor::CanUndo}
|
||||
|
||||
\func{virtual bool}{CanUndo}{\void}
|
||||
|
||||
Returns TRUE if the currently-active command can be undone, FALSE otherwise.
|
||||
|
||||
\membersection{wxCommandProcessor::ClearCommands}
|
||||
|
||||
\func{virtual void}{ClearCommands}{\void}
|
||||
|
||||
Deletes all the commands in the list and sets the current command pointer to NULL.
|
||||
|
||||
\membersection{wxCommandProcessor::Do}
|
||||
|
||||
\func{virtual bool}{Do}{\void}
|
||||
|
||||
Executes (redoes) the current command (the command that has just been undone if any).
|
||||
|
||||
\membersection{wxCommandProcessor::GetCommands}
|
||||
|
||||
\constfunc{wxList\&}{GetCommands}{\void}
|
||||
|
||||
Returns the list of commands.
|
||||
|
||||
\membersection{wxCommandProcessor::GetMaxCommands}
|
||||
|
||||
\constfunc{int}{GetMaxCommands}{\void}
|
||||
|
||||
Returns the maximum number of commands that the command processor stores.
|
||||
|
||||
\membersection{wxCommandProcessor::GetEditMenu}
|
||||
|
||||
\constfunc{wxMenu*}{GetEditMenu}{\void}
|
||||
|
||||
Returns the edit menu associated with the command processor.
|
||||
|
||||
\membersection{wxCommandProcessor::Initialize}
|
||||
|
||||
\func{virtual void}{Initialize}{\void}
|
||||
|
||||
Initializes the command processor, setting the current command to the
|
||||
last in the list (if any), and updating the edit menu (if one has been
|
||||
specified).
|
||||
|
||||
\membersection{wxCommandProcessor::SetEditMenu}
|
||||
|
||||
\func{void}{SetEditMenu}{\param{wxMenu* }{menu}}
|
||||
|
||||
Tells the command processor to update the Undo and Redo items on this
|
||||
menu as appropriate. Set this to NULL if the menu is about to be
|
||||
destroyed and command operations may still be performed, or the command
|
||||
processor may try to access an invalid pointer.
|
||||
|
||||
\membersection{wxCommandProcessor::Submit}
|
||||
|
||||
\func{virtual bool}{Submit}{\param{wxCommand *}{command}, \param{bool}{ storeIt = TRUE}}
|
||||
|
||||
Submits a new command to the command processor. The command processor
|
||||
calls wxCommand::Do to execute the command; if it succeeds, the command
|
||||
is stored in the history list, and the associated edit menu (if any) updated
|
||||
appropriately. If it fails, the command is deleted
|
||||
immediately. Once Submit has been called, the passed command should not
|
||||
be deleted directly by the application.
|
||||
|
||||
{\it storeIt} indicates whether the successful command should be stored
|
||||
in the history list.
|
||||
|
||||
\membersection{wxCommandProcessor::Undo}
|
||||
|
||||
\func{virtual bool}{Undo}{\void}
|
||||
|
||||
Undoes the command just executed.
|
||||
|
||||
|
48
docs/latex/wx/colordlg.tex
Normal file
@ -0,0 +1,48 @@
|
||||
\section{\class{wxColourDialog}}\label{wxcolourdialog}
|
||||
|
||||
This class represents the colour chooser dialog.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxDialog}{wxdialog}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxColourDialog Overview}{wxcolourdialogoverview}, \helpref{wxColour}{wxcolour}, \helpref{wxColourData}{wxcolourdata}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxColourDialog::wxColourDialog}
|
||||
|
||||
\func{}{wxColourDialog}{\param{wxWindow* }{parent}, \param{wxColourData* }{data = NULL}}
|
||||
|
||||
Constructor. Pass a parent window, and optionally a pointer to a block of colour
|
||||
data, which will be copied to the colour dialog's colour data.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxColourData}{wxcolourdata}
|
||||
|
||||
\membersection{wxColourDialog::\destruct{wxColourDialog}}
|
||||
|
||||
\func{}{\destruct{wxColourDialog}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxColourDialog::GetColourData}
|
||||
|
||||
\func{wxColourData\&}{GetColourData}{\void}
|
||||
|
||||
Returns the \helpref{colour data}{wxcolourdata} associated with the colour dialog.
|
||||
|
||||
\membersection{wxColourDialog::ShowModal}
|
||||
|
||||
\func{int}{ShowModal}{\void}
|
||||
|
||||
Shows the dialog, returning wxID\_OK if the user pressed OK, and wxOK\_CANCEL
|
||||
otherwise.
|
||||
|
||||
|
266
docs/latex/wx/colour.tex
Normal file
@ -0,0 +1,266 @@
|
||||
\section{\class{wxColour}}\label{wxcolour}
|
||||
|
||||
A colour is an object representing a combination of Red, Green, and Blue (RGB) intensity values,
|
||||
and is used to determine drawing colours. See the
|
||||
entry for \helpref{wxColourDatabase}{wxcolourdatabase} for how a pointer to a predefined,
|
||||
named colour may be returned instead of creating a new colour.
|
||||
|
||||
Valid RGB values are in the range 0 to 255.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxColourDatabase}{wxcolourdatabase}, \helpref{wxPen}{wxpen}, \helpref{wxBrush}{wxbrush},\rtfsp
|
||||
\helpref{wxColourDialog}{wxcolourdialog}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxColour::wxColour}\label{wxcolourconstr}
|
||||
|
||||
\func{}{wxColour}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxColour}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}}
|
||||
|
||||
Constructs a colour from red, green and blue values.
|
||||
|
||||
\func{}{wxColour}{\param{const wxString\& }{colourNname}}
|
||||
|
||||
Constructs a colour object using a colour name
|
||||
listed in {\bf wxTheColourDatabase}.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{red}{The red value.}
|
||||
|
||||
\docparam{green}{The green value.}
|
||||
|
||||
\docparam{blue}{The blue value.}
|
||||
|
||||
\docparam{colourName}{The colour name.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxColourDatabase}{wxcolourdatabase}
|
||||
|
||||
\membersection{wxColour::Blue}\label{wxcolourblue}
|
||||
|
||||
\constfunc{unsigned char}{Blue}{\void}
|
||||
|
||||
Returns the blue intensity.
|
||||
|
||||
\membersection{wxColour::GetPixel}\label{wxcolourgetpixel}
|
||||
|
||||
\constfunc{long}{GetPixel}{\void}
|
||||
|
||||
Returns a pixel value which is platform-dependent. On Windows, a COLORREF is returned.
|
||||
On X, an allocated pixel value is returned.
|
||||
|
||||
-1 is returned if the pixel is invalid (on X, unallocated).
|
||||
|
||||
\membersection{wxColour::Green}\label{wxcolourgreen}
|
||||
|
||||
\constfunc{unsigned char}{Green}{\void}
|
||||
|
||||
Returns the green intensity.
|
||||
|
||||
\membersection{wxColour::Ok}\label{wxcolourok}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
Returns TRUE if the colour object is valid (the colour has been initialised with RGB values).
|
||||
|
||||
\membersection{wxColour::Red}\label{wxcolourred}
|
||||
|
||||
\constfunc{unsigned char}{Red}{\void}
|
||||
|
||||
Returns the red intensity.
|
||||
|
||||
\membersection{wxColour::Set}\label{wxcolourset}
|
||||
|
||||
\func{void}{Set}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}}
|
||||
|
||||
Sets the RGB intensity values.
|
||||
|
||||
\membersection{wxColour::operator $=$}\label{wxcolourassign}
|
||||
|
||||
\func{wxColour\&}{operator $=$}{\param{const wxColour\&}{ colour}}
|
||||
|
||||
Assignment operator, taking another colour object.
|
||||
|
||||
\func{wxColour\&}{operator $=$}{\param{const wxString\&}{ colourName}}
|
||||
|
||||
Assignment operator, using a colour name to be found in the colour database.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxColourDatabase}{wxcolourdatabase}
|
||||
|
||||
\membersection{wxColour::operator $==$}\label{wxcolourequality}
|
||||
|
||||
\func{bool}{operator $==$}{\param{const wxColour\&}{ colour}}
|
||||
|
||||
Tests the equality of two colours by comparing individual red, green blue colours.
|
||||
|
||||
TODO: this may be different on platforms other than Windows - no reference counting
|
||||
is done on Windows.
|
||||
|
||||
\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.
|
||||
|
||||
TODO: this may be different on platforms other than Windows - no reference counting
|
||||
is done on Windows.
|
||||
|
||||
\section{\class{wxColourData}}\label{wxcolourdata}
|
||||
|
||||
This class holds a variety of information related to colour dialogs.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxColour}{wxcolour}, \helpref{wxColourDialog}{wxcolourdialog}, \helpref{wxColourDialog overview}{wxcolourdialogoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxColourData::wxColourData}\label{wxcolourdataconstr}
|
||||
|
||||
\func{}{wxColourData}{\void}
|
||||
|
||||
Constructor. Initializes the custom colours to white, the {\it data colour} setting
|
||||
to black, and the {\it choose full} setting to TRUE.
|
||||
|
||||
\membersection{wxColourData::\destruct{wxColourData}}
|
||||
|
||||
\func{}{\destruct{wxColourData}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxColourData::GetChooseFull}\label{wxcolourdatagetchoosefull}
|
||||
|
||||
\constfunc{bool}{GetChooseFull}{\void}
|
||||
|
||||
Under Windows, determines whether the Windows colour dialog will display the full dialog
|
||||
with custom colour selection controls. Has no meaning under other platforms.
|
||||
|
||||
The default value is TRUE.
|
||||
|
||||
\membersection{wxColourData::GetColour}\label{wxcolourdatagetcolour}
|
||||
|
||||
\constfunc{wxColour\&}{GetColour}{\void}
|
||||
|
||||
Gets the current colour associated with the colour dialog.
|
||||
|
||||
The default colour is black.
|
||||
|
||||
\membersection{wxColourData::GetCustomColour}\label{wxcolourdatagetcustomcolour}
|
||||
|
||||
\constfunc{wxColour\&}{GetCustomColour}{\param{const int}{ i}}
|
||||
|
||||
Gets the {\it i}th custom colour associated with the colour dialog. {\it i} should
|
||||
be an integer between 0 and 15.
|
||||
|
||||
The default custom colours are all white.
|
||||
|
||||
\membersection{wxColourData::SetChooseFull}\label{wxcolourdatasetchoosefull}
|
||||
|
||||
\func{void}{SetChooseFull}{\param{const bool }{flag}}
|
||||
|
||||
Under Windows, tells the Windows colour dialog to display the full dialog
|
||||
with custom colour selection controls. Under other platforms, has no effect.
|
||||
|
||||
The default value is TRUE.
|
||||
|
||||
\membersection{wxColourData::SetColour}\label{wxcolourdatasetcolour}
|
||||
|
||||
\func{void}{SetColour}{\param{const wxColour\&}{ colour}}
|
||||
|
||||
Sets the default colour for the colour dialog.
|
||||
|
||||
The default colour is black.
|
||||
|
||||
\membersection{wxColourData::SetCustomColour}\label{wxcolourdatasetcustomcolour}
|
||||
|
||||
\func{void}{SetColour}{\param{const int}{ i}, \param{const wxColour\&}{ colour}}
|
||||
|
||||
Sets the {\it i}th custom colour for the colour dialog. {\it i} should
|
||||
be an integer between 0 and 15.
|
||||
|
||||
The default custom colours are all white.
|
||||
|
||||
\membersection{wxColourData::operator $=$}\label{wxcolourdataassign}
|
||||
|
||||
\func{void}{operator $=$}{\param{const wxColourData\&}{ data}}
|
||||
|
||||
Assingment operator for the colour data.
|
||||
|
||||
\section{\class{wxColourDatabase}}\label{wxcolourdatabase}
|
||||
|
||||
wxWindows maintains a database of standard RGB colours for a predefined
|
||||
set of named colours (such as ``BLACK'', ``LIGHT GREY''). The
|
||||
application may add to this set if desired by using {\it Append}. There
|
||||
is only one instance of this class: {\bf wxTheColourDatabase}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxList}{wxlist}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The colours in the standard database are as follows:
|
||||
|
||||
AQUAMARINE, BLACK, BLUE, BLUE VIOLET, BROWN, CADET BLUE, CORAL,
|
||||
CORNFLOWER BLUE, CYAN, DARK GREY, DARK GREEN, DARK OLIVE GREEN, DARK
|
||||
ORCHID, DARK SLATE BLUE, DARK SLATE GREY DARK TURQUOISE, DIM GREY,
|
||||
FIREBRICK, FOREST GREEN, GOLD, GOLDENROD, GREY, GREEN, GREEN YELLOW,
|
||||
INDIAN RED, KHAKI, LIGHT BLUE, LIGHT GREY, LIGHT STEEL BLUE, LIME GREEN,
|
||||
MAGENTA, MAROON, MEDIUM AQUAMARINE, MEDIUM BLUE, MEDIUM FOREST GREEN,
|
||||
MEDIUM GOLDENROD, MEDIUM ORCHID, MEDIUM SEA GREEN, MEDIUM SLATE BLUE,
|
||||
MEDIUM SPRING GREEN, MEDIUM TURQUOISE, MEDIUM VIOLET RED, MIDNIGHT BLUE,
|
||||
NAVY, ORANGE, ORANGE RED, ORCHID, PALE GREEN, PINK, PLUM, PURPLE, RED,
|
||||
SALMON, SEA GREEN, SIENNA, SKY BLUE, SLATE BLUE, SPRING GREEN, STEEL
|
||||
BLUE, TAN, THISTLE, TURQUOISE, VIOLET, VIOLET RED, WHEAT, WHITE, YELLOW,
|
||||
YELLOW GREEN.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxColour}{wxcolour}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxColourDatabase::wxColourDatabase}\label{wxcolourdatabaseconstr}
|
||||
|
||||
\func{}{wxColourDatabase}{\void}
|
||||
|
||||
Constructs the colour database.
|
||||
|
||||
\membersection{wxColourDatabase::FindColour}\label{wxcolourdatabasefindcolour}
|
||||
|
||||
\func{wxColour*}{FindColour}{\param{const wxString\& }{colourName}}
|
||||
|
||||
Finds a colour given the name. Returns NULL if not found.
|
||||
|
||||
\membersection{wxColourDatabase::FindName}\label{wxcolourdatabasefindname}
|
||||
|
||||
\constfunc{wxString}{FindName}{\param{const wxColour\&}{ colour}}
|
||||
|
||||
Finds a colour name given the colour. Returns NULL if not found.
|
||||
|
||||
\membersection{wxColourDatabase::Initialize}\label{wxcolourdatabaseinitialize}
|
||||
|
||||
\func{void}{Initialize}{\void}
|
||||
|
||||
Initializes the database with a number of stock colours. Called by wxWindows
|
||||
on start-up.
|
||||
|
||||
|
313
docs/latex/wx/combobox.tex
Normal file
@ -0,0 +1,313 @@
|
||||
\section{\class{wxComboBox}}\label{wxcombobox}
|
||||
|
||||
A combobox is like a combination of an edit control and a listbox. It can be
|
||||
displayed as static list with editable or read-only text field; or a drop-down list with
|
||||
text field; or a drop-down list without a text field.
|
||||
|
||||
A combobox permits a single selection only. Combobox items are numbered from zero.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxChoice}{wxchoice}\\
|
||||
\helpref{wxControl}{wxcontrol}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxCB\_SIMPLE}}{Creates a combobox with a permanently displayed list.}
|
||||
\twocolitem{\windowstyle{wxCB\_DROPDOWN}}{Creates a combobox with a drop-down list.}
|
||||
\twocolitem{\windowstyle{wxCB\_READONLY}}{Creates a combo box consisting of a drop-down list and static text item
|
||||
displaying the current selection.}
|
||||
\twocolitem{\windowstyle{wxCB\_SORT}}{Sorts the entries in the list alphabetically.}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxListBox}{wxlistbox}, \helpref{wxTextCtrl}{wxtextctrl}, \helpref{wxChoice}{wxchoice}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxComboBox::wxComboBox}\label{wxcomboboxconstr}
|
||||
|
||||
\func{}{wxComboBox}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxComboBox}{\param{wxWindow*}{ parent}, \param{const wxWindowID}{ id},\rtfsp
|
||||
\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
||||
\param{const int}{ n}, \param{const wxString }{choices[]},\rtfsp
|
||||
\param{const long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
|
||||
|
||||
Constructor, creating and showing a combobox.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{Parent window. Must not be NULL.}
|
||||
|
||||
\docparam{id}{Window identifier. A value of -1 indicates a default value.}
|
||||
|
||||
\docparam{pos}{Window position.}
|
||||
|
||||
\docparam{size}{Window size. If the default size (-1, -1) is specified then the window is sized
|
||||
appropriately.}
|
||||
|
||||
\docparam{n}{Number of strings with which to initialise the control.}
|
||||
|
||||
\docparam{choices}{An array of strings with which to initialise the control.}
|
||||
|
||||
\docparam{style}{Window style. See \helpref{wxComboBox}{wxcombobox}.}
|
||||
|
||||
\docparam{validator}{Window validator.}
|
||||
|
||||
\docparam{name}{Window name.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxComboBox::Create}{wxcomboboxcreate}, \helpref{wxValidator}{wxvalidator}
|
||||
|
||||
\membersection{wxComboBox::\destruct{wxComboBox}}
|
||||
|
||||
\func{}{\destruct{wxComboBox}}{\void}
|
||||
|
||||
Destructor, destroying the combobox.
|
||||
|
||||
\membersection{wxComboBox::Append}\label{wxcomboboxappend}
|
||||
|
||||
\func{void}{Append}{\param{const wxString\& }{item}}
|
||||
|
||||
Adds the item to the end of the combobox.
|
||||
|
||||
\func{void}{Append}{\param{const wxString\& }{ item}, \param{char* }{clientData}}
|
||||
|
||||
Adds the item to the end of the combobox, associating the given data
|
||||
with the item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{item}{The string to add.}
|
||||
|
||||
\docparam{clientData}{Client data to associate with the item.}
|
||||
|
||||
\membersection{wxComboBox::Clear}\label{wxcomboboxclear}
|
||||
|
||||
\func{void}{Clear}{\void}
|
||||
|
||||
Clears all strings from the combobox.
|
||||
|
||||
\membersection{wxComboBox::Create}\label{wxcomboboxcreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{const wxWindowID}{ id},\rtfsp
|
||||
\param{const wxString\& }{value = ``"}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
||||
\param{const int}{ n}, \param{const wxString }{choices[]},\rtfsp
|
||||
\param{const long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``comboBox"}}
|
||||
|
||||
Creates the combobox for two-step construction. Derived classes
|
||||
should call or replace this function. See \helpref{wxComboBox::wxComboBox}{wxcomboboxconstr}\rtfsp
|
||||
for further details.
|
||||
|
||||
\membersection{wxComboBox::Copy}\label{wxcomboboxcopy}
|
||||
|
||||
\func{void}{Copy}{\void}
|
||||
|
||||
Copies the selected text to the clipboard.
|
||||
|
||||
\membersection{wxComboBox::Cut}\label{wxcomboboxcut}
|
||||
|
||||
\func{void}{Cut}{\void}
|
||||
|
||||
Copies the selected text to the clipboard and removes the selection.
|
||||
|
||||
\membersection{wxComboBox::Delete}\label{wxcomboboxdelete}
|
||||
|
||||
\func{void}{Delete}{\param{const int}{ n}}
|
||||
|
||||
Deletes an item from the combobox.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The item to delete, starting from zero.}
|
||||
|
||||
\membersection{wxComboBox::Deselect}\label{wxcomboboxdeselect}
|
||||
|
||||
\func{void}{Deselect}{\param{const int}{ n}}
|
||||
|
||||
Deselects an item in the combobox.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The item to deselect, starting from zero.}
|
||||
|
||||
\membersection{wxComboBox::FindString}\label{wxcomboboxfindstring}
|
||||
|
||||
\func{int}{FindString}{\param{const wxString\& }{string}}
|
||||
|
||||
Finds a choice matching the given string.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{string}{The item to find.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The position if found, or -1 if not found.
|
||||
|
||||
\membersection{wxComboBox::GetClientData}\label{wxcomboboxgetclientdata}
|
||||
|
||||
\constfunc{char*}{GetClientData}{\param{const int}{ n}}
|
||||
|
||||
Returns a pointer to the client data associated with the given item (if any).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{An item, starting from zero.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
A pointer to the client data, or NULL if the item was not found.
|
||||
|
||||
\membersection{wxComboBox::GetInsertionPoint}\label{wxcomboboxgetinsertionpoint}
|
||||
|
||||
\constfunc{long}{GetInsertionPoint}{\void}
|
||||
|
||||
Returns the insertion point for the combobox's text field.
|
||||
|
||||
\membersection{wxComboBox::GetLastPosition}\label{wxcomboboxgetlastposition}
|
||||
|
||||
\constfunc{long}{GetLastPosition}{\void}
|
||||
|
||||
Returns the last position in the combobox text field.
|
||||
|
||||
\membersection{wxComboBox::GetSelection}\label{wxcomboboxgetselection}
|
||||
|
||||
\constfunc{int}{GetSelection}{\void}
|
||||
|
||||
Gets the position of the selected string, or -1 if there is no selection.
|
||||
|
||||
\membersection{wxComboBox::GetString}\label{wxcomboboxgetstring}
|
||||
|
||||
\constfunc{wxString}{GetString}{\param{int}{ n}}
|
||||
|
||||
Returns the string at position {\it n}.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The item position, starting from zero.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The string if the item is found, otherwise the empty string.
|
||||
|
||||
\membersection{wxComboBox::GetStringSelection}\label{wxcomboboxgetstringselection}
|
||||
|
||||
\constfunc{wxString}{GetStringSelection}{\void}
|
||||
|
||||
Gets the selected string.
|
||||
|
||||
\membersection{wxComboBox::GetValue}\label{wxcomboboxgetvalue}
|
||||
|
||||
\constfunc{wxString}{GetValue}{\void}
|
||||
|
||||
Returns the current value in the combobox text field.
|
||||
|
||||
\membersection{wxComboBox::Number}\label{wxcomboboxnumber}
|
||||
|
||||
\constfunc{int}{Number}{\void}
|
||||
|
||||
Returns the number of items in the combobox list.
|
||||
|
||||
TODO: make this GetNumber or GetCount?
|
||||
|
||||
\membersection{wxComboBox::Paste}\label{wxcomboboxpaste}
|
||||
|
||||
\func{void}{Paste}{\void}
|
||||
|
||||
Pastes text from the clipboard to the text field.
|
||||
|
||||
\membersection{wxComboBox::Replace}\label{wxcomboboxreplace}
|
||||
|
||||
\func{void}{Replace}{\param{const long}{ from}, \param{const 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{const long}{ from}, \param{const long}{ to}}
|
||||
|
||||
Removes the text between the two positions in the combobox text field.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{from}{The first position.}
|
||||
|
||||
\docparam{to}{The last position.}
|
||||
|
||||
\membersection{wxComboBox::SetClientData}\label{wxcomboboxsetclientdata}
|
||||
|
||||
\func{void}{SetClientData}{\param{const int}{ n}, \param{char* }{data}}
|
||||
|
||||
Associates the given client data pointer with the given item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based item.}
|
||||
|
||||
\docparam{data}{The client data.}
|
||||
|
||||
\membersection{wxComboBox::SetInsertionPoint}\label{wxcomboboxsetinsertionpoint}
|
||||
|
||||
\func{void}{SetInsertionPoint}{\param{const 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{const int}{ n}}
|
||||
|
||||
Selects the given item in the combobox list.
|
||||
|
||||
\func{void}{SetSelection}{\param{const long}{ from}, \param{const long}{ to}}
|
||||
|
||||
Selects the text between the two positions, in the combobox text field.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based item to select.}
|
||||
|
||||
\docparam{from}{The first position.}
|
||||
|
||||
\docparam{to}{The second position.}
|
||||
|
||||
\membersection{wxComboBox::SetValue}\label{wxcomboboxsetvalue}
|
||||
|
||||
\func{void}{SetValue}{\param{const wxString\& }{text}}
|
||||
|
||||
Sets the text for the combobox text field.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{text}{The text to set.}
|
||||
|
||||
|
85
docs/latex/wx/command.tex
Normal file
@ -0,0 +1,85 @@
|
||||
\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{See also}
|
||||
|
||||
\overview{Overview}{wxcommandoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxCommand::wxCommand}
|
||||
|
||||
\func{}{wxCommand}{\param{bool}{ canUndo = FALSE}, \param{const wxString\& }{name = NULL}}
|
||||
|
||||
Constructor. wxCommand is an abstract class, so you will need to derive
|
||||
a new class and call this constructor from your own constructor.
|
||||
|
||||
{\it canUndo} tells the command processor whether this command is undo-able. You
|
||||
can achieve the same functionality by overriding the CanUndo member function (if for example
|
||||
the criteria for undoability is context-dependant).
|
||||
|
||||
{\it name} must be supplied for the command processor to display the command name
|
||||
in the application's edit menu.
|
||||
|
||||
\membersection{wxCommand::\destruct{wxCommand}}
|
||||
|
||||
\func{}{\destruct{wxCommand}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxCommand::CanUndo}
|
||||
|
||||
\func{bool}{CanUndo}{\void}
|
||||
|
||||
Returns TRUE if the command can be undone, FALSE otherwise.
|
||||
|
||||
\membersection{wxCommand::Do}
|
||||
|
||||
\func{bool}{Do}{\void}
|
||||
|
||||
Override this member function to execute the appropriate action when called.
|
||||
Return TRUE to indicate that the action has taken place, FALSE otherwise.
|
||||
Returning FALSE will indicate to the command processor that the action is
|
||||
not undoable and should not be added to the command history.
|
||||
|
||||
\membersection{wxCommand::GetName}
|
||||
|
||||
\func{wxString}{GetName}{\void}
|
||||
|
||||
Returns the command name.
|
||||
|
||||
\membersection{wxCommand::Undo}
|
||||
|
||||
\func{bool}{Undo}{\void}
|
||||
|
||||
Override this member function to un-execute a previous Do.
|
||||
Return TRUE to indicate that the action has taken place, FALSE otherwise.
|
||||
Returning FALSE will indicate to the command processor that the action is
|
||||
not redoable and no change should be made to the command history.
|
||||
|
||||
How you implement this command is totally application dependent, but typical
|
||||
strategies include:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item Perform an inverse operation on the last modified piece of
|
||||
data in the document. When redone, a copy of data stored in command
|
||||
is pasted back or some operation reapplied. This relies on the fact that
|
||||
you know the ordering of Undos; the user can never Undo at an arbitrary position
|
||||
in the command history.
|
||||
\item Restore the entire document state (perhaps using document transactioning).
|
||||
Potentially very inefficient, but possibly easier to code if the user interface
|
||||
and data are complex, and an `inverse execute' operation is hard to write.
|
||||
\end{itemize}
|
||||
|
||||
The docview sample uses the first method, to remove or restore segments
|
||||
in the drawing.
|
||||
|
||||
|
BIN
docs/latex/wx/contents.gif
Normal file
After Width: | Height: | Size: 231 B |
37
docs/latex/wx/control.tex
Normal file
@ -0,0 +1,37 @@
|
||||
\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{See also}
|
||||
|
||||
\helpref{wxValidator}{wxvalidator}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxControl::Command}\label{wxcontrolcommand}
|
||||
|
||||
\func{void}{Command}{\param{wxCommandEvent\& }{event}}
|
||||
|
||||
Simulates the effect of the user issuing a command to the item. See \helpref{wxCommandEvent}{wxcommandevent}.
|
||||
|
||||
\membersection{wxControl::GetLabel}\label{wxcontrolgetlabel}
|
||||
|
||||
\func{wxString\&}{GetLabel}{\void}
|
||||
|
||||
Returns the control's text.
|
||||
|
||||
\membersection{wxControl::SetLabel}\label{wxcontrolsetlabel}
|
||||
|
||||
\func{void}{SetLabel}{\param{const wxString\& }{label}}
|
||||
|
||||
Sets the item's text.
|
||||
|
BIN
docs/latex/wx/cpp.bmp
Normal file
After Width: | Height: | Size: 630 B |
169
docs/latex/wx/cursor.tex
Normal file
@ -0,0 +1,169 @@
|
||||
\section{\class{wxCursor}}\label{wxcursor}
|
||||
|
||||
A cursor is a small bitmap usually used for denoting where the mouse
|
||||
pointer is, with a picture that might indicate the interpretation of a
|
||||
mouse click. As with icons, cursors in X and MS Windows are created
|
||||
in a different manner. Therefore, separate cursors will be created for the
|
||||
different environments. Platform-specific methods for creating a {\bf
|
||||
wxCursor} object are catered for, and this is an occasion where
|
||||
conditional compilation will probably be required (see \helpref{wxIcon}{wxicon} for
|
||||
an example).
|
||||
|
||||
A single cursor object may be used in many windows (any subwindow type).
|
||||
The wxWindows convention is to set the cursor for a window, as in X,
|
||||
rather than to set it globally as in MS Windows, although a
|
||||
global \helpref{::wxSetCursor}{wxsetcursor} is also available for MS Windows use.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxBitmap}{wxbitmap}\\
|
||||
\helpref{wxGDIObject}{wxgdiobject}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap}{wxbitmap}, \helpref{wxIcon}{wxicon}, \helpref{wxWindow::SetCursor}{wxwindowsetcursor},\rtfsp
|
||||
\helpref{::wxSetCursor}{wxsetcursor}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxCursor::wxCursor}\label{wxcursorconstr}
|
||||
|
||||
\func{}{wxCursor}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxCursor}{\param{const char}{ bits[]}, \param{const int }{width},
|
||||
\param{const int }{ height}, \param{const int }{hotSpotX=-1}, \param{const int }{hotSpotY=-1}, \param{const char }{maskBits[]=NULL}}
|
||||
|
||||
Constructs a cursor by passing an array of bits (Motif and Xt only). {\it maskBits} is used only under Motif.
|
||||
|
||||
If either {\it hotSpotX} or {\it hotSpotY} is -1, the hotspot will be the centre of the cursor image (Motif only).
|
||||
|
||||
\func{}{wxCursor}{\param{const wxString\& }{cursorName}, \param{const long }{type}, \param{const int }{hotSpotX=0}, \param{const int }{hotSpotY=0}}
|
||||
|
||||
Constructs a cursor by passing a string resource name or filename.
|
||||
|
||||
{\it hotSpotX} and {\it hotSpotY} are currently only used under Windows when loading from an
|
||||
icon file, to specify the cursor hotspot relative to the top left of the image.
|
||||
|
||||
\func{}{wxCursor}{\param{const int}{ cursorId}}
|
||||
|
||||
Constructs a cursor using a cursor identifier.
|
||||
|
||||
\func{}{wxCursor}{\param{const wxCursor\&}{ cursor}}
|
||||
|
||||
Copy constructor. This uses reference counting so is a cheap operation.
|
||||
|
||||
\func{}{wxCursor}{\param{const wxCursor*}{ cursor}}
|
||||
|
||||
Copy constructor. This uses reference counting so is a cheap operation.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bits}{An array of bits.}
|
||||
|
||||
\docparam{maskBits}{Bits for a mask bitmap.}
|
||||
|
||||
\docparam{width}{Cursor width.}
|
||||
|
||||
\docparam{height}{Cursor height.}
|
||||
|
||||
\docparam{hotSpotX}{Hotspot x coordinate.}
|
||||
|
||||
\docparam{hotSpotY}{Hotspot y coordinate.}
|
||||
|
||||
\docparam{type}{Icon type to load. Under Motif, {\it type} defaults to {\bf wxBITMAP\_TYPE\_XBM}. Under Windows,
|
||||
it defaults to {\bf wxBITMAP\_TYPE\_CUR\_RESOURCE}.
|
||||
|
||||
Under X, the permitted cursor types are:
|
||||
|
||||
\twocolwidtha{6cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
|
||||
\end{twocollist}
|
||||
|
||||
Under Windows, the permitted types are:
|
||||
|
||||
\twocolwidtha{6cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxBITMAP\_TYPE\_CUR}}{Load a cursor from a .cur cursor file (only if USE\_RESOURCE\_LOADING\_IN\_MSW
|
||||
is enabled in wx\_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 wx\_setup.h). Specify {\it hotSpotX} and {\it hotSpotY}.}
|
||||
\end{twocollist}}
|
||||
|
||||
\docparam{cursorId}{A stock cursor identifier. May be one of:
|
||||
|
||||
\twocolwidtha{6cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxCURSOR\_ARROW}}{A standard arrow cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_BULLSEYE}}{Bullseye cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_CHAR}}{Rectangular character cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_CROSS}}{A cross cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_HAND}}{A hand cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_IBEAM}}{An I-beam cursor (vertical line).}
|
||||
\twocolitem{{\bf wxCURSOR\_LEFT\_BUTTON}}{Represents a mouse with the left button depressed.}
|
||||
\twocolitem{{\bf wxCURSOR\_MAGNIFIER}}{A magnifier icon.}
|
||||
\twocolitem{{\bf wxCURSOR\_MIDDLE\_BUTTON}}{Represents a mouse with the middle button depressed.}
|
||||
\twocolitem{{\bf wxCURSOR\_NO\_ENTRY}}{A no-entry sign cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_PAINT\_BRUSH}}{A paintbrush cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_PENCIL}}{A pencil cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_POINT\_LEFT}}{A cursor that points left.}
|
||||
\twocolitem{{\bf wxCURSOR\_POINT\_RIGHT}}{A cursor that points right.}
|
||||
\twocolitem{{\bf wxCURSOR\_QUESTION\_ARROW}}{An arrow and question mark.}
|
||||
\twocolitem{{\bf wxCURSOR\_RIGHT\_BUTTON}}{Represents a mouse with the right button depressed.}
|
||||
\twocolitem{{\bf wxCURSOR\_SIZENESW}}{A sizing cursor pointing NE-SW.}
|
||||
\twocolitem{{\bf wxCURSOR\_SIZENS}}{A sizing cursor pointing N-S.}
|
||||
\twocolitem{{\bf wxCURSOR\_SIZENWSE}}{A sizing cursor pointing NW-SE.}
|
||||
\twocolitem{{\bf wxCURSOR\_SIZEWE}}{A sizing cursor pointing W-E.}
|
||||
\twocolitem{{\bf wxCURSOR\_SIZING}}{A general sizing cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_SPRAYCAN}}{A spraycan cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_WAIT}}{A wait cursor.}
|
||||
\twocolitem{{\bf wxCURSOR\_WATCH}}{A watch cursor.}
|
||||
\end{twocollist}\twocolwidtha{5cm}
|
||||
|
||||
Note that not all cursors are available on all platforms.}
|
||||
|
||||
\docparam{cursor}{Pointer or reference to a cursor to copy.}
|
||||
|
||||
\membersection{wxCursor::\destruct{wxCursor}}
|
||||
|
||||
\func{}{\destruct{wxCursor}}{\void}
|
||||
|
||||
Destroys the cursor. A cursor can be reused for more
|
||||
than one window, and does not get destroyed when the window is
|
||||
destroyed. wxWindows destroys all cursors on application exit, although
|
||||
it's best to clean them up explicitly.
|
||||
|
||||
\membersection{wxCursor::Ok}\label{wxcursorok}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
Returns TRUE if cursor data is present.
|
||||
|
||||
\membersection{wxCursor::operator $=$}\label{wxcursorassignment}
|
||||
|
||||
\func{wxCursor\&}{operator $=$}{\param{const wxCursor\& }{cursor}}
|
||||
|
||||
Assignment operator, using reference counting. Returns a reference
|
||||
to `this'.
|
||||
|
||||
\membersection{wxCursor::operator $==$}\label{wxcursorequals}
|
||||
|
||||
\func{bool}{operator $==$}{\param{const wxCursor\& }{cursor}}
|
||||
|
||||
Equality operator. Two cursors are equal if they contain pointers
|
||||
to the same underlying cursor data. It does not compare each attribute,
|
||||
so two independently-created cursors using the same parameters will
|
||||
fail the test.
|
||||
|
||||
\membersection{wxCursor::operator $!=$}\label{wxcursornotequals}
|
||||
|
||||
\func{bool}{operator $!=$}{\param{const wxCursor\& }{cursor}}
|
||||
|
||||
Inequality operator. Two cursors are not equal if they contain pointers
|
||||
to different underlying cursor data. It does not compare each attribute.
|
||||
|
||||
|
272
docs/latex/wx/database.tex
Normal file
@ -0,0 +1,272 @@
|
||||
\section{\class{wxDatabase}}\label{wxdatabase}
|
||||
|
||||
Every database object represents an ODBC connection. The connection may be closed and reopened.
|
||||
|
||||
\wxheading{Derivation}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\overview{wxDatabase overview}{wxdatabaseoverview}, \helpref{wxRecordSet}{wxrecordset}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDatabase::wxDatabase}
|
||||
|
||||
\func{}{wxDatabase}{\void}
|
||||
|
||||
Constructor. The constructor of the first wxDatabase instance of an
|
||||
application initializes the ODBC manager.
|
||||
|
||||
\membersection{wxDatabase::\destruct{wxDatabase}}
|
||||
|
||||
\func{}{\destruct{wxDatabase}}{\void}
|
||||
|
||||
Destructor. Resets and destroys any associated wxRecordSet instances.
|
||||
|
||||
The destructor of the last wxDatabase instance will deinitialize
|
||||
the ODBC manager.
|
||||
|
||||
\membersection{wxDatabase::BeginTrans}
|
||||
|
||||
\func{bool}{BeginTrans}{\void}
|
||||
|
||||
Not implemented.
|
||||
|
||||
\membersection{wxDatabase::Cancel}
|
||||
|
||||
\func{void}{Cancel}{\void}
|
||||
|
||||
Not implemented.
|
||||
|
||||
\membersection{wxDatabase::CanTransact}
|
||||
|
||||
\func{bool}{CanTransact}{\void}
|
||||
|
||||
Not implemented.
|
||||
|
||||
|
||||
\membersection{wxDatabase::CanUpdate}
|
||||
|
||||
\func{bool}{CanUpdate}{\void}
|
||||
|
||||
Not implemented.
|
||||
|
||||
\membersection{wxDatabase::Close}
|
||||
|
||||
\func{bool}{Close}{\void}
|
||||
|
||||
Resets the statement handles of any associated wxRecordSet objects,
|
||||
and disconnects from the current data source.
|
||||
|
||||
\membersection{wxDatabase::CommitTrans}
|
||||
|
||||
\func{bool}{CommitTrans}{\void}
|
||||
|
||||
Commits previous transactions. Not implemented.
|
||||
|
||||
\membersection{wxDatabase::ErrorOccured}
|
||||
|
||||
\func{bool}{ErrorOccured}{\void}
|
||||
|
||||
Returns TRUE if the last action caused an error.
|
||||
|
||||
\membersection{wxDatabase::ErrorSnapshot}
|
||||
|
||||
\func{void}{ErrorSnapshot}{\param{HSTMT}{ statement = SQL\_NULL\_HSTMT}}
|
||||
|
||||
This function will be called whenever an ODBC error occured. It stores the
|
||||
error related information returned by ODBC. If a statement handle of the
|
||||
concerning ODBC action is available it should be passed to the function.
|
||||
|
||||
\membersection{wxDatabase::GetDatabaseName}
|
||||
|
||||
\func{wxString}{GetDatabaseName}{\void}
|
||||
|
||||
Returns the name of the database associated with the current connection.
|
||||
|
||||
\membersection{wxDatabase::GetDataSource}
|
||||
|
||||
\func{wxString}{GetDataSource}{\void}
|
||||
|
||||
Returns the name of the connected data source.
|
||||
|
||||
\membersection{wxDatabase::GetErrorClass}
|
||||
|
||||
\func{wxString}{GetErrorClass}{\void}
|
||||
|
||||
Returns the error class of the last error. The error class consists of
|
||||
five characters where the first two characters contain the class
|
||||
and the other three characters contain the subclass of the ODBC error.
|
||||
See ODBC documentation for further details.
|
||||
|
||||
\membersection{wxDatabase::GetErrorCode}
|
||||
|
||||
\func{wxRETCODE}{GetErrorCode}{\void}
|
||||
|
||||
Returns the error code of the last ODBC function call. This will be one of:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{SQL\_ERROR}{General error.}
|
||||
\twocolitem{SQL\_INVALID\_HANDLE}{An invalid handle was passed to an ODBC function.}
|
||||
\twocolitem{SQL\_NEED\_DATA}{ODBC expected some data.}
|
||||
\twocolitem{SQL\_NO\_DATA\_FOUND}{No data was found by this ODBC call.}
|
||||
\twocolitem{SQL\_SUCCESS}{The call was successful.}
|
||||
\twocolitem{SQL\_SUCCESS\_WITH\_INFO}{The call was successful, but further information can be
|
||||
obtained from the ODBC manager.}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxDatabase::GetErrorMessage}
|
||||
|
||||
\func{wxString}{GetErrorMessage}{\void}
|
||||
|
||||
Returns the last error message returned by the ODBC manager.
|
||||
|
||||
\membersection{wxDatabase::GetErrorNumber}
|
||||
|
||||
\func{long}{GetErrorNumber}{\void}
|
||||
|
||||
Returns the last native error. A native error is an ODBC driver dependent
|
||||
error number.
|
||||
|
||||
\membersection{wxDatabase::GetHDBC}
|
||||
|
||||
\func{HDBC}{GetHDBC}{\void}
|
||||
|
||||
Returns the current ODBC database handle.
|
||||
|
||||
\membersection{wxDatabase::GetHENV}
|
||||
|
||||
\func{HENV}{GetHENV}{\void}
|
||||
|
||||
Returns the ODBC environment handle.
|
||||
|
||||
\membersection{wxDatabase::GetInfo}
|
||||
|
||||
\func{bool}{GetInfo}{\param{long}{ infoType}, \param{long *}{buf}}
|
||||
|
||||
\func{bool}{GetInfo}{\param{long}{ infoType}, \param{const wxString\& }{buf}, \param{int}{ bufSize=-1}}
|
||||
|
||||
Returns requested information. The return value is TRUE if successful, FALSE otherwise.
|
||||
|
||||
{\it infoType} is an ODBC identifier specifying the type of information to be returned.
|
||||
|
||||
{\it buf} is a character or long integer pointer to storage which must be allocated by the
|
||||
application, and which will contain the information if the function is successful.
|
||||
|
||||
{\it bufSize} is the size of the character buffer. A value of -1 indicates that the size
|
||||
should be computed by the GetInfo function.
|
||||
|
||||
\membersection{wxDatabase::GetPassword}
|
||||
|
||||
\func{wxString}{GetPassword}{\void}
|
||||
|
||||
Returns the password of the current user.
|
||||
|
||||
\membersection{wxDatabase::GetUsername}
|
||||
|
||||
\func{wxString}{GetUsername}{\void}
|
||||
|
||||
Returns the current username.
|
||||
|
||||
\membersection{wxDatabase::GetODBCVersionFloat}
|
||||
|
||||
\func{float}{GetODBCVersionFloat}{\param{bool}{ implementation=TRUE}}
|
||||
|
||||
Returns the version of ODBC in floating point format, e.g. 2.50.
|
||||
|
||||
{\it implementation} should be TRUE to get the DLL version, or FALSE to get the
|
||||
version defined in the {\tt sql.h} header file.
|
||||
|
||||
This function can return the value 0.0 if the header version number is not defined (for early
|
||||
versions of ODBC).
|
||||
|
||||
\membersection{wxDatabase::GetODBCVersionString}
|
||||
|
||||
\func{wxString}{GetODBCVersionString}{\param{bool}{ implementation=TRUE}}
|
||||
|
||||
Returns the version of ODBC in string format, e.g. ``02.50".
|
||||
|
||||
{\it implementation} should be TRUE to get the DLL version, or FALSE to get the
|
||||
version defined in the {\tt sql.h} header file.
|
||||
|
||||
This function can return the value ``00.00" if the header version number is not defined (for early
|
||||
versions of ODBC).
|
||||
|
||||
\membersection{wxDatabase::InWaitForDataSource}
|
||||
|
||||
\func{bool}{InWaitForDataSource}{\void}
|
||||
|
||||
Not implemented.
|
||||
|
||||
\membersection{wxDatabase::IsOpen}
|
||||
|
||||
\func{bool}{IsOpen}{\void}
|
||||
|
||||
Returns TRUE if a connection is open.
|
||||
|
||||
\membersection{wxDatabase::Open}\label{wxdatabaseopen}
|
||||
|
||||
\func{bool}{Open}{\param{const wxString\& }{datasource}, \param{bool}{ exclusive = FALSE}, \param{bool }{readOnly = TRUE},
|
||||
\param{const wxString\& }{username = ``ODBC"}, \param{const wxString\& }{password = ``"}}
|
||||
|
||||
Connect to a data source. {\it datasource} contains the name of the ODBC data
|
||||
source. The parameters exclusive and readOnly are not used.
|
||||
|
||||
\membersection{wxDatabase::OnSetOptions}
|
||||
|
||||
\func{void}{OnSetOptions}{\param{wxRecordSet *}{recordSet}}
|
||||
|
||||
Not implemented.
|
||||
|
||||
\membersection{wxDatabase::OnWaitForDataSource}
|
||||
|
||||
\func{void}{OnWaitForDataSource}{\param{bool}{ stillExecuting}}
|
||||
|
||||
Not implemented.
|
||||
|
||||
\membersection{wxDatabase::RollbackTrans}
|
||||
|
||||
\func{bool}{RollbackTrans}{\void}
|
||||
|
||||
Sends a rollback to the ODBC driver. Not implemented.
|
||||
|
||||
\membersection{wxDatabase::SetDataSource}
|
||||
|
||||
\func{void}{SetDataSource}{\param{const wxString\& }{s}}
|
||||
|
||||
Sets the name of the data source. Not implemented.
|
||||
|
||||
\membersection{wxDatabase::SetLoginTimeout}
|
||||
|
||||
\func{void}{SetLoginTimeout}{\param{long}{ seconds}}
|
||||
|
||||
Sets the time to wait for an user login. Not implemented.
|
||||
|
||||
\membersection{wxDatabase::SetPassword}
|
||||
|
||||
\func{void}{SetPassword}{\param{const wxString\& }{s}}
|
||||
|
||||
Sets the password of the current user. Not implemented.
|
||||
|
||||
\membersection{wxDatabase::SetSynchronousMode}
|
||||
|
||||
\func{void}{SetSynchronousMode}{\param{bool }{synchronous}}
|
||||
|
||||
Toggles between synchronous and asynchronous mode. Currently only synchronous
|
||||
mode is supported, so this function has no effect.
|
||||
|
||||
\membersection{wxDatabase::SetQueryTimeout}
|
||||
|
||||
\func{void}{SetQueryTimeout}{\param{long}{ seconds}}
|
||||
|
||||
Sets the time to wait for a response to a query. Not implemented.
|
||||
|
||||
\membersection{wxDatabase::SetUsername}
|
||||
|
||||
\func{void}{SetUsername}{\param{const wxString\& }{s}}
|
||||
|
||||
Sets the name of the current user. Not implemented.
|
||||
|
||||
|
348
docs/latex/wx/date.tex
Normal file
@ -0,0 +1,348 @@
|
||||
\section{\class{wxDate}}\label{wxdate}
|
||||
|
||||
A class for manipulating dates.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxTime}{wxtime}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDate::wxDate}\label{wxdateconstr}
|
||||
|
||||
\func{}{wxDate}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxDate}{\param{const wxDate\&}{ date}}
|
||||
|
||||
Copy constructor.
|
||||
|
||||
\func{}{wxDate}{\param{const int}{ month}, \param{const int}{ day}, \param{const int}{ year}}
|
||||
|
||||
Constructor taking month, day and year.
|
||||
|
||||
\func{}{wxDate}{\param{const long}{ julian}}
|
||||
|
||||
Constructor taking an integer representing the Julian date. This is the number of days since
|
||||
1st January 4713 B.C., so to convert from the number of days since 1st January 1901,
|
||||
construct a date for 1/1/1901, and add the number of days.
|
||||
|
||||
\func{}{wxDate}{\param{const wxString\& }{dateString}}
|
||||
|
||||
Constructor taking a string representing a date. This must be either the string TODAY, or of the
|
||||
form {\tt MM/DD/YYYY} or {\tt MM-DD-YYYY}. For example:
|
||||
|
||||
\begin{verbatim}
|
||||
wxDate date("11/26/1966");
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{date}{Date to copy.}
|
||||
|
||||
\docparam{month}{Month: a number between 1 and 12.}
|
||||
|
||||
\docparam{day}{Day: a number between 1 and 31.}
|
||||
|
||||
\docparam{year}{Year, such as 1995, 2005.}
|
||||
|
||||
\membersection{wxDate::\destruct{wxDate}}
|
||||
|
||||
\func{void}{\destruct{wxDate}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxDate::AddMonths}\label{wxdateaddmonths}
|
||||
|
||||
\func{wxDate\&}{AddMonths}{\param{const int}{ months=1}}
|
||||
|
||||
Adds the given number of months to the date, returning a reference to `this'.
|
||||
|
||||
\membersection{wxDate::AddWeeks}\label{wxdateaddweeks}
|
||||
|
||||
\func{wxDate\&}{AddWeeks}{\param{const int}{ weeks=1}}
|
||||
|
||||
Adds the given number of weeks to the date, returning a reference to `this'.
|
||||
|
||||
\membersection{wxDate::AddYears}\label{wxdateaddyears}
|
||||
|
||||
\func{wxDate\&}{AddYears}{\param{const int}{ years=1}}
|
||||
|
||||
Adds the given number of months to the date, returning a reference to `this'.
|
||||
|
||||
\membersection{wxDate::FormatDate}\label{wxdateformatdate}
|
||||
|
||||
\constfunc{wxString}{FormatDate}{\param{const int}{ type=-1}}
|
||||
|
||||
Formats the date according to {\it type} if not -1, or according
|
||||
to the current display type if -1.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{type}{-1 or one of:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{wxDAY}{Format day only.}
|
||||
\twocolitem{wxMONTH}{Format month only.}
|
||||
\twocolitem{wxMDY}{Format MONTH, DAY, YEAR.}
|
||||
\twocolitem{wxFULL}{Format day, month and year in US style: DAYOFWEEK, MONTH, DAY, YEAR.}
|
||||
\twocolitem{wxEUROPEAN}{Format day, month and year in European style: DAY, MONTH, YEAR.}
|
||||
\end{twocollist}}
|
||||
|
||||
\membersection{wxDate::GetDay}\label{wxdategetday}
|
||||
|
||||
\constfunc{int}{GetDay}{\void}
|
||||
|
||||
Returns the numeric day (in the range 1 to 31).
|
||||
|
||||
\membersection{wxDate::GetDayOfWeek}\label{wxdategetdayofweek}
|
||||
|
||||
\constfunc{int}{GetDayOfWeek}{\void}
|
||||
|
||||
Returns the integer day of the week (in the range 1 to 7).
|
||||
|
||||
\membersection{wxDate::GetDayOfWeekName}\label{wxdategetdayofweekname}
|
||||
|
||||
\constfunc{wxString}{GetDayOfWeekName}{\void}
|
||||
|
||||
Returns the name of the day of week.
|
||||
|
||||
\membersection{wxDate::GetDayOfYear}\label{wxdategetdayofyear}
|
||||
|
||||
\constfunc{long}{GetDayOfYear}{\void}
|
||||
|
||||
Returns the day of the year (from 1 to 365).
|
||||
|
||||
\membersection{wxDate::GetDaysInMonth}\label{wxdategetdaysinmonth}
|
||||
|
||||
\constfunc{int}{GetDaysInMonth}{\void}
|
||||
|
||||
Returns the number of days in the month (in the range 1 to 31).
|
||||
|
||||
\membersection{wxDate::GetFirstDayOfMonth}\label{wxdategetfirstdayofmonth}
|
||||
|
||||
\constfunc{int}{GetFirstDayOfMonth}{\void}
|
||||
|
||||
Returns the day of week that is first in the month (in the range 1 to 7).
|
||||
|
||||
\membersection{wxDate::GetJulianDate}\label{wxdategetjuliandate}
|
||||
|
||||
\constfunc{long}{GetJulianDate}{\void}
|
||||
|
||||
Returns the Julian date.
|
||||
|
||||
\membersection{wxDate::GetMonth}\label{wxdategetmonth}
|
||||
|
||||
\constfunc{int}{GetMonth}{\void}
|
||||
|
||||
Returns the month number (in the range 1 to 12).
|
||||
|
||||
\membersection{wxDate::GetMonthEnd}
|
||||
|
||||
\func{wxDate}{GetMonthEnd}{\void}
|
||||
|
||||
Returns the date representing the last day of the month.
|
||||
|
||||
\membersection{wxDate::GetMonthName}\label{wxdategetmonthname}
|
||||
|
||||
\constfunc{wxString}{GetMonthName}{\void}
|
||||
|
||||
Returns the name of the month. Do not delete the returned storage.
|
||||
|
||||
\membersection{wxDate::GetMonthStart}\label{wxdategetmonthstart}
|
||||
|
||||
\constfunc{wxDate}{GetMonthStart}{\void}
|
||||
|
||||
Returns the date representing the first day of the month.
|
||||
|
||||
\membersection{wxDate::GetWeekOfMonth}\label{wxdategetweekofmonth}
|
||||
|
||||
\constfunc{int}{GetWeekOfMonth}{\void}
|
||||
|
||||
Returns the week of month (in the range 1 to 6).
|
||||
|
||||
\membersection{wxDate::GetWeekOfYear}\label{wxdategetweekofyear}
|
||||
|
||||
\constfunc{int}{GetWeekOfYear}{\void}
|
||||
|
||||
Returns the week of year (in the range 1 to 52).
|
||||
|
||||
\membersection{wxDate::GetYear}\label{wxdategetyear}
|
||||
|
||||
\constfunc{int}{GetYear}{\void}
|
||||
|
||||
Returns the year as an integer (such as `1995').
|
||||
|
||||
\membersection{wxDate::GetYearEnd}\label{wxdategetyearend}
|
||||
|
||||
\constfunc{wxDate}{GetYearEnd}{\void}
|
||||
|
||||
Returns the date representing the last day of the year.
|
||||
|
||||
\membersection{wxDate::GetYearStart}\label{wxdategetyearstart}
|
||||
|
||||
\constfunc{wxDate}{GetYearStart}{\void}
|
||||
|
||||
Returns the date representing the first day of the year.
|
||||
|
||||
\membersection{wxDate::IsLeapYear}\label{wxdateisleapyear}
|
||||
|
||||
\constfunc{bool}{IsLeapYear}{\void}
|
||||
|
||||
Returns TRUE if the year of this date is a leap year.
|
||||
|
||||
\membersection{wxDate::Set}\label{wxdateset}
|
||||
|
||||
\func{wxDate\&}{Set}{\void}
|
||||
|
||||
Sets the date to current system date, returning a reference to `this'.
|
||||
|
||||
\func{wxDate\&}{Set}{\param{const long}{ julian}}
|
||||
|
||||
Sets the date to the given Julian date, returning a reference to `this'.
|
||||
|
||||
\func{wxDate\&}{Set}{\param{const int}{ month}, \param{const int}{ day}, \param{const int}{ year}}
|
||||
|
||||
Sets the date to the given date, returning a reference to `this'.
|
||||
|
||||
{\it month} is a number from 1 to 12.
|
||||
|
||||
{\it day} is a number from 1 to 31.
|
||||
|
||||
{\it year} is a year, such as 1995, 2005.
|
||||
|
||||
\membersection{wxDate::SetFormat}\label{wxdatesetformat}
|
||||
|
||||
\func{void}{SetFormat}{\param{const int}{ format}}
|
||||
|
||||
Sets the current format type.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{format}{-1 or one of:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxDAY}}{Format day only.}
|
||||
\twocolitem{{\bf wxMONTH}}{Format month only.}
|
||||
\twocolitem{{\bf wxMDY}}{Format MONTH, DAY, YEAR.}
|
||||
\twocolitem{{\bf wxFULL}}{Format day, month and year in US style: DAYOFWEEK, MONTH, DAY, YEAR.}
|
||||
\twocolitem{{\bf wxEUROPEAN}}{Format day, month and year in European style: DAY, MONTH, YEAR.}
|
||||
\end{twocollist}}
|
||||
|
||||
\membersection{wxDate::SetOption}\label{wxdatesetoption}
|
||||
|
||||
\func{int}{SetOption}{\param{const int}{ option}, \param{const bool}{ enable=TRUE}}
|
||||
|
||||
Enables or disables an option for formatting.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{option}{May be one of:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxNO\_CENTURY}}{The century is not formatted.}
|
||||
\twocolitem{{\bf wxDATE\_ABBR}}{Month and day names are abbreviated to 3 characters when formatting.}
|
||||
\end{twocollist}}
|
||||
|
||||
\membersection{wxDate::operator wxString}\label{wxdatewxstring}
|
||||
|
||||
\func{}{operator wxString}{\void}
|
||||
|
||||
Conversion operator, to convert wxDate to wxString by calling FormatDate.
|
||||
|
||||
\membersection{wxDate::operator $+$}\label{wxdateplus}
|
||||
|
||||
\func{wxDate}{operator $+$}{\param{const long}{ i}}
|
||||
|
||||
\func{wxDate}{operator $+$}{\param{const int}{ i}}
|
||||
|
||||
Adds an integer number of days to the date, returning a date.
|
||||
|
||||
\membersection{wxDate::operator $-$}\label{wxdateminus}
|
||||
|
||||
\func{wxDate}{operator $-$}{\param{const long}{ i}}
|
||||
|
||||
\func{wxDate}{operator $-$}{\param{const int}{ i}}
|
||||
|
||||
Subtracts an integer number of days from the date, returning a date.
|
||||
|
||||
\func{long}{operator $-$}{\param{const wxDate\&}{ date}}
|
||||
|
||||
Subtracts one date from another, return the number of intervening days.
|
||||
|
||||
\membersection{wxDate::operator $+=$}\label{wxdateplusequals}
|
||||
|
||||
\func{wxDate\&}{operator $+=$}{\param{const long}{ i}}
|
||||
|
||||
Postfix operator: adds an integer number of days to the date, returning
|
||||
a reference to `this' date.
|
||||
|
||||
\membersection{wxDate::operator $-=$}\label{wxdateminusequals}
|
||||
|
||||
\func{wxDate\&}{operator $-=$}{\param{const long}{ i}}
|
||||
|
||||
Postfix operator: subtracts an integer number of days from the date, returning
|
||||
a reference to `this' date.
|
||||
|
||||
\membersection{wxDate::operator $++$}\label{wxdateplusplus}
|
||||
|
||||
\func{wxDate\&}{operator $++$}{\void}
|
||||
|
||||
Increments the date (postfix or prefix).
|
||||
|
||||
\membersection{wxDate::operator $--$}\label{wxdateminusminus}
|
||||
|
||||
\func{wxDate\&}{operator $--$}{\void}
|
||||
|
||||
Decrements the date (postfix or prefix).
|
||||
|
||||
\membersection{wxDate::operator $<$}\label{wxdatelessthan}
|
||||
|
||||
\func{friend bool}{operator $<$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
|
||||
|
||||
Function to compare two dates, returning TRUE if {\it date1} is earlier than {\it date2}.
|
||||
|
||||
\membersection{wxDate::operator $<=$}\label{wxdatelessthaneq}
|
||||
|
||||
\func{friend bool}{operator $<=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
|
||||
|
||||
Function to compare two dates, returning TRUE if {\it date1} is earlier than or equal to {\it date2}.
|
||||
|
||||
\membersection{wxDate::operator $>$}\label{wxdategreaterthan}
|
||||
|
||||
\func{friend bool}{operator $>$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
|
||||
|
||||
Function to compare two dates, returning TRUE if {\it date1} is later than {\it date2}.
|
||||
|
||||
\membersection{wxDate::operator $>=$}\label{wxdategreaterthaneq}
|
||||
|
||||
\func{friend bool}{operator $>=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
|
||||
|
||||
Function to compare two dates, returning TRUE if {\it date1} is later than or equal to {\it date2}.
|
||||
|
||||
\membersection{wxDate::operator $==$}\label{wxdateequals}
|
||||
|
||||
\func{friend bool}{operator $==$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
|
||||
|
||||
Function to compare two dates, returning TRUE if {\it date1} is equal to {\it date2}.
|
||||
|
||||
\membersection{wxDate::operator $!=$}\label{wxdatenotequals}
|
||||
|
||||
\func{friend bool}{operator $!=$}{\param{const wxDate\&}{ date1}, \param{const wxDate\&}{ date2}}
|
||||
|
||||
Function to compare two dates, returning TRUE if {\it date1} is not equal to {\it date2}.
|
||||
|
||||
\membersection{wxDate::operator \cinsert}\label{wxdateinsert}
|
||||
|
||||
\func{friend ostream\&}{operator \cinsert}{\param{ostream\&}{ os}, \param{const wxDate\&}{ date}}
|
||||
|
||||
Function to output a wxDate to an ostream.
|
||||
|
||||
|
696
docs/latex/wx/dc.tex
Normal file
@ -0,0 +1,696 @@
|
||||
\section{\class{wxDC}}\label{wxdc}
|
||||
|
||||
A wxDC is a {\it device context} onto which graphics and text can be drawn.
|
||||
It is intended to represent a number of output devices in a generic way,
|
||||
so a canvas has a device context and a printer also has a device context.
|
||||
In this way, the same piece of code may write to a number of different devices,
|
||||
if the device context is used as a parameter.
|
||||
|
||||
Derived types of wxDC have documentation for specific features
|
||||
only, so refer to this section for most device context information.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Overview}{dcoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDC::wxDC}
|
||||
|
||||
\func{}{wxDC}{\void}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxDC::\destruct{wxDC}}
|
||||
|
||||
\func{}{\destruct{wxDC}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxDC::BeginDrawing}\label{wxdcbegindrawing}
|
||||
|
||||
\func{void}{BeginDrawing}{\void}
|
||||
|
||||
Allows optimization of drawing code under MS Windows. Enclose
|
||||
drawing primitives between {\bf BeginDrawing} and {\bf EndDrawing}\rtfsp
|
||||
calls.
|
||||
|
||||
Drawing to a wxDialog panel device context outside of a
|
||||
system-generated OnPaint event {\it requires} this pair of calls to
|
||||
enclose drawing code. This is because a Windows dialog box does not have
|
||||
a retained device context associated with it, and selections such as pen
|
||||
and brush settings would be lost if the device context were obtained and
|
||||
released for each drawing operation.
|
||||
|
||||
\membersection{wxDC::Blit}\label{wxdcblit}
|
||||
|
||||
\func{bool}{Blit}{\param{long}{ xdest}, \param{long}{ ydest}, \param{long}{ width}, \param{long}{ height},
|
||||
\param{wxDC* }{source}, \param{long}{ xsrc}, \param{long}{ ysrc}, \param{int}{ logicalFunc},
|
||||
\param{bool }{useMask}}
|
||||
|
||||
Copy from a source DC to this DC, specifying the destination
|
||||
coordinates, size of area to copy, source DC, source coordinates, and
|
||||
logical function.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{xdest}{Destination device context x position.}
|
||||
|
||||
\docparam{ydest}{Destination device context y position.}
|
||||
|
||||
\docparam{width}{Width of source area to be copied.}
|
||||
|
||||
\docparam{height}{Height of source area to be copied.}
|
||||
|
||||
\docparam{source}{Source device context.}
|
||||
|
||||
\docparam{xsrc}{Source device context x position.}
|
||||
|
||||
\docparam{ysrc}{Source device context y position.}
|
||||
|
||||
\docparam{logicalFunc}{Logical function to use: see \helpref{wxDC::SetLogicalFunction}{wxdcsetlogicalfunction}.}
|
||||
|
||||
\docparam{useMask}{If TRUE, Blit does a transparent blit using the mask that is associated with the bitmap
|
||||
selected into the source device context. The Windows implementation does the following:
|
||||
|
||||
\begin{enumerate}
|
||||
\item Creates a temporary bitmap and copies the destination area into it.
|
||||
\item Copies the source area into the temporary bitmap using the specified logical function.
|
||||
\item Sets the masked area in the temporary bitmap to BLACK by ANDing the
|
||||
mask bitmap with the temp bitmap with the foreground colour set to WHITE
|
||||
and the bg colour set to BLACK.
|
||||
\item Sets the unmasked area in the destination area to BLACK by ANDing the
|
||||
mask bitmap with the destination area with the foreground colour set to BLACK
|
||||
and the background colour set to WHITE.
|
||||
\item ORs the temporary bitmap with the destination area.
|
||||
\item Deletes the temporary bitmap.
|
||||
\end{enumerate}
|
||||
|
||||
This sequence of operations ensures that the source's transparent area need not be black,
|
||||
and logical functions are supported.
|
||||
}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
There is partial support for Blit in wxPostScriptDC, under X.
|
||||
|
||||
See \helpref{wxMemoryDC}{wxmemorydc} for typical usage.
|
||||
|
||||
wxheading{See also}
|
||||
|
||||
\helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxBitmap}{wxbitmap}, \helpref{wxMask}{wxmask}
|
||||
|
||||
\membersection{wxDC::Clear}\label{wxdcclear}
|
||||
|
||||
\func{void}{Clear}{\void}
|
||||
|
||||
Clears the device context using the current background brush.
|
||||
|
||||
\membersection{wxDC::CrossHair}\label{wxdccrosshair}
|
||||
|
||||
\func{void}{CrossHair}{\param{long}{ x}, \param{long}{ y}}
|
||||
|
||||
Displays a cross hair using the current pen. This is a vertical
|
||||
and horizontal line the height and width of the canvas, centred
|
||||
on the given point.
|
||||
|
||||
\membersection{wxDC::DestroyClippingRegion}\label{wxdcdestroyclippingregion}
|
||||
|
||||
\func{void}{DestroyClippingRegion}{\void}
|
||||
|
||||
Destroys the current clipping region so that none of the DC is clipped.
|
||||
See also \helpref{wxDC::SetClippingRegion}{wxdcsetclippingregion}.
|
||||
|
||||
\membersection{wxDC::DeviceToLogicalX}\label{wxdcdevicetologicalx}
|
||||
|
||||
\func{long}{DeviceToLogicalX}{\param{long}{ x}}
|
||||
|
||||
Convert device X coordinate to logical coordinate, using the current
|
||||
mapping mode.
|
||||
|
||||
\membersection{wxDC::DeviceToLogicalXRel}\label{wxdcdevicetologicalxrel}
|
||||
|
||||
\func{long}{DeviceToLogicalXRel}{\param{long}{ x}}
|
||||
|
||||
Convert device X coordinate to relative logical coordinate, using the current
|
||||
mapping mode. Use this function for converting a width, for example.
|
||||
|
||||
\membersection{wxDC::DeviceToLogicalY}\label{wxdcdevicetologicaly}
|
||||
|
||||
\func{long}{DeviceToLogicalY}{\param{long}{ y}}
|
||||
|
||||
Converts device Y coordinate to logical coordinate, using the current
|
||||
mapping mode.
|
||||
|
||||
\membersection{wxDC::DeviceToLogicalYRel}\label{wxdcdevicetologicalyrel}
|
||||
|
||||
\func{long}{DeviceToLogicalYRel}{\param{long}{ y}}
|
||||
|
||||
Convert device Y coordinate to relative logical coordinate, using the current
|
||||
mapping mode. Use this function for converting a height, for example.
|
||||
|
||||
\membersection{wxDC::DrawArc}\label{wxdcdrawarc}
|
||||
|
||||
\func{void}{DrawArc}{\param{long}{ x1}, \param{long}{ y1}, \param{long}{ x2}, \param{long}{ y2}, \param{double}{ xc}, \param{double}{ yc}}
|
||||
|
||||
Draws an arc, centred on ({\it xc, yc}), with starting point ({\it x1, y1})
|
||||
and ending at ({\it x2, y2}). The current pen is used for the outline
|
||||
and the current brush for filling the shape.
|
||||
|
||||
\membersection{wxDC::DrawEllipse}\label{wxdcdrawellipse}
|
||||
|
||||
\func{void}{DrawEllipse}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
|
||||
|
||||
Draws an ellipse contained in the rectangle with the given top left corner, and with the
|
||||
given size. The current pen is used for the outline and the current brush for
|
||||
filling the shape.
|
||||
|
||||
\membersection{wxDC::DrawEllipticArc}\label{wxdcdrawellipticarc}
|
||||
|
||||
\func{void}{DrawEllipticArc}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height},
|
||||
\param{double}{ start}, \param{double}{ end}}
|
||||
|
||||
Draws an arc of an ellipse. The current pen is used for drawing the arc and
|
||||
the current brush is used for drawing the pie. This function is currently only available for
|
||||
X canvas and PostScript device contexts.
|
||||
|
||||
{\it x} and {\it y} specify the x and y coordinates of the upper-left corner of the rectangle that contains
|
||||
the ellipse.
|
||||
|
||||
{\it width} and {\it height} specify the width and height of the rectangle that contains
|
||||
the ellipse.
|
||||
|
||||
{\it start} and {\it end} specify the start and end of the arc relative to the three-o'clock
|
||||
position from the center of the rectangle. Angles are specified
|
||||
in degrees (360 is a complete circle). Positive values mean
|
||||
counter-clockwise motion. If {\it start} is equal to {\it end}, a
|
||||
complete ellipse will be drawn.
|
||||
|
||||
\membersection{wxDC::DrawIcon}\label{wxdcdrawicon}
|
||||
|
||||
\func{void}{DrawIcon}{\param{const wxIcon\&}{ icon}, \param{long}{ x}, \param{long}{ y}}
|
||||
|
||||
Draw an icon on the display (does nothing if the device context is PostScript).
|
||||
This can be the simplest way of drawing bitmaps on a canvas.
|
||||
|
||||
\membersection{wxDC::DrawLine}\label{wxdcdrawline}
|
||||
|
||||
\func{void}{DrawLine}{\param{long}{ x1}, \param{long}{ y1}, \param{long}{ x2}, \param{long}{ y2}}
|
||||
|
||||
Draws a line from the first point to the second. The current pen is used
|
||||
for drawing the line.
|
||||
|
||||
\membersection{wxDC::DrawLines}\label{wxdcdrawlines}
|
||||
|
||||
\func{void}{DrawLines}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0}}
|
||||
|
||||
\func{void}{DrawLines}{\param{wxList *}{points}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0}}
|
||||
|
||||
Draws lines using an array of {\it points} of size {\it n}, or list of
|
||||
pointers to points, adding the optional offset coordinate. The current
|
||||
pen is used for drawing the lines. The programmer is responsible for
|
||||
deleting the list of points.
|
||||
|
||||
\membersection{wxDC::DrawPolygon}\label{wxdcdrawpolygon}
|
||||
|
||||
\func{void}{DrawPolygon}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0},\\
|
||||
\param{int }{fill\_style = wxODDEVEN\_RULE}}
|
||||
|
||||
\func{void}{DrawPolygon}{\param{wxList *}{points}, \param{long}{ xoffset = 0}, \param{long}{ yoffset = 0},\\
|
||||
\param{int }{fill\_style = wxODDEVEN\_RULE}}
|
||||
|
||||
Draws a filled polygon using an array of {\it points} of size {\it n},
|
||||
or list of pointers to points, adding the optional offset coordinate.
|
||||
|
||||
The last argument specifies the fill rule: {\bf wxODDEVEN\_RULE} (the
|
||||
default) or {\bf wxWINDING\_RULE}.
|
||||
|
||||
The current pen is used for drawing the outline, and the current brush
|
||||
for filling the shape. Using a transparent brush suppresses filling.
|
||||
The programmer is responsible for deleting the list of points.
|
||||
|
||||
Note that wxWindows automatically closes the first and last points.
|
||||
|
||||
\membersection{wxDC::DrawPoint}\label{wxdcdrawpoint}
|
||||
|
||||
\func{void}{DrawPoint}{\param{long}{ x}, \param{long}{ y}}
|
||||
|
||||
Draws a point using the current pen.
|
||||
|
||||
\membersection{wxDC::DrawRectangle}\label{wxdcdrawrectangle}
|
||||
|
||||
\func{void}{DrawRectangle}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
|
||||
|
||||
Draws a rectangle with the given top left corner, and with the given
|
||||
size. The current pen is used for the outline and the current brush
|
||||
for filling the shape.
|
||||
|
||||
\membersection{wxDC::DrawRoundedRectangle}\label{wxdcdrawroundedrectangle}
|
||||
|
||||
\func{void}{DrawRoundedRectangle}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}, \param{double}{ radius = 20}}
|
||||
|
||||
Draws a rectangle with the given top left corner, and with the given
|
||||
size. The corners are quarter-circles using the given radius. The
|
||||
current pen is used for the outline and the current brush for filling
|
||||
the shape.
|
||||
|
||||
If {\it radius} is positive, the value is assumed to be the
|
||||
radius of the rounded corner. If {\it radius} is negative,
|
||||
the absolute value is assumed to be the {\it proportion} of the smallest
|
||||
dimension of the rectangle. This means that the corner can be
|
||||
a sensible size relative to the size of the rectangle, and also avoids
|
||||
the strange effects X produces when the corners are too big for
|
||||
the rectangle.
|
||||
|
||||
\membersection{wxDC::DrawSpline}\label{wxdcdrawspline}
|
||||
|
||||
\func{void}{DrawSpline}{\param{wxList *}{points}}
|
||||
|
||||
Draws a spline between all given control points, using the current
|
||||
pen. Doesn't delete the wxList and contents. The spline is drawn
|
||||
using a series of lines, using an algorithm taken from the X drawing
|
||||
program `XFIG'.
|
||||
|
||||
\func{void}{DrawSpline}{\param{long}{ x1}, \param{long}{ y1}, \param{long}{ x2}, \param{long}{ y2}, \param{long}{ x3}, \param{long}{ y3}}
|
||||
|
||||
Draws a three-point spline using the current pen.
|
||||
|
||||
\membersection{wxDC::DrawText}\label{wxdcdrawtext}
|
||||
|
||||
\func{void}{DrawText}{\param{const wxString\& }{text}, \param{long}{ x}, \param{long}{ y}}
|
||||
|
||||
Draws a text string at the specified point, using the current text font,
|
||||
and the current text foreground and background colours.
|
||||
|
||||
The coordinates refer to the top-left corner of the rectangle bounding
|
||||
the string. See \helpref{wxDC::GetTextExtent}{wxdcgettextextent} for how
|
||||
to get the dimensions of a text string, which can be used to position the
|
||||
text more precisely.
|
||||
|
||||
\membersection{wxDC::EndDoc}\label{wxdcenddoc}
|
||||
|
||||
\func{void}{EndDoc}{\void}
|
||||
|
||||
Ends a document (only relevant when outputting to a printer).
|
||||
|
||||
\membersection{wxDC::EndDrawing}\label{wxdcenddrawing}
|
||||
|
||||
\func{void}{EndDrawing}{\void}
|
||||
|
||||
Allows optimization of drawing code under MS Windows. Enclose
|
||||
drawing primitives between {\bf BeginDrawing} and {\bf EndDrawing}\rtfsp
|
||||
calls.
|
||||
|
||||
\membersection{wxDC::EndPage}\label{wxdcendpage}
|
||||
|
||||
\func{void}{EndPage}{\void}
|
||||
|
||||
Ends a document page (only relevant when outputting to a printer).
|
||||
|
||||
\membersection{wxDC::FloodFill}\label{wxdcfloodfill}
|
||||
|
||||
\func{void}{FloodFill}{\param{long}{ x}, \param{long}{ y}, \param{wxColour *}{colour}, \param{int}{ style=wxFLOOD\_SURFACE}}
|
||||
|
||||
Flood fills the device context starting from the given point, in the given colour,
|
||||
and using a style:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item wxFLOOD\_SURFACE: the flooding occurs until a colour other than the given colour is encountered.
|
||||
\item wxFLOOD\_BORDER: the area to be flooded is bounded by the given colour.
|
||||
\end{itemize}
|
||||
|
||||
{\it Note:} this function is available in MS Windows only.
|
||||
|
||||
\membersection{wxDC::GetBackground}\label{wxdcgetbackground}
|
||||
|
||||
\func{wxBrush *}{GetBackground}{\void}
|
||||
|
||||
Gets the brush used for painting the background (see \helpref{wxDC::SetBackground}{wxdcsetbackground}).
|
||||
|
||||
\membersection{wxDC::GetBrush}\label{wxdcgetbrush}
|
||||
|
||||
\func{wxBrush *}{GetBrush}{\void}
|
||||
|
||||
Gets the current brush (see \helpref{wxDC::SetBrush}{wxdcsetbrush}).
|
||||
|
||||
\membersection{wxDC::GetCharHeight}\label{wxdcgetcharheight}
|
||||
|
||||
\func{long}{GetCharHeight}{\void}
|
||||
|
||||
Gets the character height of the currently set font.
|
||||
|
||||
\membersection{wxDC::GetCharWidth}\label{wxdcgetcharwidth}
|
||||
|
||||
\func{long}{GetCharWidth}{\void}
|
||||
|
||||
Gets the average character width of the currently set font.
|
||||
|
||||
\membersection{wxCanvas::GetClippingBox}\label{wxdcgetclippingbox}
|
||||
|
||||
\func{void}{GetClippingBox}{\param{long}{ *x}, \param{long}{ *y}, \param{long}{ *width}, \param{long}{ *height}}
|
||||
|
||||
Gets the rectangle surrounding the current clipping region.
|
||||
|
||||
\membersection{wxDC::GetFont}\label{wxdcgetfont}
|
||||
|
||||
\func{wxFont *}{GetFont}{\void}
|
||||
|
||||
Gets the current font (see \helpref{wxDC::SetFont}{wxdcsetfont}).
|
||||
|
||||
\membersection{wxDC::GetLogicalFunction}\label{wxdcgetlogicalfunction}
|
||||
|
||||
\func{int}{GetLogicalFunction}{\void}
|
||||
|
||||
Gets the current logical function (see \helpref{wxDC::SetLogicalFunction}{wxdcsetlogicalfunction}).
|
||||
|
||||
\membersection{wxDC::GetMapMode}\label{wxdcgetmapmode}
|
||||
|
||||
\func{int}{GetMapMode}{\void}
|
||||
|
||||
Gets the {\it mapping mode} for the device context (see \helpref{wxDC::SetMapMode}{wxdcsetmapmode}).
|
||||
|
||||
\membersection{wxDC::GetOptimization}\label{wxdcgetoptimization}
|
||||
|
||||
\func{bool}{GetOptimization}{\void}
|
||||
|
||||
Returns TRUE if device context optimization is on.
|
||||
See \helpref{wxDC::SetOptimization}{wxsetoptimization} for details.
|
||||
|
||||
\membersection{wxDC::GetPen}\label{wxdcgetpen}
|
||||
|
||||
\func{wxPen *}{GetPen}{\void}
|
||||
|
||||
Gets the current pen (see \helpref{wxDC::SetPen}{wxdcsetpen}).
|
||||
|
||||
\membersection{wxDC::GetPixel}\label{wxdcgetpixel}
|
||||
|
||||
\func{bool}{GetPixel}{\param{long}{ x}, \param{long}{ y}, \param{wxColour *}{colour}}
|
||||
|
||||
Sets {\it colour} to the colour at the specified location. Windows only; an X implementation
|
||||
is being worked on. Not available for wxPostScriptDC or wxMetaFileDC.
|
||||
|
||||
\membersection{wxDC::GetSize}\label{wxdcgetsize}
|
||||
|
||||
\func{void}{GetSize}{\param{long *}{width}, \param{long *}{height}}
|
||||
|
||||
For a PostScript device context, this gets the maximum size of graphics
|
||||
drawn so far on the device context.
|
||||
|
||||
For a Windows printer device context, this gets the horizontal and vertical
|
||||
resolution. It can be used to scale graphics to fit the page when using
|
||||
a Windows printer device context. For example, if {\it maxX} and {\it maxY}\rtfsp
|
||||
represent the maximum horizontal and vertical `pixel' values used in your
|
||||
application, the following code will scale the graphic to fit on the
|
||||
printer page:
|
||||
|
||||
\begin{verbatim}
|
||||
long w, h;
|
||||
dc.GetSize(&w, &h);
|
||||
double scaleX=(double)(maxX/w);
|
||||
double scaleY=(double)(maxY/h);
|
||||
dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY));
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxDC::GetTextBackground}\label{wxdcgettextbackground}
|
||||
|
||||
\func{wxColour\&}{GetTextBackground}{\void}
|
||||
|
||||
Gets the current text background colour (see \helpref{wxDC::SetTextBackground}{wxdcsettextbackground}).
|
||||
|
||||
\membersection{wxDC::GetTextExtent}\label{wxdcgettextextent}
|
||||
|
||||
\func{void}{GetTextExtent}{\param{const wxString\& }{string}, \param{long *}{w}, \param{long *}{h},\\
|
||||
\param{long *}{descent = NULL}, \param{long *}{externalLeading = NULL}, \param{wxFont *}{font = NULL}}
|
||||
|
||||
Gets the dimensions of the string using the currently selected font.
|
||||
\rtfsp{\it string} is the text string to measure, {\it w} and {\it h} are
|
||||
the total width and height respectively, {\it descent} is the
|
||||
dimension from the baseline of the font to the bottom of the
|
||||
descender, and {\it externalLeading} is any extra vertical space added
|
||||
to the font by the font designer (usually is zero).
|
||||
|
||||
The optional parameter {\it font} specifies an alternative
|
||||
to the currently selected font: but note that this does not
|
||||
yet work under Windows, so you need to set a font for
|
||||
the device context first.
|
||||
|
||||
See also \helpref{wxFont}{wxfont}, \helpref{wxDC::SetFont}{wxdcsetfont}.
|
||||
|
||||
\membersection{wxDC::GetTextForeground}\label{wxdcgettextforeground}
|
||||
|
||||
\func{wxColour\&}{GetTextForeground}{\void}
|
||||
|
||||
Gets the current text foreground colour (see \helpref{wxDC::SetTextForeground}{wxdcsettextforeground}).
|
||||
|
||||
\membersection{wxDC::LogicalToDeviceX}\label{wxdclogicaltodevicex}
|
||||
|
||||
\func{long}{LogicalToDeviceX}{\param{long}{ x}}
|
||||
|
||||
Converts logical X coordinate to device coordinate, using the current
|
||||
mapping mode.
|
||||
|
||||
\membersection{wxDC::LogicalToDeviceXRel}\label{wxdclogicaltodevicexrel}
|
||||
|
||||
\func{long}{LogicalToDeviceXRel}{\param{long}{ x}}
|
||||
|
||||
Converts logical X coordinate to relative device coordinate, using the current
|
||||
mapping mode. Use this for converting a width, for example.
|
||||
|
||||
\membersection{wxDC::LogicalToDeviceY}\label{wxdclogicaltodevicey}
|
||||
|
||||
\func{long}{LogicalToDeviceY}{\param{long}{ y}}
|
||||
|
||||
Converts logical Y coordinate to device coordinate, using the current
|
||||
mapping mode.
|
||||
|
||||
\membersection{wxDC::LogicalToDeviceYRel}\label{wxdclogicaltodeviceyrel}
|
||||
|
||||
\func{long}{LogicalToDeviceYRel}{\param{long}{ y}}
|
||||
|
||||
Converts logical Y coordinate to relative device coordinate, using the current
|
||||
mapping mode. Use this for converting a height, for example.
|
||||
|
||||
\membersection{wxDC::MaxX}\label{wxdcmaxx}
|
||||
|
||||
\func{long}{MaxX}{\void}
|
||||
|
||||
Gets the maximum horizontal extent used in drawing commands so far.
|
||||
|
||||
\membersection{wxDC::MaxY}\label{wxdcmaxy}
|
||||
|
||||
\func{long}{MaxY}{\void}
|
||||
|
||||
Gets the maximum vertical extent used in drawing commands so far.
|
||||
|
||||
\membersection{wxDC::MinX}\label{wxdcminx}
|
||||
|
||||
\func{long}{MinX}{\void}
|
||||
|
||||
Gets the minimum horizontal extent used in drawing commands so far.
|
||||
|
||||
\membersection{wxDC::MinY}\label{wxdcminy}
|
||||
|
||||
\func{long}{MinY}{\void}
|
||||
|
||||
Gets the minimum vertical extent used in drawing commands so far.
|
||||
|
||||
\membersection{wxDC::Ok}\label{wxdcok}
|
||||
|
||||
\func{bool}{Ok}{\void}
|
||||
|
||||
Returns TRUE if the DC is ok to use.
|
||||
|
||||
\membersection{wxDC::SetDeviceOrigin}\label{wxdcsetdeviceorigin}
|
||||
|
||||
\func{void}{SetDeviceOrigin}{\param{long}{ x}, \param{long}{ y}}
|
||||
|
||||
Sets the device origin (i.e., the origin in pixels after scaling has been
|
||||
applied).
|
||||
|
||||
This function may be useful in Windows printing
|
||||
operations for placing a graphic on a page.
|
||||
|
||||
\membersection{wxDC::SetBackground}\label{wxdcsetbackground}
|
||||
|
||||
\func{void}{SetBackground}{\param{const wxBrush\& }{brush}}
|
||||
|
||||
Sets the current background brush for the DC.
|
||||
|
||||
\membersection{wxDC::SetBackgroundMode}\label{wxdcsetbackgroundmode}
|
||||
|
||||
\func{void}{SetBackgroundMode}{\param{int}{ mode}}
|
||||
|
||||
{\it mode} may be one of wxSOLID and wxTRANSPARENT. This setting determines
|
||||
whether text will be drawn with a background colour or not.
|
||||
|
||||
\membersection{wxDC::SetClippingRegion}\label{wxdcsetclippingregion}
|
||||
|
||||
\func{void}{SetClippingRegion}{\param{long}{ x}, \param{long}{ y}, \param{long}{ width}, \param{long}{ height}}
|
||||
|
||||
Sets the clipping region for the DC. The clipping region is a rectangular area
|
||||
to which drawing is restricted. Possible uses for the clipping region are for clipping text
|
||||
or for speeding up canvas redraws when only a known area of the screen is damaged.
|
||||
|
||||
See also \helpref{wxDC::DestroyClippingRegion}{wxdcdestroyclippingregion}.
|
||||
|
||||
\membersection{wxDC::SetPalette}\label{wxdcsetpalette}
|
||||
|
||||
\func{void}{SetPalette}{\param{const wxPalette\& }{palette}}
|
||||
|
||||
If this is a canvas DC or memory DC, assigns the given palette to the window
|
||||
or bitmap associated with the DC. If the argument is wxNullPalette, the current
|
||||
palette is selected out of the device context, and the original palette
|
||||
restored.
|
||||
|
||||
See \helpref{wxPalette}{wxpalette} for further details.
|
||||
|
||||
\membersection{wxDC::SetBrush}\label{wxdcsetbrush}
|
||||
|
||||
\func{void}{SetBrush}{\param{const wxBrush\& }{brush}}
|
||||
|
||||
Sets the current brush for the DC.
|
||||
|
||||
If the argument is wxNullBrush, the current brush is selected out of the device
|
||||
context, and the original brush restored, allowing the current brush to
|
||||
be destroyed safely.
|
||||
|
||||
See also \helpref{wxBrush}{wxbrush}.
|
||||
|
||||
\membersection{wxDC::SetFont}\label{wxdcsetfont}
|
||||
|
||||
\func{void}{SetFont}{\param{const wxFont\& }{font}}
|
||||
|
||||
Sets the current font for the DC.
|
||||
|
||||
If the argument is wxNullFont, the current font is selected out of the device
|
||||
context, and the original font restored, allowing the current font to
|
||||
be destroyed safely.
|
||||
|
||||
See also \helpref{wxFont}{wxfont}.
|
||||
|
||||
\membersection{wxDC::SetLogicalFunction}\label{wxdcsetlogicalfunction}
|
||||
|
||||
\func{void}{SetLogicalFunction}{\param{int}{ function}}
|
||||
|
||||
Sets the current logical function for the canvas. This determines how
|
||||
a source pixel (from a pen or brush colour, or source device context if
|
||||
using \helpref{wxDC::Blit}{wxdcblit}) combines with a destination pixel in the
|
||||
current device context.
|
||||
|
||||
The possible values
|
||||
and their meaning in terms of source and destination pixel values are
|
||||
as follows:
|
||||
|
||||
\begin{verbatim}
|
||||
wxAND src AND dst
|
||||
wxAND_INVERT (NOT src) AND dst
|
||||
wxAND_REVERSE src AND (NOT dst)
|
||||
wxCLEAR 0
|
||||
wxCOPY src
|
||||
wxEQUIV (NOT src) XOR dst
|
||||
wxINVERT NOT dst
|
||||
wxNAND (NOT src) OR (NOT dst)
|
||||
wxNOR (NOT src) AND (NOT dst)
|
||||
wxNO_OP dst
|
||||
wxOR src OR dst
|
||||
wxOR_INVERT (NOT src) OR dst
|
||||
wxOR_REVERSE src OR (NOT dst)
|
||||
wxSET 1
|
||||
wxSRC_INVERT NOT src
|
||||
wxXOR src XOR dst
|
||||
\end{verbatim}
|
||||
|
||||
The default is wxCOPY, which simply draws with the current colour.
|
||||
The others combine the current colour and the background using a
|
||||
logical operation. wxXOR is commonly used for drawing rubber bands or
|
||||
moving outlines, since drawing twice reverts to the original colour.
|
||||
|
||||
\membersection{wxDC::SetMapMode}\label{wxdcsetmapmode}
|
||||
|
||||
\func{void}{SetMapMode}{\param{int}{ int}}
|
||||
|
||||
The {\it mapping mode} of the device context defines the unit of
|
||||
measurement used to convert logical units to device units. Note that
|
||||
in X, text drawing isn't handled consistently with the mapping mode; a
|
||||
font is always specified in point size. However, setting the {\it
|
||||
user scale} (see \helpref{wxDC::SetUserScale}{wxdcsetuserscale}) scales the text appropriately. In
|
||||
Windows, scaleable TrueType fonts are always used; in X, results depend
|
||||
on availability of fonts, but usually a reasonable match is found.
|
||||
|
||||
Note that the coordinate origin should ideally be selectable, but for
|
||||
now is always at the top left of the screen/printer.
|
||||
|
||||
Drawing to a Windows printer device context under UNIX
|
||||
uses the current mapping mode, but mapping mode is currently ignored for
|
||||
PostScript output.
|
||||
|
||||
The mapping mode can be one of the following:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{MM\_TWIPS}{Each logical unit is 1/20 of a point, or 1/1440 of
|
||||
an inch.}
|
||||
\twocolitem{MM\_POINTS}{Each logical unit is a point, or 1/72 of an inch.}
|
||||
\twocolitem{MM\_METRIC}{Each logical unit is 1 mm.}
|
||||
\twocolitem{MM\_LOMETRIC}{Each logical unit is 1/10 of a mm.}
|
||||
\twocolitem{MM\_TEXT}{Each logical unit is 1 pixel.}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxDC::SetOptimization}\label{wxsetoptimization}
|
||||
|
||||
\func{void}{SetOptimization}{\param{bool }{optimize}}
|
||||
|
||||
If {\it optimize} is TRUE (the default), this function sets optimization mode on.
|
||||
This currently means that under X, the device context will not try to set a pen or brush
|
||||
property if it is known to be set already. This approach can fall down
|
||||
if non-wxWindows code is using the same device context or window, for example
|
||||
when the window is a panel on which the windowing system draws panel items.
|
||||
The wxWindows device context 'memory' will now be out of step with reality.
|
||||
|
||||
Setting optimization off, drawing, then setting it back on again, is a trick
|
||||
that must occasionally be employed.
|
||||
|
||||
\membersection{wxDC::SetPen}\label{wxdcsetpen}
|
||||
|
||||
\func{void}{SetPen}{\param{const wxPen\& }{pen}}
|
||||
|
||||
Sets the current pen for the DC.
|
||||
|
||||
If the argument is wxNullPen, the current pen is selected out of the device
|
||||
context, and the original pen restored.
|
||||
|
||||
\membersection{wxDC::SetTextBackground}\label{wxdcsettextbackground}
|
||||
|
||||
\func{void}{SetTextBackground}{\param{const wxColour\& }{colour}}
|
||||
|
||||
Sets the current text background colour for the DC.
|
||||
|
||||
\membersection{wxDC::SetTextForeground}\label{wxdcsettextforeground}
|
||||
|
||||
\func{void}{SetTextForeground}{\param{const wxColour\& }{colour}}
|
||||
|
||||
Sets the current text foreground colour for the DC.
|
||||
|
||||
\membersection{wxDC::SetUserScale}\label{wxdcsetuserscale}
|
||||
|
||||
\func{void}{SetUserScale}{\param{double}{ xScale}, \param{double}{ yScale}}
|
||||
|
||||
Sets the user scaling factor, useful for applications which require
|
||||
`zooming'.
|
||||
|
||||
\membersection{wxDC::StartDoc}\label{wxdcstartdoc}
|
||||
|
||||
\func{bool}{StartDoc}{\param{const wxString\& }{message}}
|
||||
|
||||
Starts a document (only relevant when outputting to a printer).
|
||||
Message is a message to show whilst printing.
|
||||
|
||||
\membersection{wxDC::StartPage}\label{wxdcstartpage}
|
||||
|
||||
\func{bool}{StartPage}{\void}
|
||||
|
||||
Starts a document page (only relevant when outputting to a printer).
|
||||
|
67
docs/latex/wx/ddeclint.tex
Normal file
@ -0,0 +1,67 @@
|
||||
\section{\class{wxDDEClient}}\label{wxddeclient}
|
||||
|
||||
\overview{Interprocess communications overview}{ipcoverview}
|
||||
|
||||
A wxDDEClient object represents the client part of a client-server DDE
|
||||
(Dynamic Data Exchange) conversation (available in {\it both}\/
|
||||
Windows and UNIX).
|
||||
|
||||
To create a client which can communicate with a suitable server,
|
||||
you need to derive a class from wxDDEConnection and another from wxDDEClient.
|
||||
The custom wxDDEConnection class will intercept communications in
|
||||
a `conversation' with a server, and the custom wxDDEServer is required
|
||||
so that a user-overriden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return
|
||||
a wxDDEConnection of the required class, when a connection is made.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxDDEObject
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDDEServer}{wxddeserver}, \helpref{wxDDEConnection}{wxddeconnection},
|
||||
the chapter on interprocess communication in the user manual, and
|
||||
the programs in {\tt samples/ipc}.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDDEClient::wxDDEClient}
|
||||
|
||||
\func{}{wxDDEClient}{\void}
|
||||
|
||||
Constructs a client object.
|
||||
|
||||
\membersection{wxDDEClient::MakeConnection}\label{wxddeclientmakeconnection}
|
||||
|
||||
\func{wxDDEConnection *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}}
|
||||
|
||||
Tries to make a connection with a server specified by the host
|
||||
(machine name under UNIX, ignored under Windows), service name (must
|
||||
contain an integer port number under UNIX), and topic string. If the
|
||||
server allows a connection, a wxDDEConnection object will be returned.
|
||||
The type of wxDDEConnection returned can be altered by overriding
|
||||
the \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member to return your own
|
||||
derived connection object.
|
||||
|
||||
\membersection{wxDDEClient::OnMakeConnection}\label{wxddeclientonmakeconnection}
|
||||
|
||||
\func{wxDDEConnection *}{OnMakeConnection}{\void}
|
||||
|
||||
The type of \helpref{wxDDEConnection}{wxddeconnection} returned from a \helpref{wxDDEClient::MakeConnection}{wxddeclientmakeconnection} call can
|
||||
be altered by deriving the {\bf OnMakeConnection} member to return your
|
||||
own derived connection object. By default, an ordinary wxDDEConnection
|
||||
object is returned.
|
||||
|
||||
The advantage of deriving your own connection class is that it will
|
||||
enable you to intercept messages initiated by the server, such
|
||||
as \helpref{wxDDEConnection::OnAdvise}{wxddeconnectiononadvise}. You may also want to
|
||||
store application-specific data in instances of the new class.
|
||||
|
||||
\membersection{wxDDEClient::ValidHost}
|
||||
|
||||
\func{bool}{ValidHost}{\param{const wxString\& }{host}}
|
||||
|
||||
Returns TRUE if this is a valid host name, FALSE otherwise. This always
|
||||
returns TRUE under MS Windows.
|
||||
|
||||
|
166
docs/latex/wx/ddeconn.tex
Normal file
@ -0,0 +1,166 @@
|
||||
\section{\class{wxDDEConnection}}\label{wxddeconnection}
|
||||
|
||||
A wxDDEConnection object represents the connection between a client and a
|
||||
server. It can be created by making a connection using a\rtfsp
|
||||
\helpref{wxDDEClient}{wxddeclient} object, or by the acceptance of a connection by a\rtfsp
|
||||
\helpref{wxDDEServer}{wxddeserver} object. The bulk of a DDE (Dynamic Data Exchange)
|
||||
conversation (available in both Windows and UNIX) is controlled by
|
||||
calling members in a {\bf wxDDEConnection} object or by overriding its
|
||||
members.
|
||||
|
||||
An application should normally derive a new connection class from
|
||||
wxDDEConnection, in order to override the communication event handlers
|
||||
to do something interesting.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDDEClient}{wxddeclient}, \helpref{wxDDEServer}{wxddeserver}, \helpref{Interprocess communications overview}{ipcoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDDEConnection::wxDDEConnection}
|
||||
|
||||
\func{}{wxDDEConnection}{\void}
|
||||
|
||||
\func{}{wxDDEConnection}{\param{char* }{buffer}, \param{int}{ size}}
|
||||
|
||||
Constructs a connection object. If no user-defined connection object is
|
||||
to be derived from wxDDEConnection, then the constructor should not be
|
||||
called directly, since the default connection object will be provided on
|
||||
requesting (or accepting) a connection. However, if the user defines his
|
||||
or her own derived connection object, the \helpref{wxDDEServer::OnAcceptConnection}{wxddeserveronacceptconnection}\rtfsp
|
||||
and/or \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} members should be replaced by
|
||||
functions which construct the new connection object. If the arguments of
|
||||
the wxDDEConnection constructor are void, then a default buffer is
|
||||
associated with the connection. Otherwise, the programmer must provide a
|
||||
a buffer and size of the buffer for the connection object to use in
|
||||
transactions.
|
||||
|
||||
\membersection{wxDDEConnection::Advise}
|
||||
|
||||
\func{bool}{Advise}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{int}{ format = wxCF\_TEXT}}
|
||||
|
||||
Called by the server application to advise the client of a change in
|
||||
the data associated with the given item. Causes the client
|
||||
connection's \helpref{wxDDEConnection::OnAdvise}{wxddeconnectiononadvise}
|
||||
member to be called. Returns TRUE if successful.
|
||||
|
||||
\membersection{wxDDEConnection::Execute}
|
||||
|
||||
\func{bool}{Execute}{\param{char* }{data}, \param{int}{ size = -1},
|
||||
\param{int}{ format = wxCF\_TEXT}}
|
||||
|
||||
Called by the client application to execute a command on the server. Can
|
||||
also be used to transfer arbitrary data to the server (similar
|
||||
to \helpref{wxDDEConnection::Poke}{wxddeconnectionpoke} in that respect). Causes the
|
||||
server connection's \helpref{wxDDEConnection::OnExecute}{wxddeconnectiononexecute} member to be
|
||||
called. Returns TRUE if successful.
|
||||
|
||||
\membersection{wxDDEConnection::Disconnect}
|
||||
|
||||
\func{bool}{Disconnect}{\void}
|
||||
|
||||
Called by the client or server application to disconnect from the other
|
||||
program; it causes the \helpref{wxDDEConnection::OnDisconnect}{wxddeconnectionondisconnect} message
|
||||
to be sent to the corresponding connection object in the other
|
||||
program. The default behaviour of {\bf OnDisconnect} is to delete the
|
||||
connection, but the calling application must explicitly delete its
|
||||
side of the connection having called {\bf Disconnect}. Returns TRUE if
|
||||
successful.
|
||||
|
||||
\membersection{wxDDEConnection::OnAdvise}\label{wxddeconnectiononadvise}
|
||||
|
||||
\func{bool}{OnAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}}
|
||||
|
||||
Message sent to the client application when the server notifies it of a
|
||||
change in the data associated with the given item.
|
||||
|
||||
\membersection{wxDDEConnection::OnDisconnect}\label{wxddeconnectionondisconnect}
|
||||
|
||||
\func{bool}{OnDisconnect}{\void}
|
||||
|
||||
Message sent to the client or server application when the other
|
||||
application notifies it to delete the connection. Default behaviour is
|
||||
to delete the connection object.
|
||||
|
||||
\membersection{wxDDEConnection::OnExecute}\label{wxddeconnectiononexecute}
|
||||
|
||||
\func{bool}{OnExecute}{\param{const wxString\& }{topic}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}}
|
||||
|
||||
Message sent to the server application when the client notifies it to
|
||||
execute the given data. Note that there is no item associated with
|
||||
this message.
|
||||
|
||||
\membersection{wxDDEConnection::OnPoke}\label{wxddeconnectiononpoke}
|
||||
|
||||
\func{bool}{OnPoke}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size}, \param{int}{ format}}
|
||||
|
||||
Message sent to the server application when the client notifies it to
|
||||
accept the given data.
|
||||
|
||||
\membersection{wxDDEConnection::OnRequest}\label{wxddeconnectiononrequest}
|
||||
|
||||
\func{char*}{OnRequest}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}, \param{int *}{size}, \param{int}{ format}}
|
||||
|
||||
Message sent to the server application when the client
|
||||
calls \helpref{wxDDEConnection::Request}{wxddeconnectionrequest}. The server
|
||||
should respond by returning a character string from {\bf OnRequest},
|
||||
or NULL to indicate no data.
|
||||
|
||||
\membersection{wxDDEConnection::OnStartAdvise}\label{wxddeconnectiononstartadvise}
|
||||
|
||||
\func{bool}{OnStartAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
|
||||
|
||||
Message sent to the server application by the client, when the client
|
||||
wishes to start an `advise loop' for the given topic and item. The
|
||||
server can refuse to participate by returning FALSE.
|
||||
|
||||
\membersection{wxDDEConnection::OnStopAdvise}\label{wxddeconnectiononstopadvise}
|
||||
|
||||
\func{bool}{OnStopAdvise}{\param{const wxString\& }{topic}, \param{const wxString\& }{item}}
|
||||
|
||||
Message sent to the server application by the client, when the client
|
||||
wishes to stop an `advise loop' for the given topic and item. The
|
||||
server can refuse to stop the advise loop by returning FALSE, although
|
||||
this doesn't have much meaning in practice.
|
||||
|
||||
\membersection{wxDDEConnection::Poke}\label{wxddeconnectionpoke}
|
||||
|
||||
\func{bool}{Poke}{\param{const wxString\& }{item}, \param{char* }{data}, \param{int}{ size = -1}, \param{int}{ format = wxCF\_TEXT}}
|
||||
|
||||
Called by the client application to poke data into the server. Can be
|
||||
used to transfer arbitrary data to the server. Causes the server
|
||||
connection's \helpref{wxDDEConnection::OnPoke}{wxddeconnectiononpoke} member
|
||||
to be called. Returns TRUE if successful.
|
||||
|
||||
\membersection{wxDDEConnection::Request}\label{wxddeconnectionrequest}
|
||||
|
||||
\func{char*}{Request}{\param{const wxString\& }{item}, \param{int *}{size}, \param{int}{ format = wxCF\_TEXT}}
|
||||
|
||||
Called by the client application to request data from the server. Causes
|
||||
the server connection's \helpref{wxDDEConnection::OnRequest}{wxddeconnectiononrequest} member to be called. Returns a
|
||||
character string (actually a pointer to the connection's buffer) if
|
||||
successful, NULL otherwise.
|
||||
|
||||
\membersection{wxDDEConnection::StartAdvise}\label{wxddeconnectionstartadvise}
|
||||
|
||||
\func{bool}{StartAdvise}{\param{const wxString\& }{item}}
|
||||
|
||||
Called by the client application to ask if an advise loop can be started
|
||||
with the server. Causes the server connection's \helpref{wxDDEConnection::OnStartAdvise}{wxddeconnectiononstartadvise}\rtfsp
|
||||
member to be called. Returns TRUE if the server okays it, FALSE
|
||||
otherwise.
|
||||
|
||||
\membersection{wxDDEConnection::StopAdvise}\label{wxddeconnectionstopadvise}
|
||||
|
||||
\func{bool}{StopAdvise}{\param{const wxString\& }{item}}
|
||||
|
||||
Called by the client application to ask if an advise loop can be
|
||||
stopped. Causes the server connection's \helpref{wxDDEConnection::OnStopAdvise}{wxddeconnectiononstopadvise} member
|
||||
to be called. Returns TRUE if the server okays it, FALSE otherwise.
|
||||
|
||||
|
45
docs/latex/wx/ddeservr.tex
Normal file
@ -0,0 +1,45 @@
|
||||
\section{\class{wxDDEServer}}\label{wxddeserver}
|
||||
|
||||
A wxDDEServer object represents the server part of a client-server DDE
|
||||
(Dynamic Data Exchange) conversation (available under both Windows
|
||||
and UNIX).
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxDDEObject
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{IPC overview}{ipcoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDDEServer::wxDDEServer}
|
||||
|
||||
\func{}{wxDDEServer}{\void}
|
||||
|
||||
Constructs a server object.
|
||||
|
||||
\membersection{wxDDEServer::Create}
|
||||
|
||||
\func{bool}{Create}{\param{const wxString\& }{service}}
|
||||
|
||||
Registers the server using the given service name. Under UNIX, the
|
||||
string must contain an integer id which is used as an Internet port
|
||||
number. FALSE is returned if the call failed (for example, the port
|
||||
number is already in use).
|
||||
|
||||
\membersection{wxDDEServer::OnAcceptConnection}\label{wxddeserveronacceptconnection}
|
||||
|
||||
\func{wxDDEConnection *}{OnAcceptConnection}{\param{const wxString\& }{topic}}
|
||||
|
||||
When a client calls {\bf MakeConnection}, the server receives the
|
||||
message and this member is called. The application should derive a
|
||||
member to intercept this message and return a connection object of
|
||||
either the standard wxDDEConnection type, or of a user-derived type. If the
|
||||
topic is ``STDIO'', the application may wish to refuse the connection.
|
||||
Under UNIX, when a server is created the OnAcceptConnection message is
|
||||
always sent for standard input and output, but in the context of DDE
|
||||
messages it doesn't make a lot of sense.
|
||||
|
||||
|
251
docs/latex/wx/debugcxt.tex
Normal file
@ -0,0 +1,251 @@
|
||||
\section{\class{wxDebugContext}}\label{wxdebugcontext}
|
||||
|
||||
A class for performing various debugging and memory tracing
|
||||
operations. Full functionality (such as printing out objects
|
||||
currently allocated) is only present in a debugging build of wxWindows,
|
||||
i.e. if the DEBUG symbol is defined and non-zero. wxDebugContext
|
||||
and related functions and macros can be compiled out by setting
|
||||
USE\_DEBUG\_CONTEXT to 0 is wx\_setup.h
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
No parent class.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\overview{Overview}{wxdebugcontextoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDebugContext::Check}\label{wxdebugcontextcheck}
|
||||
|
||||
\func{int}{Check}{\void}
|
||||
|
||||
Checks the memory blocks for errors, starting from the currently set
|
||||
checkpoint.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns the number of errors,
|
||||
so a value of zero represents success. Returns -1 if an error
|
||||
was detected that prevents further checking.
|
||||
|
||||
\membersection{wxDebugContext::Dump}\label{wxdebugcontextdump}
|
||||
|
||||
\func{bool}{Dump}{\void}
|
||||
|
||||
Performs a memory dump from the currently set checkpoint, writing to the
|
||||
current debug stream. Calls the {\bf Dump} member function for each wxObject
|
||||
derived instance.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the function succeeded, FALSE otherwise.
|
||||
|
||||
\membersection{wxDebugContext::GetCheckPrevious}\label{wxdebugcontextgetcheckprevious}
|
||||
|
||||
\func{bool}{GetCheckPrevious}{\void}
|
||||
|
||||
Returns TRUE if the memory allocator checks all previous memory blocks for errors.
|
||||
By default, this is FALSE since it slows down execution considerably.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::SetCheckPrevious}{wxdebugcontextsetcheckprevious}
|
||||
|
||||
\membersection{wxDebugContext::GetDebugMode}\label{wxdebugcontextgetdebugmode}
|
||||
|
||||
\func{bool}{GetDebugMode}{\void}
|
||||
|
||||
Returns TRUE if debug mode is on. If debug mode is on, the wxObject new and delete
|
||||
operators store or use information about memory allocation. Otherwise,
|
||||
a straight malloc and free will be performed by these operators.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::SetDebugMode}{wxdebugcontextsetdebugmode}
|
||||
|
||||
\membersection{wxDebugContext::GetLevel}\label{wxdebugcontextgetlevel}
|
||||
|
||||
\func{int}{GetLevel}{\void}
|
||||
|
||||
Gets the debug level (default 1). The debug level is used by the wxTraceLevel function and
|
||||
the WXTRACELEVEL macro to specify how detailed the trace information is; setting
|
||||
a different level will only have an effect if trace statements in the application
|
||||
specify a value other than one.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::SetLevel}{wxdebugcontextsetlevel}
|
||||
|
||||
\membersection{wxDebugContext::GetStream}\label{wxdebugcontextgetstream}
|
||||
|
||||
\func{ostream\&}{GetStream}{\void}
|
||||
|
||||
Returns the output stream associated with the debug context.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::SetStream}{wxdebugcontextsetstream}
|
||||
|
||||
\membersection{wxDebugContext::GetStreamBuf}\label{wxdebugcontextgetstreambuf}
|
||||
|
||||
\func{streambuf*}{GetStreamBuf}{\void}
|
||||
|
||||
Returns a pointer to the output stream buffer associated with the debug context.
|
||||
There may not necessarily be a stream buffer if the stream has been set
|
||||
by the user.
|
||||
|
||||
\membersection{wxDebugContext::HasStream}\label{wxdebugcontexthasstream}
|
||||
|
||||
\func{bool}{HasStream}{\void}
|
||||
|
||||
Returns TRUE if there is a stream currently associated
|
||||
with the debug context.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::SetStream}{wxdebugcontextsetstream}, \helpref{wxDebugContext::GetStream}{wxdebugcontextgetstream}
|
||||
|
||||
\membersection{wxDebugContext::PrintClasses}\label{wxdebugcontextprintclasses}
|
||||
|
||||
\func{bool}{PrintClasses}{\void}
|
||||
|
||||
Prints a list of the classes declared in this application, giving derivation
|
||||
and whether instances of this class can be dynamically created.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::PrintStatistics}{wxdebugcontextprintstatistics}
|
||||
|
||||
\membersection{wxDebugContext::PrintStatistics}\label{wxdebugcontextprintstatistics}
|
||||
|
||||
\func{bool}{PrintStatistics}{\param{bool}{ detailed = TRUE}}
|
||||
|
||||
Performs a statistics analysis from the currently set checkpoint, writing
|
||||
to the current debug stream. The number of object and non-object
|
||||
allocations is printed, together with the total size.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{detailed}{If TRUE, the function will also print how many
|
||||
objects of each class have been allocated, and the space taken by
|
||||
these class instances.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::PrintStatistics}{wxdebugcontextprintstatistics}
|
||||
|
||||
\membersection{wxDebugContext::SetCheckpoint}\label{wxdebugcontextsetcheckpoint}
|
||||
|
||||
\func{void}{SetCheckpoint}{\param{bool}{ all = FALSE}}
|
||||
|
||||
Sets the current checkpoint: Dump and PrintStatistics operations will
|
||||
be performed from this point on. This allows you to ignore allocations
|
||||
that have been performed up to this point.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{all}{If TRUE, the checkpoint is reset to include all
|
||||
memory allocations since the program started.}
|
||||
|
||||
\membersection{wxDebugContext::SetCheckPrevious}\label{wxdebugcontextsetcheckprevious}
|
||||
|
||||
\func{void}{SetCheckPrevious}{\param{bool}{ check}}
|
||||
|
||||
Tells the memory allocator to check all previous memory blocks for errors.
|
||||
By default, this is FALSE since it slows down execution considerably.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::GetCheckPrevious}{wxdebugcontextgetcheckprevious}
|
||||
|
||||
\membersection{wxDebugContext::SetDebugMode}\label{wxdebugcontextsetdebugmode}
|
||||
|
||||
\func{void}{SetDebugMode}{\param{bool}{ debug}}
|
||||
|
||||
Sets the debug mode on or off. If debug mode is on, the wxObject new and delete
|
||||
operators store or use information about memory allocation. Otherwise,
|
||||
a straight malloc and free will be performed by these operators.
|
||||
|
||||
By default, debug mode is on if DEBUG is non-zero. If the application
|
||||
uses this function, it should make sure that all object memory allocated
|
||||
is deallocated with the same value of debug mode. Otherwise, the
|
||||
delete operator might try to look for memory information that does not
|
||||
exist.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::GetDebugMode}{wxdebugcontextgetdebugmode}
|
||||
|
||||
\membersection{wxDebugContext::SetFile}\label{wxdebugcontextsetfile}
|
||||
|
||||
\func{bool}{SetFile}{\param{const wxString\& }{filename}}
|
||||
|
||||
Sets the current debug file and creates a stream. This will delete any existing
|
||||
stream and stream buffer. By default, the debug context stream
|
||||
outputs to the debugger (Windows) or standard error (other platforms).
|
||||
|
||||
\membersection{wxDebugContext::SetLevel}\label{wxdebugcontextsetlevel}
|
||||
|
||||
\func{void}{SetLevel}{\param{int}{ level}}
|
||||
|
||||
Sets the debug level (default 1). The debug level is used by the wxTraceLevel function and
|
||||
the WXTRACELEVEL macro to specify how detailed the trace information is; setting
|
||||
a different level will only have an effect if trace statements in the application
|
||||
specify a value other than one.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::GetLevel}{wxdebugcontextgetlevel}
|
||||
|
||||
\membersection{wxDebugContext::SetStandardError}\label{wxdebugcontextsetstandarderror}
|
||||
|
||||
\func{bool}{SetStandardError}{\void}
|
||||
|
||||
Sets the debugging stream to be the debugger (Windows) or standard error (other platforms).
|
||||
This is the default setting. The existing stream will be flushed and deleted.
|
||||
|
||||
\membersection{wxDebugContext::SetStream}\label{wxdebugcontextsetstream}
|
||||
|
||||
\func{void}{SetStream}{\param{ostream* }{stream}, \param{streambuf* }{streamBuf = NULL}}
|
||||
|
||||
Sets the stream and optionally, stream buffer associated with the debug context.
|
||||
This operation flushes and deletes the existing stream (and stream buffer if any).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{stream}{Stream to associate with the debug context. Do not set this to NULL.}
|
||||
|
||||
\docparam{streamBuf}{Stream buffer to associate with the debug context.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDebugContext::GetStream}{wxdebugcontextgetstream}, \helpref{wxDebugContext::HasStream}{wxdebugcontexthasstream}
|
||||
|
||||
\section{\class{wxDebugStreamBuf}}\label{wxdebugstreambuf}
|
||||
|
||||
This class allows you to treat debugging output in a similar
|
||||
(stream-based) fashion on different platforms. Under
|
||||
Windows, an ostream constructed with this buffer outputs
|
||||
to the debugger, or other program that intercepts debugging
|
||||
output. On other platforms, the output goes to standard error (cerr).
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
streambuf
|
||||
|
||||
\wxheading{Example}
|
||||
|
||||
\begin{verbatim}
|
||||
wxDebugStreamBuf streamBuf;
|
||||
ostream stream(&streamBuf);
|
||||
|
||||
stream << "Hello world!" << endl;
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\overview{Overview}{wxdebugcontextoverview}
|
||||
|
||||
|
310
docs/latex/wx/dialog.tex
Normal file
@ -0,0 +1,310 @@
|
||||
\section{\class{wxDialog}}\label{wxdialog}
|
||||
|
||||
A dialog box is a window with a title bar and sometimes a system menu, which can be moved around
|
||||
the screen. It can contain controls and other windows.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxPanel}{wxpanel}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
There are two kinds of dialog - {\it modal} and {\it modeless}. A modal dialog
|
||||
blocks program flow and user input on other windows until it is dismissed, whereas a modeless dialog behaves more
|
||||
like a frame in that program flow continues, and input on other windows is still possible.
|
||||
You specify the type of dialog with the {\bf wxDIALOG\_MODAL} and {\bf wxDIALOG\_MODELESS} window
|
||||
styles.
|
||||
|
||||
A dialog may be loaded from a wxWindows resource file (extension {\tt wxr}).
|
||||
|
||||
An application can define an \helpref{OnCloseWindow}{wxwindowonclosewindow} handler for the
|
||||
dialog to respond to system close events.
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the dialog box (Motif only).}
|
||||
\twocolitem{\windowstyle{wxDEFAULT\_DIALOG\_STYLE}}{Equivalent to a combination of wxCAPTION, wxSYSTEM\_MENU and wxTHICK\_FRAME}
|
||||
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Display a resizeable frame around the window (Motif only).}
|
||||
\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Display a system menu (Motif only).}
|
||||
\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Display a thick frame around the window (Motif only).}
|
||||
\twocolitem{\windowstyle{wxNO\_3D}}{Under Windows, specifies that the child controls
|
||||
should not have 3D borders unless specified in the control.}
|
||||
\end{twocollist}
|
||||
|
||||
Under Motif, MWM (the Motif Window Manager) should be running for any of these styles to have an effect.
|
||||
|
||||
See also \helpref{Generic window styles}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDialog overview}{wxdialogoverview}, \helpref{wxFrame}{wxframe}, \helpref{Resources}{resources},\rtfsp
|
||||
\helpref{Validator overview}{validatoroverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDialog::wxDialog}\label{wxdialogconstr}
|
||||
|
||||
\func{}{wxDialog}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxDialog}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
|
||||
\param{const wxString\& }{title},\rtfsp
|
||||
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
||||
\param{const long}{ style = wxDEFAULT\_DIALOG\_STYLE},\rtfsp
|
||||
\param{const wxString\& }{name = ``dialogBox"}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{Can be NULL, a frame or another dialog box.}
|
||||
|
||||
\docparam{id}{An identifier for the dialog. A value of -1 is taken to mean a default.}
|
||||
|
||||
\docparam{title}{The title of the dialog.}
|
||||
|
||||
\docparam{pos}{The dialog position. A value of (-1, -1) indicates a default position, chosen by
|
||||
either the windowing system or wxWindows, depending on platform.}
|
||||
|
||||
\docparam{size}{The dialog size. A value of (-1, -1) indicates a default size, chosen by
|
||||
either the windowing system or wxWindows, depending on platform.}
|
||||
|
||||
\docparam{style}{The window style. See \helpref{wxDialog}{wxdialog}.}
|
||||
|
||||
\docparam{name}{Used to associate a name with the window,
|
||||
allowing the application user to set Motif resource values for
|
||||
individual dialog boxes.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDialog::Create}{wxdialogcreate}
|
||||
|
||||
\membersection{wxDialog::\destruct{wxDialog}}
|
||||
|
||||
\func{}{\destruct{wxDialog}}{\void}
|
||||
|
||||
Destructor. Deletes any child windows before deleting the physical window.
|
||||
|
||||
\membersection{wxDialog::Centre}\label{wxdialogcentre}
|
||||
|
||||
\func{void}{Centre}{\param{const int}{ direction = wxBOTH}}
|
||||
|
||||
Centres the dialog box on the display.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{direction}{May be {\tt wxHORIZONTAL}, {\tt wxVERTICAL} or {\tt wxBOTH}.}
|
||||
|
||||
\membersection{wxDialog::Create}\label{wxdialogcreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
|
||||
\param{const wxString\& }{title},\rtfsp
|
||||
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
|
||||
\param{const long}{ style = wxDEFAULT\_DIALOG\_STYLE},\rtfsp
|
||||
\param{const wxString\& }{name = ``dialogBox"}}
|
||||
|
||||
Used for two-step dialog box construction. See \helpref{wxDialog::wxDialog}{wxdialogconstr}\rtfsp
|
||||
for details.
|
||||
|
||||
\membersection{wxDialog::EndModal}\label{wxdialogendmodal}
|
||||
|
||||
\func{void}{EndModal}{\param{int }{retCode}}
|
||||
|
||||
Ends a modal dialog, passing a value to be returned from the \helpref{wxDialog::ShowModal}{wxdialogshowmodal}\rtfsp
|
||||
invocation.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{retCode}{The value that should be returned by {\bf ShowModal}.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDialog::ShowModal}{wxdialogshowmodal},\rtfsp
|
||||
\helpref{wxWindow::GetReturnCode}{wxwindowgetreturncode},\rtfsp
|
||||
\helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode}
|
||||
|
||||
\membersection{wxDialog::GetTitle}\label{wxdialoggettitle}
|
||||
|
||||
\constfunc{wxString}{GetTitle}{\void}
|
||||
|
||||
Returns the title of the dialog box.
|
||||
|
||||
\membersection{wxDialog::Iconize}\label{wxdialogiconized}
|
||||
|
||||
\func{void}{Iconize}{\param{const bool}{ iconize}}
|
||||
|
||||
Iconizes or restores the dialog.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{iconize}{If TRUE, iconizes the dialog box; if FALSE, shows and restores it.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Note that in Windows, iconization has no effect since dialog boxes cannot be
|
||||
iconized. However, applications may need to explicitly restore dialog
|
||||
boxes under Motif which have user-iconizable frames, and under Windows
|
||||
calling {\tt Iconize(FALSE)} will bring the window to the front, as does
|
||||
\rtfsp{\tt Show(TRUE)}.
|
||||
|
||||
\membersection{wxDialog::IsIconized}\label{wxdialogisiconized}
|
||||
|
||||
\constfunc{bool}{IsIconized}{\void}
|
||||
|
||||
Returns TRUE if the dialog box is iconized.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Always returns FALSE under Windows since dialogs cannot be iconized.
|
||||
|
||||
\membersection{wxDialog::IsModal}\label{wxdialogismodal}
|
||||
|
||||
\constfunc{bool}{IsModal}{\void}
|
||||
|
||||
Returns TRUE if the dialog box is modal, FALSE otherwise.
|
||||
|
||||
\membersection{wxDialog::OnCharHook}\label{wxdialogoncharhook}
|
||||
|
||||
\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}}
|
||||
|
||||
This member is called to allow the window to intercept keyboard events
|
||||
before they are processed by child windows.
|
||||
|
||||
For more information, see \helpref{wxWindow::OnCharHook}{wxwindowoncharhook}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
wxDialog implements this handler to fake a cancel command if the escape key has been
|
||||
pressed. This will dismiss the dialog.
|
||||
|
||||
\membersection{wxDialog::OnApply}\label{wxdialogonapply}
|
||||
|
||||
\func{void}{OnApply}{\param{wxCommandEvent\& }{event}}
|
||||
|
||||
The default handler for the wxID\_APPLY identifier.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This function calls \helpref{wxWindow::Validate}{wxwindowvalidate} and \helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDialog::OnOK}{wxdialogonok}, \helpref{wxDialog::OnCancel}{wxdialogoncancel}
|
||||
|
||||
\membersection{wxDialog::OnCancel}\label{wxdialogoncancel}
|
||||
|
||||
\func{void}{OnCancel}{\param{wxCommandEvent\& }{event}}
|
||||
|
||||
The default handler for the wxID\_CANCEL identifier.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The function either calls {\bf EndModal(wxID\_CANCEL)} if the dialog is modal, or
|
||||
sets the return value to wxID\_CANCEL and calls {\bf Show(FALSE)} if the dialog is modeless.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDialog::OnOK}{wxdialogonok}, \helpref{wxDialog::OnApply}{wxdialogonapply}
|
||||
|
||||
\membersection{wxDialog::OnOK}\label{wxdialogonok}
|
||||
|
||||
\func{void}{OnOK}{\param{wxCommandEvent\& }{event}}
|
||||
|
||||
The default handler for the wxID\_OK identifier.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The function calls
|
||||
\rtfsp\helpref{wxWindow::Validate}{wxwindowvalidate}, then \helpref{wxWindow::TransferDataFromWindow}{wxwindowtransferdatafromwindow}.
|
||||
If this returns TRUE, the function either calls {\bf EndModal(wxID\_OK)} if the dialog is modal, or
|
||||
sets the return value to wxID\_OK and calls {\bf Show(FALSE)} if the dialog is modeless.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDialog::OnCancel}{wxdialogoncancel}, \helpref{wxDialog::OnApply}{wxdialogonapply}
|
||||
|
||||
\membersection{wxDialog::OnSysColourChanged}\label{wxdialogonsyscolourchanged}
|
||||
|
||||
\func{void}{OnSysColourChanged}{\param{wxSysColourChangedEvent\& }{event}}
|
||||
|
||||
The default handler for wxEVT\_SYS\_COLOUR\_CHANGED.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{event}{The colour change event.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Changes the dialog's colour to conform to the current settings (Windows only).
|
||||
Add an event table entry for your dialog class if you wish the behaviour
|
||||
to be different (such as keeping a user-defined
|
||||
background colour). If you do override this function, call \helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged} to
|
||||
propagate the notification to child windows and controls.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}
|
||||
|
||||
\membersection{wxDialog::SetModal}\label{wxdialogsetmodal}
|
||||
|
||||
\func{void}{SetModal}{\param{const bool}{ flag}}
|
||||
|
||||
Allows the programmer to specify whether the dialog box is modal (wxDialog::Show blocks control
|
||||
until the dialog is hidden) or modeless (control returns immediately).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{flag}{If TRUE, the dialog will be modal, otherwise it will be modeless.}
|
||||
|
||||
\membersection{wxDialog::SetTitle}\label{wxdialogsettitle}
|
||||
|
||||
\func{void}{SetTitle}{\param{const wxString\& }{ title}}
|
||||
|
||||
Sets the title of the dialog box.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{title}{The dialog box title.}
|
||||
|
||||
\membersection{wxDialog::Show}\label{wxdialogshow}
|
||||
|
||||
\func{bool}{Show}{\param{const bool}{ show}}
|
||||
|
||||
Hides or shows the dialog.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{show}{If TRUE, the dialog box is shown and brought to the front;
|
||||
otherwise the box is hidden. If FALSE and the dialog is
|
||||
modal, control is returned to the calling program.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The preferred way of dismissing a modal dialog is to use \helpref{wxDialog::EndModal}{wxdialogendmodal}.
|
||||
|
||||
\membersection{wxDialog::ShowModal}\label{wxdialogshowmodal}
|
||||
|
||||
\func{int}{ShowModal}{\void}
|
||||
|
||||
Shows a modal dialog. Program flow does not return until the dialog has been dismissed with\rtfsp
|
||||
\helpref{wxDialog::EndModal}{wxdialogendmodal}.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The return value is the value set with \helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDialog::EndModal}{wxdialogendmodal},\rtfsp
|
||||
\helpref{wxWindow::GetReturnCode}{wxwindowgetreturncode},\rtfsp
|
||||
\helpref{wxWindow::SetReturnCode}{wxwindowsetreturncode}
|
||||
|
||||
|
86
docs/latex/wx/dirdlg.tex
Normal file
@ -0,0 +1,86 @@
|
||||
\section{\class{wxDirDialog}}\label{wxdirdialog}
|
||||
|
||||
This class represents the directory chooser dialog.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxDialog}{wxdialog}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDirDialog overview}{wxdirdialogoverview}, \helpref{wxFileDialog}{wxfiledialog}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDirDialog::wxDirDialog}\label{wxdirdialogconstr}
|
||||
|
||||
\func{}{wxDirDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message = "Choose a directory"},\rtfsp
|
||||
\param{const wxString\& }{defaultPath = ""}, \param{long }{style = 0}, \param{const wxPoint\& }{pos = wxDefaultPosition}}
|
||||
|
||||
Constructor. Use \helpref{wxDirDialog::ShowModal}{wxdirdialogshowmodal} to show the dialog.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{Parent window.}
|
||||
|
||||
\docparam{message}{Message to show on the dialog.}
|
||||
|
||||
\docparam{defaultPath}{The default path, or the empty string.}
|
||||
|
||||
\docparam{style}{A dialog style, currently unused.}
|
||||
|
||||
\docparam{pos}{Dialog position. Not implemented.}
|
||||
|
||||
\membersection{wxDirDialog::\destruct{wxDirDialog}}
|
||||
|
||||
\func{}{\destruct{wxDirDialog}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxDirDialog::GetPath}\label{wxdirdialoggetpath}
|
||||
|
||||
\constfunc{wxString}{GetPath}{\void}
|
||||
|
||||
Returns the default or user-selected path.
|
||||
|
||||
\membersection{wxDirDialog::GetMessage}\label{wxdirdialoggetmessage}
|
||||
|
||||
\constfunc{wxString}{GetMessage}{\void}
|
||||
|
||||
Returns the message that will be displayed on the dialog.
|
||||
|
||||
\membersection{wxDirDialog::GetStyle}\label{wxdirdialoggetstyle}
|
||||
|
||||
\constfunc{long}{GetStyle}{\void}
|
||||
|
||||
Returns the dialog style.
|
||||
|
||||
\membersection{wxDirDialog::SetMessage}\label{wxdirdialogsetmessage}
|
||||
|
||||
\func{void}{SetMessage}{\param{const wxString\& }{message}}
|
||||
|
||||
Sets the message that will be displayed on the dialog.
|
||||
|
||||
\membersection{wxDirDialog::SetPath}\label{wxdirdialogsetpath}
|
||||
|
||||
\func{void}{SetPath}{\param{const wxString\& }{path}}
|
||||
|
||||
Sets the default path.
|
||||
|
||||
\membersection{wxDirDialog::SetStyle}\label{wxdirdialogsetstyle}
|
||||
|
||||
\func{void}{SetStyle}{\param{long }{style}}
|
||||
|
||||
Sets the dialog style. This is currently unused.
|
||||
|
||||
\membersection{wxDirDialog::ShowModal}\label{wxdirdialogshowmodal}
|
||||
|
||||
\func{int}{ShowModal}{\void}
|
||||
|
||||
Shows the dialog, returning wxID\_OK if the user pressed OK, and wxOK\_CANCEL
|
||||
otherwise.
|
||||
|
||||
|
88
docs/latex/wx/docchfrm.tex
Normal file
@ -0,0 +1,88 @@
|
||||
\section{\class{wxDocChildFrame}}\label{wxdocchildframe}
|
||||
|
||||
The wxDocChildFrame class provides a default frame for displaying documents
|
||||
on separate windows. This class can only be used for SDI (not MDI) child frames.
|
||||
|
||||
The class is part of the document/view framework supported by wxWindows,
|
||||
and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument},
|
||||
\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplate}{wxdoctemplate} classes.
|
||||
|
||||
See the example application in {\tt samples/docview}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxFrame}{wxframe}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Document/view overview}{docviewoverview}, \helpref{wxFrame}{wxframe}
|
||||
|
||||
\membersection{wxDocChildFrame::m\_childDocument}
|
||||
|
||||
\member{wxDocument*}{m\_childDocument}
|
||||
|
||||
The document associated with the frame.
|
||||
|
||||
\membersection{wxDocChildFrame::m\_childView}
|
||||
|
||||
\member{wxView*}{m\_childView}
|
||||
|
||||
The view associated with the frame.
|
||||
|
||||
\membersection{wxDocChildFrame::wxDocChildFrame}
|
||||
|
||||
\func{}{wxDocChildFrame}{\param{wxDocument* }{doc}, \param{wxView* }{view}, \param{wxFrame* }{parent},
|
||||
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
|
||||
\param{const wxSize\&}{ size = wxDefaultSize},
|
||||
\param{long}{ style = wxDEFAULT\_FRAME\_STYLE}, \param{const wxString\& }{name = ``frame"}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxDocChildFrame::\destruct{wxDocChildFrame}}
|
||||
|
||||
\func{}{\destruct{wxDocChildFrame}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxDocChildFrame::GetDocument}
|
||||
|
||||
\constfunc{wxDocument*}{GetDocument}{\void}
|
||||
|
||||
Returns the document associated with this frame.
|
||||
|
||||
\membersection{wxDocChildFrame::GetView}
|
||||
|
||||
\constfunc{wxView*}{GetView}{\void}
|
||||
|
||||
Returns the view associated with this frame.
|
||||
|
||||
\membersection{wxDocChildFrame::OnActivate}
|
||||
|
||||
\func{void}{OnActivate}{\param{bool}{ active}}
|
||||
|
||||
Sets the currently active view to be the frame's view. You may need
|
||||
to override (but still call) this function in order to set the keyboard
|
||||
focus for your subwindow.
|
||||
|
||||
\membersection{wxDocChildFrame::OnClose}
|
||||
|
||||
\func{virtual bool}{OnClose}{\void}
|
||||
|
||||
Closes and deletes the current view and document.
|
||||
|
||||
\membersection{wxDocChildFrame::SetDocument}
|
||||
|
||||
\func{void}{SetDocument}{\param{wxDocument *}{doc}}
|
||||
|
||||
Sets the document for this frame.
|
||||
|
||||
\membersection{wxDocChildFrame::SetView}
|
||||
|
||||
\func{void}{SetView}{\param{wxView *}{view}}
|
||||
|
||||
Sets the view for this frame.
|
||||
|
||||
|
335
docs/latex/wx/docmanag.tex
Normal file
@ -0,0 +1,335 @@
|
||||
\section{\class{wxDocManager}}\label{wxdocmanager}
|
||||
|
||||
The wxDocManager class is part of the document/view framework supported by wxWindows,
|
||||
and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument}\rtfsp
|
||||
and \helpref{wxDocTemplate}{wxdoctemplate} classes.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDocManager overview}{wxdocmanageroverview}, \helpref{wxDocument}{wxdocument},\rtfsp
|
||||
\helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDocManager::m\_currentView}
|
||||
|
||||
\member{wxView*}{m\_currentView}
|
||||
|
||||
The currently active view.
|
||||
|
||||
\membersection{wxDocManager::m\_defaultDocumentNameCounter}
|
||||
|
||||
\member{int}{m\_defaultDocumentNameCounter}
|
||||
|
||||
Stores the integer to be used for the next default document name.
|
||||
|
||||
\membersection{wxDocManager::m\_fileHistory}
|
||||
|
||||
\member{wxFileHistory*}{m\_fileHistory}
|
||||
|
||||
A pointer to an instance of \helpref{wxFileHistory}{wxfilehistory},
|
||||
which manages the history of recently-visited files on the File menu.
|
||||
|
||||
\membersection{wxDocManager::m\_maxDocsOpen}
|
||||
|
||||
\member{int}{m\_maxDocsOpen}
|
||||
|
||||
Stores the maximum number of documents that can be opened before
|
||||
existing documents are closed. By default, this is 10,000.
|
||||
|
||||
\membersection{wxDocManager::m\_docs}
|
||||
|
||||
\member{wxList}{m\_docs}
|
||||
|
||||
A list of all documents.
|
||||
|
||||
\membersection{wxDocManager::m\_flags}
|
||||
|
||||
\member{long}{m\_flags}
|
||||
|
||||
Stores the flags passed to the constructor.
|
||||
|
||||
\membersection{wxDocManager::m\_templates}
|
||||
|
||||
\member{wxList}{mnTemplates}
|
||||
|
||||
A list of all document templates.
|
||||
|
||||
\membersection{wxDocManager::wxDocManager}
|
||||
|
||||
\func{void}{wxDocManager}{\param{long}{ flags = wxDEFAULT\_DOCMAN\_FLAGS}, \param{bool}{ initialize = TRUE}}
|
||||
|
||||
Constructor. Create a document manager instance dynamically near the start of your application
|
||||
before doing any document or view operations.
|
||||
|
||||
{\it flags} is currently unused.
|
||||
|
||||
If {\it initialize} is TRUE, the \helpref{Initialize}{wxdocmanagerinitialize} function will be called
|
||||
to create a default history list object. If you derive from wxDocManager, you may wish to call the
|
||||
base constructor with FALSE, and then call Initialize in your own constructor, to allow
|
||||
your own Initialize or OnCreateFileHistory functions to be called.
|
||||
|
||||
\membersection{wxDocManager::\destruct{wxDocManager}}
|
||||
|
||||
\func{void}{\destruct{wxDocManager}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxDocManager::ActivateView}
|
||||
|
||||
\func{void}{ActivateView}{\param{wxView* }{doc}, \param{bool}{ activate}, \param{bool}{ deleting}}
|
||||
|
||||
Sets the current view.
|
||||
|
||||
\membersection{wxDocManager::AddDocument}
|
||||
|
||||
\func{void}{AddDocument}{\param{wxDocument *}{doc}}
|
||||
|
||||
Adds the document to the list of documents.
|
||||
|
||||
\membersection{wxDocManager::AddFileToHistory}
|
||||
|
||||
\func{void}{AddFileToHistory}{\param{const wxString\& }{filename}}
|
||||
|
||||
Adds a file to the file history list, if we have a pointer to an appropriate file menu.
|
||||
|
||||
\membersection{wxDocManager::AssociateTemplate}
|
||||
|
||||
\func{void}{AssociateTemplate}{\param{wxDocTemplate *}{temp}}
|
||||
|
||||
Adds the template to the document manager's template list.
|
||||
|
||||
\membersection{wxDocManager::CreateDocument}
|
||||
|
||||
\func{wxDocument*}{CreateDocument}{\param{const wxString\& }{path}, \param{long}{ flags}}
|
||||
|
||||
Creates a new document in a manner determined by the {\it flags} parameter, which can be:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item wxDOC\_NEW Creates a fresh document.
|
||||
\item wxDOC\_SILENT Silently loads the given document file.
|
||||
\end{itemize}
|
||||
|
||||
If wxDOC\_NEW is present, a new document will be created and returned, possibly after
|
||||
asking the user for a template to use if there is more than one document template.
|
||||
If wxDOC\_SILENT is present, a new document will be created and the given file loaded
|
||||
into it. If neither of these flags is present, the user will be presented with
|
||||
a file selector for the file to load, and the template to use will be determined by the
|
||||
extension (Windows) or by popping up a template choice list (other platforms).
|
||||
|
||||
If the maximum number of documents has been reached, this function
|
||||
will delete the oldest currently loaded document before creating a new one.
|
||||
|
||||
\membersection{wxDocManager::CreateView}
|
||||
|
||||
\func{wxView*}{CreateView}{\param{wxDocument*}{doc}, \param{long}{ flags}}
|
||||
|
||||
Creates a new view for the given document. If more than one view is allowed for the
|
||||
document (by virtue of multiple templates mentioning the same document type), a choice
|
||||
of view is presented to the user.
|
||||
|
||||
\membersection{wxDocManager::DisassociateTemplate}
|
||||
|
||||
\func{void}{DisassociateTemplate}{\param{wxDocTemplate *}{temp}}
|
||||
|
||||
Removes the template from the list of templates.
|
||||
|
||||
\membersection{wxDocManager::FileHistoryLoad}
|
||||
|
||||
\func{void}{FileHistoryLoad}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}}
|
||||
|
||||
Loads the file history from a resource file, using the given section. This must be called
|
||||
explicitly by the application.
|
||||
|
||||
\membersection{wxDocManager::FileHistorySave}
|
||||
|
||||
\func{void}{FileHistorySave}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}}
|
||||
|
||||
Saves the file history into a resource file, using the given section. This must be called
|
||||
explicitly by the application.
|
||||
|
||||
\membersection{wxDocManager::FileHistoryUseMenu}
|
||||
|
||||
\func{void}{FileHistoryUseMenu}{\param{wxMenu *}{menu}}
|
||||
|
||||
Use this menu for appending recently-visited document filenames, for convenient
|
||||
access. Calling this function with a valid menu pointer enables the history
|
||||
list functionality.
|
||||
|
||||
\membersection{wxDocManager::FindTemplateForPath}
|
||||
|
||||
\func{wxDocTemplate *}{FindTemplateForPath}{\param{const wxString\& }{path}}
|
||||
|
||||
Given a path, try to find template that matches the extension. This is only
|
||||
an approximate method of finding a template for creating a document.
|
||||
|
||||
\membersection{wxDocManager::GetCurrentDocument}
|
||||
|
||||
\func{wxDocument *}{GetCurrentDocument}{\void}
|
||||
|
||||
Returns the document associated with the currently active view (if any).
|
||||
|
||||
\membersection{wxDocManager::GetCurrentView}
|
||||
|
||||
\func{wxView *}{GetCurrentView}{\void}
|
||||
|
||||
Returns the currently active view
|
||||
|
||||
\membersection{wxDocManager::GetDocuments}
|
||||
|
||||
\func{wxList\&}{GetDocuments}{\void}
|
||||
|
||||
Returns a reference to the list of documents.
|
||||
|
||||
\membersection{wxDocManager::GetFileHistory}
|
||||
|
||||
\func{wxFileHistory *}{GetFileHistory}{\void}
|
||||
|
||||
Returns a pointer to file history.
|
||||
|
||||
\membersection{wxDocManager::GetMaxDocsOpen}
|
||||
|
||||
\func{int}{GetMaxDocsOpen}{\void}
|
||||
|
||||
Returns the number of documents that can be open simultaneously.
|
||||
|
||||
\membersection{wxDocManager::GetNoHistoryFiles}
|
||||
|
||||
\func{int}{GetNoHistoryFiles}{\void}
|
||||
|
||||
Returns the number of files currently stored in the file history.
|
||||
|
||||
\membersection{wxDocManager::Initialize}\label{wxdocmanagerinitialize}
|
||||
|
||||
\func{bool}{Initialize}{\void}
|
||||
|
||||
Initializes data; currently just calls OnCreateFileHistory. Some data cannot
|
||||
always be initialized in the constructor because the programmer must be given
|
||||
the opportunity to override functionality. If OnCreateFileHistory was called
|
||||
from the constructor, an overridden virtual OnCreateFileHistory would not be
|
||||
called due to C++'s `interesting' constructor semantics. In fact Initialize
|
||||
\rtfsp{\it is} called from the wxDocManager constructor, but this can be
|
||||
vetoed by passing FALSE to the second argument, allowing the derived class's
|
||||
constructor to call Initialize, possibly calling a different OnCreateFileHistory
|
||||
from the default.
|
||||
|
||||
The bottom line: if you're not deriving from Initialize, forget it and
|
||||
construct wxDocManager with no arguments.
|
||||
|
||||
\membersection{wxDocManager::MakeDefaultName}
|
||||
|
||||
\func{bool}{MakeDefaultName}{\param{const wxString\& }{buf}}
|
||||
|
||||
Copies a suitable default name into {\it buf}. This is implemented by
|
||||
appending an integer counter to the string {\bf unnamed} and incrementing
|
||||
the counter.
|
||||
|
||||
\membersection{wxDocManager::OnCreateFileHistory}
|
||||
|
||||
\func{wxFileHistory *}{OnCreateFileHistory}{\void}
|
||||
|
||||
A hook to allow a derived class to create a different type of file history. Called
|
||||
from \helpref{Initialize}{wxdocmanagerinitialize}.
|
||||
|
||||
\membersection{wxDocManager::OnFileClose}
|
||||
|
||||
\func{void}{OnFileClose}{\void}
|
||||
|
||||
Closes and deletes the currently active document.
|
||||
|
||||
\membersection{wxDocManager::OnFileNew}
|
||||
|
||||
\func{void}{OnFileNew}{\void}
|
||||
|
||||
Creates a document from a list of templates (if more than one template).
|
||||
|
||||
\membersection{wxDocManager::OnFileOpen}
|
||||
|
||||
\func{void}{OnFileOpen}{\void}
|
||||
|
||||
Creates a new document and reads in the selected file.
|
||||
|
||||
\membersection{wxDocManager::OnFileSave}
|
||||
|
||||
\func{void}{OnFileSave}{\void}
|
||||
|
||||
Saves the current document by calling wxDocument::Save for the current document.
|
||||
|
||||
\membersection{wxDocManager::OnFileSaveAs}
|
||||
|
||||
\func{void}{OnFileSaveAs}{\void}
|
||||
|
||||
Calls wxDocument::SaveAs for the current document.
|
||||
|
||||
\membersection{wxDocManager::OnMenuCommand}
|
||||
|
||||
\func{void}{OnMenuCommand}{\param{int}{ cmd}}
|
||||
|
||||
Processes menu commands routed from child or parent frames. This deals
|
||||
with the following predefined menu item identifiers:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item wxID\_OPEN Creates a new document and opens a file into it.
|
||||
\item wxID\_CLOSE Closes the current document.
|
||||
\item wxID\_NEW Creates a new document.
|
||||
\item wxID\_SAVE Saves the document.
|
||||
\item wxID\_SAVE\_AS Saves the document into a specified filename.
|
||||
\end{itemize}
|
||||
|
||||
Unrecognized commands are routed to the currently active wxView's OnMenuCommand.
|
||||
|
||||
\membersection{wxDocManager::RemoveDocument}
|
||||
|
||||
\func{void}{RemoveDocument}{\param{wxDocument *}{doc}}
|
||||
|
||||
Removes the document from the list of documents.
|
||||
|
||||
\membersection{wxDocManager::SelectDocumentPath}
|
||||
|
||||
\func{wxDocTemplate *}{SelectDocumentPath}{\param{wxDocTemplate **}{templates},
|
||||
\param{int}{ noTemplates}, \param{const wxString\& }{path}, \param{const wxString\& }{bufSize},
|
||||
\param{long}{ flags}, \param{bool}{ save}}
|
||||
|
||||
Under Windows, pops up a file selector with a list of filters corresponding to document templates.
|
||||
The wxDocTemplate corresponding to the selected file's extension is returned.
|
||||
|
||||
On other platforms, if there is more than one document template a choice list is popped up,
|
||||
followed by a file selector.
|
||||
|
||||
This function is used in wxDocManager::CreateDocument.
|
||||
|
||||
\membersection{wxDocManager::SelectDocumentType}
|
||||
|
||||
\func{wxDocTemplate *}{SelectDocumentType}{\param{wxDocTemplate **}{templates},
|
||||
\param{int}{ noTemplates}}
|
||||
|
||||
Returns a document template by asking the user (if there is more than one template).
|
||||
This function is used in wxDocManager::CreateDocument.
|
||||
|
||||
\membersection{wxDocManager::SelectViewType}
|
||||
|
||||
\func{wxDocTemplate *}{SelectViewType}{\param{wxDocTemplate **}{templates},
|
||||
\param{int}{ noTemplates}}
|
||||
|
||||
Returns a document template by asking the user (if there is more than one template),
|
||||
displaying a list of valid views. This function is used in wxDocManager::CreateView.
|
||||
The dialog normally won't appear because the array of templates only contains
|
||||
those relevant to the document in question, and often there will only be one such.
|
||||
|
||||
\membersection{wxDocManager::SetMaxDocsOpen}
|
||||
|
||||
\func{void}{SetMaxDocsOpen}{\param{int}{ n}}
|
||||
|
||||
Sets the maximum number of documents that can be open at a time. By default, this
|
||||
is 10,000. If you set it to 1, existing documents will be saved and deleted
|
||||
when the user tries to open or create a new one (similar to the behaviour
|
||||
of Windows Write, for example). Allowing multiple documents gives behaviour
|
||||
more akin to MS Word and other Multiple Document Interface applications.
|
||||
|
||||
|
||||
|
78
docs/latex/wx/docprfrm.tex
Normal file
@ -0,0 +1,78 @@
|
||||
\section{\class{wxDocParentFrame}}\label{wxdocparentframe}
|
||||
|
||||
The wxDocParentFrame class provides a default top-level frame for
|
||||
applications using the document/view framework. This class can only be used for SDI (not MDI) parent frames.
|
||||
|
||||
It cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocument}{wxdocument},
|
||||
\rtfsp\helpref{wxDocManager}{wxdocmanager} and \helpref{wxDocTemplates}{wxdoctemplate} classes.
|
||||
|
||||
See the example application in {\tt samples/docview}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxFrame}{wxframe}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Document/view overview}{docviewoverview}, \helpref{wxFrame}{wxframe}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDocParentFrame::wxDocParentFrame}
|
||||
|
||||
\func{}{wxDocParentFrame}{\param{wxFrame *}{parent},
|
||||
\param{const wxString\& }{title}, \param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height},
|
||||
\param{long}{ style}, \param{const wxString\& }{name}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxDocParentFrame::\destruct{wxDocParentFrame}}
|
||||
|
||||
\func{}{\destruct{wxDocParentFrame}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxDocParentFrame::OnClose}
|
||||
|
||||
\func{bool}{OnClose}{\void}
|
||||
|
||||
Deletes all views and documents. If no user input cancelled the
|
||||
operation, the function returns TRUE and the application will exit.
|
||||
|
||||
Since understanding how document/view clean-up takes place can be difficult,
|
||||
the implementation of this function is shown below.
|
||||
|
||||
\begin{verbatim}
|
||||
bool wxDocParentFrame::OnClose(void)
|
||||
{
|
||||
// Delete all views and documents
|
||||
wxNode *node = docManager->GetDocuments().First();
|
||||
while (node)
|
||||
{
|
||||
wxDocument *doc = (wxDocument *)node->Data();
|
||||
wxNode *next = node->Next();
|
||||
|
||||
if (!doc->Close())
|
||||
return FALSE;
|
||||
|
||||
// Implicitly deletes the document when the last
|
||||
// view is removed (deleted)
|
||||
doc->DeleteAllViews();
|
||||
|
||||
// Check document is deleted
|
||||
if (docManager->GetDocuments().Member(doc))
|
||||
delete doc;
|
||||
|
||||
// This assumes that documents are not connected in
|
||||
// any way, i.e. deleting one document does NOT
|
||||
// delete another.
|
||||
node = next;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
|
233
docs/latex/wx/doctempl.tex
Normal file
@ -0,0 +1,233 @@
|
||||
\section{\class{wxDocTemplate}}\label{wxdoctemplate}
|
||||
|
||||
The wxDocTemplate class is used to model the relationship between a
|
||||
document class and a view class.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDocTemplate overview}{wxdoctemplateoverview}, \helpref{wxDocument}{wxdocument}, \helpref{wxView}{wxview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDocTemplate::m\_defaultExt}
|
||||
|
||||
\member{wxString}{m\_defaultExt}
|
||||
|
||||
The default extension for files of this type.
|
||||
|
||||
\membersection{wxDocTemplate::m\_description}
|
||||
|
||||
\member{wxString}{m\_description}
|
||||
|
||||
A short description of this template.
|
||||
|
||||
\membersection{wxDocTemplate::m\_directory}
|
||||
|
||||
\member{wxString}{m\_directory}
|
||||
|
||||
The default directory for files of this type.
|
||||
|
||||
\membersection{wxDocTemplate::m\_docClassInfo}
|
||||
|
||||
\member{wxClassInfo* }{m\_docClassInfo}
|
||||
|
||||
Run-time class information that allows document instances to be constructed dynamically.
|
||||
|
||||
\membersection{wxDocTemplate::m\_docTypeName}
|
||||
|
||||
\member{wxString}{m\_docTypeName}
|
||||
|
||||
The named type of the document associated with this template.
|
||||
|
||||
\membersection{wxDocTemplate::m\_documentManager}
|
||||
|
||||
\member{wxDocTemplate*}{m\_documentManager}
|
||||
|
||||
A pointer to the document manager for which this template was created.
|
||||
|
||||
\membersection{wxDocTemplate::m\_fileFilter}
|
||||
|
||||
\member{wxString}{m\_fileFilter}
|
||||
|
||||
The file filter (such as \verb$*.txt$) to be used in file selector dialogs.
|
||||
|
||||
\membersection{wxDocTemplate::m\_flags}
|
||||
|
||||
\member{long}{m\_flags}
|
||||
|
||||
The flags passed to the constructor.
|
||||
|
||||
\membersection{wxDocTemplate::m\_viewClassInfo}
|
||||
|
||||
\member{wxClassInfo*}{m\_viewClassInfo}
|
||||
|
||||
Run-time class information that allows view instances to be constructed dynamically.
|
||||
|
||||
\membersection{wxDocTemplate::m\_viewTypeName}
|
||||
|
||||
\member{wxString}{m\_viewTypeName}
|
||||
|
||||
The named type of the view associated with this template.
|
||||
|
||||
\membersection{wxDocTemplate::wxDocTemplate}
|
||||
|
||||
\func{}{wxDocTemplate}{\param{wxDocManager* }{manager}, \param{const wxString\& }{descr}, \param{const wxString\& }{filter},
|
||||
\param{const wxString\& }{dir}, \param{const wxString\& }{ext}, \param{const wxString\& }{docTypeName},
|
||||
\param{const wxString\& }{viewTypeName}, \param{wxClassInfo* }{docClassInfo = NULL},
|
||||
\param{wxClassInfo* }{viewClassInfo = NULL}, \param{long}{ flags = wxDEFAULT\_TEMPLATE\_FLAGS}}
|
||||
|
||||
Constructor. Create instances dynamically near the start of your application after creating
|
||||
a wxDocManager instance, and before doing any document or view operations.
|
||||
|
||||
{\it manager} is the document manager object which manages this template.
|
||||
|
||||
{\it descr} is a short description of what the template is for. This string will be displayed in the
|
||||
file filter list of Windows file selectors.
|
||||
|
||||
{\it filter} is an appropriate file filter such as \verb$*.txt$.
|
||||
|
||||
{\it dir} is the default directory to use for file selectors.
|
||||
|
||||
{\it ext} is the default file extension (such as txt).
|
||||
|
||||
{\it docTypeName} is a name that should be unique for a given type of document, used for
|
||||
gathering a list of views relevant to a particular document.
|
||||
|
||||
{\it viewTypeName} is a name that should be unique for a given view.
|
||||
|
||||
{\it docClassInfo} is a pointer to the run-time document class information as returned
|
||||
by the CLASSINFO macro, e.g. CLASSINFO(MyDocumentClass). If this is not supplied,
|
||||
you will need to derive a new wxDocTemplate class and override the CreateDocument
|
||||
member to return a new document instance on demand.
|
||||
|
||||
{\it viewClassInfo} is a pointer to the run-time view class information as returned
|
||||
by the CLASSINFO macro, e.g. CLASSINFO(MyViewClass). If this is not supplied,
|
||||
you will need to derive a new wxDocTemplate class and override the CreateView
|
||||
member to return a new view instance on demand.
|
||||
|
||||
{\it flags} is a bit list of the following:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item wxTEMPLATE\_VISIBLE The template may be displayed to the user in dialogs.
|
||||
\item wxTEMPLATE\_INVISIBLE The template may not be displayed to the user in dialogs.
|
||||
\item wxDEFAULT\_TEMPLATE\_FLAGS Defined as wxTEMPLATE\_VISIBLE.
|
||||
\end{itemize}
|
||||
|
||||
\membersection{wxDocTemplate::\destruct{wxDocTemplate}}
|
||||
|
||||
\func{void}{\destruct{wxDocTemplate}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxDocTemplate::CreateDocument}
|
||||
|
||||
\func{wxDocument *}{CreateDocument}{\param{const wxString\& }{path}, \param{long}{ flags = 0}}
|
||||
|
||||
Creates a new instance of the associated document class. If you have not supplied
|
||||
a wxClassInfo parameter to the template constructor, you will need to override this
|
||||
function to return an appropriate document instance.
|
||||
|
||||
\membersection{wxDocTemplate::CreateView}
|
||||
|
||||
\func{wxView *}{CreateView}{\param{wxDocument *}{doc}, \param{long}{ flags = 0}}
|
||||
|
||||
Creates a new instance of the associated view class. If you have not supplied
|
||||
a wxClassInfo parameter to the template constructor, you will need to override this
|
||||
function to return an appropriate view instance.
|
||||
|
||||
\membersection{wxDocTemplate::GetDefaultExtension}
|
||||
|
||||
\func{wxString}{GetDefaultExtension}{\void}
|
||||
|
||||
Returns the default file extension for the document data, as passed to the document template constructor.
|
||||
|
||||
\membersection{wxDocTemplate::GetDescription}
|
||||
|
||||
\func{wxString}{GetDescription}{\void}
|
||||
|
||||
Returns the text description of this template, as passed to the document template constructor.
|
||||
|
||||
\membersection{wxDocTemplate::GetDirectory}
|
||||
|
||||
\func{wxString}{GetDirectory}{\void}
|
||||
|
||||
Returns the default directory, as passed to the document template constructor.
|
||||
|
||||
\membersection{wxDocTemplate::GetDocumentManager}
|
||||
|
||||
\func{wxDocManager *}{GetDocumentManager}{\void}
|
||||
|
||||
Returns a pointer to the document manager instance for which this template was created.
|
||||
|
||||
\membersection{wxDocTemplate::GetDocumentName}
|
||||
|
||||
\func{wxString}{GetDocumentName}{\void}
|
||||
|
||||
Returns the document type name, as passed to the document template constructor.
|
||||
|
||||
\membersection{wxDocTemplate::GetFileFilter}
|
||||
|
||||
\func{wxString}{GetFileFilter}{\void}
|
||||
|
||||
Returns the file filter, as passed to the document template constructor.
|
||||
|
||||
\membersection{wxDocTemplate::GetFlags}
|
||||
|
||||
\func{long}{GetFlags}{\void}
|
||||
|
||||
Returns the flags, as passed to the document template constructor.
|
||||
|
||||
\membersection{wxDocTemplate::GetViewName}
|
||||
|
||||
\func{wxString}{GetViewName}{\void}
|
||||
|
||||
Returns the view type name, as passed to the document template constructor.
|
||||
|
||||
\membersection{wxDocTemplate::IsVisible}
|
||||
|
||||
\func{bool}{IsVisible}{\void}
|
||||
|
||||
Returns TRUE if the document template can be shown in user dialogs, FALSE otherwise.
|
||||
|
||||
\membersection{wxDocTemplate::SetDefaultExtension}
|
||||
|
||||
\func{void}{SetDefaultExtension}{\param{const wxString\& }{ext}}
|
||||
|
||||
Sets the default file extension.
|
||||
|
||||
\membersection{wxDocTemplate::SetDescription}
|
||||
|
||||
\func{void}{SetDescription}{\param{const wxString\& }{descr}}
|
||||
|
||||
Sets the template description.
|
||||
|
||||
\membersection{wxDocTemplate::SetDirectory}
|
||||
|
||||
\func{void}{SetDirectory}{\param{const wxString\& }{dir}}
|
||||
|
||||
Sets the default directory.
|
||||
|
||||
\membersection{wxDocTemplate::SetDocumentManager}
|
||||
|
||||
\func{void}{SetDocumentManager}{\param{wxDocManager *}{manager}}
|
||||
|
||||
Sets the pointer to the document manager instance for which this template was created.
|
||||
Should not be called by the application.
|
||||
|
||||
\membersection{wxDocTemplate::SetFileFilter}
|
||||
|
||||
\func{void}{SetFileFilter}{\param{const wxString\& }{filter}}
|
||||
|
||||
Sets the file filter.
|
||||
|
||||
\membersection{wxDocTemplate::SetFlags}
|
||||
|
||||
\func{void}{SetFlags}{\param{long }{flags}}
|
||||
|
||||
Sets the internal document template flags (see the constructor description for more details).
|
||||
|
||||
|
327
docs/latex/wx/document.tex
Normal file
@ -0,0 +1,327 @@
|
||||
\section{\class{wxDocument}}\label{wxdocument}
|
||||
|
||||
The document class can be used to model an application's file-based
|
||||
data. It is part of the document/view framework supported by wxWindows,
|
||||
and cooperates with the \helpref{wxView}{wxview}, \helpref{wxDocTemplate}{wxdoctemplate}\rtfsp
|
||||
and \helpref{wxDocManager}{wxdocmanager} classes.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxDocument overview}{wxdocumentoverview}, \helpref{wxView}{wxview},\rtfsp
|
||||
\helpref{wxDocTemplate}{wxdoctemplate}, \helpref{wxDocManager}{wxdocmanager}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDocument::m\_commandProcessor}
|
||||
|
||||
\member{wxCommandProcessor*}{m\_commandProcessor}
|
||||
|
||||
A pointer to the command processor associated with this document.
|
||||
|
||||
\membersection{wxDocument::m\_documentFile}
|
||||
|
||||
\member{wxString}{m\_documentFile}
|
||||
|
||||
Filename associated with this document (``" if none).
|
||||
|
||||
\membersection{wxDocument::m\_documentModified}
|
||||
|
||||
\member{bool}{m\_documentModified}
|
||||
|
||||
TRUE if the document has been modified, FALSE otherwise.
|
||||
|
||||
\membersection{wxDocument::m\_documentTemplate}
|
||||
|
||||
\member{wxDocTemplate *}{m\_documentTemplate}
|
||||
|
||||
A pointer to the template from which this document was created.
|
||||
|
||||
\membersection{wxDocument::m\_documentTitle}
|
||||
|
||||
\member{wxString}{m\_documentTitle}
|
||||
|
||||
Document title. The document title is used for an associated
|
||||
frame (if any), and is usually constructed by the framework from
|
||||
the filename.
|
||||
|
||||
\membersection{wxDocument::m\_documentTypeName}\label{documenttypename}
|
||||
|
||||
\member{wxString}{m\_documentTypeName}
|
||||
|
||||
The document type name given to the wxDocTemplate constructor, copied to this
|
||||
variable when the document is created. If several document templates are
|
||||
created that use the same document type, this variable is used in wxDocManager::CreateView
|
||||
to collate a list of alternative view types that can be used on this kind of
|
||||
document. Do not change the value of this variable.
|
||||
|
||||
\membersection{wxDocument::m\_documentViews}
|
||||
|
||||
\member{wxList}{m\_documentViews}
|
||||
|
||||
List of wxView instances associated with this document.
|
||||
|
||||
\membersection{wxDocument::wxDocument}
|
||||
|
||||
\func{}{wxDocument}{\void}
|
||||
|
||||
Constructor. Define your own default constructor to initialize application-specific
|
||||
data.
|
||||
|
||||
\membersection{wxDocument::\destruct{wxDocument}}
|
||||
|
||||
\func{}{\destruct{wxDocument}}{\void}
|
||||
|
||||
Destructor. Removes itself from the document manager.
|
||||
|
||||
\membersection{wxDocument::AddView}
|
||||
|
||||
\func{virtual bool}{AddView}{\param{wxView *}{view}}
|
||||
|
||||
If the view is not already in the list of views, adds the view and calls OnChangedViewList.
|
||||
|
||||
\membersection{wxDocument::Close}
|
||||
|
||||
\func{virtual bool}{Close}{\void}
|
||||
|
||||
Closes the document, by calling OnSaveModified and then (if this returned TRUE) OnCloseDocument.
|
||||
This does not normally delete the document object: use DeleteAllViews to do this implicitly.
|
||||
|
||||
\membersection{wxDocument::DeleteAllViews}
|
||||
|
||||
\func{virtual bool}{DeleteAllViews}{\void}
|
||||
|
||||
Calls wxView::Close and deletes each view. Deleting the final view will implicitly
|
||||
delete the document itself, because the wxView destructor calls RemoveView. This
|
||||
in turns calls wxDocument::OnChangedViewList, whose default implemention is to
|
||||
save and delete the document if no views exist.
|
||||
|
||||
\membersection{wxDocument::GetCommandProcessor}
|
||||
|
||||
\constfunc{wxCommandProcessor*}{GetCommandProcessor}{\void}
|
||||
|
||||
Returns a pointer to the command processor associated with this document.
|
||||
|
||||
See \helpref{wxCommandProcessor}{wxcommandprocessor}.
|
||||
|
||||
\membersection{wxDocument::GetDocumentTemplate}
|
||||
|
||||
\constfunc{wxDocTemplate*}{GetDocumentTemplate}{\void}
|
||||
|
||||
Gets a pointer to the template that created the document.
|
||||
|
||||
\membersection{wxDocument::GetDocumentManager}
|
||||
|
||||
\constfunc{wxDocManager*}{GetDocumentManager}{\void}
|
||||
|
||||
Gets a pointer to the associated document manager.
|
||||
|
||||
\membersection{wxDocument::GetDocumentName}
|
||||
|
||||
\constfunc{wxString}{GetDocumentName}{\void}
|
||||
|
||||
Gets the document type name for this document. See the comment for \helpref{documentTypeName}{documenttypename}.
|
||||
|
||||
\membersection{wxDocument::GetDocumentWindow}
|
||||
|
||||
\constfunc{wxWindow*}{GetDocumentWindow}{\void}
|
||||
|
||||
Intended to return a suitable window for using as a parent for document-related
|
||||
dialog boxes. By default, uses the frame associated with the first view.
|
||||
|
||||
\membersection{wxDocument::GetFilename}
|
||||
|
||||
\constfunc{wxString}{GetFilename}{\void}
|
||||
|
||||
Gets the filename associated with this document, or NULL if none is
|
||||
associated.
|
||||
|
||||
\membersection{wxDocument::GetFirstView}
|
||||
|
||||
\constfunc{wxView*}{GetFirstView}{\void}
|
||||
|
||||
A convenience function to get the first view for a document, because
|
||||
in many cases a document will only have a single view.
|
||||
|
||||
\membersection{wxDocument::GetPrintableName}
|
||||
|
||||
\constfunc{virtual void}{GetPrintableName}{\param{wxString\& }{name}}
|
||||
|
||||
Copies a suitable document name into the supplied {\it name} buffer. The default
|
||||
function uses the title, or if there is no title, uses the filename; or if no
|
||||
filename, the string {\bf unnamed}.
|
||||
|
||||
\membersection{wxDocument::GetTitle}
|
||||
|
||||
\constfunc{wxString}{GetTitle}{\void}
|
||||
|
||||
Gets the title for this document. The document title is used for an associated
|
||||
frame (if any), and is usually constructed by the framework from
|
||||
the filename.
|
||||
|
||||
\membersection{wxDocument::IsModified}\label{wxdocumentismodified}
|
||||
|
||||
\constfunc{virtual bool}{IsModified}{\void}
|
||||
|
||||
Returns TRUE if the document has been modified since the last save, FALSE otherwise.
|
||||
You may need to override this if your document view maintains its own
|
||||
record of being modified (for example if using wxTextWindow to view and edit the document).
|
||||
|
||||
See also \helpref{Modify}{wxdocumentmodify}.
|
||||
|
||||
\membersection{wxDocument::LoadObject}
|
||||
|
||||
\func{virtual istream\&}{LoadObject}{\param{istream\& }{stream}}
|
||||
|
||||
Override this function and call it from your own LoadObject before
|
||||
streaming your own data. LoadObject is called by the framework
|
||||
automatically when the document contents need to be loaded.
|
||||
|
||||
\membersection{wxDocument::Modify}\label{wxdocumentmodify}
|
||||
|
||||
\func{virtual void}{Modify}{\param{bool}{ modify}}
|
||||
|
||||
Call with TRUE to mark the document as modified since the last save, FALSE otherwise.
|
||||
You may need to override this if your document view maintains its own
|
||||
record of being modified (for example if using wxTextWindow to view and edit the document).
|
||||
|
||||
See also \helpref{IsModified}{wxdocumentismodified}.
|
||||
|
||||
\membersection{wxDocument::OnChangedViewList}
|
||||
|
||||
\func{virtual void}{OnChangedViewList}{\void}
|
||||
|
||||
Called when a view is added to or deleted from this document. The default
|
||||
implementation saves and deletes the document if no views exist (the last
|
||||
one has just been removed).
|
||||
|
||||
\membersection{wxDocument::OnCloseDocument}
|
||||
|
||||
\func{virtual bool}{OnCloseDocument}{\void}
|
||||
|
||||
The default implementation calls DeleteContents (an empty implementation)
|
||||
sets the modified flag to FALSE. Override this to
|
||||
supply additional behaviour when the document is closed with Close.
|
||||
|
||||
\membersection{wxDocument::OnCreate}
|
||||
|
||||
\func{virtual bool}{OnCreate}{\param{const wxString\& }{path}, \param{long}{ flags}}
|
||||
|
||||
Called just after the document object is created to give it a chance
|
||||
to initialize itself. The default implementation uses the
|
||||
template associated with the document to create an initial view.
|
||||
If this function returns FALSE, the document is deleted.
|
||||
|
||||
\membersection{wxDocument::OnCreateCommandProcessor}
|
||||
|
||||
\func{virtual wxCommandProcessor*}{OnCreateCommandProcessor}{\void}
|
||||
|
||||
Override this function if you want a different (or no) command processor
|
||||
to be created when the document is created. By default, it returns
|
||||
an instance of wxCommandProcessor.
|
||||
|
||||
See \helpref{wxCommandProcessor}{wxcommandprocessor}.
|
||||
|
||||
\membersection{wxDocument::OnNewDocument}
|
||||
|
||||
\func{virtual bool}{OnNewDocument}{\void}
|
||||
|
||||
The default implementation calls OnSaveModified and DeleteContents, makes a default title for the
|
||||
document, and notifies the views that the filename (in fact, the title) has changed.
|
||||
|
||||
\membersection{wxDocument::OnOpenDocument}
|
||||
|
||||
\func{virtual bool}{OnOpenDocument}{\param{const wxString\& }{filename}}
|
||||
|
||||
Constructs an input file stream for the given filename (which must not be NULL),
|
||||
and calls LoadObject. If LoadObject returns TRUE, the document is set to
|
||||
unmodified; otherwise, an error message box is displayed. The document's
|
||||
views are notified that the filename has changed, to give windows an opportunity
|
||||
to update their titles. All of the document's views are then updated.
|
||||
|
||||
\membersection{wxDocument::OnSaveDocument}
|
||||
|
||||
\func{virtual bool}{OnSaveDocument}{\param{const wxString\& }{filename}}
|
||||
|
||||
Constructs an output file stream for the given filename (which must not be NULL),
|
||||
and calls SaveObject. If SaveObject returns TRUE, the document is set to
|
||||
unmodified; otherwise, an error message box is displayed.
|
||||
|
||||
\membersection{wxDocument::OnSaveModified}
|
||||
|
||||
\func{virtual bool}{OnSaveModified}{\void}
|
||||
|
||||
If the document has been modified, prompts the user to ask if the changes should
|
||||
be changed. If the user replies Yes, the Save function is called. If No, the
|
||||
document is marked as unmodified and the function succeeds. If Cancel, the
|
||||
function fails.
|
||||
|
||||
\membersection{wxDocument::RemoveView}
|
||||
|
||||
\func{virtual bool}{RemoveView}{\param{wxView* }{view}}
|
||||
|
||||
Removes the view from the document's list of views, and calls OnChangedViewList.
|
||||
|
||||
\membersection{wxDocument::Save}
|
||||
|
||||
\func{virtual bool}{Save}{\void}
|
||||
|
||||
Saves the document by calling OnSaveDocument if there is an associated filename,
|
||||
or SaveAs if there is no filename.
|
||||
|
||||
\membersection{wxDocument::SaveAs}
|
||||
|
||||
\func{virtual bool}{SaveAs}{\void}
|
||||
|
||||
Prompts the user for a file to save to, and then calls OnSaveDocument.
|
||||
|
||||
\membersection{wxDocument::SaveObject}
|
||||
|
||||
\func{virtual ostream\&}{SaveObject}{\param{ostream\& }{stream}}
|
||||
|
||||
Override this function and call it from your own SaveObject before
|
||||
streaming your own data. SaveObject is called by the framework
|
||||
automatically when the document contents need to be saved.
|
||||
|
||||
\membersection{wxDocument::SetCommandProcessor}
|
||||
|
||||
\func{virtual void}{SetCommandProcessor}{\param{wxCommandProcessor *}{processor}}
|
||||
|
||||
Sets the command processor to be used for this document. The document will then be responsible
|
||||
for its deletion. Normally you should not call this; override OnCreateCommandProcessor
|
||||
instead.
|
||||
|
||||
See \helpref{wxCommandProcessor}{wxcommandprocessor}.
|
||||
|
||||
\membersection{wxDocument::SetDocumentName}
|
||||
|
||||
\func{void}{SetDocumentName}{\param{const wxString\& }{name}}
|
||||
|
||||
Sets the document type name for this document. See the comment for \helpref{documentTypeName}{documenttypename}.
|
||||
|
||||
\membersection{wxDocument::SetDocumentTemplate}
|
||||
|
||||
\func{void}{SetDocumentTemplate}{\param{wxDocTemplate* }{templ}}
|
||||
|
||||
Sets the pointer to the template that created the document. Should only be called by the
|
||||
framework.
|
||||
|
||||
\membersection{wxDocument::SetFilename}
|
||||
|
||||
\func{void}{SetFilename}{\param{const wxString\& }{filename}}
|
||||
|
||||
Sets the filename for this document. Usually called by the framework.
|
||||
|
||||
\membersection{wxDocument::SetTitle}
|
||||
|
||||
\func{void}{SetTitle}{\param{const wxString\& }{title}}
|
||||
|
||||
Sets the title for this document. The document title is used for an associated
|
||||
frame (if any), and is usually constructed by the framework from
|
||||
the filename.
|
||||
|
||||
|
72
docs/latex/wx/dropevt.tex
Normal file
@ -0,0 +1,72 @@
|
||||
\section{\class{wxDropFilesEvent}}\label{wxdropfilesevent}
|
||||
|
||||
This class is used for drop files events, that is, when files have been dropped
|
||||
onto the window. This functionality is currently only available under Windows.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvent}{wxevent}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Event table macros}
|
||||
|
||||
To process a drop files event, use these event handler macros to direct input to a member
|
||||
function that takes a wxDropFilesEvent argument.
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_DROP\_FILES(func)}}{Process a wxEVT\_DROP\_FILES event.}
|
||||
\end{twocollist}%
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::OnDropFiles}{wxwindowondropfiles}, \helpref{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxDropFilesEvent::wxDropFilesEvent}
|
||||
|
||||
\func{}{wxDropFilesEvent}{\param{WXTYPE }{id = 0}, \param{int }{noFiles = 0},\rtfsp
|
||||
\param{wxString* }{files = NULL}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxDropFilesEvent::m\_files}
|
||||
|
||||
\member{wxString*}{m\_files}
|
||||
|
||||
An array of filenames.
|
||||
|
||||
\membersection{wxDropFilesEvent::m\_noFiles}
|
||||
|
||||
\member{int}{m\_noFiles}
|
||||
|
||||
The number of files dropped.
|
||||
|
||||
\membersection{wxDropFilesEvent::m\_pos}
|
||||
|
||||
\member{wxPoint}{m\_pos}
|
||||
|
||||
The point at which the drop took place.
|
||||
|
||||
\membersection{wxDropFilesEvent::GetFiles}\label{wxdropfileseventgetfiles}
|
||||
|
||||
\constfunc{wxString*}{GetFiles}{\void}
|
||||
|
||||
Returns an array of filenames.
|
||||
|
||||
\membersection{wxDropFilesEvent::GetNumberOfFiles}\label{wxdropfileseventgetnumberoffiles}
|
||||
|
||||
\constfunc{int}{GetNumberOfFiles}{\void}
|
||||
|
||||
Returns the number of files dropped.
|
||||
|
||||
\membersection{wxDropFilesEvent::GetPosition}\label{wxdropfileseventgetposition}
|
||||
|
||||
\constfunc{wxPoint}{GetPosition}{\void}
|
||||
|
||||
Returns the position at which the files were dropped.
|
||||
|
||||
Returns an array of filenames.
|
||||
|
||||
|
48
docs/latex/wx/eraseevt.tex
Normal file
@ -0,0 +1,48 @@
|
||||
\section{\class{wxEraseEvent}}\label{wxeraseevent}
|
||||
|
||||
An erase event is sent when a window's background needs to be repainted.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvent}{wxevent}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Event table macros}
|
||||
|
||||
To process an erase event, use this event handler macro to direct input to a member
|
||||
function that takes a wxEraseEvent argument.
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_ERASE(func)}}{Process a wxEVT\_ERASE\_BACKGROUND event.}
|
||||
\end{twocollist}%
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
If the {\bf m\_DC} member is non-NULL, draw into this device context.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground}, \helpref{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxEraseEvent::wxEraseEvent}
|
||||
|
||||
\func{}{wxEraseEvent}{\param{int }{id = 0}, \param{wxDC* }{dc = NULL}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxEraseEvent::m\_dc}
|
||||
|
||||
\member{wxDC*}{m\_dc}
|
||||
|
||||
The device context associated with the erase event (may be NULL).
|
||||
|
||||
\membersection{wxEraseEvent::GetDC}\label{wxeraseeventgetdc}
|
||||
|
||||
\constfunc{wxDC*}{GetDC}{\void}
|
||||
|
||||
Returns the device context to draw into. If this is non-NULL, you should draw
|
||||
into it to perform the erase operation.
|
||||
|
141
docs/latex/wx/event.tex
Normal file
@ -0,0 +1,141 @@
|
||||
\section{\class{wxEvent}}\label{wxevent}
|
||||
|
||||
An event is a structure holding information about an event passed to a
|
||||
callback or member function. {\bf wxEvent} used to be a multipurpose
|
||||
event object, and is an abstract base class for other event classes (see below).
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxCommandEvent}{wxcommandevent},\rtfsp
|
||||
\helpref{wxMouseEvent}{wxmouseevent}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxEvent::wxEvent}
|
||||
|
||||
\func{}{wxEvent}{\param{int }{id = 0}}
|
||||
|
||||
Constructor. Should not need to be used directly by an application.
|
||||
|
||||
\membersection{wxEvent::m\_eventHandle}
|
||||
|
||||
\member{char*}{m\_eventHandle}
|
||||
|
||||
Handle of an underlying windowing system event handle, such as
|
||||
XEvent. Not guaranteed to be instantiated.
|
||||
|
||||
\membersection{wxEvent::m\_eventObject}
|
||||
|
||||
\member{wxObject*}{m\_eventObject}
|
||||
|
||||
The object (usually a window) that the event was generated from,
|
||||
or should be sent to.
|
||||
|
||||
\membersection{wxEvent::m\_eventType}
|
||||
|
||||
\member{WXTYPE}{m\_eventType}
|
||||
|
||||
The type of the event, such as wxEVENT\_TYPE\_BUTTON\_COMMAND.
|
||||
|
||||
\membersection{wxEvent::m\_id}
|
||||
|
||||
\member{int}{m\_id}
|
||||
|
||||
Identifier for the window.
|
||||
|
||||
\membersection{wxEvent::m\_skipped}
|
||||
|
||||
\member{bool}{m\_skipped}
|
||||
|
||||
Set to TRUE by {\bf Skip} if this event should be skipped.
|
||||
|
||||
\membersection{wxEvent::m\_timeStamp}
|
||||
|
||||
\member{long}{m\_timeStamp}
|
||||
|
||||
Timestamp for this event.
|
||||
|
||||
\membersection{wxEvent::GetEventClass}
|
||||
|
||||
\func{WXTYPE}{GetEventClass}{\void}
|
||||
|
||||
Returns the identifier of the given event class,
|
||||
such as wxTYPE\_MOUSE\_EVENT.
|
||||
|
||||
\membersection{wxEvent::GetEventObject}
|
||||
|
||||
\func{wxObject*}{GetEventObject}{\void}
|
||||
|
||||
Returns the object associated with the
|
||||
event, if any.
|
||||
|
||||
\membersection{wxEvent::GetEventType}
|
||||
|
||||
\func{WXTYPE}{GetEventType}{\void}
|
||||
|
||||
Returns the identifier of the given event type,
|
||||
such as wxEVENT\_TYPE\_BUTTON\_COMMAND.
|
||||
|
||||
\membersection{wxEvent::GetId}
|
||||
|
||||
\func{int}{GetId}{\void}
|
||||
|
||||
Returns the identifier associated with this event, such as a button command id.
|
||||
|
||||
\membersection{wxEvent::GetObjectType}
|
||||
|
||||
\func{WXTYPE}{GetObjectType}{\void}
|
||||
|
||||
Returns the type of the object associated with the
|
||||
event, such as wxTYPE\_BUTTON.
|
||||
|
||||
\membersection{wxEvent::GetSkipped}
|
||||
|
||||
\func{bool}{GetSkipped}{\void}
|
||||
|
||||
Returns TRUE if the event handler should be skipped, FALSE otherwise.
|
||||
|
||||
\membersection{wxEvent::GetTimestamp}
|
||||
|
||||
\func{long}{GetTimestamp}{\void}
|
||||
|
||||
Gets the timestamp for the event.
|
||||
|
||||
\membersection{wxEvent::SetEventObject}
|
||||
|
||||
\func{void}{SetEventObject}{\param{wxObject* }{object}}
|
||||
|
||||
Sets the originating object.
|
||||
|
||||
\membersection{wxEvent::SetEventType}
|
||||
|
||||
\func{void}{SetEventType}{\param{WXTYPE }{typ}}
|
||||
|
||||
Sets the event type.
|
||||
|
||||
\membersection{wxEvent::SetId}
|
||||
|
||||
\func{void}{SetId}{\param{int}{ id}}
|
||||
|
||||
Sets the identifier associated with this event, such as a button command id.
|
||||
|
||||
\membersection{wxEvent::SetTimestamp}
|
||||
|
||||
\func{void}{SetTimestamp}{\param{long }{timeStamp}}
|
||||
|
||||
Sets the timestamp for the event.
|
||||
|
||||
Sets the originating object.
|
||||
|
||||
\membersection{wxEvent::Skip}\label{wxeventskip}
|
||||
|
||||
\func{void}{Skip}{\param{bool}{ skip = TRUE}}
|
||||
|
||||
Called by an event handler to tell the event system that the
|
||||
event handler should be skipped, and the next valid handler used
|
||||
instead.
|
||||
|
269
docs/latex/wx/evthand.tex
Normal file
@ -0,0 +1,269 @@
|
||||
\section{\class{wxEvtHandler}}\label{wxevthandler}
|
||||
|
||||
A class that can handle events from the windowing system.
|
||||
wxWindow (and therefore all window classes) are derived from
|
||||
this class.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\overview{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxEvtHandler::wxEvtHandler}
|
||||
|
||||
\func{}{wxEvtHandler}{\void}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxEvtHandler::\destruct{wxEvtHandler}}
|
||||
|
||||
\func{}{\destruct{wxEvtHandler}}{\void}
|
||||
|
||||
Destructor. If the handler is part of a chain, the destructor will
|
||||
unlink itself and restore the previous and next handlers so that they point to
|
||||
each other.
|
||||
|
||||
\membersection{wxEvtHandler::Default}\label{wxevthandlerdefault}
|
||||
|
||||
\func{virtual long}{Default}{\void}
|
||||
|
||||
Invokes default processing if this event handler is a window.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
System dependent.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
A generic way of delegating processing to the default system behaviour. It calls a platform-dependent
|
||||
default function, with parameters dependent on the event or message parameters
|
||||
originally sent from the windowing system.
|
||||
|
||||
Normally the application should call a base member, such as \helpref{wxWindow::OnChar}{wxwindowonchar}, which itself
|
||||
may call {\bf Default}.
|
||||
|
||||
\membersection{wxEvtHandler::GetClientData}\label{wxevthandlergetclientdata}
|
||||
|
||||
\func{char* }{GetClientData}{\void}
|
||||
|
||||
Gets user-supplied client data.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Normally, any extra data the programmer wishes to associate with the object
|
||||
should be made available by deriving a new class
|
||||
with new data members.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxEvtHandler::SetClientData}{wxevthandlersetclientdata}
|
||||
|
||||
\membersection{wxEvtHandler::GetEvtHandlerEnabled}\label{wxevthandlergetevthandlerenabled}
|
||||
|
||||
\func{bool}{GetEvtHandlerEnabled}{\void}
|
||||
|
||||
Returns TRUE if the event handler is enabled, FALSE otherwise.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxEvtHandler::SetEvtHandlerEnabled}{wxevthandlersetevthandlerenabled}
|
||||
|
||||
\membersection{wxEvtHandler::GetNextHandler}\label{wxevthandlergetnexthandler}
|
||||
|
||||
\func{wxEvtHandler*}{GetNextHandler}{\void}
|
||||
|
||||
Gets the pointer to the next handler in the chain.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp
|
||||
\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp
|
||||
\helpref{wxEvtHandler::SetNextHandler}{wxevthandlersetnexthandler},\rtfsp
|
||||
\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
|
||||
\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler}
|
||||
|
||||
\membersection{wxEvtHandler::GetPreviousHandler}\label{wxevthandlergetprevioushandler}
|
||||
|
||||
\func{wxEvtHandler*}{GetPreviousHandler}{\void}
|
||||
|
||||
Gets the pointer to the previous handler in the chain.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp
|
||||
\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp
|
||||
\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp
|
||||
\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
|
||||
\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler}
|
||||
|
||||
\membersection{wxEvtHandler::ProcessEvent}\label{wxevthandlerprocessevent}
|
||||
|
||||
\func{virtual bool}{ProcessEvent}{\param{wxEvent\& }{event}}
|
||||
|
||||
Processes an event, searching event tables and calling zero or more suitable event handler function(s).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{event}{Event to process.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if a suitable event handler function was found and executed, and the function did not
|
||||
call \helpref{wxEvent::Skip}{wxeventskip}.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Normally, your application would not call this function: it is called in the wxWindows
|
||||
implementation to dispatch incoming user interface events to the framework (and application).
|
||||
|
||||
However, you might need to call it if implementing new functionality (such as a new control) where
|
||||
you define new event types, as opposed to allowing the user to override virtual functions.
|
||||
|
||||
An instance where you might actually override the {\bf ProcessEvent} function is where you want
|
||||
to direct event processing to event handlers not normally noticed by wxWindows. For example,
|
||||
in the document/view architecture, documents and views are potential event handlers.
|
||||
When an event reaches a frame, {\bf ProcessEvent} will need to be called on the associated
|
||||
document and view in case event handler functions are associated with these objects.
|
||||
The property classes library (wxProperty) also overrides {\bf ProcessEvent} for similar reasons.
|
||||
|
||||
The normal order of event table searching is as follows:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item If the object is disabled (via a call to \helpref{wxEvtHandler::SetEvtHandlerEnabled}{wxevthandlersetevthandlerenabled})
|
||||
the function skips to step (6).
|
||||
\item If the object is a wxWindow, {\bf ProcessEvent} is recursively called on the window's\rtfsp
|
||||
\helpref{wxValidator}{wxvalidator}. If this returns TRUE, the function exits.
|
||||
\item {\bf SearchEventTable} is called for this event handler. If this fails, the base
|
||||
class table is tried, and so on until no more tables exist or an appropriate function was found,
|
||||
in which case the function exits.
|
||||
\item The search is applied down the entire chain of event handlers (usually the chain has a length
|
||||
of one). If this succeeds, the function exits.
|
||||
\item If the object is a wxWindow and the event is a wxCommandEvent, {\bf ProcessEvent} is
|
||||
recursively applied to the parent window's event handler. If this returns TRUE, the function exits.
|
||||
\item Finally, {\bf ProcessEvent} is called on the wxApp object.
|
||||
\end{enumerate}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxEvtHandler::SearchEventTable}{wxevthandlersearcheventtable}
|
||||
|
||||
\membersection{wxEvtHandler::SearchEventTable}\label{wxevthandlersearcheventtable}
|
||||
|
||||
\func{bool}{SearchEventTable}{\param{wxEventTable\& }{table}, \param{wxEvent\& }{event}}
|
||||
|
||||
Searches the event table, executing an event handler function if an appropriate one
|
||||
is found.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{table}{Event table to be searched.}
|
||||
|
||||
\docparam{event}{Event to be matched against an event table entry.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if a suitable event handler function was found and executed, and the function did not
|
||||
call \helpref{wxEvent::Skip}{wxeventskip}.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This function looks through the object's event table and tries to find an entry
|
||||
that will match the event.
|
||||
|
||||
An entry will match if:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item The event type matches, and
|
||||
\item the identifier or identifier range matches, or the event table entry's identifier is zero.
|
||||
\end{enumerate}
|
||||
|
||||
If a suitable function is called but calls \helpref{wxEvent::Skip}{wxeventskip}, this function will
|
||||
fail, and searching will continue.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent}
|
||||
|
||||
\membersection{wxEvtHandler::SetClientData}\label{wxevthandlersetclientdata}
|
||||
|
||||
\func{void}{SetClientData}{\param{char* }{data}}
|
||||
|
||||
Sets user-supplied client data.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{data}{Data to be associated with the event handler.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Normally, any extra data the programmer wishes
|
||||
to associate with the object should be made available by deriving a new class
|
||||
with new data members.
|
||||
|
||||
TODO: make this void*, char* only in compatibility mode.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxEvtHandler::GetClientData}{wxevthandlergetclientdata}
|
||||
|
||||
\membersection{wxEvtHandler::SetEvtHandlerEnabled}\label{wxevthandlersetevthandlerenabled}
|
||||
|
||||
\func{void}{SetEvtHandlerEnabled}{\param{bool }{enabled}}
|
||||
|
||||
Enables or disables the event handler.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{enabled}{TRUE if the event handler is to be enabled, FALSE if it is to be disabled.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
You can use this function to avoid having to remove the event handler from the chain, for example
|
||||
when implementing a dialog editor and changing from edit to test mode.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxEvtHandler::GetEvtHandlerEnabled}{wxevthandlergetevthandlerenabled}
|
||||
|
||||
\membersection{wxEvtHandler::SetNextHandler}\label{wxevthandlersetnexthandler}
|
||||
|
||||
\func{void}{SetNextHandler}{\param{wxEvtHandler* }{handler}}
|
||||
|
||||
Sets the pointer to the next handler.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{handler}{Event handler to be set as the next handler.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxEvtHandler::GetNextHandler}{wxevthandlergetnexthandler},\rtfsp
|
||||
\helpref{wxEvtHandler::SetPreviousHandler}{wxevthandlersetprevioushandler},\rtfsp
|
||||
\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp
|
||||
\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
|
||||
\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler}
|
||||
|
||||
\membersection{wxEvtHandler::SetPreviousHandler}\label{wxevthandlersetprevioushandler}
|
||||
|
||||
\func{void}{SetPreviousHandler}{\param{wxEvtHandler* }{handler}}
|
||||
|
||||
Sets the pointer to the previous handler.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{handler}{Event handler to be set as the previous handler.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxEvtHandler::GetPreviousHandler}{wxevthandlergetprevioushandler},\rtfsp
|
||||
\helpref{wxEvtHandler::SetNextHandler}{wxevthandlersetnexthandler},\rtfsp
|
||||
\helpref{wxEvtHandler::GetNextHandler}{wxevthandlergetnexthandler},\rtfsp
|
||||
\helpref{wxWindow::PushEventHandler}{wxwindowpusheventhandler},\rtfsp
|
||||
\helpref{wxWindow::PopEventHandler}{wxwindowpopeventhandler}
|
||||
|
||||
|
505
docs/latex/wx/expr.tex
Normal file
@ -0,0 +1,505 @@
|
||||
\section{\class{wxExpr}}\label{wxexpr}
|
||||
|
||||
The {\bf wxExpr} class is the building brick of expressions similar to Prolog
|
||||
clauses, or objects. It can represent an expression of type long integer, float, string, word,
|
||||
or list, and lists can be nested.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
None
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxExpr overview}{exproverview}, \helpref{wxExprDatabase}{wxexprdatabase}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxExpr::wxExpr}\label{wxexprconstr}
|
||||
|
||||
\func{}{wxExpr}{\param{const wxString\&}{functor}}
|
||||
|
||||
Construct a new clause with this form, supplying the functor name. A clause is an object
|
||||
that will appear in the data file, with a list of attribute/value pairs.
|
||||
|
||||
\func{}{wxExpr}{\param{wxExprType}{ type}, \param{const wxString\&}{ wordOrString = ``"}}
|
||||
|
||||
Construct a new empty list, or a word (will be output with no quotes), or a string, depending on the
|
||||
value of {\it type}.
|
||||
|
||||
{\it type} can be {\bf wxExprList}, {\bf wxExprWord}, or {\bf wxExprString}. If {\it type} is wxExprList,
|
||||
the value of {\it wordOrString} will be ignored.
|
||||
|
||||
\func{}{wxExpr}{\param{long}{ value}}
|
||||
|
||||
Construct an integer expression.
|
||||
|
||||
\func{}{wxExpr}{\param{float}{ value}}
|
||||
|
||||
Construct a floating point expression.
|
||||
|
||||
\func{}{wxExpr}{\param{wxList* }{value}}
|
||||
|
||||
Construct a list expression. The list's nodes' data should
|
||||
themselves be {\bf wxExpr}s.
|
||||
|
||||
The current version of this library no longer uses the {\bf wxList}
|
||||
internally, so this constructor turns the list into its internal
|
||||
format (assuming a non-nested list) and then deletes the supplied
|
||||
list.
|
||||
|
||||
\membersection{wxExpr::\destruct{wxExpr}}
|
||||
|
||||
\func{}{\destruct{wxExpr}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxExpr::AddAttributeValue}\label{wxexpraddattributevalue}
|
||||
|
||||
Use these on clauses ONLY. Note that the functions for adding strings
|
||||
and words must be differentiated by function name which is why
|
||||
they are missing from this group (see \helpref{wxExpr::AddAttributeValueString}{wxexpraddattributevaluestring} and
|
||||
\rtfsp\helpref{wxExpr::AddAttributeValueWord}{wxexpraddattributevalueword}).
|
||||
|
||||
\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{float }{value}}
|
||||
|
||||
Adds an attribute and floating point value pair to the clause.
|
||||
|
||||
\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{long }{value}}
|
||||
|
||||
Adds an attribute and long integer value pair to the clause.
|
||||
|
||||
\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxList* }{value}}
|
||||
|
||||
Adds an attribute and list value pair to the clause, converting the list into
|
||||
internal form and then deleting {\bf value}. Note that the list should not contain
|
||||
nested lists (except if in internal {\bf wxExpr} form.)
|
||||
|
||||
\func{void}{AddAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxExpr* }{value}}
|
||||
|
||||
Adds an attribute and wxExpr value pair to the clause. Do not delete\rtfsp
|
||||
{\it value} once this function has been called.
|
||||
|
||||
\membersection{wxExpr::AddAttributeValueString}\label{wxexpraddattributevaluestring}
|
||||
|
||||
\func{void}{AddAttributeValueString}{\param{const wxString\&}{ attribute}, \param{const wxString\&}{ value}}
|
||||
|
||||
Adds an attribute and string value pair to the clause.
|
||||
|
||||
\membersection{wxExpr::AddAttributeValueStringList}\label{wxexpraddattributevaluestringlist}
|
||||
|
||||
\func{void}{AddAttributeValueStringList}{\param{const wxString\&}{ attribute}, \param{wxList* }{value}}
|
||||
|
||||
Adds an attribute and string list value pair to the clause.
|
||||
|
||||
Note that the list passed to this function is a list of strings, NOT a list
|
||||
of {\bf wxExpr}s; it gets turned into a list of {\bf wxExpr}s
|
||||
automatically. This is a convenience function, since lists of strings
|
||||
are often manipulated in C++.
|
||||
|
||||
\membersection{wxExpr::AddAttributeValueWord}\label{wxexpraddattributevalueword}
|
||||
|
||||
\func{void}{AddAttributeValueWord}{\param{const wxString\&}{ attribute}, \param{const wxString\&}{ value}}
|
||||
|
||||
Adds an attribute and word value pair to the clause.
|
||||
|
||||
\membersection{wxExpr::Append}\label{wxexprappend}
|
||||
|
||||
\func{void}{Append}{\param{wxExpr*}{ value}}
|
||||
|
||||
Append the {\bf value} to the end of the list. `this' must be a list.
|
||||
|
||||
\membersection{wxExpr::Arg}\label{wxexprarg}
|
||||
|
||||
\constfunc{wxExpr* }{Arg}{\param{wxExprType}{ type}, \param{int}{ n}}
|
||||
|
||||
Get nth arg of the given clause (starting from 1). NULL is returned if
|
||||
the expression is not a clause, or {\it n} is invalid, or the given type
|
||||
does not match the actual type. See also \helpref{wxExpr::Nth}{wxexprnth}.
|
||||
|
||||
\membersection{wxExpr::Insert}\label{wxexprinsert}
|
||||
|
||||
\func{void}{Insert}{\param{wxExpr* }{value}}
|
||||
|
||||
Insert the {\bf value} at the start of the list. `this' must be a list.
|
||||
|
||||
\membersection{wxExpr::GetAttributeValue}\label{wxexprgetattributevalue}
|
||||
|
||||
These functions are the easiest way to retrieve attribute values, by
|
||||
passing a pointer to variable. If the attribute is present, the
|
||||
variable will be filled with the appropriate value. If not, the
|
||||
existing value is left alone. This style of retrieving attributes
|
||||
makes it easy to set variables to default values before calling these
|
||||
functions; no code is necessary to check whether the attribute is
|
||||
present or not.
|
||||
|
||||
\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxString\&}{ value}}
|
||||
|
||||
Retrieve a string (or word) value.
|
||||
|
||||
\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{float\& }{value}}
|
||||
|
||||
Retrieve a floating point value.
|
||||
|
||||
\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{int\& }{value}}
|
||||
|
||||
Retrieve an integer value.
|
||||
|
||||
\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{long\& }{value}}
|
||||
|
||||
Retrieve a long integer value.
|
||||
|
||||
\constfunc{bool}{GetAttributeValue}{\param{const wxString\&}{ attribute}, \param{wxExpr**}{ value}}
|
||||
|
||||
Retrieve a wxExpr pointer.
|
||||
|
||||
\membersection{wxExpr::GetAttributeValueStringList}\label{wxexprgetattributestringlist}
|
||||
|
||||
\constfunc{void}{GetAttributeValueStringList}{\param{const wxString\&}{attribute}, \param{wxList* }{value}}
|
||||
|
||||
Use this on clauses ONLY. See above for comments on this style of
|
||||
attribute value retrieval. This function expects to receive a pointer to
|
||||
a new list (created by the calling application); it will append strings
|
||||
to the list if the attribute is present in the clause.
|
||||
|
||||
\membersection{wxExpr::AttributeValue}\label{wxexprattributevalue}
|
||||
|
||||
\constfunc{wxExpr*}{AttributeValue}{\param{const wxString\&}{ word}}
|
||||
|
||||
Use this on clauses ONLY. Searches the clause for an attribute
|
||||
matching {\it word}, and returns the value associated with it.
|
||||
|
||||
\membersection{wxExpr::Copy}\label{wxexprcopy}
|
||||
|
||||
\constfunc{wxExpr*}{Copy}{\void}
|
||||
|
||||
Recursively copies the expression, allocating new storage space.
|
||||
|
||||
\membersection{wxExpr::DeleteAttributeValue}\label{wxexprdeletattributevalue}
|
||||
|
||||
\func{void}{DeleteAttributeValue}{\param{const wxString\&}{ attribute}}
|
||||
|
||||
Use this on clauses only. Deletes the attribute and its value (if any) from the
|
||||
clause.
|
||||
|
||||
\membersection{wxExpr::Functor}\label{wxexprfunctor}
|
||||
|
||||
\constfunc{wxString}{Functor}{\void}
|
||||
|
||||
Use this on clauses only. Returns the clause's functor (object name).
|
||||
|
||||
\membersection{wxExpr::GetClientData}\label{wxexprgetclientdata}
|
||||
|
||||
\constfunc{wxObject*}{GetClientData}{\void}
|
||||
|
||||
Retrieve arbitrary data stored with this clause. This can be useful when
|
||||
reading in data for storing a pointer to the C++ object, so when another
|
||||
clause makes a reference to this clause, its C++ object can be retrieved.
|
||||
See \helpref{wxExpr::SetClientData}{wxexprsetclientdata}.
|
||||
|
||||
\membersection{wxExpr::GetFirst}\label{wxexprgetfirst}
|
||||
|
||||
\constfunc{wxExpr*}{GetFirst}{\void}
|
||||
|
||||
If this is a list expression (or clause), gets the first element in the list.
|
||||
|
||||
See also \helpref{wxExpr::GetLast}{wxexprgetlast}, \helpref{wxExpr::GetNext}{wxexprgetnext}, \helpref{wxExpr::Nth}{wxexprnth}.
|
||||
|
||||
\membersection{wxExpr::GetLast}\label{wxexprgetlast}
|
||||
|
||||
\constfunc{wxExpr*}{GetLast}{\void}
|
||||
|
||||
If this is a list expression (or clause), gets the last element in the list.
|
||||
|
||||
See also \helpref{wxExpr::GetFirst}{wxexprgetfirst}, \helpref{wxExpr::GetNext}{wxexprgetnext}, \helpref{wxExpr::Nth}{wxexprnth}.
|
||||
|
||||
\membersection{wxExpr::GetNext}\label{wxexprgetnext}
|
||||
|
||||
\constfunc{wxExpr*}{GetNext}{\void}
|
||||
|
||||
If this is a node in a list (any wxExpr may be a node in a list), gets the
|
||||
next element in the list.
|
||||
|
||||
See also \helpref{wxExpr::GetFirst}{wxexprgetfirst}, \helpref{wxExpr::GetLast}{wxexprgetlast}, \helpref{wxExpr::Nth}{wxexprnth}.
|
||||
|
||||
\membersection{wxExpr::IntegerValue}\label{wxexprintegervalue}
|
||||
|
||||
\constfunc{long}{IntegerValue}{\void}
|
||||
|
||||
Returns the integer value of the expression.
|
||||
|
||||
\membersection{wxExpr::Nth}\label{wxexprnth}
|
||||
|
||||
\constfunc{wxExpr*}{Nth}{\param{int}{ n}}
|
||||
|
||||
Get nth arg of the given list expression (starting from 0). NULL is returned if
|
||||
the expression is not a list expression, or {\it n} is invalid. See also \helpref{wxExpr::Arg}{wxexprarg}.
|
||||
|
||||
Normally, you would use attribute-value pairs to add and retrieve data
|
||||
from objects (clauses) in a data file. However, if the data gets complex,
|
||||
you may need to store attribute values as lists, and pick them apart
|
||||
yourself.
|
||||
|
||||
\membersection{wxExpr::RealValue}\label{wxexprrealvalue}
|
||||
|
||||
\constfunc{float}{RealValue}{\void}
|
||||
|
||||
Returns the floating point value of the expression.
|
||||
|
||||
\membersection{wxExpr::SetClientData}\label{wxexprsetclientdata}
|
||||
|
||||
\func{void}{SetClientData}{\param{wxObject *}{data}}
|
||||
|
||||
Associate arbitrary data with this clause. This can be useful when
|
||||
reading in data for storing a pointer to the C++ object, so when another
|
||||
clause makes a reference to this clause, its C++ object can be retrieved.
|
||||
See \helpref{wxExpr::GetClientData}{wxexprgetclientdata}.
|
||||
|
||||
\membersection{wxExpr::StringValue}\label{wxexprstringvalue}
|
||||
|
||||
\constfunc{wxString}{StringValue}{\void}
|
||||
|
||||
Returns the string value of the expression.
|
||||
|
||||
\membersection{wxExpr::Type}\label{wxexprtype}
|
||||
|
||||
\constfunc{wxExprType}{Type}{\void}
|
||||
|
||||
Returns the type of the expression. {\bf wxExprType} is defined as follows:
|
||||
|
||||
\begin{verbatim}
|
||||
typedef enum {
|
||||
wxExprNull,
|
||||
wxExprInteger,
|
||||
wxExprReal,
|
||||
wxExprWord,
|
||||
wxExprString,
|
||||
wxExprList
|
||||
} wxExprType;
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxExpr::WordValue}\label{wxexprwordvalue}
|
||||
|
||||
\constfunc{wxString}{WordValue}{\void}
|
||||
|
||||
Returns the word value of the expression.
|
||||
|
||||
\membersection{wxExpr::WriteLispExpr}\label{wxexprwritelistexpr}
|
||||
|
||||
\func{void}{WriteLispExpr}{\param{ostream\&}{ stream}}
|
||||
|
||||
Writes the expression or clause to the given stream in LISP format.
|
||||
Not normally needed, since the whole {\bf wxExprDatabase} will usually
|
||||
be written at once. Lists are enclosed in parentheses will no commas.
|
||||
|
||||
\membersection{wxExpr::WritePrologClause}\label{wxexprwriteprologclause}
|
||||
|
||||
\func{void}{WritePrologClause}{\param{ostream\&}{ stream}}
|
||||
|
||||
Writes the clause to the given stream in Prolog format. Not normally needed, since
|
||||
the whole {\bf wxExprDatabase} will usually be written at once. The format is:
|
||||
functor, open parenthesis, list of comma-separated expressions, close parenthesis,
|
||||
full stop.
|
||||
|
||||
\membersection{wxExpr::WriteExpr}\label{wxexprwriteexpr}
|
||||
|
||||
\func{void}{WriteExpr}{\param{ostream\&}{ stream}}
|
||||
|
||||
Writes the expression (not clause) to the given stream in Prolog
|
||||
format. Not normally needed, since the whole {\bf wxExprDatabase} will
|
||||
usually be written at once. Lists are written in square bracketed,
|
||||
comma-delimited format.
|
||||
|
||||
\membersection{Functions and macros}
|
||||
|
||||
Below are miscellaneous functions and macros associated with wxExpr objects.
|
||||
|
||||
\func{bool}{wxExprIsFunctor}{\param{wxExpr *}{expr}, \param{const wxString\&}{ functor}}
|
||||
|
||||
Checks that the functor of {\it expr} is {\it functor}.
|
||||
|
||||
\func{void}{wxExprCleanUp}{\void}
|
||||
|
||||
Cleans up the wxExpr system (YACC/LEX buffers) to avoid memory-checking warnings as the program exits.
|
||||
|
||||
\begin{verbatim}
|
||||
#define wxMakeInteger(x) (new wxExpr((long)x))
|
||||
#define wxMakeReal(x) (new wxExpr((float)x))
|
||||
#define wxMakeString(x) (new wxExpr(PrologString, x))
|
||||
#define wxMakeWord(x) (new wxExpr(PrologWord, x))
|
||||
#define wxMake(x) (new wxExpr(x))
|
||||
\end{verbatim}
|
||||
|
||||
Macros to help make wxExpr objects.
|
||||
|
||||
\section{\class{wxExprDatabase}}\label{wxexprdatabase}
|
||||
|
||||
The {\bf wxExprDatabase} class represents a database, or list,
|
||||
of Prolog-like expressions. Instances of this class are used for reading,
|
||||
writing and creating data files.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxList}{wxlist}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxExpr overview}{exproverview}, \helpref{wxExpr}{wxexpr}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxExprDatabase::wxExprDatabase}\label{wxexprdatabaseconstr}
|
||||
|
||||
\func{void}{wxExprDatabase}{\param{proioErrorHandler}{ handler = 0}}
|
||||
|
||||
Construct a new, unhashed database, with an optional error handler. The
|
||||
error handler must be a function returning a bool and taking an integer and a string
|
||||
argument. When an error occurs when reading or writing a database, this function is
|
||||
called. The error is given as the first argument (currently one of WXEXPR\_ERROR\_GENERAL,
|
||||
WXEXPR\_ERROR\_SYNTAX) and an error message is given as the second argument. If FALSE
|
||||
is returned by the error handler, processing of the wxExpr operation stops.
|
||||
|
||||
Another way of handling errors is simply to call \helpref{wxExprDatabase::GetErrorCount}{wxexprdatabasegeterrorcount} after
|
||||
the operation, to check whether errors have occurred, instead of installing an error handler.
|
||||
If the error count is more than zero, \helpref{wxExprDatabase::Write}{wxexprdatabasewrite} and
|
||||
\rtfsp\helpref{wxExprDatabase::Read}{wxexprdatabaseread} will return FALSE to
|
||||
the application.
|
||||
|
||||
For example:
|
||||
|
||||
\begin{verbatim}
|
||||
bool myErrorHandler(int err, chat *msg)
|
||||
{
|
||||
if (err == WXEXPR_ERROR_SYNTAX)
|
||||
{
|
||||
wxMessageBox(msg, "Syntax error");
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wxExprDatabase database(myErrorHandler);
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\func{}{wxExprDatabase}{\param{wxExprType}{ type}, \param{const wxString\&}{attribute},
|
||||
\rtfsp\param{int}{ size = 500}, \param{proioErrorHandler}{ handler = 0}}
|
||||
|
||||
Construct a new database hashed on a combination of the clause functor and
|
||||
a named attribute (often an integer identification).
|
||||
|
||||
See above for an explanation of the error handler.
|
||||
|
||||
\membersection{wxExprDatabase::\destruct{wxExprDatabase}}
|
||||
|
||||
\func{}{\destruct{wxExprDatabase}}{\void}
|
||||
|
||||
Delete the database and contents.
|
||||
|
||||
\membersection{wxExprDatabase::Append}\label{wxexprdatabaseappend}
|
||||
|
||||
\func{void}{Append}{\param{wxExpr* }{clause}}
|
||||
|
||||
Append a clause to the end of the database. If the database is hashing,
|
||||
the functor and a user-specified attribute will be hashed upon, giving the
|
||||
option of random access in addition to linear traversal of the database.
|
||||
|
||||
\membersection{wxExprDatabase::BeginFind}\label{wxexprdatabasebeginfind}
|
||||
|
||||
\func{void}{BeginFind}{\void}
|
||||
|
||||
Reset the current position to the start of the database. Subsequent
|
||||
\rtfsp\helpref{wxExprDatabase::FindClause}{wxexprdatabasefindclause} calls will move the pointer.
|
||||
|
||||
\membersection{wxExprDatabase::ClearDatabase}\label{wxexprdatabasecleardatabase}
|
||||
|
||||
\func{void}{ClearDatabase}{\void}
|
||||
|
||||
Clears the contents of the database.
|
||||
|
||||
\membersection{wxExprDatabase::FindClause}\label{wxexprdatabasefindclause}
|
||||
|
||||
Various ways of retrieving clauses from the database. A return
|
||||
value of NULL indicates no (more) clauses matching the given criteria.
|
||||
Calling the functions repeatedly retrieves more matching clauses, if any.
|
||||
|
||||
\func{wxExpr* }{FindClause}{\param{long}{ id}}
|
||||
|
||||
Find a clause based on the special ``id'' attribute.
|
||||
|
||||
\func{wxExpr* }{FindClause}{\param{const wxString\&}{ attribute}, \param{const wxString\&}{ value}}
|
||||
|
||||
Find a clause which has the given attribute set to the given string or word value.
|
||||
|
||||
\func{wxExpr*}{FindClause}{\param{const wxString\&}{ attribute}, \param{long}{ value}}
|
||||
|
||||
Find a clause which has the given attribute set to the given integer value.
|
||||
|
||||
\func{wxExpr*}{FindClause}{\param{const wxString\&}{ attribute}, \param{float}{ value}}
|
||||
|
||||
Find a clause which has the given attribute set to the given floating point value.
|
||||
|
||||
\membersection{wxExprDatabase::FindClauseByFunctor}\label{wxexprdatabasefindclausebyfunctor}
|
||||
|
||||
\func{wxExpr*}{FindClauseByFunctor}{\param{const wxString\&}{ functor}}
|
||||
|
||||
Find the next clause with the specified functor.
|
||||
|
||||
\membersection{wxExprDatabase::GetErrorCount}\label{wxexprdatabasegeterrorcount}
|
||||
|
||||
\constfunc{int}{GetErrorCount}{\void}
|
||||
|
||||
Returns the number of errors encountered during the last read or write operation.
|
||||
|
||||
\membersection{wxExprDatabase::HashFind}\label{wxexprdatabasehashfind}
|
||||
|
||||
\constfunc{wxExpr*}{HashFind}{\param{const wxString\&}{ functor}, \param{long}{ value}}
|
||||
|
||||
Finds the clause with the given functor and with the attribute specified
|
||||
in the database constructor having the given integer value.
|
||||
|
||||
For example,
|
||||
|
||||
\begin{verbatim}
|
||||
// Hash on a combination of functor and integer "id" attribute when reading in
|
||||
wxExprDatabase db(wxExprInteger, "id");
|
||||
|
||||
// Read it in
|
||||
db.ReadProlog("data");
|
||||
|
||||
// Retrieve a clause with specified functor and id
|
||||
wxExpr *clause = db.HashFind("node", 24);
|
||||
\end{verbatim}
|
||||
|
||||
This would retrieve a clause which is written: {\tt node(id = 24, ..., )}.
|
||||
|
||||
\func{wxExpr*}{HashFind}{\param{const wxString\&}{ functor}, \param{const wxString\&}{ value}}
|
||||
|
||||
Finds the clause with the given functor and with the attribute specified
|
||||
in the database constructor having the given string value.
|
||||
|
||||
\membersection{wxExprDatabase::Read}\label{wxexprdatabaseread}
|
||||
|
||||
\func{bool}{Read}{\param{const wxString\&}{ filename}}
|
||||
|
||||
Reads in the given file, returning TRUE if successful.
|
||||
|
||||
\membersection{wxExprDatabase::ReadFromString}\label{wxexprdatabasereadfromstring}
|
||||
|
||||
\func{bool}{ReadFromString}{\param{const wxString\&}{ buffer}}
|
||||
|
||||
Reads a Prolog database from the given string buffer, returning TRUE if
|
||||
successful.
|
||||
|
||||
\membersection{wxExprDatabase::WriteLisp}\label{wxexprdatabasewritelisp}
|
||||
|
||||
\func{bool}{WriteLisp}{\param{ostream\& }{stream}}
|
||||
|
||||
Writes the database as a LISP-format file.
|
||||
|
||||
\membersection{wxExprDatabase::Write}\label{wxexprdatabasewrite}
|
||||
|
||||
\func{bool}{Write}{\param{ostream\& }{stream}}
|
||||
|
||||
Writes the database as a Prolog-format file.
|
||||
|
||||
|
169
docs/latex/wx/file.tex
Normal file
@ -0,0 +1,169 @@
|
||||
\section{\class{wxFile}}\label{wxfile}
|
||||
|
||||
A wxFile performs raw file I/O. Note that wxFile::Flush is not implemented on some Windows compilers
|
||||
due to a missing fsync function, which reduces the usefulness of this class.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
None.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxFile::wxFile}\label{wxfileconstr}
|
||||
|
||||
\func{}{wxFile}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxFile}{\param{const char*}{ filename}, \param{wxFile::OpenMode}{ mode = wxFile::read}}
|
||||
|
||||
Opens a file with the given mode.
|
||||
|
||||
\func{}{wxFile}{\param{int}{ fd}}
|
||||
|
||||
Opens a file with the given file descriptor, which has already been opened.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{filename}{The filename.}
|
||||
|
||||
\docparam{mode}{The mode in which to open the file. May be one of {\bf wxFile::read}, {\bf wxFile::write} and {\bf wxFile::read\_write}.}
|
||||
|
||||
\docparam{fd}{An existing file descriptor.}
|
||||
|
||||
\membersection{wxFile::\destruct{wxFile}}
|
||||
|
||||
\func{}{\destruct{wxFile}}{\void}
|
||||
|
||||
Destructor. This is not virtual, for efficiency.
|
||||
|
||||
\membersection{wxFile::Attach}\label{wxfileattach}
|
||||
|
||||
\func{void}{Attach}{\param{int}{ fd}}
|
||||
|
||||
Attaches an existing file descriptor to the wxFile object.
|
||||
|
||||
\membersection{wxFile::Close}\label{wxfileclose}
|
||||
|
||||
\func{void}{Close}{\void}
|
||||
|
||||
Closes the file.
|
||||
|
||||
\membersection{wxFile::Create}\label{wxfilecreate}
|
||||
|
||||
\func{bool}{Create}{\param{const char*}{ filename}, \param{bool}{ overwrite = FALSE}}
|
||||
|
||||
Creates a file for writing. If the file already exists, setting {\bf overwrite} to TRUE
|
||||
will ensure it is overwritten.
|
||||
|
||||
\membersection{wxFile::Eof}\label{wxfileeof}
|
||||
|
||||
\constfunc{bool}{Eof}{\void}
|
||||
|
||||
Returns TRUE if the end of the file has been reached.
|
||||
|
||||
\membersection{wxFile::Exists}\label{wxfileexists}
|
||||
|
||||
\func{static bool}{Exists}{\param{const char*}{ filename}}
|
||||
|
||||
Returns TRUE if the file exists.
|
||||
|
||||
\membersection{wxFile::Flush}\label{wxfileflush}
|
||||
|
||||
\func{bool}{Flush}{\void}
|
||||
|
||||
Flushes the file descriptor. Not implemented for some Windows compilers.
|
||||
|
||||
\membersection{wxFile::IsOpened}\label{wxfileisopened}
|
||||
|
||||
\constfunc{bool}{IsOpened}{\void}
|
||||
|
||||
Returns TRUE if the file has been opened.
|
||||
|
||||
\membersection{wxFile::Length}\label{wxfilelength}
|
||||
|
||||
\constfunc{off\_t}{Length}{\void}
|
||||
|
||||
Returns the length of the file.
|
||||
|
||||
\membersection{wxFile::Open}\label{wxfileopen}
|
||||
|
||||
\func{bool}{Open}{\param{const char*}{ filename}, \param{wxFile::OpenMode}{ mode = wxFile::read}}
|
||||
|
||||
Opens the file, returning TRUE if successful.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{filename}{The filename.}
|
||||
|
||||
\docparam{mode}{The mode in which to open the file. May be one of {\bf wxFile::read}, {\bf wxFile::write} and {\bf wxFile::read\_write}.}
|
||||
|
||||
\membersection{wxFile::Read}\label{wxfileread}
|
||||
|
||||
\func{off\_t}{Read}{\param{void*}{ buffer}, \param{off\_t}{ count}}
|
||||
|
||||
Reads the specified number of bytes into a buffer, returning the actual number read.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{buffer}{A buffer to receive the data.}
|
||||
|
||||
\docparam{count}{The number of bytes to read.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The number of bytes read, or the symbol {\bf ofsInvalid} (-1) if there was an error.
|
||||
|
||||
\membersection{wxFile::Seek}\label{wxfileseek}
|
||||
|
||||
\func{off\_t}{Seek}{\param{off\_t }{ofs}, \param{wxFile::SeekMode }{mode = wxFile::FromStart}}
|
||||
|
||||
Seeks to the specified position.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{ofs}{Offset to seek to.}
|
||||
|
||||
\docparam{mode}{One of {\bf wxFile::FromStart}, {\bf wxFile::FromEnd}, {\bf wxFile::FromCurrent}.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The actual offset position achieved, or ofsInvalid on failure.
|
||||
|
||||
\membersection{wxFile::SeekEnd}\label{wxfileseekend}
|
||||
|
||||
\func{off\_t}{SeekEnd}{\param{off\_t }{ofs = 0}}
|
||||
|
||||
Moves the file pointer to the specified number of bytes before the end of the file.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{ofs}{Number of bytes before the end of the file.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The actual offset position achieved, or ofsInvalid on failure.
|
||||
|
||||
\membersection{wxFile::Tell}\label{wxfiletell}
|
||||
|
||||
\constfunc{off\_t}{Tell}{\void}
|
||||
|
||||
Returns the current position.
|
||||
|
||||
\membersection{wxFile::Write}\label{wxfilewrite}
|
||||
|
||||
\func{bool}{Write}{\param{const void*}{ buffer}, \param{off\_t}{ count}}
|
||||
|
||||
Writes the specified number of bytes from a buffer.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{buffer}{A buffer containing the data.}
|
||||
|
||||
\docparam{count}{The number of bytes to write.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the operation was successful.
|
||||
|
||||
|
179
docs/latex/wx/filedlg.tex
Normal file
@ -0,0 +1,179 @@
|
||||
\section{\class{wxFileDialog}}\label{wxfiledialog}
|
||||
|
||||
This class represents the file chooser dialog.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxDialog}{wxdialog}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFileDialog overview}{wxfiledialogoverview}, \helpref{wxFileSelector}{wxfileselector}
|
||||
%\rtfsp\helpref{wxFileSelectorEx}{wxfileselectorex}
|
||||
%\helpref{wxLoadFileSelector}{wxloadfileselector},\rtfsp
|
||||
%\helpref{wxSaveFileSelector}{wxsavefileselector}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Pops up a file selector box. In Windows, this is the common file selector
|
||||
dialog. In X, this is a file selector box with somewhat less functionality.
|
||||
The path and filename are distinct elements of a full file pathname.
|
||||
If path is ``", the current directory will be used. If filename is ``",
|
||||
no default filename will be supplied. The wildcard determines what files
|
||||
are displayed in the file selector, and file extension supplies a type
|
||||
extension for the required filename. Flags may be a combination of wxOPEN,
|
||||
wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, or 0. They are only significant
|
||||
at present in Windows.
|
||||
|
||||
Both the X and Windows versions implement a wildcard filter. Typing a
|
||||
filename containing wildcards (*, ?) in the filename text item, and
|
||||
clicking on Ok, will result in only those files matching the pattern being
|
||||
displayed. In the X version, supplying no default name will result in the
|
||||
wildcard filter being inserted in the filename text item; the filter is
|
||||
ignored if a default name is supplied.
|
||||
|
||||
Under Windows (only), the wildcard may be a specification for multiple
|
||||
types of file with a description for each, such as:
|
||||
|
||||
\begin{verbatim}
|
||||
"BMP files (*.bmp) | *.bmp | GIF files (*.gif) | *.gif"
|
||||
\end{verbatim}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxFileDialog::wxFileDialog}\label{wxfiledialogconstr}
|
||||
|
||||
\func{}{wxFileDialog}{\param{wxWindow* }{parent}, \param{const wxString\& }{message = "Choose a file"},\rtfsp
|
||||
\param{const wxString\& }{defaultDir = ""}, \param{const wxString\& }{defaultFile = ``"},\rtfsp
|
||||
\param{const wxString\& }{wildcard = ``*.*"}, \param{long }{style = 0}, \param{const wxPoint\& }{pos = wxDefaultPosition}}
|
||||
|
||||
Constructor. Use \helpref{wxFileDialog::ShowModal}{wxfiledialogshowmodal} to show the dialog.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{Parent window.}
|
||||
|
||||
\docparam{message}{Message to show on the dialog.}
|
||||
|
||||
\docparam{defaultDir}{The default directory, or the empty string.}
|
||||
|
||||
\docparam{defaultFile}{The default filename, or the empty string.}
|
||||
|
||||
\docparam{wildcard}{A wildcard, such as ``*.*".}
|
||||
|
||||
\docparam{style}{A dialog style. A bitlist of:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}
|
||||
\twocolitem{{\bf wxOPEN}}{This is an open dialog (Windows only).}
|
||||
\twocolitem{{\bf wxSAVE}}{This is a save dialog (Windows only).}
|
||||
\twocolitem{{\bf wxHIDE\_READONLY}}{Hide read-only files (Windows only).}
|
||||
\twocolitem{{\bf wxOVERWRITE\_PROMPT}}{Prompt for a conformation if a file will be overridden (Windows only).}
|
||||
\end{twocollist}%
|
||||
}
|
||||
|
||||
\docparam{pos}{Dialog position. Not implemented.}
|
||||
|
||||
\membersection{wxFileDialog::\destruct{wxFileDialog}}
|
||||
|
||||
\func{}{\destruct{wxFileDialog}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxFileDialog::GetDirectory}\label{wxfiledialoggetdirectory}
|
||||
|
||||
\constfunc{wxString}{GetDirectory}{\void}
|
||||
|
||||
Returns the default directory.
|
||||
|
||||
\membersection{wxFileDialog::GetFilename}\label{wxfiledialoggetfilename}
|
||||
|
||||
\constfunc{wxString}{GetFilename}{\void}
|
||||
|
||||
Returns the default filename.
|
||||
|
||||
\membersection{wxFileDialog::GetFilterIndex}\label{wxfiledialoggetfilterindex}
|
||||
|
||||
\constfunc{int}{GetFilterIndex}{\void}
|
||||
|
||||
Returns the index into the list of filters supplied, optionally, in the wildcard parameter.
|
||||
Before the dialog is shown, this is the index which will be used when the dialog is first displayed.
|
||||
After the dialog is shown, this is the index selected by the user.
|
||||
|
||||
\membersection{wxFileDialog::GetMessage}\label{wxfiledialoggetmessage}
|
||||
|
||||
\constfunc{wxString}{GetMessage}{\void}
|
||||
|
||||
Returns the message that will be displayed on the dialog.
|
||||
|
||||
\membersection{wxFileDialog::GetPath}\label{wxfiledialoggetpath}
|
||||
|
||||
\constfunc{wxString}{GetPath}{\void}
|
||||
|
||||
Returns the full path (directory and filename) of the selected file.
|
||||
|
||||
\membersection{wxFileDialog::GetStyle}\label{wxfiledialoggetstyle}
|
||||
|
||||
\constfunc{long}{GetStyle}{\void}
|
||||
|
||||
Returns the dialog style.
|
||||
|
||||
\membersection{wxFileDialog::GetWildcard}\label{wxfiledialoggetwildcard}
|
||||
|
||||
\constfunc{wxString}{GetWildcard}{\void}
|
||||
|
||||
Returns the file dialog wildcard.
|
||||
|
||||
\membersection{wxFileDialog::SetDirectory}\label{wxfiledialogsetdirectory}
|
||||
|
||||
\func{void}{SetDirectory}{\param{const wxString\& }{directory}}
|
||||
|
||||
Sets the default directory.
|
||||
|
||||
\membersection{wxFileDialog::SetFilename}\label{wxfiledialogsetfilename}
|
||||
|
||||
\func{void}{SetFilename}{\param{const wxString\& }{setfilename}}
|
||||
|
||||
Sets the default filename.
|
||||
|
||||
\membersection{wxFileDialog::SetFilterIndex}\label{wxfiledialogsetfilterindex}
|
||||
|
||||
\func{void}{SetFilterIndex}{\param{int }{filterIndex}}
|
||||
|
||||
Sets the default filter index, starting from zero. Windows only.
|
||||
|
||||
\membersection{wxFileDialog::SetMessage}\label{wxfiledialogsetmessage}
|
||||
|
||||
\func{void}{SetMessage}{\param{const wxString\& }{message}}
|
||||
|
||||
Sets the message that will be displayed on the dialog.
|
||||
|
||||
\membersection{wxFileDialog::SetPath}\label{wxfiledialogsetpath}
|
||||
|
||||
\func{void}{SetPath}{\param{const wxString\& }{path}}
|
||||
|
||||
Sets the path (the combined directory and filename that will be returned when the dialog is dismissed).
|
||||
|
||||
\membersection{wxFileDialog::SetStyle}\label{wxfiledialogsetstyle}
|
||||
|
||||
\func{void}{SetStyle}{\param{long }{style}}
|
||||
|
||||
Sets the dialog style. See \helpref{wxFileDialog::wxFileDialog}{wxfiledialogconstr} for details.
|
||||
|
||||
\membersection{wxFileDialog::SetWildcard}\label{wxfiledialogsetwildcard}
|
||||
|
||||
\func{void}{SetWildcard}{\param{const wxString\& }{wildCard}}
|
||||
|
||||
Sets the wildcard, which in Windows can contain multiple file types.
|
||||
|
||||
\membersection{wxFileDialog::ShowModal}\label{wxfiledialogshowmodal}
|
||||
|
||||
\func{int}{ShowModal}{\void}
|
||||
|
||||
Shows the dialog, returning wxID\_OK if the user pressed OK, and wxOK\_CANCEL
|
||||
otherwise.
|
||||
|
||||
|
93
docs/latex/wx/filehist.tex
Normal file
@ -0,0 +1,93 @@
|
||||
\section{\class{wxFileHistory}}\label{wxfilehistory}
|
||||
|
||||
The wxFileHistory encapsulates a user interface convenience, the
|
||||
list of most recently visited files as shown on a menu (usually the File menu).
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\overview{wxFileHistory overview}{wxfilehistoryoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxFileHistory::m\_fileHistory}
|
||||
|
||||
\member{char**}{m\_fileHistory}
|
||||
|
||||
A character array of strings corresponding to the most recently opened
|
||||
files.
|
||||
|
||||
\membersection{wxFileHistory::m\_fileHistoryN}
|
||||
|
||||
\member{int}{m\_fileHistoryN}
|
||||
|
||||
The number of files stored in the history array.
|
||||
|
||||
\membersection{wxFileHistory::m\_fileMaxFiles}
|
||||
|
||||
\member{int}{m\_fileMaxFiles}
|
||||
|
||||
The maximum number of files to be stored and displayed on the menu.
|
||||
|
||||
\membersection{wxFileHistory::m\_fileMenu}
|
||||
|
||||
\member{wxMenu*}{m\_fileMenu}
|
||||
|
||||
The file menu used to display the file history list (if enabled).
|
||||
|
||||
\membersection{wxFileHistory::wxFileHistory}
|
||||
|
||||
\func{}{wxFileHistory}{\param{int}{ maxFiles = 9}}
|
||||
|
||||
Constructor. Pass the maximum number of files that should be stored and displayed.
|
||||
|
||||
\membersection{wxFileHistory::\destruct{wxFileHistory}}
|
||||
|
||||
\func{}{\destruct{wxFileHistory}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxFileHistory::AddFileToHistory}
|
||||
|
||||
\func{void}{AddFileToHistory}{\param{const wxString\& }{filename}}
|
||||
|
||||
Adds a file to the file history list, if the object has a pointer to an appropriate file menu.
|
||||
|
||||
\membersection{wxFileHistory::FileHistoryLoad}
|
||||
|
||||
\func{void}{FileHistoryLoad}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}}
|
||||
|
||||
Loads the file history from a resource file, using the given section. This must be called
|
||||
explicitly by the application.
|
||||
|
||||
\membersection{wxFileHistory::FileHistorySave}
|
||||
|
||||
\func{void}{FileHistorySave}{\param{const wxString\& }{resourceFile}, \param{const wxString\& }{sectionName}}
|
||||
|
||||
Saves the file history into a resource file, using the given section. This must be called
|
||||
explicitly by the application.
|
||||
|
||||
\membersection{wxFileHistory::FileHistoryUseMenu}
|
||||
|
||||
\func{void}{FileHistoryUseMenu}{\param{wxMenu* }{menu}}
|
||||
|
||||
Use this menu for appending recently-visited document filenames, for convenient
|
||||
access. Calling this function with a valid menu pointer enables the history
|
||||
list functionality.
|
||||
|
||||
\membersection{wxFileHistory::GetMaxFiles}
|
||||
|
||||
\func{int}{GetMaxFiles}{\void}
|
||||
|
||||
Returns the maximum number of files that can be stored.
|
||||
|
||||
\membersection{wxFileHistory::GetNoHistoryFiles}
|
||||
|
||||
\func{int}{GetNoHistoryFiles}{\void}
|
||||
|
||||
Returns the number of files currently stored in the file history.
|
||||
|
||||
|
34
docs/latex/wx/focusevt.tex
Normal file
@ -0,0 +1,34 @@
|
||||
\section{\class{wxFocusEvent}}\label{wxfocusevent}
|
||||
|
||||
A focus event is sent when a window's focus changes.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvent}{wxevent}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Event table macros}
|
||||
|
||||
To process a focus event, use these event handler macros to direct input to a member
|
||||
function that takes a wxFocusEvent argument.
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_SET\_FOCUS(func)}}{Process a wxEVT\_SET\_FOCUS event.}
|
||||
\twocolitem{{\bf EVT\_KILL\_FOCUS(func)}}{Process a wxEVT\_KILL\_FOCUS event.}
|
||||
\end{twocollist}%
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::OnSetFocus}{wxwindowonsetfocus},\rtfsp
|
||||
\helpref{wxWindow::OnKillFocus}{wxwindowonkillfocus},\rtfsp
|
||||
\helpref{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxFocusEvent::wxFocusEvent}
|
||||
|
||||
\func{}{wxFocusEvent}{\param{WXTYPE }{eventType = 0}, \param{int }{id = 0}}
|
||||
|
||||
Constructor.
|
||||
|
277
docs/latex/wx/font.tex
Normal file
@ -0,0 +1,277 @@
|
||||
\section{\class{wxFont}}\label{wxfont}
|
||||
|
||||
A font is an object which determines the appearance of text. Fonts are
|
||||
used for drawing text to a device context, and setting the appearance of
|
||||
a window's text.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxGDIObject}{wxgdiobject}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont overview}{wxfontoverview}, \helpref{wxDC::SetFont}{wxdcsetfont},\rtfsp
|
||||
\helpref{wxDC::DrawText}{wxdcdrawtext}, \helpref{wxDC::GetTextExtent}{wxdcgettextextent},\rtfsp
|
||||
\helpref{wxFontDialog}{wxfontdialog}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxFont::wxFont}\label{wxfontconstr}
|
||||
|
||||
\func{}{wxFont}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxFont}{\param{const int}{ pointSize}, \param{const int}{ family}, \param{const int}{ style}, \param{const int}{ weight},
|
||||
\param{const bool}{ underline = FALSE}, \param{const wxString\& }{faceName = ""}}
|
||||
|
||||
Creates a font object.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{pointSize}{Size in points.}
|
||||
|
||||
\docparam{family}{Font family, a generic way of referring to fonts without specifying actual facename. One of:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxDEFAULT}}{Chooses a default font.}
|
||||
\twocolitem{{\bf wxDECORATIVE}}{A decorative font.}
|
||||
\twocolitem{{\bf wxROMAN}}{A formal, serif font.}
|
||||
\twocolitem{{\bf wxSCRIPT}}{A handwriting font.}
|
||||
\twocolitem{{\bf wxSWISS}}{A sans-serif font.}
|
||||
\twocolitem{{\bf wxMODERN}}{A fixed pitch font.}
|
||||
\end{twocollist}}
|
||||
|
||||
\docparam{style}{One of {\bf wxNORMAL}, {\bf wxSLANT} and {\bf wxITALIC}.}
|
||||
|
||||
\docparam{weight}{One of {\bf wxNORMAL}, {\bf wxLIGHT} and {\bf wxBOLD}.}
|
||||
|
||||
\docparam{underline}{The value can be TRUE or FALSE. At present this has an effect on Windows only.}
|
||||
|
||||
\docparam{faceName}{An optional string specifying the actual typeface to be used. If the empty string,
|
||||
a default typeface will chosen based on the family.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
If the desired font does not exist, the closest match will be chosen.
|
||||
Under Windows, only scaleable TrueType fonts are used.
|
||||
|
||||
Underlining only works under Windows at present.
|
||||
|
||||
See also \helpref{wxDC::SetFont}{wxdcsetfont}, \helpref{wxDC::DrawText}{wxdcdrawtext}
|
||||
and \helpref{wxDC::GetTextExtent}{wxdcgettextextent}.
|
||||
|
||||
\membersection{wxFont::\destruct{wxFont}}
|
||||
|
||||
\func{}{\destruct{wxFont}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The destructor may not delete the underlying font object of the native windowing
|
||||
system, since wxBrush uses a reference counting system for efficiency.
|
||||
|
||||
Although all remaining fonts are deleted when the application exits,
|
||||
the application should try to clean up all fonts itself. This is because
|
||||
wxWindows cannot know if a pointer to the font object is stored in an
|
||||
application data structure, and there is a risk of double deletion.
|
||||
|
||||
\membersection{wxFont::GetFaceName}\label{wxfontgetfacename}
|
||||
|
||||
\constfunc{wxString}{GetFaceName}{\void}
|
||||
|
||||
Returns the typeface name associated with the font, or the empty string if there is no
|
||||
typeface information.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::SetFaceName}{wxfontsetfacename}
|
||||
|
||||
\membersection{wxFont::GetFamily}\label{wxfontgetfamily}
|
||||
|
||||
\constfunc{int}{GetFamily}{\void}
|
||||
|
||||
Gets the font family. See \helpref{wxFont::wxFont}{wxfontconstr} for a list of valid
|
||||
family identifiers.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::SetFamily}{wxfontsetfamily}
|
||||
|
||||
\membersection{wxFont::GetFontId}\label{wxfontgetfontid}
|
||||
|
||||
\constfunc{int}{GetFontId}{\void}
|
||||
|
||||
Returns the font id, if the portable font system is in operation. See \helpref{Font overview}{wxfontoverview} for
|
||||
further details.
|
||||
|
||||
\membersection{wxFont::GetPointSize}\label{wxfontgetpointsize}
|
||||
|
||||
\constfunc{int}{GetPointSize}{\void}
|
||||
|
||||
Gets the point size.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::SetPointSize}{wxfontsetpointsize}
|
||||
|
||||
\membersection{wxFont::GetStyle}\label{wxfontgetstyle}
|
||||
|
||||
\constfunc{int}{GetStyle}{\void}
|
||||
|
||||
Gets the font style. See \helpref{wxFont::wxFont}{wxfontconstr} for a list of valid
|
||||
styles.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::SetStyle}{wxfontsetstyle}
|
||||
|
||||
\membersection{wxFont::GetUnderlined}\label{wxfontgetunderlined}
|
||||
|
||||
\constfunc{bool}{GetUnderlined}{\void}
|
||||
|
||||
Returns TRUE if the font is underlined, FALSE otherwise.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::SetUnderlined}{wxfontsetunderlined}
|
||||
|
||||
\membersection{wxFont::GetWeight}\label{wxfontgetweight}
|
||||
|
||||
\constfunc{int}{GetWeight}{\void}
|
||||
|
||||
Gets the font weight. See \helpref{wxFont::wxFont}{wxfontconstr} for a list of valid
|
||||
weight identifiers.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::SetWeight}{wxfontsetweight}
|
||||
|
||||
\membersection{wxFont::SetFaceName}\label{wxfontsetfacename}
|
||||
|
||||
\func{void}{SetFaceName}{\param{const wxString\& }{faceName}}
|
||||
|
||||
Sets the facename for the font.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{faceName}{A valid facename, which should be on the end-user's system.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
To avoid portability problems, don't rely on a specific face, but specify the font family
|
||||
instead or as well. A suitable font will be found on the end-user's system. If both the
|
||||
family and the facename are specified, wxWindows will first search for the specific face,
|
||||
and then for a font belonging to the same family.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::GetFaceName}{wxfontgetfacename}, \helpref{wxFont::SetFamily}{wxfontsetfamily}
|
||||
|
||||
\membersection{wxFont::SetFamily}\label{wxfontsetfamily}
|
||||
|
||||
\func{void}{SetFamily}{\param{const int}{ family}}
|
||||
|
||||
Sets the font family.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{family}{One of:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxDEFAULT}}{Chooses a default font.}
|
||||
\twocolitem{{\bf wxDECORATIVE}}{A decorative font.}
|
||||
\twocolitem{{\bf wxROMAN}}{A formal, serif font.}
|
||||
\twocolitem{{\bf wxSCRIPT}}{A handwriting font.}
|
||||
\twocolitem{{\bf wxSWISS}}{A sans-serif font.}
|
||||
\twocolitem{{\bf wxMODERN}}{A fixed pitch font.}
|
||||
\end{twocollist}}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::GetFamily}{wxfontgetfamily}, \helpref{wxFont::SetFaceName}{wxfontsetfacename}
|
||||
|
||||
\membersection{wxFont::SetPointSize}\label{wxfontsetpointsize}
|
||||
|
||||
\func{void}{SetPointSize}{\param{const int}{ pointSize}}
|
||||
|
||||
Sets the point size.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{pointSize}{Size in points.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::GetPointSize}{wxfontgetpointsize}
|
||||
|
||||
\membersection{wxFont::SetStyle}\label{wxfontsetstyle}
|
||||
|
||||
\func{void}{SetStyle}{\param{const int}{ style}}
|
||||
|
||||
Sets the font style.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{style}{One of {\bf wxNORMAL}, {\bf wxSLANT} and {\bf wxITALIC}.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::GetStyle}{wxfontgetstyle}
|
||||
|
||||
\membersection{wxFont::SetUnderlined}\label{wxfontsetunderlined}
|
||||
|
||||
\func{void}{SetUnderlined}{\param{const bool}{ underlined}}
|
||||
|
||||
Sets underlining.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{underlining}{TRUE to underline, FALSE otherwise.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::GetUnderlined}{wxfontgetunderlined}
|
||||
|
||||
\membersection{wxFont::SetWeight}\label{wxfontsetweight}
|
||||
|
||||
\func{void}{SetWeight}{\param{const int}{ weight}}
|
||||
|
||||
Sets the font weight.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{weight}{One of {\bf wxNORMAL}, {\bf wxLIGHT} and {\bf wxBOLD}.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont::GetWeight}{wxfontgetweight}
|
||||
|
||||
\membersection{wxFont::operator $=$}\label{wxfontassignment}
|
||||
|
||||
\func{wxFont\&}{operator $=$}{\param{const wxFont\& }{font}}
|
||||
|
||||
Assignment operator, using reference counting. Returns a reference
|
||||
to `this'.
|
||||
|
||||
\membersection{wxFont::operator $==$}\label{wxfontequals}
|
||||
|
||||
\func{bool}{operator $==$}{\param{const wxFont\& }{font}}
|
||||
|
||||
Equality operator. Two fonts are equal if they contain pointers
|
||||
to the same underlying font data. It does not compare each attribute,
|
||||
so two indefontdently-created fonts using the same parameters will
|
||||
fail the test.
|
||||
|
||||
\membersection{wxFont::operator $!=$}\label{wxfontnotequals}
|
||||
|
||||
\func{bool}{operator $!=$}{\param{const wxFont\& }{font}}
|
||||
|
||||
Inequality operator. Two fonts are not equal if they contain pointers
|
||||
to different underlying font data. It does not compare each attribute.
|
||||
|
||||
|
187
docs/latex/wx/fontdlg.tex
Normal file
@ -0,0 +1,187 @@
|
||||
\section{\class{wxFontData}}\label{wxfontdata}
|
||||
|
||||
\overview{wxFontDialog overview}{wxfontdialogoverview}
|
||||
|
||||
This class holds a variety of information related to font dialogs.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Overview}{wxfontdialogoverview}, \helpref{wxFontDialog}{wxfontdialog}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxFontData::wxFontData}
|
||||
|
||||
\func{}{wxFontData}{\void}
|
||||
|
||||
Constructor. Initializes {\it fontColour} to black, {\it showHelp} to black,
|
||||
\rtfsp{\it allowSymbols} to TRUE, {\it enableEffects} to TRUE,
|
||||
\rtfsp{\it minSize} to 0 and {\it maxSize} to 0.
|
||||
|
||||
\membersection{wxFontData::\destruct{wxFontData}}
|
||||
|
||||
\func{}{\destruct{wxFontData}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxFontData::EnableEffects}
|
||||
|
||||
\func{void}{EnableEffects}{\param{bool}{ enable}}
|
||||
|
||||
Enables or disables `effects' under MS Windows only. This refers to the
|
||||
controls for manipulating colour, strikeout and underline properties.
|
||||
|
||||
The default value is TRUE.
|
||||
|
||||
\membersection{wxFontData::GetAllowSymbols}
|
||||
|
||||
\func{bool}{GetAllowSymbols}{\void}
|
||||
|
||||
Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no
|
||||
effect on other platforms.
|
||||
|
||||
The default value is TRUE.
|
||||
|
||||
\membersection{wxFontData::GetColour}
|
||||
|
||||
\func{wxColour\&}{GetColour}{\void}
|
||||
|
||||
Gets the colour associated with the font dialog.
|
||||
|
||||
The default value is black.
|
||||
|
||||
\membersection{wxFontData::GetChosenFont}
|
||||
|
||||
\func{wxFont}{GetChosenFont}{\void}
|
||||
|
||||
Gets the font chosen by the user. If the user pressed OK (wxFontDialog::Show returned TRUE), this returns
|
||||
a new font which is now `owned' by the application, and should be deleted
|
||||
if not required. If the user pressed Cancel (wxFontDialog::Show returned FALSE) or
|
||||
the colour dialog has not been invoked yet, this will return NULL.
|
||||
|
||||
\membersection{wxFontData::GetEnableEffects}
|
||||
|
||||
\func{bool}{GetEnableEffects}{\void}
|
||||
|
||||
Determines whether `effects' are enabled under Windows. This refers to the
|
||||
controls for manipulating colour, strikeout and underline properties.
|
||||
|
||||
The default value is TRUE.
|
||||
|
||||
\membersection{wxFontData::GetInitialFont}
|
||||
|
||||
\func{wxFont}{GetInitialFont}{\void}
|
||||
|
||||
Gets the font that will be initially used by the font dialog. This should have
|
||||
previously been set by the application.
|
||||
|
||||
\membersection{wxFontData::GetShowHelp}
|
||||
|
||||
\func{bool}{GetShowHelp}{\void}
|
||||
|
||||
Returns TRUE if the Help button will be shown (Windows only).
|
||||
|
||||
The default value is FALSE.
|
||||
|
||||
\membersection{wxFontData::SetAllowSymbols}
|
||||
|
||||
\func{void}{SetAllowSymbols}{\param{bool}{ allowSymbols}}
|
||||
|
||||
Under MS Windows, determines whether symbol fonts can be selected. Has no
|
||||
effect on other platforms.
|
||||
|
||||
The default value is TRUE.
|
||||
|
||||
\membersection{wxFontData::SetChosenFont}
|
||||
|
||||
\func{void}{SetChosenFont}{\param{const wxFont\& }{font}}
|
||||
|
||||
Sets the font that will be returned to the user (for internal use only).
|
||||
|
||||
\membersection{wxFontData::SetColour}
|
||||
|
||||
\func{void}{SetColour}{\param{const wxColour\&}{ colour}}
|
||||
|
||||
Sets the colour that will be used for the font foreground colour.
|
||||
|
||||
The default colour is black.
|
||||
|
||||
\membersection{wxFontData::SetInitialFont}
|
||||
|
||||
\func{void}{SetInitialFont}{\param{const wxFont\&}{font}}
|
||||
|
||||
Sets the font that will be initially used by the font dialog.
|
||||
|
||||
\membersection{wxFontData::SetRange}
|
||||
|
||||
\func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}}
|
||||
|
||||
Sets the valid range for the font point size (Windows only).
|
||||
|
||||
The default is 0, 0 (unrestricted range).
|
||||
|
||||
\membersection{wxFontData::SetShowHelp}
|
||||
|
||||
\func{void}{SetShowHelp}{\param{bool}{ showHelp}}
|
||||
|
||||
Determines whether the Help button will be displayed in the font dialog (Windows only).
|
||||
|
||||
The default value is FALSE.
|
||||
|
||||
\membersection{wxFontData::operator $=$}
|
||||
|
||||
\func{void}{operator $=$}{\param{const wxFontData\&}{ data}}
|
||||
|
||||
Assingment operator for the font data.
|
||||
|
||||
\section{\class{wxFontDialog}}\label{wxfontdialog}
|
||||
|
||||
This class represents the font chooser dialog.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxDialog}{wxdialog}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Overview}{wxfontdialogoverview}, \helpref{wxFontData}{wxfontdata}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxFontDialog::wxFontDialog}
|
||||
|
||||
\func{}{wxFontDialog}{\param{wxWindow* }{parent}, \param{wxFontData* }{data = NULL}}
|
||||
|
||||
Constructor. Pass a parent window, and optionally a pointer to a block of font
|
||||
data, which will be copied to the font dialog's font data.
|
||||
|
||||
\membersection{wxFontDialog::\destruct{wxFontDialog}}
|
||||
|
||||
\func{}{\destruct{wxFontDialog}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxFontDialog::GetFontData}
|
||||
|
||||
\func{wxFontData\&}{GetFontData}{\void}
|
||||
|
||||
Returns the \helpref{font data}{wxfontdata} associated with the font dialog.
|
||||
|
||||
\membersection{wxFontDialog::ShowModal}
|
||||
|
||||
\func{int}{ShowModal}{\void}
|
||||
|
||||
Shows the dialog, returning wxID\_OK if the user pressed Ok, and wxID\_CANCEL
|
||||
otherwise.
|
||||
|
||||
If the user cancels the dialog (ShowModal returns wxID\_CANCEL), no font will be
|
||||
created. If the user presses OK (ShowModal returns wxID\_OK), a new wxFont will
|
||||
be created and stored in the font dialog's wxFontData structure.
|
||||
|
48
docs/latex/wx/fontlist.tex
Normal file
@ -0,0 +1,48 @@
|
||||
\section{\class{wxFontList}}\label{wxfontlist}
|
||||
|
||||
A font list is a list containing all fonts which have been created. There
|
||||
is only one instance of this class: {\bf wxTheFontList}. Use this object to search
|
||||
for a previously created font of the desired type and create it if not already found.
|
||||
In some windowing systems, the font may be a scarce resource, so it is best to
|
||||
reuse old resources if possible. When an application finishes, all fonts will be
|
||||
deleted and their resources freed, eliminating the possibility of `memory leaks'.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxList}{wxlist}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFont}{wxfont}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxFontList::wxFontList}
|
||||
|
||||
\func{}{wxFontList}{\void}
|
||||
|
||||
Constructor. The application should not construct its own font list:
|
||||
use the object pointer {\bf wxTheFontList}.
|
||||
|
||||
\membersection{wxFontList::AddFont}
|
||||
|
||||
\func{void}{AddFont}{\param{wxFont *}{font}}
|
||||
|
||||
Used by wxWindows to add a font to the list, called in the font constructor.
|
||||
|
||||
\membersection{wxFontList::FindOrCreateFont}\label{findorcreatefont}
|
||||
|
||||
\func{wxFont *}{FindOrCreateFont}{\param{int}{ point\_size}, \param{int}{ family}, \param{int}{ style}, \param{int}{ weight}, \param{bool}{ underline = FALSE},
|
||||
\param{const wxString\& }{facename = NULL}}
|
||||
|
||||
Finds a font of the given specification, or creates one and adds it to the list. See the \helpref{wxFont constructor}{wxfontconstr} for
|
||||
details of the arguments.
|
||||
|
||||
\membersection{wxFontList::RemoveFont}
|
||||
|
||||
\func{void}{RemoveFont}{\param{wxFont *}{font}}
|
||||
|
||||
Used by wxWindows to remove a font from the list.
|
||||
|
||||
|
BIN
docs/latex/wx/forward.gif
Normal file
After Width: | Height: | Size: 164 B |
445
docs/latex/wx/frame.tex
Normal file
@ -0,0 +1,445 @@
|
||||
\section{\class{wxFrame}}\label{wxframe}
|
||||
|
||||
A frame is a window whose size and position can (usually) be changed by the user. It usually has
|
||||
thick borders and a title bar, and can optionally contain a menu bar, toolbar and
|
||||
status bar. A frame can contain any window that is not a frame or dialog.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).}
|
||||
\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.}
|
||||
\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.}
|
||||
\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.}
|
||||
\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).}
|
||||
\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).}
|
||||
\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only).}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
An application should normally define an \helpref{OnCloseWindow}{wxwindowonclosewindow} handler for the
|
||||
frame to respond to system close events, for example so that related data and subwindows can be cleaned up.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame}{wxmdiparentframe}, \helpref{wxMDIChildFrame}{wxmdichildframe},\rtfsp
|
||||
\helpref{wxMiniFrame}{wxminiframe}, \helpref{wxDialog}{wxdialog}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxFrame::wxFrame}\label{wxframeconstr}
|
||||
|
||||
\func{}{wxFrame}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxFrame}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
|
||||
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp
|
||||
\param{const wxString\& }{name = ``frame"}}
|
||||
|
||||
Constructor, creating the window.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{The window parent. This may be NULL. If it is non-NULL, the frame will
|
||||
always be displayed on top of the parent window on Windows.}
|
||||
|
||||
\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.}
|
||||
|
||||
\docparam{title}{The caption to be displayed on the frame's title bar.}
|
||||
|
||||
\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by
|
||||
either the windowing system or wxWindows, depending on platform.}
|
||||
|
||||
\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by
|
||||
either the windowing system or wxWindows, depending on platform.}
|
||||
|
||||
\docparam{style}{The window style. See \helpref{wxFrame}{wxframe}.}
|
||||
|
||||
\docparam{name}{The name of the window. This parameter is used to associate a name with the item,
|
||||
allowing the application user to set Motif resource values for
|
||||
individual windows.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
For Motif, MWM (the Motif Window Manager) should be running for any window styles to work
|
||||
(otherwise all styles take effect).
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFrame::Create}{wxframecreate}
|
||||
|
||||
\membersection{wxFrame::\destruct{wxFrame}}
|
||||
|
||||
\func{void}{\destruct{wxFrame}}{\void}
|
||||
|
||||
Destructor. Destroys all child windows and menu bar if present.
|
||||
|
||||
\membersection{wxFrame::Centre}\label{wxframecentre}
|
||||
|
||||
\func{void}{Centre}{\param{const int}{ direction = wxBOTH}}
|
||||
|
||||
Centres the frame on the display.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{direction}{The parameter may be {\tt wxHORIZONTAL}, {\tt wxVERTICAL} or {\tt wxBOTH}.}
|
||||
|
||||
\membersection{wxFrame::Command}\label{wxframecommand}
|
||||
|
||||
\func{void}{Command}{\param{int }{id}}
|
||||
|
||||
Simulate a menu command.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The identifier for a menu item.}
|
||||
|
||||
\membersection{wxFrame::Create}\label{wxframecreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
|
||||
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp
|
||||
\param{const wxString\& }{name = ``frame"}}
|
||||
|
||||
Used in two-step frame construction. See \helpref{wxFrame::wxFrame}{wxframeconstr}\rtfsp
|
||||
for further details.
|
||||
|
||||
\membersection{wxFrame::CreateStatusBar}\label{wxframecreatestatusbar}
|
||||
|
||||
\func{virtual bool}{CreateStatusBar}{\param{const int}{ number = 1}}
|
||||
|
||||
Creates a status bar at the bottom of the frame.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{number}{The number of fields to create. Specify a
|
||||
value greater than 1 to create a multi-field status bar.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the status bar was created successfully.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The width of the status bar is the whole width of the frame (adjusted automatically when
|
||||
resizing), and the height and text size are chosen by the host windowing system.
|
||||
|
||||
By default, the status bar is an instance of wxStatusBar. To use a different class,
|
||||
override \helpref{wxFrame::OnCreateStatusBar}{wxframeoncreatestatusbar}.
|
||||
|
||||
Note that you can put controls and other windows on the status bar if you wish.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFrame::SetStatusText}{wxframesetstatustext},\rtfsp
|
||||
\helpref{wxFrame::OnCreateStatusBar}{wxframeoncreatestatusbar},\rtfsp
|
||||
\helpref{wxFrame::GetStatusBar}{wxframegetstatusbar}
|
||||
|
||||
\membersection{wxFrame::GetMenuBar}\label{wxframegetmenubar}
|
||||
|
||||
\constfunc{wxMenuBar*}{GetMenuBar}{\void}
|
||||
|
||||
Returns a pointer to the menubar currently associated with the frame (if any).
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFrame::SetMenuBar}{wxframesetmenubar}, \helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}
|
||||
|
||||
\membersection{wxFrame::GetStatusBar}\label{wxframegetstatusbar}
|
||||
|
||||
\func{wxStatusBar*}{GetStatusBar}{\void}
|
||||
|
||||
Returns a pointer to the status bar currently associated with the frame (if any).
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}
|
||||
|
||||
\membersection{wxFrame::GetTitle}\label{wxframegettitle}
|
||||
|
||||
\func{wxString\&}{GetTitle}{\void}
|
||||
|
||||
Gets a temporary pointer to the frame title. See
|
||||
\helpref{wxFrame::SetTitle}{wxframesettitle}.
|
||||
|
||||
\membersection{wxFrame::Iconize}\label{wxframeiconize}
|
||||
|
||||
\func{void}{Iconize}{\param{const bool}{ iconize}}
|
||||
|
||||
Iconizes or restores the frame.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{izonize}{If TRUE, iconizes the frame; if FALSE, shows and restores it.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFrame::IsIconized}{wxframeisiconized}, \helpref{wxFrame::Maximize}{wxframemaximize}.
|
||||
|
||||
\membersection{wxFrame::IsIconized}\label{wxframeisiconized}
|
||||
|
||||
\func{bool}{IsIconized}{\void}
|
||||
|
||||
Returns TRUE if the frame is iconized.
|
||||
|
||||
\membersection{wxFrame::LoadAccelerators}\label{wxframeloadaccelerators}
|
||||
|
||||
\func{void}{LoadAccelerators}{\param{const wxString\& }{table}}
|
||||
|
||||
Loads a keyboard accelerator table for this frame.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{table}{Accelerator table to load.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the operation was successful, FALSE otherwise.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Accelerator tables map keystrokes onto control and menu identifiers, so the
|
||||
programmer does not have to explicitly program this correspondence.
|
||||
|
||||
See the hello demo ({\tt hello.cpp} and {\tt hello.rc}) for
|
||||
an example of accelerator usage. This is a fragment from {\tt hello.rc}:
|
||||
|
||||
\begin{verbatim}
|
||||
#define HELLO_LOAD_FILE 111
|
||||
|
||||
menus_accel ACCELERATORS
|
||||
{
|
||||
|
||||
"^L", HELLO_LOAD_FILE
|
||||
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
This function only works under Windows.
|
||||
|
||||
% huh? If you call LoadAccelerators, you need to override wxFrame::OnActivate to do nothing.
|
||||
|
||||
\membersection{wxFrame::Maximize}\label{wxframemaximize}
|
||||
|
||||
\func{void}{Maximize}{\param{const bool }{maximize}}
|
||||
|
||||
Maximizes or restores the frame.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{maximize}{If TRUE, maximizes the frame, otherwise it restores it}.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This function only works under Windows.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFrame::Iconize}{wxframeiconize}
|
||||
|
||||
\membersection{wxFrame::OnActivate}
|
||||
|
||||
\func{void}{OnActivate}{\param{bool}{ active}}
|
||||
|
||||
Called when a window is activated or deactivated (MS Windows
|
||||
only). If the window is being activated, {\it active} is TRUE, else it
|
||||
is FALSE.
|
||||
|
||||
If you call wxFrame::LoadAccelerators, you need to override this function e.g.
|
||||
|
||||
\begin{verbatim}
|
||||
void OnActivate(bool) {};
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxFrame::OnCreateStatusBar}\label{wxframeoncreatestatusbar}
|
||||
|
||||
\func{virtual wxStatusBar*}{OnCreateStatusBar}{\param{const int }{number}}
|
||||
|
||||
Virtual function called when a status bar is requested by \helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{number}{The number of fields to create.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
A status bar object.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
An application can override this function to return a different kind of status bar. The default
|
||||
implementation returns an instance of \helpref{wxStatusBar}{wxstatusbar}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}.
|
||||
|
||||
\membersection{wxFrame::OnMenuCommand}\label{wxframeonmenucommand}
|
||||
|
||||
\func{void}{OnMenuCommand}{\param{wxCommandEvent\&}{ event}}
|
||||
|
||||
See \helpref{wxWindow::OnMenuCommand}{wxwindowonmenucommand}.
|
||||
|
||||
\membersection{wxFrame::OnMenuHighlight}\label{wxframeonmenuhighlight}
|
||||
|
||||
\func{void}{OnMenuHighlight}{\param{wxMenuEvent\&}{ event}}
|
||||
|
||||
See \helpref{wxWindow::OnMenuHighlight}{wxwindowonmenuhighlight}.
|
||||
|
||||
\membersection{wxFrame::OnSize}\label{wxframeonsize}
|
||||
|
||||
\func{void}{OnSize}{\param{wxSizeEvent\& }{event}}
|
||||
|
||||
See \helpref{wxWindow::OnSize}{wxwindowonsize}.
|
||||
|
||||
The default {\bf wxFrame::OnSize} implementation looks for a single subwindow,
|
||||
and if one is found, resizes it to fit
|
||||
inside the frame. Override this member if more complex behaviour
|
||||
is required (for example, if there are several subwindows).
|
||||
|
||||
\membersection{wxFrame::SetIcon}\label{wxframeseticon}
|
||||
|
||||
\func{void}{SetIcon}{\param{const wxIcon\& }{icon}}
|
||||
|
||||
Sets the icon for this frame.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{icon}{The icon to associate with this frame.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The frame takes a `copy' of {\it icon}, but since it uses reference
|
||||
counting, the copy is very quick. It is safe to delete {\it icon} after
|
||||
calling this function.
|
||||
|
||||
Under Windows, instead of using {\bf SetIcon}, you can add the
|
||||
following lines to your MS Windows resource file:
|
||||
|
||||
\begin{verbatim}
|
||||
wxSTD_MDIPARENTFRAME ICON icon1.ico
|
||||
wxSTD_MDICHILDFRAME ICON icon2.ico
|
||||
wxSTD_FRAME ICON icon3.ico
|
||||
\end{verbatim}
|
||||
|
||||
where icon1.ico will be used for the MDI parent frame, icon2.ico
|
||||
will be used for MDI child frames, and icon3.ico will be used for
|
||||
non-MDI frames.
|
||||
|
||||
If these icons are not supplied, and {\bf SetIcon} is not called either,
|
||||
then the following defaults apply if you have included wx.rc.
|
||||
|
||||
\begin{verbatim}
|
||||
wxDEFAULT_FRAME ICON std.ico
|
||||
wxDEFAULT_MDIPARENTFRAME ICON mdi.ico
|
||||
wxDEFAULT_MDICHILDFRAME ICON child.ico
|
||||
\end{verbatim}
|
||||
|
||||
You can replace std.ico, mdi.ico and child.ico with your own defaults
|
||||
for all your wxWindows application. Currently they show the same icon.
|
||||
|
||||
{\it Note:} a wxWindows application linked with subsystem equal to 4.0
|
||||
(i.e. marked as a Windows 95 application) doesn't respond properly
|
||||
to wxFrame::SetIcon. To work around this until a solution is found,
|
||||
mark your program as a 3.5 application. This will also ensure
|
||||
that Windows provides small icons for the application automatically.
|
||||
|
||||
See also \helpref{wxIcon}{wxicon}.
|
||||
|
||||
\membersection{wxFrame::SetMenuBar}\label{wxframesetmenubar}
|
||||
|
||||
\func{void}{SetMenuBar}{\param{wxMenuBar* }{menuBar}}
|
||||
|
||||
Tells the frame to show the given menu bar.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{menuBar}{The menu bar to associate with the frame.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
If the frame is destroyed, the
|
||||
menu bar and its menus will be destroyed also, so do not delete the menu
|
||||
bar explicitly (except by resetting the frame's menu bar to another
|
||||
frame or NULL).
|
||||
|
||||
Under Windows, a call to \helpref{wxFrame::OnSize}{wxframeonsize} is generated, so be sure to initialize
|
||||
data members properly before calling {\bf SetMenuBar}.
|
||||
|
||||
Note that it is not possible to call this function twice for the same frame object.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFrame::GetMenuBar}{wxframegetmenubar}, \helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}.
|
||||
|
||||
\membersection{wxFrame::SetStatusText}\label{wxframesetstatustext}
|
||||
|
||||
\func{virtual void}{SetStatusText}{\param{const wxString\& }{ text}, \param{const int}{ number = 0}}
|
||||
|
||||
Sets the status bar text and redraws the status bar.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{text}{The text for the status field.}
|
||||
|
||||
\docparam{number}{The status field (starting from zero).}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Use an empty string to clear the status bar.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFrame::CreateStatusBar}{wxframecreatestatusbar}, \helpref{wxStatusBar}{wxstatusbar}
|
||||
|
||||
\membersection{wxFrame::SetStatusWidths}\label{wxframesetstatuswidths}
|
||||
|
||||
\func{virtual void}{SetStatusWidths}{\param{const int}{ n}, \param{const int *}{widths}}
|
||||
|
||||
Sets the widths of the fields in the status bar.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\wxheading{n}{The number of fields in the status bar. It must be the
|
||||
same used in \helpref{CreateStatusBar}{wxframecreatestatusbar}.}
|
||||
|
||||
\docparam{widths}{Must contain an array of {\it n} integers, each of which is a status field width
|
||||
in pixels. A value of -1 indicates that the field is variable width; at least one
|
||||
field must be -1. You should delete this array after calling {\bf SetStatusWidths}.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The widths of the variable fields are calculated from the total width of all fields,
|
||||
minus the sum of widths of the non-variable fields, divided by the number of
|
||||
variable fields.
|
||||
|
||||
\membersection{wxFrame::SetTitle}\label{wxframesettitle}
|
||||
|
||||
\func{virtual void}{SetTitle}{\param{const wxString\& }{ title}}
|
||||
|
||||
Sets the frame title.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{title}{The frame title.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxFrame::GetTitle}{wxframegettitle}
|
||||
|
1665
docs/latex/wx/function.tex
Normal file
178
docs/latex/wx/gauge.tex
Normal file
@ -0,0 +1,178 @@
|
||||
\section{\class{wxGauge}}\label{wxgauge}
|
||||
|
||||
A gauge is a horizontal or vertical bar which shows a quantity (often time).
|
||||
There are no user commands for the gauge.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxControl}{wxcontrol}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxEvtHandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxGA\_HORIZONTAL}}{Creates a horizontal gauge.}
|
||||
\twocolitem{\windowstyle{wxGA\_VERTICAL}}{Creates a vertical gauge.}
|
||||
\twocolitem{\windowstyle{wxGA\_PROGRESSBAR}}{Under Windows 95, creates a horizontal progress bar.}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxSlider}{wxslider}, \helpref{wxScrollBar}{wxscrollbar}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxGauge::wxGauge}\label{wxgaugeconstr}
|
||||
|
||||
\func{}{wxGauge}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxGauge}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
|
||||
\param{const int}{ range}, \param{const wxPoint\& }{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
||||
\param{const long}{ style = wxGA\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``gauge"}}
|
||||
|
||||
Constructor, creating and showing a gauge.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{Window parent.}
|
||||
|
||||
\docparam{id}{Window identifier.}
|
||||
|
||||
\docparam{range}{Integer range (maximum value) of the gauge.}
|
||||
|
||||
\docparam{pos}{Window position.}
|
||||
|
||||
\docparam{size}{Window size.}
|
||||
|
||||
\docparam{style}{Gauge style. See \helpref{wxGauge}{wxgauge}.}
|
||||
|
||||
\docparam{name}{Window name.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Under Windows 95, there are two different styles of gauge: normal gauge, and progress bar (when
|
||||
the {\bf wxGA\_PROGRESSBAR} style is used). A progress bar is always horizontal.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxGauge::Create}{wxgaugecreate}
|
||||
|
||||
\membersection{wxGauge::\destruct{wxGauge}}
|
||||
|
||||
\func{}{\destruct{wxGauge}}{\void}
|
||||
|
||||
Destructor, destroying the gauge.
|
||||
|
||||
\membersection{wxGauge::Create}\label{wxgaugecreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
|
||||
\param{const int}{ range}, \param{const wxPoint\& }{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
||||
\param{const long}{ style = wxGA\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``gauge"}}
|
||||
|
||||
Creates the gauge for two-step construction. See \helpref{wxGauge::wxGauge}{wxgaugeconstr}\rtfsp
|
||||
for further details.
|
||||
|
||||
\membersection{wxGauge::GetBezelFace}\label{wxgaugegetbezelface}
|
||||
|
||||
\constfunc{int}{GetBezelFace}{\void}
|
||||
|
||||
Returns the width of the 3D bezel face.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Windows only, not for {\bf wxGA\_PROGRESSBAR}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxGauge::SetBezelFace}{wxgaugesetbezelface}
|
||||
|
||||
\membersection{wxGauge::GetRange}\label{wxgaugegetrange}
|
||||
|
||||
\constfunc{int}{GetRange}{\void}
|
||||
|
||||
Returns the maximum position of the gauge.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxGauge::SetRange}{wxgaugesetrange}
|
||||
|
||||
\membersection{wxGauge::GetShadowWidth}\label{wxgaugegetshadowwidth}
|
||||
|
||||
\constfunc{int}{GetShadowWidth}{\void}
|
||||
|
||||
Returns the 3D shadow margin width.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Windows only, not for {\bf wxGA\_PROGRESSBAR}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxGauge::SetShadowWidth}{wxgaugesetshadowwidth}
|
||||
|
||||
\membersection{wxGauge::GetValue}\label{wxgaugegetvalue}
|
||||
|
||||
\constfunc{int}{GetValue}{\void}
|
||||
|
||||
Returns the current position of the gauge.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxGauge::SetValue}{wxgaugesetvalue}
|
||||
|
||||
\membersection{wxGauge::SetBezelFace}\label{wxgaugesetbezelface}
|
||||
|
||||
\func{void}{SetBezelFace}{\param{const int }{width}}
|
||||
|
||||
Sets the 3D bezel face width.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Windows only, not for {\bf wxGA\_PROGRESSBAR}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxGauge::GetBezelFace}{wxgaugegetbezelface}
|
||||
|
||||
\membersection{wxGauge::SetRange}\label{wxgaugesetrange}
|
||||
|
||||
\func{void}{SetRange}{\param{const int }{range}}
|
||||
|
||||
Sets the range (maximum value) of the gauge.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxGauge::GetRange}{wxgaugegetrange}
|
||||
|
||||
\membersection{wxGauge::SetShadowWidth}\label{wxgaugesetshadowwidth}
|
||||
|
||||
\func{void}{SetShadowWidth}{\param{const int }{width}}
|
||||
|
||||
Sets the 3D shadow width.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Windows only, not for {\bf wxGA\_PROGRESSBAR}.
|
||||
|
||||
\membersection{wxGauge::SetValue}\label{wxgaugesetvalue}
|
||||
|
||||
\func{void}{SetValue}{\param{const int }{pos}}
|
||||
|
||||
Sets the position of the gauge.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{pos}{Position for the gauge level.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxGauge::GetValue}{wxgaugegetvalue}
|
||||
|
||||
|
26
docs/latex/wx/gdiobj.tex
Normal file
@ -0,0 +1,26 @@
|
||||
\section{\class{wxGDIObject}}\label{wxgdiobject}
|
||||
|
||||
This class allows platforms to implement functionality to optimise GDI objects, such
|
||||
as wxPen, wxBrush and wxFont. On Windows, the underling GDI objects are a scarce resource
|
||||
and are cleaned up when a usage count goes to zero. On some platforms this
|
||||
class may not have any special functionality.
|
||||
|
||||
Since the functionality of this class is platform-specific, it is not documented here in detail.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxPen}{wxpen}, \helpref{wxBrush}{wxbrush}, \helpref{wxFont}{wxfont}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxGDIObject::wxGDIObject}\label{wxgdiobjectconstr}
|
||||
|
||||
\func{}{wxGDIObject}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
|
517
docs/latex/wx/grid.tex
Normal file
@ -0,0 +1,517 @@
|
||||
\section{\class{wxGrid}}\label{wxgrid}
|
||||
|
||||
wxGrid is a class for displaying and editing tabular information.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxPanel}{wxpanel}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
There are no specific window styles for this class.
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxGrid classes overview}{gridoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxGrid::wxGrid}\label{wxgridconstr}
|
||||
|
||||
\func{void}{wxGrid}{\param{wxWindow* }{parent}, \param{const wxWindowID}{ id}, \param{const wxPoint\&}{ pos},
|
||||
\rtfsp\param{const wxSize\&}{ size}, \param{const long}{ style=0}, \param{const wxString\& }{name="grid"}}
|
||||
|
||||
Constructor. Before using a wxGrid object, you must call CreateGrid to set up the required rows and columns.
|
||||
|
||||
\membersection{wxGrid::AdjustScrollbars}\label{wxgridadjustscrollbars}
|
||||
|
||||
\func{void}{AdjustScrollbars}{\void}
|
||||
|
||||
Call this function whenever a change has been made via the API that might alter the scrollbar characteristics:
|
||||
particularly when adding or deleting rows, or changing row or column dimensions. For example,
|
||||
removing rows might make it unnecessary to show the vertical scrollbar.
|
||||
|
||||
\membersection{wxGrid::AppendCols}\label{wxgridappendcols}
|
||||
|
||||
\func{bool}{AppendCols}{\param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
||||
|
||||
Appends {\it n} columns to the grid. If {\it updateLabels} is TRUE,
|
||||
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
||||
|
||||
\membersection{wxGrid::AppendRows}\label{wxgridappendrows}
|
||||
|
||||
\func{bool}{AppendRows}{\param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
||||
|
||||
Appends {\it n} rows to the grid. If {\it updateLabels} is TRUE,
|
||||
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
||||
|
||||
\membersection{wxGrid::BeginBatch}\label{wxgridbeginbatch}
|
||||
|
||||
\func{void}{BeginBatch}{\void}
|
||||
|
||||
Start a BeginBatch/EndBatch pair between which, calls to SetCellValue or
|
||||
SetCellBitmap will not cause a refresh. This allows you to speed up some operations
|
||||
(for example, setting several hundred cell values). You can nest, but not overlap,
|
||||
these two functions.
|
||||
|
||||
See also \helpref{wxGrid::EndBatch}{wxgridendbatch}, \helpref{wxGrid::GetBatchCount}{wxgridgetbatchcount}.
|
||||
|
||||
\membersection{wxGrid::CellHitTest}\label{wxgridcellhittest}
|
||||
|
||||
\func{bool}{CellHitTest}{\param{int}{ x}, \param{int}{ y}, \param{int *}{row}, \param{int *}{col}}
|
||||
|
||||
Returns TRUE if the x, y panel position coincides with a cell. If so, {\it row} and {\it col} are
|
||||
returned.
|
||||
|
||||
\membersection{wxGrid::CreateGrid}\label{wxgridcreategrid}
|
||||
|
||||
\func{bool}{CreateGrid}{\param{int}{ rows}, \param{int}{ cols}, \param{wxString **}{cellValues=NULL},
|
||||
\param{short *}{widths=NULL}, \param{short}{ defaultWidth=wxGRID\_DEFAULT\_CELL\_WIDTH},
|
||||
\param{short}{ defaultHeight=wxGRID\_DEFAULT\_CELL\_HEIGHT}}
|
||||
|
||||
Creates a grid {\it rows} high and {\it cols} wide. You can optionally specify an array of initial values
|
||||
and widths, and/or default cell width and height.
|
||||
|
||||
Call this function after creating the wxGrid object.
|
||||
|
||||
\membersection{wxGrid::CurrentCellVisible}\label{wxgridcurrentcellvisible}
|
||||
|
||||
\func{bool}{CurrentCellVisible}{\void}
|
||||
|
||||
Returns TRUE if the currently selected cell is visible, FALSE otherwise.
|
||||
|
||||
\membersection{wxGrid::DeleteCols}\label{wxgriddeletecols}
|
||||
|
||||
\func{bool}{DeleteCols}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
||||
|
||||
Deletes {\it n} columns from the grid at position {\it pos}. If {\it updateLabels} is TRUE,
|
||||
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
||||
|
||||
\membersection{wxGrid::DeleteRows}\label{wxgriddeleterows}
|
||||
|
||||
\func{bool}{DeleteRows}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
||||
|
||||
Deletes {\it n} rows from the grid at position {\it pos}. If {\it updateLabels} is TRUE,
|
||||
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
||||
|
||||
\membersection{wxGrid::EndBatch}\label{wxgridendbatch}
|
||||
|
||||
\func{void}{EndBatch}{\void}
|
||||
|
||||
End a BeginBatch/EndBatch pair between which, calls to SetCellValue or
|
||||
SetCellBitmap will not cause a refresh. This allows you to speed up some operations
|
||||
(for example, setting several hundred cell values). You can nest, but not overlap,
|
||||
these two functions.
|
||||
|
||||
See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::GetBatchCount}{wxgridgetbatchcount}.
|
||||
|
||||
\membersection{wxGrid::GetBatchCount}\label{wxgridgetbatchcount}
|
||||
|
||||
\func{void}{GetBatchCount}{\void}
|
||||
|
||||
Return the level of batch nesting. This is initially zero, and will be incremented
|
||||
every time BeginBatch is called, and decremented when EndBatch is called. When the
|
||||
batch count is more zero, some functions (such as SetCellValue and SetCellBitmap) will
|
||||
not refresh the cell.
|
||||
|
||||
See also \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}, \helpref{wxGrid::EndBatch}{wxgridendbatch}.
|
||||
|
||||
\membersection{wxGrid::GetCell}\label{wxgridgetcell}
|
||||
|
||||
\func{wxGridCell *}{GetCell}{\param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
Returns the grid cell object associated with this position.
|
||||
|
||||
wxGenericGrid implementation only.
|
||||
|
||||
\membersection{wxGrid::GetCellAlignment}\label{wxgridgetcellalignment}
|
||||
|
||||
\func{int}{GetCellAlignment}{\param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
\func{int}{GetCellAlignment}{\void}
|
||||
|
||||
Sets the text alignment for the cell at the given position, or the global alignment value.
|
||||
The return value is wxLEFT, wxRIGHT or wxCENTRE.
|
||||
|
||||
\membersection{wxGrid::GetCellBackgroundColour}\label{wxgridgetcellbackgroundcolour}
|
||||
|
||||
\func{wxColour\&}{GetCellBackgroundColour}{\param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
\func{wxColour\&}{GetCellBackgroundColour}{\void}
|
||||
|
||||
Gets the background colour for the cell at the given position, or the global background colour.
|
||||
|
||||
\membersection{wxGrid::GetCells}\label{wxgridgetcells}
|
||||
|
||||
\func{wxGridCell ***}{GetCells}{\void}
|
||||
|
||||
Returns the array of grid cell object associated with this wxGrid.
|
||||
|
||||
\membersection{wxGrid::GetCellTextColour}\label{wxgridgetcelltextcolour}
|
||||
|
||||
\func{wxColour\&}{GetCellTextColour}{\param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
\func{wxColour\&}{GetCellTextColour}{\void}
|
||||
|
||||
Gets the text colour for the cell at the given position, or the global text colour.
|
||||
|
||||
\membersection{wxGrid::GetCellTextFont}\label{wxgridgetcelltextfont}
|
||||
|
||||
\func{wxFont *}{GetCellTextFont}{\param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
\func{wxFont *}{GetCellTextFont}{\void}
|
||||
|
||||
Gets the text font for the cell at the given position, or the global text font.
|
||||
|
||||
\membersection{wxGrid::GetCellValue}\label{wxgridgetcellvalue}
|
||||
|
||||
\func{wxString\&}{GetCellValue}{\param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
Returns the cell value at the given position.
|
||||
|
||||
\membersection{wxGrid::GetCols}\label{wxgridgetcols}
|
||||
|
||||
\func{int}{GetCols}{\void}
|
||||
|
||||
Returns the number of columns in the grid.
|
||||
|
||||
\membersection{wxGrid::GetColumnWidth}\label{wxgridcolumnwidth}
|
||||
|
||||
\func{int}{GetColumnWidth}{\param{int}{ col}}
|
||||
|
||||
Gets the width in pixels for column {\it col}.
|
||||
|
||||
\membersection{wxGrid::GetCurrentRect}\label{wxgridgetcurrentrect}
|
||||
|
||||
\func{wxRectangle *}{GetCurrentRect}{\void}
|
||||
|
||||
Returns a pointer to the rectangle enclosing the currently selected cell.
|
||||
Do not delete this pointer.
|
||||
|
||||
\membersection{wxGrid::GetCursorColumn}\label{wxgridgetcursorcolumn}
|
||||
|
||||
\func{int}{GetCursorColumn}{\void}
|
||||
|
||||
Returns the column position of the currently selected cell.
|
||||
|
||||
\membersection{wxGrid::GetCursorRow}\label{wxgridgetcursorrow}
|
||||
|
||||
\func{int}{GetCursorRow}{\void}
|
||||
|
||||
Returns the row position of the currently selected cell.
|
||||
|
||||
\membersection{wxGrid::GetEditable}\label{wxgridgeteditable}
|
||||
|
||||
\func{bool}{GetEditable}{\void}
|
||||
|
||||
Returns TRUE if the grid cells can be edited.
|
||||
|
||||
\membersection{wxGrid::GetHorizScrollBar}\label{wxgridgethorizscrollbar}
|
||||
|
||||
\func{wxScrollBar *}{GetHorizScrollBar}{\void}
|
||||
|
||||
Returns a pointer to the horizontal scrollbar.
|
||||
|
||||
\membersection{wxGrid::GetLabelAlignment}\label{wxgridgetlabelalignment}
|
||||
|
||||
\func{int}{GetLabelAlignment}{\param{int}{ orientation}}
|
||||
|
||||
Gets the row or column label alignment. {\it orientation} should
|
||||
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
|
||||
{\it alignment} should be wxCENTRE, wxLEFT or wxRIGHT.
|
||||
|
||||
\membersection{wxGrid::GetLabelBackgroundColour}\label{wxgridgetlabelbackgroundcolour}
|
||||
|
||||
\func{wxColour\&}{GetLabelBackgroundColour}{\void}
|
||||
|
||||
Gets a row and column label text colour.
|
||||
|
||||
\membersection{wxGrid::GetLabelSize}\label{wxgridgetlabelsize}
|
||||
|
||||
\func{int}{GetLabelSize}{\param{int}{ orientation}}
|
||||
|
||||
Gets the row label height, or column label width, in pixels. {\it orientation} should
|
||||
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.
|
||||
|
||||
\membersection{wxGrid::GetLabelTextColour}\label{wxgridgetlabeltextcolour}
|
||||
|
||||
\func{wxColour\&}{GetLabelTextColour}{\void}
|
||||
|
||||
Gets a row and column label text colour.
|
||||
|
||||
\membersection{wxGrid::GetLabelTextFont}\label{wxgridgetlabeltextfont}
|
||||
|
||||
\func{wxFont *}{GetLabelTextFont}{\void}
|
||||
|
||||
Gets the font to be used for the row and column labels.
|
||||
|
||||
\membersection{wxGrid::GetLabelValue}\label{wxgridgetlabelvalue}
|
||||
|
||||
\func{wxString\&}{GetLabelValue}{\param{int}{ orientation}, \param{int}{ pos}}
|
||||
|
||||
Gets a row or column label value. {\it orientation} should
|
||||
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
|
||||
{\it pos} is the label position.
|
||||
|
||||
\membersection{wxGrid::GetRowHeight}\label{wxgridgetrowheight}
|
||||
|
||||
\func{int}{GetRowHeight}{\param{int}{ row}}
|
||||
|
||||
Gets the height in pixels for row {\it row}.
|
||||
|
||||
\membersection{wxGrid::GetRows}\label{wxgridgetrows}
|
||||
|
||||
\func{int}{GetRows}{\void}
|
||||
|
||||
Returns the number of rows in the grid.
|
||||
|
||||
\membersection{wxGrid::GetScrollPosX}\label{wxgridgetscrollposx}
|
||||
|
||||
\func{int}{GetScrollPosX}{\void}
|
||||
|
||||
Returns the column scroll position.
|
||||
|
||||
\membersection{wxGrid::GetScrollPosY}\label{wxgridgetscrollposy}
|
||||
|
||||
\func{int}{GetScrollPosY}{\void}
|
||||
|
||||
Returns the row scroll position.
|
||||
|
||||
\membersection{wxGrid::GetTextItem}\label{wxgridgettextitem}
|
||||
|
||||
\func{wxText *}{GetTextItem}{\void}
|
||||
|
||||
Returns a pointer to the text item used for entering text into a cell.
|
||||
|
||||
\membersection{wxGrid::GetVertScrollBar}\label{wxgridgetvertscrollbar}
|
||||
|
||||
\func{wxScrollBar *}{GetVertScrollBar}{\void}
|
||||
|
||||
Returns a pointer to the vertical scrollbar.
|
||||
|
||||
\membersection{wxGrid::InsertCols}\label{wxgridinsertcols}
|
||||
|
||||
\func{bool}{InsertCols}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
||||
|
||||
Inserts {\it n} number of columns before position {\it pos}. If {\it updateLabels} is TRUE,
|
||||
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
||||
|
||||
\membersection{wxGrid::InsertRows}\label{wxgridinsertrows}
|
||||
|
||||
\func{bool}{InsertRows}{\param{int}{ pos=0}, \param{int}{ n=1}, \param{bool}{ updateLabels=TRUE}}
|
||||
|
||||
Inserts {\it n} number of rows before position {\it pos}. If {\it updateLabels} is TRUE,
|
||||
the function OnChangeLabels is called to give the application the opportunity to relabel.
|
||||
|
||||
\membersection{wxGrid::OnActivate}\label{wxgridonactivate}
|
||||
|
||||
\func{void}{OnActivate}{\param{bool}{ active}}
|
||||
|
||||
Sets the text item to have the focus. Call this function when the wxGrid window should have the
|
||||
focus, for example from wxFrame::OnActivate.
|
||||
|
||||
\membersection{wxGrid::OnChangeLabels}\label{wxgridonchangelabels}
|
||||
|
||||
\func{void}{OnChangeLabels}{\void}
|
||||
|
||||
Called when rows and columns are created or deleted, to allow the application an
|
||||
opportunity to update the labels. By default, columns are labelled alphabetically,
|
||||
and rows numerically.
|
||||
|
||||
\membersection{wxGrid::OnChangeSelectionLabel}\label{wxgridonchangeselectionlabel}
|
||||
|
||||
\func{void}{OnChangeSelectionLabel}{\void}
|
||||
|
||||
Called when a cell is selected, to allow the application an
|
||||
opportunity to update the selection label (the label of the wxText item
|
||||
used for entering cell text). By default, the cell column letter and row
|
||||
number are concatenated to form the selection label.
|
||||
|
||||
\membersection{wxGrid::OnCreateCell}\label{wxgridoncreatecell}
|
||||
|
||||
\func{wxGridCell *}{OnCreateCell}{\void}
|
||||
|
||||
Override this virtual function if you want to replace the normal wxGridCell with a derived
|
||||
class.
|
||||
|
||||
\membersection{wxGrid::OnCellLeftClick}\label{wxgridoncellleftclick}
|
||||
|
||||
\func{void}{OnLeftClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
|
||||
|
||||
Virtual function called when the left button is depressed within a cell, just after OnSelectCell is called.
|
||||
|
||||
\membersection{wxGrid::OnCellRightClick}\label{wxgridoncellrightclick}
|
||||
|
||||
\func{void}{OnRightClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
|
||||
|
||||
Virtual function called when the right button is depressed within a cell, just after OnSelectCell is called.
|
||||
|
||||
\membersection{wxGrid::OnLabelLeftClick}\label{wxgridonlabelleftclick}
|
||||
|
||||
\func{void}{OnLeftClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
|
||||
|
||||
Virtual function called when the left button is depressed within a
|
||||
label.
|
||||
|
||||
{\it row} will be {\it -1} if the click is in the top labels.
|
||||
|
||||
{\it col} will be {\it -1} if the click is in the left labels.
|
||||
|
||||
{\it row} and {\it col} will be {\it -1} if the click is in the upper
|
||||
left corner.
|
||||
|
||||
\membersection{wxGrid::OnLabelRightClick}\label{wxgridonlabelrightclick}
|
||||
|
||||
\func{void}{OnRightClick}{\param{int}{ row}, \param{int}{ col}, \param{int}{ x}, \param{int}{ y}, \param{bool}{ control}, \param{bool}{ shift}}
|
||||
|
||||
Virtual function called when the right button is depressed within a label.
|
||||
|
||||
{\it row} will be {\it -1} if the click is in the top labels.
|
||||
|
||||
{\it col} will be {\it -1} if the click is in the left labels.
|
||||
|
||||
{\it row} and {\it col} will be {\it -1} if the click is in the upper
|
||||
left corner.
|
||||
|
||||
\membersection{wxGrid::OnSelectCell}\label{wxgridonselectcell}
|
||||
|
||||
\func{void}{OnSelectCell}{\param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
Virtual function called when the user left-clicks on a cell.
|
||||
|
||||
\membersection{wxGrid::OnSelectCellImplementation}\label{wxgridonselectcellimplementation}
|
||||
|
||||
\func{void}{OnSelectCellImplementation}{\param{wxDC *}{dc}, \param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
Virtual function called when the user left-clicks on a cell. If you override this function,
|
||||
call wxGrid::OnSelectCell to apply the default behaviour.
|
||||
|
||||
\membersection{wxGrid::SetCellAlignment}\label{wxgridsetcellalignment}
|
||||
|
||||
\func{void}{SetCellAlignment}{\param{int}{ alignment}, \param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
\func{void}{SetCellAlignment}{\param{int}{ alignment}}
|
||||
|
||||
Sets the text alignment for the cell at the given position, or for the whole grid. {\it alignment} may be wxLEFT, wxRIGHT or wxCENTRE.
|
||||
|
||||
\membersection{wxGrid::SetCellBackgroundColour}\label{wxgridsetcellbackgroundcolour}
|
||||
|
||||
\func{void}{SetCellBackgroundColour}{\param{const wxColour\&}{ colour}, \param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
\func{void}{SetCellBackgroundColour}{\param{const wxColour\&}{ colour}}
|
||||
|
||||
Sets the background colour for the cell at the given position, or for the whole grid.
|
||||
|
||||
\membersection{wxGrid::SetCellTextColour}\label{wxgridsetcelltextcolour}
|
||||
|
||||
\func{void}{SetCellTextColour}{\param{const wxColour\&}{ colour}, \param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
\func{void}{SetCellTextColour}{\param{const wxColour\&}{ colour}}
|
||||
|
||||
Sets the text colour for the cell at the given position, or for the whole grid.
|
||||
|
||||
\membersection{wxGrid::SetCellTextFont}\label{wxgridsetcelltextfont}
|
||||
|
||||
\func{void}{SetCellTextFont}{\param{wxFont *}{font}, \param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
\func{void}{SetCellTextFont}{\param{wxFont *}{font}}
|
||||
|
||||
Sets the text font for the cell at the given position, or for the whole grid.
|
||||
|
||||
\membersection{wxGrid::SetCellValue}\label{wxgridsetcellvalue}
|
||||
|
||||
\func{void}{SetCellValue}{\param{const wxString\&}{ val}, \param{int}{ row}, \param{int}{ col}}
|
||||
|
||||
Sets the cell value at the given position.
|
||||
|
||||
\membersection{wxGrid::SetColumnWidth}\label{wxgridsetcolumnwidth}
|
||||
|
||||
\func{void}{SetColumnWidth}{\param{int}{ col}, \param{int}{ width}}
|
||||
|
||||
Sets the width in pixels for column {\it col}.
|
||||
|
||||
\membersection{wxGrid::SetDividerPen}\label{wxgridsetdividerpen}
|
||||
|
||||
\func{void}{SetDividerPen}{\param{wxPen *}{pen}}
|
||||
|
||||
Specifies the pen to be used for drawing the divisions between cells. The default
|
||||
is a light grey. If NULL is specified, the divisions will not be drawn.
|
||||
|
||||
\membersection{wxGrid::SetEditable}\label{wxgridseteditable}
|
||||
|
||||
\func{void}{SetEditable}{\param{bool}{ editable}}
|
||||
|
||||
If {\it editable} is TRUE (the default), the grid cells will be editable by means of the
|
||||
text edit control. If FALSE, the text edit control will be hidden and the user will not
|
||||
be able to edit the cell contents.
|
||||
|
||||
\membersection{wxGrid::SetGridCursor}\label{wxgridsetgridcursor}
|
||||
|
||||
\func{void}{SetGridCursor}{\param{int }{row}, \param{int}{ col}}
|
||||
|
||||
Sets the position of the selected cell.
|
||||
|
||||
\membersection{wxGrid::SetLabelAlignment}\label{wxgridsetlabelalignment}
|
||||
|
||||
\func{void}{SetLabelAlignment}{\param{int}{ orientation}, \param{int}{ alignment}}
|
||||
|
||||
Sets the row or column label alignment. {\it orientation} should
|
||||
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
|
||||
{\it alignment} should be wxCENTRE, wxLEFT or wxRIGHT.
|
||||
|
||||
\membersection{wxGrid::SetLabelBackgroundColour}\label{wxgridsetlabelbackgroundcolour}
|
||||
|
||||
\func{void}{SetLabelBackgroundColour}{\param{const wxColour\&}{ value}}
|
||||
|
||||
Sets a row or column label background colour.
|
||||
|
||||
\membersection{wxGrid::SetLabelSize}\label{wxgridsetlabelsize}
|
||||
|
||||
\func{void}{SetLabelSize}{\param{int}{ orientation}, \param{int}{ size}}
|
||||
|
||||
Sets the row label height, or column label width, in pixels. {\it orientation} should
|
||||
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.
|
||||
|
||||
If a dimension of zero is specified, the row or column labels will not be
|
||||
shown.
|
||||
|
||||
\membersection{wxGrid::SetLabelTextColour}\label{wxgridsetlabeltextcolour}
|
||||
|
||||
\func{void}{SetLabelTextColour}{\param{const wxColour\&}{ value}}
|
||||
|
||||
Sets a row and column label text colour.
|
||||
|
||||
\membersection{wxGrid::SetLabelTextFont}\label{wxgridsetlabeltextfont}
|
||||
|
||||
\func{void}{SetLabelTextFont}{\param{wxFont *}{font}}
|
||||
|
||||
Sets the font to be used for the row and column labels.
|
||||
|
||||
\membersection{wxGrid::SetLabelValue}\label{wxgridsetlabelvalue}
|
||||
|
||||
\func{void}{SetLabelValue}{\param{int}{ orientation}, \param{const wxString\&}{ value}, \param{int}{ pos}}
|
||||
|
||||
Sets a row or column label value. {\it orientation} should
|
||||
be wxHORIZONTAL to specify column label, wxVERTICAL to specify row label.\rtfsp
|
||||
{\it pos} is the label position.
|
||||
|
||||
\membersection{wxGrid::SetRowHeight}\label{wxgridsetrowheight}
|
||||
|
||||
\func{void}{SetRowHeight}{\param{int}{ row}, \param{int}{ height}}
|
||||
|
||||
Sets the height in pixels for row {\it row}.
|
||||
|
||||
\membersection{wxGrid::UpdateDimensions}\label{wxgridupdatedimensions}
|
||||
|
||||
\func{void}{UpdateDimensions}{\void}
|
||||
|
||||
Call this function whenever a change has been made via the API that
|
||||
might alter size characteristics. You may also need to follow it with
|
||||
a call to AdjustScrollbars.
|
||||
|
||||
|
BIN
docs/latex/wx/grid1.bmp
Normal file
After Width: | Height: | Size: 67 KiB |
771
docs/latex/wx/grid1.eps
Normal file
@ -0,0 +1,771 @@
|
||||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: /home/jacs/wx/utils/wxgrid/docs/grid1.eps
|
||||
%%Creator: XV Version 3.10a Rev: 12/29/94 - by John Bradley
|
||||
%%BoundingBox: 36 216 576 576
|
||||
%%Pages: 1
|
||||
%%DocumentFonts:
|
||||
%%EndComments
|
||||
%%EndProlog
|
||||
|
||||
%%Page: 1 1
|
||||
|
||||
% remember original state
|
||||
/origstate save def
|
||||
|
||||
% build a temporary dictionary
|
||||
20 dict begin
|
||||
|
||||
% define space for color conversions
|
||||
/grays 450 string def % space for gray scale line
|
||||
/npixls 0 def
|
||||
/rgbindx 0 def
|
||||
|
||||
% lower left corner
|
||||
36 216 translate
|
||||
|
||||
% size of image (on paper, in 1/72inch coords)
|
||||
540.00000 360.00000 scale
|
||||
|
||||
% define 'colorimage' if it isn't defined
|
||||
% ('colortogray' and 'mergeprocs' come from xwd2ps
|
||||
% via xgrab)
|
||||
/colorimage where % do we know about 'colorimage'?
|
||||
{ pop } % yes: pop off the 'dict' returned
|
||||
{ % no: define one
|
||||
/colortogray { % define an RGB->I function
|
||||
/rgbdata exch store % call input 'rgbdata'
|
||||
rgbdata length 3 idiv
|
||||
/npixls exch store
|
||||
/rgbindx 0 store
|
||||
0 1 npixls 1 sub {
|
||||
grays exch
|
||||
rgbdata rgbindx get 20 mul % Red
|
||||
rgbdata rgbindx 1 add get 32 mul % Green
|
||||
rgbdata rgbindx 2 add get 12 mul % Blue
|
||||
add add 64 idiv % I = .5G + .31R + .18B
|
||||
put
|
||||
/rgbindx rgbindx 3 add store
|
||||
} for
|
||||
grays 0 npixls getinterval
|
||||
} bind def
|
||||
|
||||
% Utility procedure for colorimage operator.
|
||||
% This procedure takes two procedures off the
|
||||
% stack and merges them into a single procedure.
|
||||
|
||||
/mergeprocs { % def
|
||||
dup length
|
||||
3 -1 roll
|
||||
dup
|
||||
length
|
||||
dup
|
||||
5 1 roll
|
||||
3 -1 roll
|
||||
add
|
||||
array cvx
|
||||
dup
|
||||
3 -1 roll
|
||||
0 exch
|
||||
putinterval
|
||||
dup
|
||||
4 2 roll
|
||||
putinterval
|
||||
} bind def
|
||||
|
||||
/colorimage { % def
|
||||
pop pop % remove 'false 3' operands
|
||||
{colortogray} mergeprocs
|
||||
image
|
||||
} bind def
|
||||
} ifelse % end of 'false' case
|
||||
|
||||
|
||||
|
||||
% define the colormap
|
||||
/cmap 39 string def
|
||||
|
||||
|
||||
% load up the colormap
|
||||
currentfile cmap readhexstring
|
||||
000000 bf0000 00bf00 bfbf00 0000bf 00bfbf c0c0c0 808080 ff0000 00ff00
|
||||
ffff00 00ffff ffffff
|
||||
pop pop % lose return values from readhexstring
|
||||
|
||||
|
||||
% rlecmapimage expects to have 'w h bits matrix' on stack
|
||||
/rlecmapimage {
|
||||
/buffer 1 string def
|
||||
/rgbval 3 string def
|
||||
/block 384 string def
|
||||
|
||||
% proc to read a block from file, and return RGB data
|
||||
{ currentfile buffer readhexstring pop
|
||||
/bcount exch 0 get store
|
||||
bcount 128 ge
|
||||
{ % it's a non-run block
|
||||
0 1 bcount 128 sub
|
||||
{ currentfile buffer readhexstring pop pop
|
||||
|
||||
% look up value in color map
|
||||
/rgbval cmap buffer 0 get 3 mul 3 getinterval store
|
||||
|
||||
% and put it in position i*3 in block
|
||||
block exch 3 mul rgbval putinterval
|
||||
} for
|
||||
block 0 bcount 127 sub 3 mul getinterval
|
||||
}
|
||||
|
||||
{ % else it's a run block
|
||||
currentfile buffer readhexstring pop pop
|
||||
|
||||
% look up value in colormap
|
||||
/rgbval cmap buffer 0 get 3 mul 3 getinterval store
|
||||
|
||||
0 1 bcount { block exch 3 mul rgbval putinterval } for
|
||||
|
||||
block 0 bcount 1 add 3 mul getinterval
|
||||
} ifelse
|
||||
} % end of proc
|
||||
false 3 colorimage
|
||||
} bind def
|
||||
|
||||
|
||||
450 300 8 % dimensions of data
|
||||
[450 0 0 -300 0 300] % mapping matrix
|
||||
rlecmapimage
|
||||
|
||||
7f067f067f0640060000
|
||||
81060c7f0c7f0c7f0c3d0c810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c068106047f047f047f0438040106810700
|
||||
82060c068106048204060c820c060783070c0702010203098102047f047f047f04260401
|
||||
06810700
|
||||
82060c068106048104060106830001020781070283020702098109028102047f047f0472
|
||||
040e0c81000c0d0c81000481040c0d0c81000481040682060700
|
||||
82060c06810604810406010601008102078507020902070201028109047f047f04720481
|
||||
0c060b068307000c060b068207000482040c060b068207000481040682060700
|
||||
82060c0681060481040601068300040307820702098409020702098109041104040c0604
|
||||
010c0404010c0504030c1904010c7f047f042504810c060b068307000c06810600070001
|
||||
068207000482040c060b068207000481040682060700
|
||||
82060c0681060481040601068304000a0789070209020002070209041004010c0204010c
|
||||
0c04010c0404010c0104010c1804010c7f047f042504810c060b068307000c0681060007
|
||||
0001068207000482040c06010601000306010001068207000481040682060700
|
||||
82060c068106048204070681060001000107010286000209020702041004010c1104010c
|
||||
0404010c1c04010c7f047f042504810c060b068307000c06820600060506810006830607
|
||||
000482040c06020601000106010002068207000481040682060700
|
||||
82060c0681060485040c0607060c010c8407020002090109820200040104010c81040c82
|
||||
0c040c820c040c820c040c820c040c810c040504020c81040c810c0481040c030c040401
|
||||
0c0604030c0104060c0104040c0104010c0104030c7f047f041f04810c060b068307000c
|
||||
06820600060506810006830607000482040c060306030003068207000481040682060700
|
||||
|
||||
82060c068106048104070507010006020204010c81040c820c040c820c040c820c040c82
|
||||
0c040c820c040c020c0104010c0104010c81040c810c0481040c810c040404030c060401
|
||||
0c81040c820c040c820c040c820c040c810c0481040c820c040c820c040c810c0481040c
|
||||
810c047f047f041d04810c060b068307000c06820600060506810006830607000482040c
|
||||
060406010004068207000481040682060700
|
||||
82060c068106048104050505010006030204070c0104020c0104010c0204010c0104010c
|
||||
0104010c81040c810c0481040c810c040704010c0204040c81040c820c040c820c040c82
|
||||
0c040c810c0481040c820c040c820c040c040c7f047f041e04810c060b068307000c0682
|
||||
0600060506810006830607000482040c060306030003068207000481040682060700
|
||||
82060c0681060481040b010b8205010b830b05030a020a81030a810a040104070c010402
|
||||
0c0104010c0204010c0104010c0104010c81040c810c0481040c810c040704010c010401
|
||||
0c0104010c81040c820c040c820c040c820c040c810c0481040c820c040c820c040c810c
|
||||
047f047f042104810c060b068307000c06820600060506810006830607000482040c0602
|
||||
0601000106010002068207000481040682060700
|
||||
82060c068106048c040b05070507050b05030a030a840a03000a040204010c0104010c01
|
||||
04010c81040c820c040c810c0481040c010c0104010c0104010c81040c810c0481040c81
|
||||
0c040304010c0104010c0104010c0104010c81040c820c040c820c040c820c040c810c04
|
||||
81040c820c040c820c040c810c0481040c810c047f047f041d04810c0601060500030683
|
||||
07000c06820600060506810006830607000482040c060106010003060100010682070004
|
||||
81040682060700
|
||||
82060c0681060482040b08020886070b05030a030a010a82030a040204010c0104010c01
|
||||
04010c81040c810c0481040c040c0104010c0104010c0104040c0504030c0304040c8104
|
||||
0c820c040c820c040c820c040c030c0104010c0104030c7f047f041f04810c0601060500
|
||||
03068307000c06810600070001068207000482040c060b068207000481040682060700
|
||||
82060c0681060482040b080208010b8205030a810a0384030a030a044304010c7f047f04
|
||||
2c04810c060b068307000c060b068207000482040c060b068207000481040682060700
|
||||
82060c0681060482040b080308850b05030a030a010a82000a044304010c7f047f042c04
|
||||
810c070c0782000c070c0781000482040c070c0781000481040682060700
|
||||
82060c068106048c040b05080108010b05030a030a810a0382030a047f047f0472041f00
|
||||
01040f0001040106810700
|
||||
82060c0681060481040b050b8205030a050a7f047f047f0427040106810700
|
||||
82060c068106047f047f047f0438040106810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c0607060400840600060006120602000e068100067f067f067f060306810700
|
||||
82060c0607068100060506810006110681000601068100060606810006820600067f067f
|
||||
067f060606810700
|
||||
82060c060706810006050681000611068100060a06810006820600067f067f067f060606
|
||||
810700
|
||||
82060c0607068100060306830006000681060001000d0681000605060200010601008106
|
||||
00860006000600060081000601060300010601007f067f067406810700
|
||||
82060c060706030001068500060006000601068100060c06020002068100060106830006
|
||||
000682060006830600060081000684060006000601068300060006820600067f067f0672
|
||||
06810700
|
||||
82060c060706810006030684000600060003001006810006810600030082060006820600
|
||||
06840600060006010683000600060106810006820600067f067f067406810700
|
||||
82060c060706810006030685000600060006130681000682060006030681000682060006
|
||||
84060006000601068300060006010681000601068100067f067f067306810700
|
||||
82060c06070681000603068500060006000601068100060b068100060106810006820600
|
||||
060106830006000682060006840600060006010683000600060106830006000682060006
|
||||
7f067f067206810700
|
||||
82060c0607068100060306830006000681060001000e0602000306020002068100068606
|
||||
00060006000601068100068106000200010601007f067f067406810700
|
||||
82060c0642068100067f067f067706810700
|
||||
82060c060606050015060600140603007f067f067906810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c061b067f077f077f071e070106810700
|
||||
82060c061b068107007f007f007f001b000206810700
|
||||
82060c061b068207000c7f0c7f0c7f0c1a0c0206810700
|
||||
82060c061b068207000c7f0c7f0c7f0c1a0c0206810700
|
||||
82060c061b068207000c7f0c7f0c7f0c1a0c0206810700
|
||||
82060c061b068207000c7f0c7f0c7f0c1a0c0206810700
|
||||
82060c061b068207000c810c000200820c000c0a0c81000c0f0c81000c820c000c7f0c7f
|
||||
0c700c0206810700
|
||||
82060c060806810006040681000609068207000c820c000c0f0c81000c0f0c81000c820c
|
||||
000c7f0c7f0c700c0206810700
|
||||
82060c0607068300060006020601000a068207000c820c000c020c81000c810c00010001
|
||||
0c0600040c0200020c0200010c81000c820c000c7f0c7f0c700c0206810700
|
||||
82060c06070683000600060106830006000609068207000c810c000200820c000c820c00
|
||||
0c010c81000c030c81000c030c81000c010c83000c000c010c83000c000c820c000c7f0c
|
||||
7f0c700c0206810700
|
||||
82060c0606068100060106810006020681000609068207000c820c000c020c81000c820c
|
||||
000c020c0200010c81000c030c81000c030c0400820c000c820c000c7f0c7f0c700c0206
|
||||
810700
|
||||
82060c0606060400030681000609068207000c820c000c020c81000c820c000c050c8300
|
||||
0c000c030c81000c010c83000c000c030c81000c820c000c7f0c7f0c700c0206810700
|
||||
82060c0606068100060106810006020681000609068207000c820c000c020c81000c820c
|
||||
000c010c0300010c0100040c0200020c0300820c000c820c000c7f0c7f0c700c02068107
|
||||
00
|
||||
82060c0605068100060306810006010681000609068207000c7f0c7f0c7f0c1a0c020681
|
||||
0700
|
||||
82060c061b068207000c7f0c7f0c7f0c1a0c0206810700
|
||||
82060c061b068207000c7f0c7f0c7f0c1a0c0206810700
|
||||
82060c061b068207000c7f0c7f0c7f0c1a0c0206810700
|
||||
82060c061b068207000c7f0c7f0c7f0c1a0c0206810700
|
||||
82060c061b068107067f067f067f061e06810700
|
||||
82060c061b067f0c7f0c7f0c1e0c0106810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c068106007f007f007f0028000e0681000682060700
|
||||
82060c0682060006250681000c4d0c81000c4d0c81000c4d0c81000c7f0c0f0c81060c0b
|
||||
0c8207000682060700
|
||||
82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06
|
||||
810c060a068207000682060700
|
||||
82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06
|
||||
810c060a068207000682060700
|
||||
82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06
|
||||
810c060a068207000682060700
|
||||
82060c0682060006250682000c0624060200240682000c0622060500230682000c062406
|
||||
0400220682000c065e0604002b06810c060a068207000682060700
|
||||
82060c0682060006250682000c0624060200240682000c06220601000206010022068200
|
||||
0c062306010002060100210682000c065e060100010601002a06810c0603068100060406
|
||||
8207000682060700
|
||||
82060c0682060006250682000c0623060100810600810006220682000c06220601000206
|
||||
0100220682000c0622060100270682000c065e060100020601002906810c060206020004
|
||||
068207000682060700
|
||||
82060c0682060006250682000c0623060100810600810006220682000c06220601000206
|
||||
0100220682000c0622060100270682000c065e060100020601002906810c060106040003
|
||||
068207000682060700
|
||||
82060c0682060006250682000c0623060100810600810006220682000c06220605002306
|
||||
82000c0622060100270682000c065e060100020601002906810c06810600050002068207
|
||||
000682060700
|
||||
82060c0682060006250682000c062206010002060100220682000c062206010002060100
|
||||
220682000c0622060100270682000c065e060100020601002906810c060a068207000682
|
||||
060700
|
||||
82060c0682060006250682000c062206010002060100220682000c062206010002060100
|
||||
220682000c0622060100270682000c065e060100020601002906810c060a068207000682
|
||||
060700
|
||||
82060c0682060006250682000c0622060600220682000c06220601000206010022068200
|
||||
0c0622060100270682000c065e060100020601002906810c060a068207000682060700
|
||||
82060c0682060006250682000c062106010004060100210682000c062206010002060100
|
||||
220682000c062306010002060100210682000c065e060100010601002a06810c060a0682
|
||||
07000682060700
|
||||
82060c0682060006250682000c062106010004060100210682000c062206050023068200
|
||||
0c0624060400220682000c065e0604002b060d0781000682060700
|
||||
82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060e06
|
||||
0f000106810700
|
||||
82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f061d06
|
||||
81000682060700
|
||||
82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06
|
||||
0c0c8207000682060700
|
||||
82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06
|
||||
810c060a068207000682060700
|
||||
82060c0682060006250682000c064c0682000c064c0682000c064c0682000c067f060f06
|
||||
810c060a068207000682060700
|
||||
82060c068106007f007f007f00280082060c060a068207000682060700
|
||||
82060c068206000c250c4f0081060c4d0c81060c4d0c81060c7f0c0f0c82060c060a0682
|
||||
07000682060700
|
||||
82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c
|
||||
060a068207000682060700
|
||||
82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c
|
||||
060a068207000682060700
|
||||
82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c
|
||||
060a068207000682060700
|
||||
82060c068306000c0624060100030c0700210c0100010c0100180c8200060c4d0c81060c
|
||||
4d0c81060c7f0c0f0c82060c060a068207000682060700
|
||||
82060c068306000c061006010011060100040c81000c030c83000c000c0b0c81000c110c
|
||||
81000c010c81000c170c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c060a068207
|
||||
000682060700
|
||||
82060c068306000c060f06020011060100040c81000c820c000c820c000c0d0c81000c11
|
||||
0c81000c010c81000c170c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c060a0682
|
||||
07000682060700
|
||||
82060c068306000c060e06030011060100040c81000c820c000c010c0100810c0082000c
|
||||
0082000c000100810c000200050c0200020c0200020c81000c010c81000c170c8200060c
|
||||
4d0c81060c4d0c81060c7f0c0f0c82060c060a068207000682060700
|
||||
82060c068306000c060e068200060081000610060100040c0300030c81000c840c000c00
|
||||
0c820c000c020c81000c050c81000c820c000c820c000c820c000c820c000c010c81000c
|
||||
180c8200060c4d0c81060c4d0c81060c7f0c0f0c82060c060a068207000682060700
|
||||
82060c068306000c061006010011060100030c81000c820c000c020c81000c010c010002
|
||||
0c81000c020c81000c050c81000c020c81000c010c81000c820c000c010c81000c180c82
|
||||
00060c4d0c81060c4d0c81060c7f0c0f0c8106070c0781000682060700
|
||||
82060c068306000c061006010011060100030c81000c820c000c020c81000c010c81000c
|
||||
030c81000c010c81000c040c81000c030c81000c820c000c010c81000c010c81000c180c
|
||||
8200060c4d0c81060c4d0c81060c7f0c0f0c0f000106810700
|
||||
82060c068306000c061006010011060100030c81000c050c81000c010c81000c040c8100
|
||||
0c820c000c040c81000c030c0200030c81000c010c81000c180c8200060c4d0c81060c4d
|
||||
0c81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c061006010011060100020c81000c050c81000c010c81000c020c8100
|
||||
0c860c000c000c000c030c81000c820c000c820c000c010c83000c000c010c81000c190c
|
||||
8200060c4d0c81060c4d0c81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c061006010011060100010c0200050c0100010c81000c020c0200010c
|
||||
0100060c0100030c0200010c0100010c0100190c8200060c4d0c81060c4d0c81060c7f0c
|
||||
0f0c8107060c0681070682060700
|
||||
82060c068306000c0610060100110601004c0c8200060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240601004c0c8200060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068206000625064f0081060c4d0c81060c4d0c81060c7f0c0f0c8107060c068107
|
||||
0682060700
|
||||
82060c0681060027007f067f067f06820607060c0681070682060700
|
||||
82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c050c81080c150c81080c210c81080c820c
|
||||
080c060c81060c4d0c81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060e060300110681000c4d0c81060c040c83080c080c100c81080c01
|
||||
0c81080c210c81080c820c080c060c81060c4d0c81060c7f0c0f0c8107060c0681070682
|
||||
060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c040c83080c080c100c
|
||||
81080c010c81080c210c81080c820c080c060c81060c4d0c81060c7f0c0f0c8107060c06
|
||||
81070682060700
|
||||
82060c068306000c0611060100100681000c4d0c81060c040c83080c080c020c82080c08
|
||||
81080c020c0208010c0208010c82080c0881080c020c0208020c83080c080c040c020803
|
||||
0c0208020c81080c820c080c060c81060c4d0c81060c7f0c0f0c8107060c068107068206
|
||||
0700
|
||||
82060c068306000c0611060100100681000c4d0c81060c030c81080c010c81080c010c01
|
||||
08010c81080c820c080c010c81080c820c080c010c0108010c81080c820c080c010c8108
|
||||
0c810c0881080c040c81080c010c81080c820c080c010c81080c820c080c820c080c060c
|
||||
81060c4d0c81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c0610060100110681000c4d0c81060c030c81080c010c81080c010c81
|
||||
080c010c81080c820c080c010c81080c820c080c010c81080c010c81080c820c080c010c
|
||||
81080c820c080c050c81080c040c81080c010c81080c820c080c820c080c060c81060c4d
|
||||
0c81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060f060200110681000c4d0c81060c020c0608010c81080c010c8108
|
||||
0c820c080c010c81080c820c080c010c81080c010c81080c810c080308010c81080c050c
|
||||
81080c040c0408010c81080c820c080c060c81060c4d0c81060c7f0c0f0c8107060c0681
|
||||
070682060700
|
||||
82060c068306000c060f060100120681000c4d0c81060c020c81080c030c81080c820c08
|
||||
0c010c81080c820c080c010c81080c820c080c010c81080c010c81080c820c080c040c81
|
||||
080c050c81080c040c81080c040c81080c820c080c060c81060c4d0c81060c7f0c0f0c81
|
||||
07060c0681070682060700
|
||||
82060c068306000c060e060100130681000c4d0c81060c010c81080c050c83080c080c01
|
||||
0c81080c820c080c010c81080c820c080c010c81080c010c81080c820c080c010c81080c
|
||||
820c080c050c81080c010c81080c820c080c010c81080c820c080c820c080c060c81060c
|
||||
4d0c81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d060100140681000c4d0c81060c010c81080c050c83080c080c01
|
||||
0c81080c010c0208020c0108010c81080c010c81080c010c0208020c81080c060c020803
|
||||
0c0208020c81080c820c080c060c81060c4d0c81060c7f0c0f0c8107060c068107068206
|
||||
0700
|
||||
82060c068306000c060d060500100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c0681060027007f067f067f06820607060c0681070682060700
|
||||
82060c068206000c250c81000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060b020b81000b030b81000b280b
|
||||
81000b170b81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060e060300110681000c4d0c81060c4d0c81060b030b81000b010b81
|
||||
000b080b81000b1a0b81000b010b81000b170b81060c7f0c0f0c8107060c068107068206
|
||||
0700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060b030b8100
|
||||
0b010b81000b080b81000b1a0b81000b010b81000b170b81060c7f0c0f0c8107060c0681
|
||||
070682060700
|
||||
82060c068306000c0611060100100681000c4d0c81060c4d0c81060b040b83000b000b03
|
||||
0b0200010b0200060b0200020b82000b0081000b020b0200010b0200010b82000b008100
|
||||
0b020b0200020b83000b000b040b81000b820b060c7f0c0f0c8107060c06810706820607
|
||||
00
|
||||
82060c068306000c0611060100100681000c4d0c81060c4d0c81060b040b83000b000b02
|
||||
0b81000b010b81000b820b000b050b81000b010b81000b810b0081000b820b000b820b00
|
||||
0b010b81000b820b000b010b0100010b81000b820b000b010b81000b810b0081000b040b
|
||||
81000b010b81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060f060200110681000c4d0c81060c4d0c81060b050b81000b030b81
|
||||
000b010b81000b820b000b090b81000b820b000b010b81000b820b000b010b81000b820b
|
||||
000b010b81000b010b81000b820b000b010b81000b820b000b050b81000b010b81060c7f
|
||||
0c0f0c8107060c0681070682060700
|
||||
82060c068306000c0611060100100681000c4d0c81060c4d0c81060b050b81000b030b04
|
||||
00010b81000b060b0300010b81000b010b81000b820b000b010b81000b820b000b010b81
|
||||
000b010b81000b810b000300010b81000b050b81000b010b81060c7f0c0f0c8107060c06
|
||||
81070682060700
|
||||
82060c068306000c0611060100100681000c4d0c81060c4d0c81060b050b81000b030b81
|
||||
000b040b81000b050b81000b010b81000b820b000b010b81000b820b000b010b81000b82
|
||||
0b000b010b81000b010b81000b820b000b040b81000b050b81000b010b81060c7f0c0f0c
|
||||
8107060c0681070682060700
|
||||
82060c068306000c0611060100100681000c4d0c81060c4d0c81060b050b81000b030b81
|
||||
000b010b81000b820b000b050b81000b810b0081000b820b000b010b81000b820b000b01
|
||||
0b81000b820b000b010b81000b010b81000b820b000b010b81000b820b000b050b81000b
|
||||
010b81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060b050b8100
|
||||
0b040b0200020b0100060b0100820b000b820b000b010b81000b010b0200020b0100010b
|
||||
81000b010b81000b010b0200020b81000b060b81000b820b060c7f0c0f0c8107060c0681
|
||||
070682060700
|
||||
82060c068306000c060e060300110681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c0682060006250681000c4d0c81060c4d0c81060b4d0b81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c0681060027007f067f067f06820607060c0681070682060700
|
||||
82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060f060200110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060f060200110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060e0682000600810006100681000c4d0c81060c4d0c81060c4d0c81
|
||||
060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060e0682000600810006100681000c4d0c81060c4d0c81060c4d0c81
|
||||
060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d06810006810600810006100681000c4d0c81060c4d0c81060c4d
|
||||
0c81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d060500100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c0681060027007f067f067f06820607060c0681070682060700
|
||||
82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c060e060400100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060e060100130681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060d060100140681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060d060400110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c0611060100100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c0611060100100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c0611060100100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c0681060027007f067f067f06820607060c0681070682060700
|
||||
82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c060f060200110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060e068100068106008100060f0681000c4d0c81060c4d0c81060c4d
|
||||
0c81060c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d060100140681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060d060100140681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060d060400110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c0681060027007f067f067f06820607060c0681070682060700
|
||||
82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c060d060500100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c0611060100100681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c0610060100110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060f060100120681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060f060100120681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060f060100120681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060e060100130681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060e060100130681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060e060100130681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c0681060027007f067f067f06820607060c0681070682060700
|
||||
82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c8107060c
|
||||
0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c810706
|
||||
0c0681070682060700
|
||||
82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c8107060c0681070682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c0e0681000682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c81060c0b0c8207000682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c82060c060a068207000682060700
|
||||
82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c82060c060a068207000682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c
|
||||
060a068207000682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c
|
||||
060a068207000682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c
|
||||
06810600050002068207000682060700
|
||||
82060c0682060006250681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c06
|
||||
0106040003068207000682060700
|
||||
82060c0681060027007f067f067f060106810c060206020004068207000682060700
|
||||
82060c068206000c250c81000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c06
|
||||
030681000604068207000682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c
|
||||
060a068207000682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c
|
||||
060a068207000682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c
|
||||
060a068207000682060700
|
||||
82060c068306000c06240681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f0c82060c
|
||||
060a068207000682060700
|
||||
82060c068306000c060e060300110681000c4d0c81060c4d0c81060c4d0c81060c7f0c0f
|
||||
0c8106070c0781000682060700
|
||||
82060c068306000c060d06010001060100100681000c4d0c81060c4d0c81060c4d0c8106
|
||||
0c7f0c0f0c0f000106810700
|
||||
82060c060f068100060d068100077f077f0778070e068100061006810700
|
||||
82060c0601060c0c830700060c0b0c820700067f067f0679060c0c820700061006810700
|
||||
|
||||
82060c060106810c060a06840700060c060a06820700067f067f067906810c060a068207
|
||||
00061006810700
|
||||
82060c060106810c060a06840700060c060a06820700067f067f067906810c060a068207
|
||||
00061006810700
|
||||
82060c060106810c0604068100060306840700060c060a06820700067f067f067906810c
|
||||
0602068100060506820700061006810700
|
||||
82060c060106810c06030601000406840700060c060a06820700067f067f067906810c06
|
||||
020601000506820700061006810700
|
||||
82060c060106810c06020602000406840700060c060a06820700067f067f067906810c06
|
||||
020602000406820700061006810700
|
||||
82060c060106810c06010603000406840700060c060a06820700067f067f067906810c06
|
||||
020603000306820700061006810700
|
||||
82060c060106810c06020602000406840700060c060a06820700067f067f067906810c06
|
||||
020602000406820700061006810700
|
||||
82060c060106810c06030601000406840700060c060a06820700067f067f067906810c06
|
||||
020601000506820700061006810700
|
||||
82060c060106810c0604068100060306840700060c060a06820700067f067f067906810c
|
||||
0602068100060506820700061006810700
|
||||
82060c060106810c060a06840700060c060a06820700067f067f067906810c060a068207
|
||||
00061006810700
|
||||
82060c060106810c060a06840700060c060a06820700067f067f067906810c060a068207
|
||||
00061006810700
|
||||
82060c060106810c060a06840700060c060a06820700067f067f067906810c060a068207
|
||||
00061006810700
|
||||
82060c0601060d07820006070c078100067f067f0679060d078100061006810700
|
||||
82060c068106001e007f077f0779070f001106810700
|
||||
82060c067f067f067f063c06810700
|
||||
82060c067f067f067f063c06810700
|
||||
8106077f077f077f073e070000
|
||||
7f007f007f004100
|
||||
|
||||
%
|
||||
% Compression made this file 3.88% of the uncompressed size.
|
||||
%
|
||||
|
||||
|
||||
showpage
|
||||
|
||||
% stop using temporary dictionary
|
||||
end
|
||||
|
||||
% restore original state
|
||||
origstate restore
|
||||
|
||||
%%Trailer
|
BIN
docs/latex/wx/grid1.gif
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
docs/latex/wx/hand1.bmp
Normal file
After Width: | Height: | Size: 454 B |
118
docs/latex/wx/hash.tex
Normal file
@ -0,0 +1,118 @@
|
||||
\section{\class{wxHashTable}}\label{wxhashtable}
|
||||
|
||||
This class provides hash table functionality for wxWindows, and for an
|
||||
application if it wishes. Data can be hashed on an integer or string
|
||||
key.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Example}
|
||||
|
||||
Below is an example of using a hash table.
|
||||
|
||||
\begin{verbatim}
|
||||
wxHashTable table(KEY_STRING);
|
||||
|
||||
wxPoint *point = new wxPoint(100, 200);
|
||||
table.Put("point 1", point);
|
||||
|
||||
....
|
||||
|
||||
wxPoint *found_point = (wxPoint *)table.Get("point 1");
|
||||
\end{verbatim}
|
||||
|
||||
A hash table is implemented as an array of pointers to lists. When no
|
||||
data has been stored, the hash table takes only a little more space than
|
||||
this array (default size is 1000). When a data item is added, an
|
||||
integer is constructed from the integer or string key that is within the
|
||||
bounds of the array. If the array element is NULL, a new (keyed) list is
|
||||
created for the element. Then the data object is appended to the list,
|
||||
storing the key in case other data objects need to be stored in the list
|
||||
also (when a `collision' occurs).
|
||||
|
||||
Retrieval involves recalculating the array index from the key, and searching
|
||||
along the keyed list for the data object whose stored key matches the passed
|
||||
key. Obviously this is quicker when there are fewer collisions, so hashing
|
||||
will become inefficient if the number of items to be stored greatly exceeds
|
||||
the size of the hash table.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxList}{wxlist}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHashTable::wxHashTable}
|
||||
|
||||
\func{}{wxHashTable}{\param{unsigned int}{ key\_type}, \param{int}{ size = 1000}}
|
||||
|
||||
Constructor. {\it key\_type} is one of wxKEY\_INTEGER, or wxKEY\_STRING,
|
||||
and indicates what sort of keying is required. {\it size} is optional.
|
||||
|
||||
\membersection{wxHashTable::\destruct{wxHashTable}}
|
||||
|
||||
\func{}{\destruct{wxHashTable}}{\void}
|
||||
|
||||
Destroys the hash table.
|
||||
|
||||
\membersection{wxHashTable::BeginFind}
|
||||
|
||||
\func{void}{BeginFind}{\void}
|
||||
|
||||
The counterpart of {\it Next}. If the application wishes to iterate
|
||||
through all the data in the hash table, it can call {\it BeginFind} and
|
||||
then loop on {\it Next}.
|
||||
|
||||
\membersection{wxHashTable::Clear}
|
||||
|
||||
\func{void}{Clear}{\void}
|
||||
|
||||
Clears the hash table of all nodes (but as usual, doesn't delete user data).
|
||||
|
||||
\membersection{wxHashTable::Delete}
|
||||
|
||||
\func{wxObject *}{Delete}{\param{long}{ key}}
|
||||
|
||||
\func{wxObject *}{Delete}{\param{const wxString\& }{ key}}
|
||||
|
||||
Deletes entry in hash table and returns the user's data (if found).
|
||||
|
||||
\membersection{wxHashTable::Get}
|
||||
|
||||
\func{wxObject *}{Get}{\param{long}{ key}}
|
||||
|
||||
\func{wxObject *}{Get}{\param{const wxString\& }{ key}}
|
||||
|
||||
Gets data from the hash table, using an integer or string key (depending on which
|
||||
has table constructor was used).
|
||||
|
||||
\membersection{wxHashTable::MakeKey}
|
||||
|
||||
\func{long}{MakeKey}{\param{const wxString\& }{string}}
|
||||
|
||||
Makes an integer key out of a string. An application may wish to make a key
|
||||
explicitly (for instance when combining two data values to form a key).
|
||||
|
||||
\membersection{wxHashTable::Next}
|
||||
|
||||
\func{wxNode *}{Next}{\void}
|
||||
|
||||
If the application wishes to iterate through all the data in the hash
|
||||
table, it can call {\it BeginFind} and then loop on {\it Next}. This function
|
||||
returns a {\bf wxNode} pointer (or NULL if there are no more nodes). See the
|
||||
description for \helpref{wxNode}{wxnode}. The user will probably only wish to use the
|
||||
{\bf wxNode::Data} function to retrieve the data; the node may also be deleted.
|
||||
|
||||
\membersection{wxHashTable::Put}
|
||||
|
||||
\func{void}{Put}{\param{long}{ key}, \param{wxObject *}{object}}
|
||||
|
||||
\func{void}{Put}{\param{const wxString\& }{ key}, \param{wxObject *}{object}}
|
||||
|
||||
Inserts data into the hash table, using an integer or string key (depending on which
|
||||
has table constructor was used). The key string is copied and stored by the hash
|
||||
table implementation.
|
||||
|
||||
|
BIN
docs/latex/wx/hellow.bmp
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
docs/latex/wx/hellow.gif
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
docs/latex/wx/hellox.bmp
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
docs/latex/wx/hellox.gif
Normal file
After Width: | Height: | Size: 8.7 KiB |
130
docs/latex/wx/helpinst.tex
Normal file
@ -0,0 +1,130 @@
|
||||
\section{\class{wxHelpInstance}}\label{wxhelpinstance}
|
||||
|
||||
NOTE: this documentation is out of date (see comments below).
|
||||
|
||||
The {\bf wxHelpInstance} class implements the interface by which
|
||||
applications may invoke wxHelp to provide on-line help. Each instance
|
||||
of the class maintains one connection to an instance of wxHelp which
|
||||
belongs to the application, and which is shut down when the Quit
|
||||
member of {\bf wxHelpInstance} is called (for example in the {\bf
|
||||
OnClose} member of an application's main frame). Under MS Windows,
|
||||
there is currently only one instance of wxHelp which is used by all
|
||||
applications.
|
||||
|
||||
Since there is a DDE link between the two programs, each subsequent
|
||||
request to display a file or section uses the existing instance of
|
||||
wxHelp, rather than starting a new instance each time. wxHelp thus
|
||||
appears to the user to be an extension of the current application.
|
||||
wxHelp may also be invoked independently of a client application.
|
||||
|
||||
Normally an application will create an instance of {\bf
|
||||
wxHelpInstance} when it starts, and immediately call {\bf Initialize}\rtfsp
|
||||
to associate a filename with it. wxHelp will only get run, however,
|
||||
just before the first call to display something. See the test program
|
||||
supplied with the wxHelp source.
|
||||
|
||||
Include the file {\tt wx\_help.h} to use this API, even if you have
|
||||
included {\tt wx.h}.
|
||||
|
||||
If you give TRUE to the constructor, you can use the native help system
|
||||
where appropriate (currently under Windows only). Omit the file extension
|
||||
to allow wxWindows to choose the appropriate file for the platform.
|
||||
|
||||
TODO: no longer derive this from a client class, but maybe have several implementations,
|
||||
e.g. wxHelpInstanceBase, wxHelpInstanceDDE, wxHelpInstanceWinHelp, wxHelpInstanceHTML, etc.
|
||||
|
||||
\wxheading{Derivation}
|
||||
|
||||
TODO
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
TODO
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHelpInstance::wxHelpInstance}
|
||||
|
||||
\func{}{wxHelpInstance}{\param{bool}{ native}}
|
||||
|
||||
Constructs a help instance object, but does not invoke wxHelp.
|
||||
If {\it native} is TRUE, tries to use the native help system where
|
||||
possible (Windows Help under MS Windows, wxHelp on other platforms).
|
||||
|
||||
\membersection{wxHelpInstance::\destruct{wxHelpInstance}}
|
||||
|
||||
\func{}{\destruct{wxHelpInstance}}{\void}
|
||||
|
||||
Destroys the help instance, closing down wxHelp for this application
|
||||
if it is running.
|
||||
|
||||
\membersection{wxHelpInstance::Initialize}
|
||||
|
||||
\func{void}{Initialize}{\param{const wxString\& }{file}, \param{int}{ server = -1}}
|
||||
|
||||
Initializes the help instance with a help filename, and optionally a server (socket)
|
||||
number (one is chosen at random if this parameter is omitted). Does not invoke wxHelp.
|
||||
This must be called directly after the help instance object is created and before
|
||||
any attempts to communicate with wxHelp.
|
||||
|
||||
You may omit the file extension, and in fact this is recommended if you
|
||||
wish to support .xlp files under X and .hlp under Windows.
|
||||
|
||||
\membersection{wxHelpInstance::DisplayBlock}
|
||||
|
||||
\func{bool}{DisplayBlock}{\param{long}{ blockNo}}
|
||||
|
||||
If wxHelp is not running, runs wxHelp and displays the file at the given block number.
|
||||
If using Windows Help, displays the file at the given context number.
|
||||
|
||||
\membersection{wxHelpInstance::DisplayContents}
|
||||
|
||||
\func{bool}{DisplayContents}{\void}
|
||||
|
||||
If wxHelp is not running, runs wxHelp (or Windows Help) and displays the
|
||||
contents (the first section of the file).
|
||||
|
||||
\membersection{wxHelpInstance::DisplaySection}
|
||||
|
||||
\func{bool}{DisplaySection}{\param{int}{ sectionNo}}
|
||||
|
||||
If wxHelp is not running, runs wxHelp and displays the given section.
|
||||
Sections are numbered starting from 1, and section numbers may be viewed by running
|
||||
wxHelp in edit mode.
|
||||
|
||||
\membersection{wxHelpInstance::KeywordSearch}
|
||||
|
||||
\func{bool}{KeywordSearch}{\param{const wxString\& }{keyWord}}
|
||||
|
||||
If wxHelp (or Windows Help) is not running, runs wxHelp (or Windows
|
||||
Help), and searches for sections matching the given keyword. If one
|
||||
match is found, the file is displayed at this section. If more than one
|
||||
match is found, the Search dialog is displayed with the matches (wxHelp)
|
||||
or the first topic is displayed (Windows Help).
|
||||
|
||||
\membersection{wxHelpInstance::LoadFile}
|
||||
|
||||
\func{bool}{LoadFile}{\param{const wxString\& }{file = NULL}}
|
||||
|
||||
If wxHelp (or Windows Help) is not running, runs wxHelp (or Windows
|
||||
Help), and loads the given file. If the filename is not supplied or is
|
||||
NULL, the file specified in {\bf Initialize} is used. If wxHelp is
|
||||
already displaying the specified file, it will not be reloaded. This
|
||||
member function may be used before each display call in case the user
|
||||
has opened another file.
|
||||
|
||||
\membersection{wxHelpInstance::OnQuit}
|
||||
|
||||
\func{bool}{OnQuit}{\void}
|
||||
|
||||
Overridable member called when this application's wxHelp is quit
|
||||
(no effect if Windows Help is being used instead).
|
||||
|
||||
\membersection{wxHelpInstance::Quit}
|
||||
|
||||
\func{bool}{Quit}{\void}
|
||||
|
||||
If wxHelp is running, quits wxHelp by disconnecting (no effect for Windows
|
||||
Help).
|
||||
|
||||
|
397
docs/latex/wx/icon.tex
Normal file
@ -0,0 +1,397 @@
|
||||
\section{\class{wxIcon}}\label{wxicon}
|
||||
|
||||
An icon is a small rectangular bitmap usually used for denoting a
|
||||
minimized application.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
It is optional (but desirable) to associate a
|
||||
pertinent icon with a frame. Obviously icons in X and MS Windows are
|
||||
created in a different manner, and colour icons in X are difficult
|
||||
to arrange. Therefore, separate icons will be created for the different
|
||||
environments. Platform-specific methods for creating a {\bf wxIcon}\rtfsp
|
||||
structure are catered for, and this is an occasion where conditional
|
||||
compilation will probably be required.
|
||||
|
||||
Note that a new icon must be created for every time the icon is to be
|
||||
used for a new window. In X, this will ensure that fresh X resources
|
||||
are allocated for this frame. In MS Windows, the icon will not be
|
||||
reloaded if it has already been used. An icon allocated to a frame will
|
||||
be deleted when the frame is deleted.
|
||||
|
||||
The following shows the conditional compilation required to define an
|
||||
icon in X and in MS Windows. The alternative is to use the string
|
||||
version of the icon constructor, which loads a file under X and a
|
||||
resource under MS Windows, but has the disadvantage of requiring the
|
||||
X icon file to be available at run-time.
|
||||
|
||||
\begin{verbatim}
|
||||
#ifdef wx_x
|
||||
#include "aiai.xbm"
|
||||
#endif
|
||||
#ifdef wx_msw
|
||||
wxIcon *icon = new wxIcon("aiai");
|
||||
#endif
|
||||
#ifdef wx_x
|
||||
wxIcon *icon = new wxIcon(aiai_bits, aiai_width, aiai_height);
|
||||
#endif
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxBitmap}{wxbitmap}\\
|
||||
\helpref{wxGDIObject}{wxgdiobject}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxIcon overview}{wxiconoverview}, \helpref{wxDC::DrawIcon}{wxdcdrawicon}, \helpref{wxCursor}{wxcursor}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxIcon::wxIcon}\label{wxiconconstr}
|
||||
|
||||
\func{}{wxIcon}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxIcon}{\param{const wxIcon\& }{icon}}
|
||||
|
||||
\func{}{wxIcon}{\param{const wxIcon* }{icon}}
|
||||
|
||||
Copy constructors.
|
||||
|
||||
\func{}{wxIcon}{\param{void*}{ data}, \param{const int}{ type}, \param{const int}{ width}, \param{const int}{ height}, \param{const int}{ depth = -1}}
|
||||
|
||||
Creates an icon from the given data, which can be of arbitrary type.
|
||||
|
||||
\func{}{wxIcon}{\param{const char}{ bits[]}, \param{const int}{ width}, \param{const int}{ height}\\
|
||||
\param{const int}{ depth = 1}}
|
||||
|
||||
Creates an icon from an array of bits.
|
||||
|
||||
\func{}{wxIcon}{\param{const int}{ width}, \param{const int}{ height}, \param{const int}{ depth = -1}}
|
||||
|
||||
Creates a new icon.
|
||||
|
||||
\func{}{wxIcon}{\param{const char**}{ bits}}
|
||||
|
||||
Creates an icon from XPM data.
|
||||
|
||||
\func{}{wxIcon}{\param{const wxString\& }{name}, \param{const long}{ type}}
|
||||
|
||||
Loads an icon from a file or resource.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bits}{Specifies an array of pixel values.}
|
||||
|
||||
\docparam{width}{Specifies the width of the icon.}
|
||||
|
||||
\docparam{height}{Specifies the height of the icon.}
|
||||
|
||||
\docparam{depth}{Specifies the depth of the icon. 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 flags} parameter.}
|
||||
|
||||
\docparam{type}{May be one of the following:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_ICO}}}{Load a Windows icon file.}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_ICO\_RESOURCE}}}{Load a Windows icon from the resource database.}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_GIF}}}{Load a GIF bitmap file.}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XBM}}}{Load an X bitmap file.}
|
||||
\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XPM}}}{Load an XPM bitmap file.}
|
||||
%\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_RESOURCE}}}{Load a Windows resource name.}
|
||||
\end{twocollist}
|
||||
|
||||
The validity of these flags depends on the platform and wxWindows configuration.
|
||||
If all possible wxWindows settings are used, the Windows platform supports ICO, ICO\_RESOURCE,
|
||||
XPM\_DATA, and XPM. Under X, the available formats are BMP, GIF, XBM, and XPM.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The first form constructs an icon 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
|
||||
icon data, but instead a pointer to the data, keeping a reference count. They are therefore
|
||||
very efficient operations.
|
||||
|
||||
The fourth form constructs an icon from data whose type and value depends on
|
||||
the value of the {\it type} argument.
|
||||
|
||||
The fifth form constructs a (usually monochrome) icon from an array of pixel values, under both
|
||||
X and Windows.
|
||||
|
||||
The sixth form constructs a new icon.
|
||||
|
||||
The seventh form constructs an icon from pixmap (XPM) data, if wxWindows has been configured
|
||||
to incorporate this feature.
|
||||
|
||||
To use this constructor, you must first include an XPM file. For
|
||||
example, assuming that the file {\tt mybitmap.xpm} contains an XPM array
|
||||
of character pointers called mybitmap:
|
||||
|
||||
\begin{verbatim}
|
||||
#include "mybitmap.xpm"
|
||||
|
||||
...
|
||||
|
||||
wxIcon *icon = new wxIcon(mybitmap);
|
||||
\end{verbatim}
|
||||
|
||||
The eighth form constructs an icon 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\_ICO\_RESOURCE.
|
||||
Under X, {\it type} defaults to wxBITMAP\_TYPE\_XBM.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxIcon::LoadFile}{wxiconloadfile}
|
||||
|
||||
\membersection{wxIcon::\destruct{wxIcon}}
|
||||
|
||||
\func{}{\destruct{wxIcon}}{\void}
|
||||
|
||||
Destroys the wxIcon object and possibly the underlying icon data.
|
||||
Because reference counting is used, the icon may not actually be
|
||||
destroyed at this point - only when the reference count is zero will the
|
||||
data be deleted.
|
||||
|
||||
If the application omits to delete the icon explicitly, the icon will be
|
||||
destroyed automatically by wxWindows when the application exits.
|
||||
|
||||
Do not delete an icon that is selected into a memory device context.
|
||||
|
||||
\begin{comment}
|
||||
\membersection{wxIcon::Create}\label{wxiconcreate}
|
||||
|
||||
\func{virtual bool}{Create}{\param{const int}{ width}, \param{const int}{ height}, \param{const int}{ depth = -1}}
|
||||
|
||||
Creates a fresh icon. If the final argument is omitted, the display depth of
|
||||
the screen is used.
|
||||
|
||||
\func{virtual bool}{Create}{\param{void*}{ data}, \param{const int}{ type}, \param{const int}{ width}, \param{const int}{ height}, \param{const int}{ depth = -1}}
|
||||
|
||||
Creates an icon from the given data, which can be of arbitrary type.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{width}{The width of the icon in pixels.}
|
||||
|
||||
\docparam{height}{The height of the icon in pixels.}
|
||||
|
||||
\docparam{depth}{The depth of the icon 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}{An icon type identifier - see \helpref{wxIcon::wxIcon}{wxiconconstr} 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{wxIcon::wxIcon}{wxiconconstr}
|
||||
|
||||
\end{comment}
|
||||
|
||||
\membersection{wxIcon::GetDepth}
|
||||
|
||||
\constfunc{int}{GetDepth}{\void}
|
||||
|
||||
Gets the colour depth of the icon. A value of 1 indicates a
|
||||
monochrome icon.
|
||||
|
||||
\membersection{wxIcon::GetHeight}\label{wxicongetheight}
|
||||
|
||||
\constfunc{int}{GetHeight}{\void}
|
||||
|
||||
Gets the height of the icon in pixels.
|
||||
|
||||
\membersection{wxIcon::GetWidth}\label{wxicongetwidth}
|
||||
|
||||
\constfunc{int}{GetWidth}{\void}
|
||||
|
||||
Gets the width of the icon in pixels.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxIcon::GetHeight}{wxicongetheight}
|
||||
|
||||
\membersection{wxIcon::LoadFile}\label{wxiconloadfile}
|
||||
|
||||
\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{const long}{ type}}
|
||||
|
||||
Loads an icon 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\_ICO}}{Load a Windows icon file.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_ICO\_RESOURCE}}{Load a Windows icon from the resource database.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Load a GIF bitmap file.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Load an X bitmap file.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Load an XPM bitmap file.}
|
||||
\end{twocollist}
|
||||
|
||||
The validity of these flags depends on the platform and wxWindows configuration.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the operation succeeded, FALSE otherwise.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxIcon::wxIcon}{wxiconconstr}
|
||||
|
||||
\membersection{wxIcon::Ok}\label{wxiconok}
|
||||
|
||||
\constfunc{bool}{Ok}{\void}
|
||||
|
||||
Returns TRUE if icon data is present.
|
||||
|
||||
\begin{comment}
|
||||
\membersection{wxIcon::SaveFile}\label{wxiconsavefile}
|
||||
|
||||
\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{int}{ type}, \param{wxPalette* }{palette = NULL}}
|
||||
|
||||
Saves an icon 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\_ICO}}{Save a Windows icon file.}
|
||||
%\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Save a GIF icon file.}
|
||||
%\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Save an X bitmap file.}
|
||||
\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Save an XPM bitmap file.}
|
||||
\end{twocollist}
|
||||
|
||||
The validity of these flags depends on the platform and wxWindows configuration.}
|
||||
|
||||
\docparam{palette}{An optional palette used for saving the icon. TODO: this parameter should
|
||||
probably be eliminated; instead the app should set the palette before saving.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the operation succeeded, FALSE otherwise.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Depending on how wxWindows has been configured, not all formats may be available.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxIcon::LoadFile}{wxiconloadfile}
|
||||
\end{comment}
|
||||
|
||||
\membersection{wxIcon::SetDepth}\label{wxiconsetdepth}
|
||||
|
||||
\func{void}{SetDepth}{\param{int }{depth}}
|
||||
|
||||
Sets the depth member (does not affect the icon data).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{depth}{Icon depth.}
|
||||
|
||||
\membersection{wxIcon::SetHeight}\label{wxiconsetheight}
|
||||
|
||||
\func{void}{SetHeight}{\param{int }{height}}
|
||||
|
||||
Sets the height member (does not affect the icon data).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{height}{Icon height in pixels.}
|
||||
|
||||
\membersection{wxIcon::SetOk}
|
||||
|
||||
\func{void}{SetOk}{\param{int }{isOk}}
|
||||
|
||||
Sets the validity member (does not affect the icon data).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{isOk}{Validity flag.}
|
||||
|
||||
\membersection{wxIcon::SetWidth}
|
||||
|
||||
\func{void}{SetWidth}{\param{int }{width}}
|
||||
|
||||
Sets the width member (does not affect the icon data).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{width}{Icon width in pixels.}
|
||||
|
||||
\membersection{wxIcon::operator $=$}
|
||||
|
||||
\func{wxIcon\& }{operator $=$}{\param{const wxIcon\& }{icon}}
|
||||
|
||||
Assignment operator. This operator does not copy any data, but instead
|
||||
passes a pointer to the data in {\it icon} and increments a reference
|
||||
counter. It is a fast operation.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{icon}{Icon to assign.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns 'this' object.
|
||||
|
||||
\membersection{wxIcon::operator $==$}
|
||||
|
||||
\func{bool}{operator $==$}{\param{const wxIcon\& }{icon}}
|
||||
|
||||
Equality operator. This operator tests whether the internal data pointers are
|
||||
equal (a fast test).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{icon}{Icon to compare with 'this'}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns TRUE if the icons were effectively equal, FALSE otherwise.
|
||||
|
||||
\membersection{wxIcon::operator $!=$}
|
||||
|
||||
\func{bool}{operator $!=$}{\param{const wxIcon\& }{icon}}
|
||||
|
||||
Inequality operator. This operator tests whether the internal data pointers are
|
||||
unequal (a fast test).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{icon}{Icon to compare with 'this'}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns TRUE if the icons were unequal, FALSE otherwise.
|
||||
|
||||
|
59
docs/latex/wx/idleevt.tex
Normal file
@ -0,0 +1,59 @@
|
||||
\section{\class{wxIdleEvent}}\label{wxidleevent}
|
||||
|
||||
This class is used for idle events, which are generated when the system is idle.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvent}{wxevent}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Event table macros}
|
||||
|
||||
To process an idle event, use this event handler macro to direct input to a member
|
||||
function that takes a wxIdleEvent argument.
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_IDLE(func)}}{Process a wxEVT\_IDLE event.}
|
||||
\end{twocollist}%
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Idle events can be caught by the wxApp class, or by top-level window classes.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxApp::OnIdle}{wxapponidle}, \helpref{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxIdleEvent::wxIdleEvent}
|
||||
|
||||
\func{}{wxIdleEvent}{\void}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxIdleEvent::RequestMore}\label{wxidleeventrequestmore}
|
||||
|
||||
\func{void}{RequestMore}{\param{bool}{ needMore = TRUE}}
|
||||
|
||||
Tells wxWindows that more processing is required. This function can be called by an OnIdle
|
||||
handler for a window or window event handler to indicate that wxApp::OnIdle should
|
||||
forward the OnIdle event once more to the application windows. If no window calls this function
|
||||
during OnIdle, then the application will remain in a passive event loop (not calling OnIdle) until a
|
||||
new event is posted to the application by the windowing system.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxIdleEvent::MoreRequested}{wxidleeventmorerequested}, \helpref{wxApp::OnIdle}{wxapponidle}
|
||||
|
||||
\membersection{wxIdleEvent::MoreRequested}\label{wxidleeventmorerequested}
|
||||
|
||||
\constfunc{bool}{MoreRequested}{\void}
|
||||
|
||||
Returns TRUE if the OnIdle function processing this event requested more processing time.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}, \helpref{wxApp::OnIdle}{wxapponidle}
|
||||
|
133
docs/latex/wx/ilayout.tex
Normal file
@ -0,0 +1,133 @@
|
||||
\section{\class{wxIndividualLayoutConstraint}}\label{wxindividuallayoutconstraint}
|
||||
|
||||
Objects of this class are stored in the wxIndividualLayoutConstraint class
|
||||
as one of eight possible constraints that a window can be involved in.
|
||||
|
||||
Constraints are initially set to have the relationship wxUnconstrained,
|
||||
which means that their values should be calculated by looking at known constraints.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Overview and examples}{constraintsoverview},\rtfsp
|
||||
\helpref{wxLayoutConstraints}{wxlayoutconstraints}, \helpref{wxWindow::SetConstraints}{wxwindowsetconstraints}.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\subsection{Edges and relationships}
|
||||
|
||||
TODO: put this in a different section.
|
||||
|
||||
The {\it wxEdge}\index{wxEdge} enumerated type specifies the type of edge or dimension of a window.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{wxLeft}{The left edge.}
|
||||
\twocolitem{wxTop}{The top edge.}
|
||||
\twocolitem{wxRight}{The right edge.}
|
||||
\twocolitem{wxBottom}{The bottom edge.}
|
||||
\twocolitem{wxCentreX}{The x-coordinate of the centre of the window.}
|
||||
\twocolitem{wxCentreY}{The y-coordinate of the centre of the window.}
|
||||
\end{twocollist}
|
||||
|
||||
The {\it wxRelationship}\index{wxRelationship} enumerated type specifies the relationship that
|
||||
this edge or dimension has with another specified edge or dimension. Normally, the user
|
||||
doesn't use these directly because functions such as {\it Below} and {\it RightOf} are a convenience
|
||||
for using the more general {\it Set} function.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{wxUnconstrained}{The edge or dimension is unconstrained (the default for edges.}
|
||||
\twocolitem{wxAsIs}{The edge or dimension is to be taken from the current window position or size (the
|
||||
default for dimensions.}
|
||||
\twocolitem{wxAbove}{The edge should be above another edge.}
|
||||
\twocolitem{wxBelow}{The edge should be below another edge.}
|
||||
\twocolitem{wxLeftOf}{The edge should be to the left of another edge.}
|
||||
\twocolitem{wxRightOf}{The edge should be to the right of another edge.}
|
||||
\twocolitem{wxSameAs}{The edge or dimension should be the same as another edge or dimension.}
|
||||
\twocolitem{wxPercentOf}{The edge or dimension should be a percentage of another edge or dimension.}
|
||||
\twocolitem{wxAbsolute}{The edge or dimension should be a given absolute value.}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::wxIndividualLayoutConstraint}
|
||||
|
||||
\func{void}{wxIndividualLayoutConstraint}{\void}
|
||||
|
||||
Constructor. Not used by the end-user.
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::Above}
|
||||
|
||||
\func{void}{Above}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
|
||||
|
||||
Constrains this edge to be above the given window, with an
|
||||
optional margin. Implicitly, this is relative to the top edge of the other window.
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::Absolute}
|
||||
|
||||
\func{void}{Absolute}{\param{int}{ value}}
|
||||
|
||||
Constrains this edge or dimension to be the given absolute value.
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::AsIs}
|
||||
|
||||
\func{void}{AsIs}{\void}
|
||||
|
||||
Sets this edge or constraint to be whatever the window's value is
|
||||
at the moment. If either of the width and height constraints
|
||||
are {\it as is}, the window will not be resized, but moved instead.
|
||||
This is important when considering panel items which are intended
|
||||
to have a default size, such as a button, which may take its size
|
||||
from the size of the button label.
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::Below}
|
||||
|
||||
\func{void}{Below}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
|
||||
|
||||
Constrains this edge to be below the given window, with an
|
||||
optional margin. Implicitly, this is relative to the bottom edge of the other window.
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::Unconstrained}
|
||||
|
||||
\func{void}{Unconstrained}{\void}
|
||||
|
||||
Sets this edge or dimension to be unconstrained, that is, dependent on
|
||||
other edges and dimensions from which this value can be deduced.
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::LeftOf}
|
||||
|
||||
\func{void}{LeftOf}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
|
||||
|
||||
Constrains this edge to be to the left of the given window, with an
|
||||
optional margin. Implicitly, this is relative to the left edge of the other window.
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::PercentOf}
|
||||
|
||||
\func{void}{PercentOf}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ margin = 0}}
|
||||
|
||||
Constrains this edge or dimension to be to a percentage of the given window, with an
|
||||
optional margin.
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::RightOf}
|
||||
|
||||
\func{void}{RightOf}{\param{wxWindow *}{otherWin}, \param{int}{ margin = 0}}
|
||||
|
||||
Constrains this edge to be to the right of the given window, with an
|
||||
optional margin. Implicitly, this is relative to the right edge of the other window.
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::SameAs}
|
||||
|
||||
\func{void}{SameAs}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ margin = 0}}
|
||||
|
||||
Constrains this edge or dimension to be to the same as the edge of the given window, with an
|
||||
optional margin.
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::Set}
|
||||
|
||||
\func{void}{Set}{\param{wxRelationship}{ rel}, \param{wxWindow *}{otherWin}, \param{wxEdge}{ otherEdge},
|
||||
\param{int}{ value = 0}, \param{int}{ margin = 0}}
|
||||
|
||||
Sets the properties of the constraint. Normally called by one of the convenience
|
||||
functions such as Above, RightOf, SameAs.
|
||||
|
||||
|
160
docs/latex/wx/imaglist.tex
Normal file
@ -0,0 +1,160 @@
|
||||
\section{\class{wxImageList}}\label{wximagelist}
|
||||
|
||||
A wxImageList contains a list of images, which are stored in
|
||||
an unspecified form. Images can have masks for transparent
|
||||
drawing, and can be made from a variety of sources including bitmaps
|
||||
and icons.
|
||||
|
||||
wxImageList is used principally in conjunction with \helpref{wxTreeCtrl}{wxtreectrl} and
|
||||
\rtfsp\helpref{wxListCtrl}{wxlistctrl} classes.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxTreeCtrl}{wxtreectrl}, \helpref{wxListCtrl}{wxlistctrl}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxImageList::wxImageList}\label{wximagelistconstr}
|
||||
|
||||
\func{}{wxImageList}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxImageList}{\param{const int }{width}, \param{const int }{height}, \param{const bool }{mask = TRUE},\rtfsp
|
||||
\param{const int }{initialCount = 1}}
|
||||
|
||||
Constructor specifying the image size, whether image masks should be created, and the initial size of the list.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{width}{Width of the images in the list.}
|
||||
|
||||
\docparam{height}{Height of the images in the list.}
|
||||
|
||||
\docparam{mask}{TRUE if masks should be created for all images.}
|
||||
|
||||
\docparam{initialCount}{The initial size of the list.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxImageList::Create}{wximagelistcreate}
|
||||
|
||||
\membersection{wxImageList::Add}\label{wximagelistadd}
|
||||
|
||||
\func{int}{Add}{\param{const wxBitmap\&}{ bitmap}, \param{const wxBitmap\&}{ mask = wxNullBitmap}}
|
||||
|
||||
Adds a new image using a bitmap and optional mask bitmap.
|
||||
|
||||
\func{int}{Add}{\param{const wxBitmap\&}{ bitmap}, \param{const wxColour\&}{ maskColour}}
|
||||
|
||||
Adds a new image using a bitmap and mask colour.
|
||||
|
||||
\func{int}{Add}{\param{const wxBitmap\&}{ icon}}
|
||||
|
||||
Adds a new image using an icon.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{Bitmap representing the opaque areas of the image.}
|
||||
|
||||
\docparam{mask}{Monochrome mask bitmap, representing the transparent areas of the image.}
|
||||
|
||||
\docparam{maskColour}{Colour indicating which parts of the image are transparent.}
|
||||
|
||||
\docparam{icon}{Icon to use as the image.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The new zero-based image index.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The original bitmap or icon is not affected by the {\bf Add} operation, and can be deleted afterwards.
|
||||
|
||||
\membersection{wxImageList::Create}\label{wximagelistcreate}
|
||||
|
||||
\func{bool}{Create}{\param{const int }{width}, \param{const int }{height}, \param{const bool }{mask = TRUE},\rtfsp
|
||||
\param{const int }{initialCount = 1}}
|
||||
|
||||
Initializes the list. See \helpref{wxImageList::wxImageList}{wximagelistconstr} for details.
|
||||
|
||||
\membersection{wxImageList::Draw}\label{wximagelistdraw}
|
||||
|
||||
\func{bool}{Draw}{\param{const int}{ index}, \param{wxDC\&}{ dc}, \param{const int }{x},\rtfsp
|
||||
\param{const int }{x}, \param{const int }{flags = wxIMAGELIST\_DRAW\_NORMAL},\rtfsp
|
||||
\param{const bool }{solidBackground = FALSE}}
|
||||
|
||||
Draws a specified image onto a device context.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{index}{Image index, starting from zero.}
|
||||
|
||||
\docparam{dc}{Device context to draw on.}
|
||||
|
||||
\docparam{x}{X position on the device context.}
|
||||
|
||||
\docparam{y}{Y position on the device context.}
|
||||
|
||||
\docparam{flags}{How to draw the image. A bitlist of a selection of the following:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxIMAGELIST\_DRAW\_NORMAL}}{Draw the image normally.}
|
||||
\twocolitem{{\bf wxIMAGELIST\_DRAW\_TRANSPARENT}}{Draw the image with transparency.}
|
||||
\twocolitem{{\bf wxIMAGELIST\_DRAW\_SELECTED}}{Draw the image in selected state.}
|
||||
\twocolitem{{\bf wxIMAGELIST\_DRAW\_FOCUSED}}{Draw the image in a focussed state.}
|
||||
\end{twocollist}
|
||||
}
|
||||
|
||||
\docparam{solidBackground}{For optimisation - drawing can be faster if the function is told
|
||||
that the background is solid.}
|
||||
|
||||
\membersection{wxImageList::GetImageCount}\label{wximagelistgetimagecount}
|
||||
|
||||
\constfunc{int}{GetImageCount}{\void}
|
||||
|
||||
Returns the number of images in the list.
|
||||
|
||||
\membersection{wxImageList::Remove}\label{wximagelistremove}
|
||||
|
||||
\func{bool}{Remove}{\param{const int}{ index}}
|
||||
|
||||
Removes the image at the given position.
|
||||
|
||||
\membersection{wxImageList::RemoveAll}\label{wximagelistremoveall}
|
||||
|
||||
\func{bool}{RemoveAll}{\void}
|
||||
|
||||
Removes all the images in the list.
|
||||
|
||||
\membersection{wxImageList::Replace}\label{wximagelistreplace}
|
||||
|
||||
\func{bool}{Replace}{\param{const int}{ index}, \param{const wxBitmap\&}{ bitmap}, \param{const wxBitmap\&}{ mask = wxNullBitmap}}
|
||||
|
||||
Replaces the existing image with the new image.
|
||||
|
||||
\func{bool}{Replace}{\param{const int}{ index}, \param{const wxIcon\&}{ icon}}
|
||||
|
||||
Replaces the existing image with the new image.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{Bitmap representing the opaque areas of the image.}
|
||||
|
||||
\docparam{mask}{Monochrome mask bitmap, representing the transparent areas of the image.}
|
||||
|
||||
\docparam{icon}{Icon to use as the image.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the replacement was successful, FALSE otherwise.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The original bitmap or icon is not affected by the {\bf Replace} operation, and can be deleted afterwards.
|
||||
|
||||
|
34
docs/latex/wx/indlgevt.tex
Normal file
@ -0,0 +1,34 @@
|
||||
\section{\class{wxInitDialogEvent}}\label{wxinitdialogevent}
|
||||
|
||||
A wxInitDialogEvent is sent as a dialog or panel is being initialised.
|
||||
Handlers for this event can transfer data to the window.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvent}{wxevent}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Event table macros}
|
||||
|
||||
To process an activate event, use these event handler macros to direct input to a member
|
||||
function that takes a wxInitDialogEvent argument.
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_INIT\_DIALOG(func)}}{Process a wxEVT\_INIT\_DIALOG event.}
|
||||
\end{twocollist}%
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog},\rtfsp
|
||||
\helpref{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxInitDialogEvent::wxInitDialogEvent}
|
||||
|
||||
\func{}{wxInitDialogEvent}{\param{int }{id = 0}}
|
||||
|
||||
Constructor.
|
||||
|
||||
|
197
docs/latex/wx/keyevent.tex
Normal file
@ -0,0 +1,197 @@
|
||||
\section{\class{wxKeyEvent}}\label{wxkeyevent}
|
||||
|
||||
This event class contains information about keypress (character) events. See \helpref{wxWindow::OnChar}{wxwindowonchar}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvent}{wxevent}
|
||||
|
||||
\wxheading{Event table macros}
|
||||
|
||||
To process a key event, use these event handler macros to direct input to member
|
||||
functions that take a wxKeyEvent argument.
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_CHAR(func)}}{Process a wxEVT\_CHAR event.}
|
||||
\twocolitem{{\bf EVT\_CHAR\_HOOK(func)}}{Process a wxEVT\_CHAR\_HOOK event.}
|
||||
\end{twocollist}%
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxKeyEvent::m\_altDown}
|
||||
|
||||
\member{bool}{m\_altDown}
|
||||
|
||||
TRUE if the Alt key is pressed down.
|
||||
|
||||
\membersection{wxKeyEvent::m\_controlDown}
|
||||
|
||||
\member{bool}{m\_controlDown}
|
||||
|
||||
TRUE if control is pressed down.
|
||||
|
||||
\membersection{wxKeyEvent::m\_keyCode}
|
||||
|
||||
\member{long}{m\_keyCode}
|
||||
|
||||
Virtual keycode. An enumerated type, one of:
|
||||
|
||||
\begin{verbatim}
|
||||
WXK_BACK = 8
|
||||
WXK_TAB = 9
|
||||
WXK_RETURN = 13
|
||||
WXK_ESCAPE = 27
|
||||
WXK_SPACE = 32
|
||||
WXK_DELETE = 127
|
||||
|
||||
WXK_START = 300
|
||||
WXK_LBUTTON
|
||||
WXK_RBUTTON
|
||||
WXK_CANCEL
|
||||
WXK_MBUTTON
|
||||
WXK_CLEAR
|
||||
WXK_SHIFT
|
||||
WXK_CONTROL
|
||||
WXK_MENU
|
||||
WXK_PAUSE
|
||||
WXK_CAPITAL
|
||||
WXK_PRIOR
|
||||
WXK_NEXT
|
||||
WXK_END
|
||||
WXK_HOME
|
||||
WXK_LEFT
|
||||
WXK_UP
|
||||
WXK_RIGHT
|
||||
WXK_DOWN
|
||||
WXK_SELECT
|
||||
WXK_PRINT
|
||||
WXK_EXECUTE
|
||||
WXK_SNAPSHOT
|
||||
WXK_INSERT
|
||||
WXK_HELP
|
||||
WXK_NUMPAD0
|
||||
WXK_NUMPAD1
|
||||
WXK_NUMPAD2
|
||||
WXK_NUMPAD3
|
||||
WXK_NUMPAD4
|
||||
WXK_NUMPAD5
|
||||
WXK_NUMPAD6
|
||||
WXK_NUMPAD7
|
||||
WXK_NUMPAD8
|
||||
WXK_NUMPAD9
|
||||
WXK_MULTIPLY
|
||||
WXK_ADD
|
||||
WXK_SEPARATOR
|
||||
WXK_SUBTRACT
|
||||
WXK_DECIMAL
|
||||
WXK_DIVIDE
|
||||
WXK_F1
|
||||
WXK_F2
|
||||
WXK_F3
|
||||
WXK_F4
|
||||
WXK_F5
|
||||
WXK_F6
|
||||
WXK_F7
|
||||
WXK_F8
|
||||
WXK_F9
|
||||
WXK_F10
|
||||
WXK_F11
|
||||
WXK_F12
|
||||
WXK_F13
|
||||
WXK_F14
|
||||
WXK_F15
|
||||
WXK_F16
|
||||
WXK_F17
|
||||
WXK_F18
|
||||
WXK_F19
|
||||
WXK_F20
|
||||
WXK_F21
|
||||
WXK_F22
|
||||
WXK_F23
|
||||
WXK_F24
|
||||
WXK_NUMLOCK
|
||||
WXK_SCROLL
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxKeyEvent::m\_metaDown}
|
||||
|
||||
\member{bool}{m\_metaDown}
|
||||
|
||||
TRUE if the Meta key is pressed down.
|
||||
|
||||
\membersection{wxKeyEvent::m\_shiftDown}
|
||||
|
||||
\member{bool}{m\_shiftDown}
|
||||
|
||||
TRUE if shift is pressed down.
|
||||
|
||||
\membersection{wxKeyEvent::m\_x}
|
||||
|
||||
\member{int}{m\_x}
|
||||
|
||||
X position of the event.
|
||||
|
||||
\membersection{wxKeyEvent::m\_y}
|
||||
|
||||
\member{int}{m\_y}
|
||||
|
||||
Y position of the event.
|
||||
|
||||
\membersection{wxKeyEvent::wxKeyEvent}
|
||||
|
||||
\func{}{wxKeyEvent}{\param{WXTYPE}{ keyEventType}}
|
||||
|
||||
Constructor. Currently, the only valid event types are wxEVT\_CHAR and wxEVT\_CHAR\_HOOK.
|
||||
|
||||
\membersection{wxKeyEvent::AltDown}
|
||||
|
||||
\func{bool}{AltDown}{\void}
|
||||
|
||||
Returns TRUE if the Alt key was down at the time of the key event.
|
||||
|
||||
\membersection{wxKeyEvent::ControlDown}
|
||||
|
||||
\func{bool}{ControlDown}{\void}
|
||||
|
||||
Returns TRUE if the control key was down at the time of the key event.
|
||||
|
||||
\membersection{wxKeyEvent::GetX}
|
||||
|
||||
\func{float}{GetX}{\void}
|
||||
|
||||
Returns the X position of the event.
|
||||
|
||||
\membersection{wxKeyEvent::GetY}
|
||||
|
||||
\func{float}{GetY}{\void}
|
||||
|
||||
Returns the Y position of the event.
|
||||
|
||||
\membersection{wxKeyEvent::KeyCode}
|
||||
|
||||
\func{long}{KeyCode}{\void}
|
||||
|
||||
Returns the virtual key code. ASCII events return normal ASCII values,
|
||||
while non-ASCII events return values such as {\bf WXK\_LEFT} for the
|
||||
left cursor key. See {\tt wx\_defs.h} for a full list of the virtual key codes.
|
||||
|
||||
\membersection{wxKeyEvent::MetaDown}
|
||||
|
||||
\func{bool}{MetaDown}{\void}
|
||||
|
||||
Returns TRUE if the Meta key was down at the time of the key event.
|
||||
|
||||
\membersection{wxKeyEvent::Position}
|
||||
|
||||
\func{void}{Position}{\param{float *}{x}, \param{float *}{y}}
|
||||
|
||||
Obtains the position at which the key was pressed.
|
||||
|
||||
\membersection{wxKeyEvent::ShiftDown}
|
||||
|
||||
\func{bool}{ShiftDown}{\void}
|
||||
|
||||
Returns TRUE if the shift key was down at the time of the key event.
|
||||
|
||||
|
94
docs/latex/wx/layout.tex
Normal file
@ -0,0 +1,94 @@
|
||||
\section{\class{wxLayoutConstraints}}\label{wxlayoutconstraints}
|
||||
|
||||
Objects of this class can be associated with a window to define its
|
||||
layout constraints, with respect to siblings or its parent.
|
||||
|
||||
The class consists of the following eight constraints of class wxIndividualLayoutConstraint,
|
||||
some or all of which should be accessed directly to set the appropriate
|
||||
constraints.
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item {\bf left:} represents the left hand edge of the window
|
||||
\item {\bf right:} represents the right hand edge of the window
|
||||
\item {\bf top:} represents the top edge of the window
|
||||
\item {\bf bottom:} represents the bottom edge of the window
|
||||
\item {\bf width:} represents the width of the window
|
||||
\item {\bf height:} represents the height of the window
|
||||
\item {\bf centreX:} represents the horizontal centre point of the window
|
||||
\item {\bf centreY:} represents the vertical centre point of the window
|
||||
\end{itemize}
|
||||
|
||||
Most constraints are initially set to have the relationship wxUnconstrained,
|
||||
which means that their values should be calculated by looking at known constraints.
|
||||
The exceptions are {\it width} and {\it height}, which are set to wxAsIs to
|
||||
ensure that if the user does not specify a constraint, the existing
|
||||
width and height will be used, to be compatible with panel items which often
|
||||
have take a default size. If the constraint is wxAsIs, the dimension will
|
||||
not be changed.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Overview and examples}{constraintsoverview},\rtfsp
|
||||
\helpref{wxIndividualLayoutConstraint}{wxindividuallayoutconstraint}, \helpref{wxWindow::SetConstraints}{wxwindowsetconstraints}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxLayoutConstraints::wxLayoutConstraints}
|
||||
|
||||
\func{}{wxLayoutConstraints}{\void}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxLayoutConstraints::bottom}
|
||||
|
||||
\member{wxIndividualLayoutConstraint}{bottom}
|
||||
|
||||
Constraint for the bottom edge.
|
||||
|
||||
\membersection{wxLayoutConstraints::centreX}
|
||||
|
||||
\member{wxIndividualLayoutConstraint}{centreX}
|
||||
|
||||
Constraint for the horizontal centre point.
|
||||
|
||||
\membersection{wxLayoutConstraints::centreY}
|
||||
|
||||
\member{wxIndividualLayoutConstraint}{centreY}
|
||||
|
||||
Constraint for the vertical centre point.
|
||||
|
||||
\membersection{wxLayoutConstraints::height}
|
||||
|
||||
\member{wxIndividualLayoutConstraint}{height}
|
||||
|
||||
Constraint for the height.
|
||||
|
||||
\membersection{wxLayoutConstraints::left}
|
||||
|
||||
\member{wxIndividualLayoutConstraint}{left}
|
||||
|
||||
Constraint for the left-hand edge.
|
||||
|
||||
\membersection{wxLayoutConstraints::right}
|
||||
|
||||
\member{wxIndividualLayoutConstraint}{right}
|
||||
|
||||
Constraint for the right-hand edge.
|
||||
|
||||
\membersection{wxLayoutConstraints::top}
|
||||
|
||||
\member{wxIndividualLayoutConstraint}{top}
|
||||
|
||||
Constraint for the top edge.
|
||||
|
||||
\membersection{wxLayoutConstraints::width}
|
||||
|
||||
\member{wxIndividualLayoutConstraint}{width}
|
||||
|
||||
Constraint for the width.
|
||||
|
||||
|
217
docs/latex/wx/list.tex
Normal file
@ -0,0 +1,217 @@
|
||||
\section{\class{wxList}}\label{wxlist}
|
||||
|
||||
This class provides linked list functionality for wxWindows, and for an application
|
||||
if it wishes. Depending on the form of constructor used, a list can be keyed on
|
||||
integer or string keys to provide a primitive look-up ability. See \helpref{wxHashTable}{wxhashtable}\rtfsp
|
||||
for a faster method of storage when random access is required.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Example}
|
||||
|
||||
It is very common to iterate on a list as follows:
|
||||
|
||||
\begin{verbatim}
|
||||
...
|
||||
wxPoint *point1 = new wxPoint(100, 100);
|
||||
wxPoint *point2 = new wxPoint(200, 200);
|
||||
|
||||
wxList SomeList;
|
||||
SomeList.Append(point1);
|
||||
SomeList.Append(point2);
|
||||
|
||||
...
|
||||
|
||||
wxNode *node = SomeList.First();
|
||||
while (node)
|
||||
{
|
||||
wxPoint *point = (wxPoint *)node->Data();
|
||||
...
|
||||
node = node->Next();
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
To delete nodes in a list as the list is being traversed, replace
|
||||
|
||||
\begin{verbatim}
|
||||
...
|
||||
node = node->Next();
|
||||
...
|
||||
\end{verbatim}
|
||||
|
||||
with
|
||||
|
||||
\begin{verbatim}
|
||||
...
|
||||
delete point;
|
||||
delete node;
|
||||
node = SomeList.First();
|
||||
...
|
||||
\end{verbatim}
|
||||
|
||||
See \helpref{wxNode}{wxnode} for members that retrieve the data associated with a node, and
|
||||
members for getting to the next or previous node.
|
||||
|
||||
Note that a cast is required when retrieving the data from a node. Although a
|
||||
node is defined to store objects of type {\bf wxObject} and derived types, other
|
||||
types (such as char*) may be used with appropriate casting.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxNode}{wxnode}, \helpref{wxStringList}{wxstringlist}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxList::wxList}
|
||||
|
||||
\func{}{wxList}{\void}
|
||||
|
||||
\func{}{wxList}{\param{unsigned int}{ key\_type}}
|
||||
|
||||
\func{}{wxList}{\param{int}{ n}, \param{wxObject *}{objects[]}}
|
||||
|
||||
\func{}{wxList}{\param{wxObject *}{object}, ...}
|
||||
|
||||
Constructors. {\it key\_type} is one of wxKEY\_NONE, wxKEY\_INTEGER, or wxKEY\_STRING,
|
||||
and indicates what sort of keying is required (if any).
|
||||
|
||||
{\it objects} is an array of {\it n} objects with which to initialize the list.
|
||||
|
||||
The variable-length argument list constructor must be supplied with a
|
||||
terminating NULL.
|
||||
|
||||
\membersection{wxList::\destruct{wxList}}
|
||||
|
||||
\func{}{\destruct{wxList}}{\void}
|
||||
|
||||
Destroys the list. Also destroys any remaining nodes, but does not destroy
|
||||
client data held in the nodes.
|
||||
|
||||
\membersection{wxList::Append}
|
||||
|
||||
\func{wxNode *}{Append}{\param{wxObject *}{object}}
|
||||
|
||||
\func{wxNode *}{Append}{\param{long}{ key}, \param{wxObject *}{object}}
|
||||
|
||||
\func{wxNode *}{Append}{\param{const wxString\& }{key}, \param{wxObject *}{object}}
|
||||
|
||||
Appends a new {\bf wxNode} to the end of the list and puts a pointer to the
|
||||
\rtfsp{\it object} in the node. The last two forms store a key with the object for
|
||||
later retrieval using the key. The new node is returned in each case.
|
||||
|
||||
The key string is copied and stored by the list implementation.
|
||||
|
||||
\membersection{wxList::Clear}
|
||||
|
||||
\func{void}{Clear}{\void}
|
||||
|
||||
Clears the list (but does not delete the client data stored with each node).
|
||||
|
||||
\membersection{wxList::DeleteContents}
|
||||
|
||||
\func{void}{DeleteContents}{\param{bool}{ destroy}}
|
||||
|
||||
If {\it destroy} is TRUE, instructs the list to call {\it delete} on the client contents of
|
||||
a node whenever the node is destroyed. The default is FALSE.
|
||||
|
||||
\membersection{wxList::DeleteNode}
|
||||
|
||||
\func{bool}{DeleteNode}{\param{wxNode *}{node}}
|
||||
|
||||
Deletes the given node from the list, returning TRUE if successful.
|
||||
|
||||
\membersection{wxList::DeleteObject}
|
||||
|
||||
\func{bool}{DeleteObject}{\param{wxObject *}{object}}
|
||||
|
||||
Finds the given client {\it object} and deletes the appropriate node from the list, returning
|
||||
TRUE if successful. The application must delete the actual object separately.
|
||||
|
||||
\membersection{wxList::Find}
|
||||
|
||||
\func{wxNode *}{Find}{\param{long}{ key}}
|
||||
|
||||
\func{wxNode *}{Find}{\param{const wxString\& }{key}}
|
||||
|
||||
Returns the node whose stored key matches {\it key}. Use on a keyed list only.
|
||||
|
||||
\membersection{wxList::First}
|
||||
|
||||
\func{wxNode *}{First}{\void}
|
||||
|
||||
Returns the first node in the list (NULL if the list is empty).
|
||||
|
||||
\membersection{wxList::Insert}
|
||||
|
||||
\func{wxNode *}{Insert}{\param{wxObject *}{object}}
|
||||
|
||||
Insert object at front of list.
|
||||
|
||||
\func{wxNode *}{Insert}{\param{wxNode *}{position}, \param{wxObject *}{object}}
|
||||
|
||||
Insert object before {\it position}.
|
||||
|
||||
|
||||
\membersection{wxList::Last}
|
||||
|
||||
\func{wxNode *}{Last}{\void}
|
||||
|
||||
Returns the last node in the list (NULL if the list is empty).
|
||||
|
||||
\membersection{wxList::Member}
|
||||
|
||||
\func{wxNode *}{Member}{\param{wxObject *}{object}}
|
||||
|
||||
Returns the node associated with {\it object} if it is in the list, NULL otherwise.
|
||||
|
||||
\membersection{wxList::Nth}
|
||||
|
||||
\func{wxNode *}{Nth}{\param{int}{ n}}
|
||||
|
||||
Returns the {\it nth} node in the list, indexing from zero (NULL if the list is empty
|
||||
or the nth node could not be found).
|
||||
|
||||
\membersection{wxList::Number}
|
||||
|
||||
\func{int}{Number}{\void}
|
||||
|
||||
Returns the number of elements in the list.
|
||||
|
||||
\membersection{wxList::Sort}
|
||||
|
||||
\func{void}{Sort}{\param{wxSortCompareFunction}{ compfunc}}
|
||||
|
||||
\begin{verbatim}
|
||||
// Type of compare function for list sort operation (as in 'qsort')
|
||||
typedef int (*wxSortCompareFunction)(const void *elem1, const void *elem2);
|
||||
\end{verbatim}
|
||||
|
||||
Allows the sorting of arbitrary lists by giving
|
||||
a function to compare two list elements. We use the system {\bf qsort} function
|
||||
for the actual sorting process. The sort function receives pointers to wxObject pointers (wxObject **),
|
||||
so be careful to dereference appropriately.
|
||||
|
||||
Example:
|
||||
|
||||
\begin{verbatim}
|
||||
int listcompare(const void *arg1, const void *arg2)
|
||||
{
|
||||
return(compare(**(wxString **)arg1, // use the wxString 'compare'
|
||||
**(wxString **)arg2)); // function
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
wxList list;
|
||||
|
||||
list.Append(new wxString("DEF"));
|
||||
list.Append(new wxString("GHI"));
|
||||
list.Append(new wxString("ABC"));
|
||||
list.Sort(listcompare);
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
|
346
docs/latex/wx/listbox.tex
Normal file
@ -0,0 +1,346 @@
|
||||
\section{\class{wxListBox}}\label{wxlistbox}
|
||||
|
||||
A listbox is used to select one or more of a list of strings. The
|
||||
strings are displayed in a scrolling box, with the selected string(s)
|
||||
marked in reverse video. A listbox can be single selection (if an item
|
||||
is selected, the previous selection is removed) or multiple selection
|
||||
(clicking an item toggles the item on or off independently of other
|
||||
selections).
|
||||
|
||||
List box elements are numbered from zero.
|
||||
|
||||
A listbox callback gets an event wxEVT\_COMMAND\_LISTBOX\_SELECT for single clicks, and
|
||||
wxEVT\_COMMAND\_LISTBOX\_DOUBLE\_CLICKED for double clicks. Another way of intercepting
|
||||
double clicks is to override \helpref{wxWindow::OnDefaultAction}{wxwindowondefaultaction}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxControl}{wxcontrol}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
\twocolwidtha{5cm}%
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxLB\_SINGLE}}{Single-selection list.}
|
||||
\twocolitem{\windowstyle{wxLB\_MULTIPLE}}{Multiple-selection list: the user can toggle multiple
|
||||
items on and off.}
|
||||
\twocolitem{\windowstyle{wxLB\_EXTENDED}}{Extended-selection list: the user can
|
||||
select multiple items using the SHIFT key and the mouse or special key combinations.}
|
||||
\twocolitem{\windowstyle{wxLB\_HSCROLL}}{Create horizontal scrollbar if contents are too wide (Windows only).}
|
||||
\twocolitem{\windowstyle{wxLB\_ALWAYS\_SB}}{Always show a vertical scrollbar.}
|
||||
\twocolitem{\windowstyle{wxLB\_NEEDED\_SB}}{Only create a vertical scrollbar if needed.}
|
||||
\twocolitem{\windowstyle{wxLB\_SORT}}{The listbox contents are sorted in alphabetical order.}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}, \helpref{wxListCtrl}{wxlistctrl}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxListBox::wxListBox}\label{wxlistboxconstr}
|
||||
|
||||
\func{}{wxListBox}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxListBox}{\param{wxWindow*}{ parent}, \param{const wxWindowID}{ id},\rtfsp
|
||||
\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
||||
\param{const int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp
|
||||
\param{const 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{wxListBox}{wxlistbox}.}
|
||||
|
||||
\docparam{validator}{Window validator.}
|
||||
|
||||
\docparam{name}{Window name.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxListBox::Create}{wxlistboxcreate}, \helpref{wxValidator}{wxvalidator}
|
||||
|
||||
\membersection{wxListBox::\destruct{wxListBox}}
|
||||
|
||||
\func{void}{\destruct{wxListBox}}{\void}
|
||||
|
||||
Destructor, destroying the list box.
|
||||
|
||||
\membersection{wxListBox::Append}\label{wxlistboxappend}
|
||||
|
||||
\func{void}{Append}{\param{const wxString\& }{ item}}
|
||||
|
||||
Adds the item to the end of the list box.
|
||||
|
||||
\func{void}{Append}{\param{const wxString\& }{ item}, \param{char* }{clientData}}
|
||||
|
||||
Adds the item to the end of the list box, associating the given data
|
||||
with the item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{item}{String to add.}
|
||||
|
||||
\docparam{clientData}{Client data to associate with the item.}
|
||||
|
||||
\membersection{wxListBox::Clear}\label{wxlistboxclear}
|
||||
|
||||
\func{void}{Clear}{\void}
|
||||
|
||||
Clears all strings from the list box.
|
||||
|
||||
\membersection{wxListBox::Create}\label{wxlistboxcreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{const wxWindowID}{ id},\rtfsp
|
||||
\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
||||
\param{const int}{ n}, \param{const wxString }{choices[] = NULL},\rtfsp
|
||||
\param{const long}{ style = 0}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listBox"}}
|
||||
|
||||
Creates the listbox for two-step construction. See \helpref{wxListBox::wxListBox}{wxlistboxconstr}\rtfsp
|
||||
for further details.
|
||||
|
||||
\membersection{wxListBox::Delete}\label{wxlistboxdelete}
|
||||
|
||||
\func{void}{Delete}{\param{int}{ n}}
|
||||
|
||||
Deletes an item from the listbox.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based item index.}
|
||||
|
||||
\membersection{wxListBox::Deselect}\label{wxlistboxdeselect}
|
||||
|
||||
\func{void}{Deselect}{\param{int}{ n}}
|
||||
|
||||
Deselects an item in the list box.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based item to deselect.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This applies to multiple selection listboxes only.
|
||||
|
||||
\membersection{wxListBox::FindString}\label{wxlistboxfindstring}
|
||||
|
||||
\func{int}{FindString}{\param{const wxString\& }{string}}
|
||||
|
||||
Finds an item matching the given string.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{string}{String to find.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The zero-based position of the item, or -1 if the string was not found.
|
||||
|
||||
\membersection{wxListBox::GetClientData}\label{wxlistboxgetclientdata}
|
||||
|
||||
\constfunc{char*}{GetClientData}{\param{const int}{ n}}
|
||||
|
||||
Returns a pointer to the client data associated with the given item (if any).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based position of the item.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
A pointer to the client data, or NULL if not present.
|
||||
|
||||
\membersection{wxListBox::GetSelection}\label{wxlistboxgetselection}
|
||||
|
||||
\constfunc{int}{GetSelection}{\void}
|
||||
|
||||
Gets the position of the selected item.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The position of the current selection.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Applicable to single selection list boxes only.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxListBox::SetSelection}{wxlistboxsetselection},\rtfsp
|
||||
\helpref{wxListBox::GetStringSelection}{wxlistboxgetstringselection},\rtfsp
|
||||
\helpref{wxListBox::GetSelections}{wxlistboxgetselections}
|
||||
|
||||
\membersection{wxListBox::GetSelections}\label{wxlistboxgetselections}
|
||||
|
||||
\constfunc{int}{GetSelections}{\param{int **}{selections}}
|
||||
|
||||
Gets an array containing the positions of the selected strings.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{selections}{A pointer to an integer array, which will be allocated by the function if
|
||||
selects are present. Do not deallocate the returned array - it will be deallocated by the listbox.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The number of selections.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Use this with a multiple selection listbox.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxListBox::GetSelection}{wxlistboxgetselection},\rtfsp
|
||||
\helpref{wxListBox::GetStringSelection}{wxlistboxgetstringselection},\rtfsp
|
||||
\helpref{wxListBox::SetSelection}{wxlistboxsetselection}
|
||||
|
||||
\membersection{wxListBox::GetString}\label{wxlistboxgetstring}
|
||||
|
||||
\constfunc{wxString}{GetString}{\param{const int}{ n}}
|
||||
|
||||
Returns the string at the given position.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based position.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The string, or an empty string if the position was invalid.
|
||||
|
||||
\membersection{wxListBox::GetStringSelection}\label{wxlistboxgetstringselection}
|
||||
|
||||
\constfunc{wxString}{GetStringSelection}{\void}
|
||||
|
||||
Gets the selected string - for single selection list boxes only. This
|
||||
must be copied by the calling program if long term use is to be made of
|
||||
it.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxListBox::GetSelection}{wxlistboxgetselection},\rtfsp
|
||||
\helpref{wxListBox::GetSelections}{wxlistboxgetselections},\rtfsp
|
||||
\helpref{wxListBox::SetSelection}{wxlistboxsetselection}
|
||||
|
||||
\membersection{wxListBox::Number}\label{wxlistboxnumber}
|
||||
|
||||
\constfunc{int}{Number}{\void}
|
||||
|
||||
Returns the number of items in the listbox.
|
||||
|
||||
\membersection{wxListBox::Selected}\label{wxlistboxselected}
|
||||
|
||||
\constfunc{bool}{Selected}{\param{const int}{ n}}
|
||||
|
||||
Determines whether an item is selected.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based item index.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the given item is selected, FALSE otherwise.
|
||||
|
||||
\membersection{wxListBox::Set}\label{wxlistboxset}
|
||||
|
||||
\func{void}{Set}{\param{const int}{ n}, \param{const wxString*}{ choices}}
|
||||
|
||||
Clears the list box and adds the given strings.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The number of strings to set.}
|
||||
|
||||
\docparam{choices}{An array of strings to set.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Deallocate the array from the calling program
|
||||
after this function has been called.
|
||||
|
||||
\membersection{wxListBox::SetClientData}\label{wxlistboxsetclientdata}
|
||||
|
||||
\func{void}{SetClientData}{\param{const int}{ n}, \param{char* }{data}}
|
||||
|
||||
Associates the given client data pointer with the given item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based item index.}
|
||||
|
||||
\docparam{data}{The client data to associate with the item.}
|
||||
|
||||
\membersection{wxListBox::SetFirstItem}\label{wxlistboxsetfirstitem}
|
||||
|
||||
\func{void}{SetFirstItem}{\param{int}{ n}}
|
||||
|
||||
\func{void}{SetFirstItem}{\param{const wxString\& }{string}}
|
||||
|
||||
Set the specified item to be the first visible item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based item index.}
|
||||
|
||||
\docparam{string}{The string that should be visible.}
|
||||
|
||||
\membersection{wxListBox::SetSelection}\label{wxlistboxsetselection}
|
||||
|
||||
\func{void}{SetSelection}{\param{const int}{ n}, \param{const bool }{select = TRUE}}
|
||||
|
||||
Selects or deselects the given item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based item index.}
|
||||
|
||||
\docparam{select}{If TRUE, will select the item. If FALSE, will deselect it.}
|
||||
|
||||
\membersection{wxListBox::SetString}\label{wxlistboxsetstring}
|
||||
|
||||
\func{void}{SetString}{\param{const int}{ n}, \param{const wxString\& }{ string}}
|
||||
|
||||
Sets the string value of an item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The zero-based item index.}
|
||||
|
||||
\docparam{string}{The string to set.}
|
||||
|
||||
\membersection{wxListBox::SetStringSelection}\label{wxlistboxsetstringselection}
|
||||
|
||||
\func{void}{SetStringSelection}{\param{const wxString\& }{ string}, \param{const bool}{ select = TRUE}}
|
||||
|
||||
Sets the current selection.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{string}{The item to select.}
|
||||
|
||||
\docparam{select}{If TRUE, will select the item. If FALSE, will deselect it.}
|
||||
|
511
docs/latex/wx/listctrl.tex
Normal file
@ -0,0 +1,511 @@
|
||||
\section{\class{wxListCtrl}}\label{wxlistctrl}
|
||||
|
||||
A list control presents lists in a number of formats: list view, report view, icon view
|
||||
and small icon view. Elements are numbered from zero.
|
||||
|
||||
To intercept events from a list control, use the event table macros described in \helpref{wxListEvent}{wxlistevent}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxControl}{wxcontrol}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxLC\_LIST}}{multicolumn list view, with optional small icons.
|
||||
Columns are computed automatically, i.e. you don't set columns as in wxLC\_REPORT. In other words,
|
||||
the list wraps, unlike a wxListBox.}
|
||||
\twocolitem{\windowstyle{wxLC\_REPORT}}{single or multicolumn report view, with optional header.}
|
||||
\twocolitem{\windowstyle{wxLC\_ICON}}{Large icon view, with optional labels.}
|
||||
\twocolitem{\windowstyle{wxLC\_SMALL\_ICON}}{Small icon view, with optional labels.}
|
||||
\twocolitem{\windowstyle{wxLC\_ALIGN\_TOP}}{Icons align to the top (default).}
|
||||
\twocolitem{\windowstyle{wxLC\_ALIGN\_LEFT}}{Icons align to the left.}
|
||||
\twocolitem{\windowstyle{wxLC\_AUTOARRANGE}}{Icons arrange themselves.}
|
||||
\twocolitem{\windowstyle{wxLC\_USER\_TEXT}}{The application provides label text on demand, except for column headers.}
|
||||
\twocolitem{\windowstyle{wxLC\_EDIT\_LABELS}}{Labels are editable: the application will be notified when editing starts.}
|
||||
\twocolitem{\windowstyle{wxLC\_NO\_HEADER}}{No header in report mode.}
|
||||
\twocolitem{\windowstyle{wxLC\_SINGLE\_SEL}}{Single selection.}
|
||||
\twocolitem{\windowstyle{wxLC\_SORT\_ASCENDING}}{Sort in ascending order (must still supply a comparison callback in SortItems.}
|
||||
\twocolitem{\windowstyle{wxLC\_SORT\_DESCENDING}}{Sort in descending order (must still supply a comparison callback in SortItems.}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxListCtrl overview}{wxlistctrloverview}, \helpref{wxListBox}{wxlistbox}, \helpref{wxTreeCtrl}{wxtreectrl},\rtfsp
|
||||
\helpref{wxImageList}{wximagelist}, \helpref{wxListEvent}{wxlistevent}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxListCtrl::wxListCtrl}\label{wxlistctrlconstr}
|
||||
|
||||
\func{}{wxListCtrl}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxListCtrl}{\param{wxWindow*}{ parent}, \param{const wxWindowID}{ id},\rtfsp
|
||||
\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
||||
\param{const long}{ style = wxLC\_ICON}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}}
|
||||
|
||||
Constructor, creating and showing a list control.
|
||||
|
||||
\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{style}{Window style. See \helpref{wxListCtrl}{wxlistctrl}.}
|
||||
|
||||
\docparam{validator}{Window validator.}
|
||||
|
||||
\docparam{name}{Window name.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxListCtrl::Create}{wxlistctrlcreate}, \helpref{wxValidator}{wxvalidator}
|
||||
|
||||
\membersection{wxListCtrl::\destruct{wxListCtrl}}
|
||||
|
||||
\func{void}{\destruct{wxListCtrl}}{\void}
|
||||
|
||||
Destructor, destroying the list control.
|
||||
|
||||
\membersection{wxListCtrl::Arrange}\label{wxlistctrlarrange}
|
||||
|
||||
\func{bool}{Arrange}{\param{const int }{flag = wxLIST\_ALIGN\_DEFAULT}}
|
||||
|
||||
Arranges the items in icon or small icon view. {\it flag} is one of:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{wxLIST\_ALIGN\_DEFAULT}{Default alignment.}
|
||||
\twocolitem{wxLIST\_ALIGN\_LEFT}{Align to the left side of the control.}
|
||||
\twocolitem{wxLIST\_ALIGN\_TOP}{Align to the top side of the control.}
|
||||
\twocolitem{wxLIST\_ALIGN\_SNAP\_TO\_GRID}{Snap to grid.}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxListCtrl::Create}\label{wxlistctrlcreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{const wxWindowID}{ id},\rtfsp
|
||||
\param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
|
||||
\param{const long}{ style = wxLC\_ICON}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``listCtrl"}}
|
||||
|
||||
Creates the list control. See \helpref{wxListCtrl::wxListCtrl}{wxlistctrlconstr} for further details.
|
||||
|
||||
\membersection{wxListCtrl::DeleteItem}\label{wxlistctrldeleteitem}
|
||||
|
||||
\func{bool}{DeleteItem}{\param{const long }{item}}
|
||||
|
||||
Deletes the specified item.
|
||||
|
||||
\membersection{wxListCtrl::DeleteAllItems}\label{wxlistctrldeleteallitems}
|
||||
|
||||
\func{bool}{DeleteAllItems}{\void}
|
||||
|
||||
Deletes all the items in the list control.
|
||||
|
||||
\membersection{wxListCtrl::DeleteColumn}\label{wxlistctrldeletecolumn}
|
||||
|
||||
\func{bool}{DeleteColumn}{\param{const int }{col}}
|
||||
|
||||
Deletes a column.
|
||||
|
||||
\membersection{wxListCtrl::Edit}\label{wxlistctrledit}
|
||||
|
||||
\func{wxTextCtrl\&}{Edit}{\param{const long }{item}}
|
||||
|
||||
Starts editing a label.
|
||||
|
||||
\membersection{wxListCtrl::EnsureVisible}\label{wxlistctrlensurevisible}
|
||||
|
||||
\func{bool}{EnsureVisible}{\param{const long }{item}}
|
||||
|
||||
Ensures this item is visible.
|
||||
|
||||
\membersection{wxListCtrl::FindItem}\label{wxlistctrlfinditem}
|
||||
|
||||
\func{long}{FindItem}{\param{const long }{start}, \param{const wxString\& }{str}, \param{const bool }{partial = FALSE}}
|
||||
|
||||
Find an item whose label matches this string, starting from the item after {\it start} or
|
||||
the beginning if {\it start} is -1.
|
||||
|
||||
\func{long}{FindItem}{\param{const long }{start}, \param{const long }{data}}
|
||||
|
||||
Find an item whose data matches this data, starting from the item after {\it start} or
|
||||
the beginning if 'start' is -1.
|
||||
|
||||
\func{long}{FindItem}{\param{const long }{start}, \param{const wxPoint\& }{pt}, \param{const int }{direction}}
|
||||
|
||||
Find an item nearest this position in the specified direction, starting from
|
||||
the item after {\it start} or the beginning if {\it start} is -1.
|
||||
|
||||
\membersection{wxListCtrl::GetColumn}\label{wxlistctrlgetcolumn}
|
||||
|
||||
\constfunc{bool}{GetColumn}{\param{const int }{col}, \param{wxListItem\& }{item}}
|
||||
|
||||
Gets information about this column. See \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem} for more
|
||||
information.
|
||||
|
||||
\membersection{wxListCtrl::GetColumnWidth}\label{wxlistctrlgetcolumnwidth}
|
||||
|
||||
\constfunc{int}{GetColumnWidth}{\param{const int }{col}}
|
||||
|
||||
Gets the column width (report view only).
|
||||
|
||||
\membersection{wxListCtrl::GetCountPerPage}\label{wxlistctrlgetcountperpage}
|
||||
|
||||
\constfunc{int}{GetCountPerPage}{\void}
|
||||
|
||||
Gets the number of items that can fit vertically in the
|
||||
visible area of the list control (list or report view)
|
||||
or the total number of items in the list control (icon
|
||||
or small icon view).
|
||||
|
||||
\membersection{wxListCtrl::GetEditControl}\label{wxlistctrlgeteditcontrol}
|
||||
|
||||
\constfunc{wxTextCtrl\&}{GetEditControl}{\void}
|
||||
|
||||
Gets the edit control for editing labels.
|
||||
|
||||
\membersection{wxListCtrl::GetImageList}\label{wxlistctrlgetimagelist}
|
||||
|
||||
\constfunc{wxImageList*}{GetImageList}{\param{const int }{which}}
|
||||
|
||||
Returns the specified image list. {\it which} may be one of:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxIMAGE\_LIST\_NORMAL}}{The normal (large icon) image list.}
|
||||
\twocolitem{\windowstyle{wxIMAGE\_LIST\_SMALL}}{The small icon image list.}
|
||||
\twocolitem{\windowstyle{wxIMAGE\_LIST\_STATE}}{The user-defined state image list (unimplemented).}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxListCtrl::GetItem}\label{wxlistctrlgetitem}
|
||||
|
||||
\constfunc{bool}{GetItem}{\param{wxListItem\& }{info}}
|
||||
|
||||
Gets information about the item. See \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem} for more
|
||||
information.
|
||||
|
||||
\membersection{wxListCtrl::GetItemData}\label{wxlistctrlgetitemdata}
|
||||
|
||||
\constfunc{long}{GetItemData}{\param{const long }{item}}
|
||||
|
||||
Gets the application-defined data associated with this item.
|
||||
|
||||
\membersection{wxListCtrl::GetItemPosition}\label{wxlistctrlgetitemposition}
|
||||
|
||||
\constfunc{bool}{GetItemPosition}{\param{const long }{item}, \param{wxPoint\& }{pos}}
|
||||
|
||||
Returns the position of the item, in icon or small icon view.
|
||||
|
||||
\membersection{wxListCtrl::GetItemRect}\label{wxlistctrlgetitemrect}
|
||||
|
||||
\constfunc{bool}{GetItemRect}{\param{const long }{item}, \param{wxRect\& }{rect}, \param{const int }{code = wxLIST\_RECT\_BOUNDS}}
|
||||
|
||||
Returns the rectangle representing the item's size and position, in client coordinates.
|
||||
|
||||
{\it code} is one of wxLIST\_RECT\_BOUNDS, wxLIST\_RECT\_ICON, wxLIST\_RECT\_LABEL.
|
||||
|
||||
\membersection{wxListCtrl::GetItemState}\label{wxlistctrlgetitemstate}
|
||||
|
||||
\constfunc{int}{GetItemState}{\param{const long }{item}, \param{const long }{stateMask}}
|
||||
|
||||
Gets the item state. For a list of state flags, see \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}.
|
||||
|
||||
The {\bf stateMask} indicates which state flags are of interest.
|
||||
|
||||
\membersection{wxListCtrl::GetItemCount}\label{wxlistctrlgetitemcount}
|
||||
|
||||
\constfunc{int}{GetItemCount}{\void}
|
||||
|
||||
Returns the number of items in the list control.
|
||||
|
||||
\membersection{wxListCtrl::GetItemSpacing}\label{wxlistctrlgetitemspacing}
|
||||
|
||||
\constfunc{int}{GetItemSpacing}{\param{bool }{isSmall}}
|
||||
|
||||
Retrieves the spacing between icons in pixels.
|
||||
If {\it small} is TRUE, gets the spacing for the small icon
|
||||
view, otherwise the large icon view.
|
||||
|
||||
\membersection{wxListCtrl::GetItemText}\label{wxlistctrlgetitemtext}
|
||||
|
||||
\constfunc{wxString}{GetItemText}{\param{const long }{item}}
|
||||
|
||||
Gets the item text for this item.
|
||||
|
||||
\membersection{wxListCtrl::GetNextItem}\label{wxlistctrlgetnextitem}
|
||||
|
||||
\constfunc{long}{GetNextItem}{\param{const long }{item}, \param{int }{geometry = wxLIST\_NEXT\_ALL}, \param{int }{state = wxLIST\_STATE\_DONTCARE}}
|
||||
|
||||
Searches for an item with the given goemetry or state, starting from {\it item}. {\it item} can be -1
|
||||
to find the first item that matches the specified flags.
|
||||
|
||||
Returns the item or -1 if unsuccessful.
|
||||
|
||||
{\it geometry} can be one of:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{wxLIST\_NEXT\_ABOVE}{Searches for an item above the specified item.}
|
||||
\twocolitem{wxLIST\_NEXT\_ALL}{Searches for subsequent item by index.}
|
||||
\twocolitem{wxLIST\_NEXT\_BELOW}{Searches for an item below the specified item.}
|
||||
\twocolitem{wxLIST\_NEXT\_LEFT}{Searches for an item to the left of the specified item.}
|
||||
\twocolitem{wxLIST\_NEXT\_RIGHT}{Searches for an item to the right of the specified item.}
|
||||
\end{twocollist}
|
||||
|
||||
{\it state} can be a bitlist of the following:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{wxLIST\_STATE\_DONTCARE}{Don't care what the state is.}
|
||||
\twocolitem{wxLIST\_STATE\_DROPHILITED}{The item indicates it is a drop target.}
|
||||
\twocolitem{wxLIST\_STATE\_FOCUSED}{The item has the focus.}
|
||||
\twocolitem{wxLIST\_STATE\_SELECTED}{The item is selected.}
|
||||
\twocolitem{wxLIST\_STATE\_CUT}{The item is selected as part of a cut and paste operation.}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxListCtrl::GetSelectedItemCount}\label{wxlistctrlgetselecteditemcount}
|
||||
|
||||
\constfunc{int}{GetSelectedItemCount}{\void}
|
||||
|
||||
Returns the number of selected items in the list control.
|
||||
|
||||
\membersection{wxListCtrl::GetTextColour}\label{wxlistctrlgettextcolour}
|
||||
|
||||
\constfunc{wxColour}{GetTextColour}{\void}
|
||||
|
||||
Gets the text colour of the list control.
|
||||
|
||||
\membersection{wxListCtrl::GetTopItem}\label{wxlistctrlgettopitem}
|
||||
|
||||
\constfunc{long}{GetTopItem}{\void}
|
||||
|
||||
Gets the index of the topmost visible item when in
|
||||
list or report view.
|
||||
|
||||
\membersection{wxListCtrl::HitTest}\label{wxlistctrlhittest}
|
||||
|
||||
\func{long}{HitTest}{\param{const wxPoint\& }{point}, \param{int\& }{flags}}
|
||||
|
||||
Determines which item (if any) is at the specified point,
|
||||
giving details in {\it flags}. {\it flags} will be a combination of the following flags:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{wxLIST\_HITTEST\_ABOVE}{Above the client area.}
|
||||
\twocolitem{wxLIST\_HITTEST\_BELOW}{Below the client area.}
|
||||
\twocolitem{wxLIST\_HITTEST\_NOWHERE}{In the client area but below the last item.}
|
||||
\twocolitem{wxLIST\_HITTEST\_ONITEMICON}{On the bitmap associated with an item.}
|
||||
\twocolitem{wxLIST\_HITTEST\_ONITEMLABEL}{On the label (string) associated with an item.}
|
||||
\twocolitem{wxLIST\_HITTEST\_ONITEMRIGHT}{In the area to the right of an item.}
|
||||
\twocolitem{wxLIST\_HITTEST\_ONITEMSTATEICON}{On the state icon for a tree view item that is in a user-defined state.}
|
||||
\twocolitem{wxLIST\_HITTEST\_TOLEFT}{To the right of the client area.}
|
||||
\twocolitem{wxLIST\_HITTEST\_TORIGHT}{To the left of the client area.}
|
||||
\twocolitem{wxLIST\_HITTEST\_ONITEM}{Combination of wxLIST\_HITTEST\_ONITEMICON, wxLIST\_HITTEST\_ONITEMLABEL,
|
||||
wxLIST\_HITTEST\_ONITEMSTATEICON.}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxListCtrl::InsertColumn}\label{wxlistctrlinsertcolumn}
|
||||
|
||||
\func{long}{InsertColumn}{\param{const long }{col}, \param{wxListItem\& }{info}}
|
||||
|
||||
For list view mode (only), inserts a column. For more details, see \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}.
|
||||
|
||||
\func{long}{InsertColumn}{\param{const long }{col}, \param{const wxString\& }{heading}, \param{const int }{format = wxLIST\_FORMAT\_LEFT},\rtfsp
|
||||
\param{const int }{width = -1}}
|
||||
|
||||
For list view mode (only), inserts a column. For more details, see \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}.
|
||||
|
||||
\membersection{wxListCtrl::InsertItem}\label{wxlistctrlinsertitem}
|
||||
|
||||
\func{long}{InsertItem}{\param{wxListItem\& }{info}}
|
||||
|
||||
Inserts an item, returning the index of the new item if successful,
|
||||
-1 otherwise.
|
||||
|
||||
\func{long}{InsertItem}{\param{const long }{index}, \param{const wxString\& }{label}}
|
||||
|
||||
Inserts a string item.
|
||||
|
||||
\func{long}{InsertItem}{\param{const long }{index}, \param{const int }{imageIndex}}
|
||||
|
||||
Inserts an image item.
|
||||
|
||||
\func{long}{InsertItem}{\param{const long }{index}, \param{const wxString\& }{label}, \param{const int }{imageIndex}}
|
||||
|
||||
Insert an image/string item.
|
||||
|
||||
\membersection{wxListCtrl::ScrollList}\label{wxlistctrlscrolllist}
|
||||
|
||||
\func{bool}{ScrollList}{\param{const int }{dx}, \param{const int }{dy}}
|
||||
|
||||
Scrolls the list control. If in icon, small icon or report view mode,
|
||||
dx specifies the number of pixels to scroll. If in list view mode, dx
|
||||
specifies the number of columns to scroll.
|
||||
|
||||
If in icon, small icon or list view mode, dy specifies the number of pixels
|
||||
to scroll. If in report view mode, dy specifies the number of lines to scroll.
|
||||
|
||||
\membersection{wxListCtrl::SetBackgroundColour}\label{wxlistctrlsetbackgroundcolour}
|
||||
|
||||
\func{void}{SetBackgroundColour}{\param{const wxColour\& }{col}}
|
||||
|
||||
Sets the background colour (GetBackgroundColour already implicit in
|
||||
wxWindow class).
|
||||
|
||||
\membersection{wxListCtrl::SetColumn}\label{wxlistctrlsetcolumn}
|
||||
|
||||
\func{bool}{SetColumn}{\param{const int }{col}, \param{wxListItem\& }{item}}
|
||||
|
||||
Sets information about this column. See \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem} for more
|
||||
information.
|
||||
|
||||
\membersection{wxListCtrl::SetColumnWidth}\label{wxlistctrlsetcolumnwidth}
|
||||
|
||||
\func{bool}{SetColumnWidth}{\param{const int }{col}, \param{const int }{width}}
|
||||
|
||||
Sets the column width (report view only).
|
||||
|
||||
{\it width} can be a width in pixels or wxLIST\_AUTOSIZE (-1) or wxLIST\_AUTOSIZE\_USEHEADER (-2).
|
||||
|
||||
\membersection{wxListCtrl::SetImageList}\label{wxlistctrlsetimagelist}
|
||||
|
||||
\func{void}{SetImageList}{\param{wxImageList*}{ imageList}, \param{const int }{which}}
|
||||
|
||||
Sets the image list associated with the control. {\it which} is one of
|
||||
wxIMAGE\_LIST\_NORMAL, wxIMAGE\_LIST\_SMALL, wxIMAGE\_LIST\_STATE (the last is unimplemented).
|
||||
|
||||
\membersection{wxListCtrl::SetItem}\label{wxlistctrlsetitem}
|
||||
|
||||
\func{bool}{SetItem}{\param{wxListItem\& }{info}}
|
||||
|
||||
Sets information about the item.
|
||||
|
||||
wxListItem is a class with the following members:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{long m\_mask}{Indicates which fields are valid. See the list of valid mask flags below.}
|
||||
\twocolitem{long m\_itemId}{The zero-based item position.}
|
||||
\twocolitem{int m\_col}{Zero-based column, if in report mode.}
|
||||
\twocolitem{long m\_state}{The state of the item. See the list of valid state flags below.}
|
||||
\twocolitem{long m\_stateMask}{A mask indicating which state flags are valid. See the list of valid state flags below.}
|
||||
\twocolitem{wxString m\_text}{The label/header text.}
|
||||
\twocolitem{int m\_image}{The zero-based index into an image list.}
|
||||
\twocolitem{long m\_data}{Application-defined data.}
|
||||
\twocolitem{int m\_format}{For columns only: the format. Can be wxLIST\_FORMAT\_LEFT, wxLIST\_FORMAT\_RIGHT or
|
||||
wxLIST\_FORMAT\_CENTRE.}
|
||||
\twocolitem{int m\_width}{For columns only: the column width.}
|
||||
\end{twocollist}
|
||||
|
||||
The {\bf m\_mask} member contains a bitlist specifying which of the other fields are valid. The flags are:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{wxLIST\_MASK\_STATE}{The {\bf m\_state} field is valid.}
|
||||
\twocolitem{wxLIST\_MASK\_TEXT}{The {\bf m\_text} field is valid.}
|
||||
\twocolitem{wxLIST\_MASK\_IMAGE}{The {\bf m\_image} field is valid.}
|
||||
\twocolitem{wxLIST\_MASK\_DATA}{The {\bf m\_data} field is valid.}
|
||||
\twocolitem{wxLIST\_MASK\_WIDTH}{The {\bf m\_width} field is valid.}
|
||||
\twocolitem{wxLIST\_MASK\_FORMAT}{The {\bf m\_format} field is valid.}
|
||||
\end{twocollist}
|
||||
|
||||
The {\bf m\_stateMask} and {\bf m\_state} members take flags from the following:
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{wxLIST\_STATE\_DONTCARE}{Don't care what the state is.}
|
||||
\twocolitem{wxLIST\_STATE\_DROPHILITED}{The item is highlighted to receive a drop event.}
|
||||
\twocolitem{wxLIST\_STATE\_FOCUSED}{The item has the focus.}
|
||||
\twocolitem{wxLIST\_STATE\_SELECTED}{The item is selected.}
|
||||
\twocolitem{wxLIST\_STATE\_CUT}{The item is in the cut state.}
|
||||
\end{twocollist}
|
||||
|
||||
\func{long}{SetItem}{\param{const long }{index}, \param{const int }{col}, \param{const wxString\& }{label}, \param{const int }{imageId = -1}}
|
||||
|
||||
Sets a string field at a particular column.
|
||||
|
||||
\membersection{wxListCtrl::SetItemData}\label{wxlistctrlsetitemdata}
|
||||
|
||||
\func{bool}{SetItemData}{\param{const long }{item}, \param{long }{data}}
|
||||
|
||||
Associates application-defined data with this item.
|
||||
|
||||
\membersection{wxListCtrl::SetItemImage}\label{wxlistctrlsetitemimage}
|
||||
|
||||
\func{bool}{SetItemImage}{\param{const long }{item}, \param{const int }{image}, \param{const int }{selImage}}
|
||||
|
||||
Sets the unselected and selected images associated with the item. The images are indices into the
|
||||
image list associated with the list control.
|
||||
|
||||
\membersection{wxListCtrl::SetItemPosition}\label{wxlistctrlsetitemposition}
|
||||
|
||||
\func{bool}{SetItemPosition}{\param{const long }{item}, \param{const wxPoint\& }{pos}}
|
||||
|
||||
Sets the position of the item, in icon or small icon view.
|
||||
|
||||
\membersection{wxListCtrl::SetItemState}\label{wxlistctrlsetitemstate}
|
||||
|
||||
\func{bool}{SetItemState}{\param{const long }{item}, \param{const long }{state}, \param{const long }{stateMask}}
|
||||
|
||||
Sets the item state. For a list of state flags, see \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}.
|
||||
|
||||
The {\bf stateMask} indicates which state flags are valid.
|
||||
|
||||
\membersection{wxListCtrl::SetItemText}\label{wxlistctrlsetitemtext}
|
||||
|
||||
\func{void}{SetItemText}{\param{const long }{item}, \param{const wxString\& }{text}}
|
||||
|
||||
Sets the item text for this item.
|
||||
|
||||
\membersection{wxListCtrl::SetSingleStyle}\label{wxlistctrlsetsinglestyle}
|
||||
|
||||
\func{void}{SetSingleStyle}{\param{const long }{style}, \param{const bool }{add = TRUE}}
|
||||
|
||||
Adds or removes a single window style.
|
||||
|
||||
\membersection{wxListCtrl::SetTextColour}\label{wxlistctrlsettextcolour}
|
||||
|
||||
\func{void}{SetTextColour}{\param{const wxColour\& }{col}}
|
||||
|
||||
Sets the text colour of the list control.
|
||||
|
||||
\membersection{wxListCtrl::SetWindowStyleFlag}\label{wxlistctrlsetwindowstyleflag}
|
||||
|
||||
\func{void}{SetWindowStyleFlag}{\param{const long }{style}}
|
||||
|
||||
Sets the whole window style.
|
||||
|
||||
\membersection{wxListCtrl::SortItems}\label{wxlistctrlsortitems}
|
||||
|
||||
\func{bool}{SortItems}{\param{wxListCtrlCompare }{fn}, \param{long }{data}}
|
||||
|
||||
Sorts the items in the list control.
|
||||
|
||||
fn is a function which takes 3 long arguments: item1, item2, data.
|
||||
|
||||
item1 is the long data associated with a first item (NOT the index).
|
||||
|
||||
item2 is the long data associated with a second item (NOT the index).
|
||||
|
||||
data is the same value as passed to SortItems.
|
||||
|
||||
The return value is a negative number if the first item should precede the second
|
||||
item, a positive number of the second item should precede the first,
|
||||
or zero if the two items are equivalent.
|
||||
|
||||
data is arbitrary data to be passed to the sort function.
|
||||
|
87
docs/latex/wx/listevt.tex
Normal file
@ -0,0 +1,87 @@
|
||||
\section{\class{wxListEvent}}\label{wxlistevent}
|
||||
|
||||
A list event holds information about events associated with wxListCtrl objects.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxCommandEvent}{wxcommandevent}\\
|
||||
\helpref{wxEvent}{wxevent}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Event table macros}
|
||||
|
||||
To process input from a list control, use these event handler macros to direct input to member
|
||||
functions that take a wxListEvent argument.
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_LIST\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.}
|
||||
\twocolitem{{\bf EVT\_LIST\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.}
|
||||
\twocolitem{{\bf EVT\_LIST\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.}
|
||||
\twocolitem{{\bf EVT\_LIST\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.}
|
||||
\twocolitem{{\bf EVT\_LIST\_DELETE\_ITEM(id, func)}}{Delete an item.}
|
||||
\twocolitem{{\bf EVT\_LIST\_DELETE\_ALL\_ITEMS(id, func)}}{Delete all items.}
|
||||
\twocolitem{{\bf EVT\_LIST\_GET\_INFO(id, func)}}{Request information from the application, usually the item text.}
|
||||
\twocolitem{{\bf EVT\_LIST\_SET\_INFO(id, func)}}{Information is being supplied (not implemented).}
|
||||
\twocolitem{{\bf EVT\_LIST\_ITEM\_SELECTED(id, func)}}{The item has been selected.}
|
||||
\twocolitem{{\bf EVT\_LIST\_ITEM\_DESELECTED(id, func)}}{The item has been deselected.}
|
||||
\twocolitem{{\bf EVT\_LIST\_KEY\_DOWN(id, func)}}{A key has been pressed.}
|
||||
\twocolitem{{\bf EVT\_LIST\_INSERT\_ITEM(id, func)}}{An item has been inserted.}
|
||||
\twocolitem{{\bf EVT\_LIST\_COL\_CLICK(id, func)}}{A column ({\bf m\_col}) has been left-clicked.}
|
||||
\end{twocollist}%
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxListCtrl}{wxlistctrl}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxListEvent::wxListEvent}
|
||||
|
||||
\func{}{wxListEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxListEvent::m\_code}
|
||||
|
||||
\member{int}{m\_code}
|
||||
|
||||
Key code if the event is a keypress event.
|
||||
|
||||
\membersection{wxListEvent::m\_itemIndex}
|
||||
|
||||
\member{long}{m\_itemIndex}
|
||||
|
||||
The item index.
|
||||
|
||||
\membersection{wxListEvent::m\_oldItemIndex}
|
||||
|
||||
\member{long}{m\_oldItemIndex}
|
||||
|
||||
The old item index.
|
||||
|
||||
\membersection{wxListEvent::m\_col}
|
||||
|
||||
\member{int}{m\_col}
|
||||
|
||||
The column position.
|
||||
|
||||
\membersection{wxListEvent::m\_cancelled}
|
||||
|
||||
\member{bool}{m\_cancelled}
|
||||
|
||||
TRUE if this event is an end edit event and the user cancelled the edit.
|
||||
|
||||
\membersection{wxListEvent::m\_pointDrag}
|
||||
|
||||
\member{wxPoint}{m\_pointDrag}
|
||||
|
||||
The position of the mouse pointer if the event is a drag event.
|
||||
|
||||
\membersection{wxListEvent::m\_item}
|
||||
|
||||
\member{wxListItem}{m\_item}
|
||||
|
||||
An item object, used by some events. See also \helpref{wxListCtrl::SetItem}{wxlistctrlsetitem}.
|
||||
|
||||
|
124
docs/latex/wx/manual.tex
Normal file
@ -0,0 +1,124 @@
|
||||
\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}
|
||||
\newcommand{\indexit}[1]{#1\index{#1}}%
|
||||
\newcommand{\pipe}[0]{$\|$\ }%
|
||||
\definecolour{black}{0}{0}{0}%
|
||||
\definecolour{cyan}{0}{255}{255}%
|
||||
\definecolour{green}{0}{255}{0}%
|
||||
\definecolour{magenta}{255}{0}{255}%
|
||||
\definecolour{red}{255}{0}{0}%
|
||||
\definecolour{blue}{0}{0}{200}%
|
||||
\definecolour{yellow}{255}{255}{0}%
|
||||
\definecolour{white}{255}{255}{255}%
|
||||
%
|
||||
\input psbox.tex
|
||||
% Remove this for processing with dvi2ps instead of dvips
|
||||
%\special{!/@scaleunit 1 def}
|
||||
\parskip=10pt
|
||||
\parindent=0pt
|
||||
\title{User Manual for wxWindows 2.0: a portable C++ GUI toolkit}
|
||||
\winhelponly{\author{by Julian Smart and Markus Holzem
|
||||
%\winhelponly{\\$$\image{1cm;0cm}{wxwin.wmf}$$}
|
||||
}}
|
||||
\winhelpignore{\author{Julian Smart and Markus Holzem}
|
||||
\date{October 21st 1997}
|
||||
}
|
||||
\makeindex
|
||||
\begin{document}
|
||||
\maketitle
|
||||
\pagestyle{fancyplain}
|
||||
\bibliographystyle{plain}
|
||||
\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
\pagenumbering{roman}
|
||||
\tableofcontents
|
||||
|
||||
% A special table of contents for the WinHelp manual
|
||||
\begin{comment}
|
||||
\winhelponly{
|
||||
\chapter*{wxWindows class library reference}\label{winhelpcontents}
|
||||
|
||||
\center{
|
||||
%\image{}{wxwin.wmf}
|
||||
}%
|
||||
|
||||
\sethotspotcolour{off}%
|
||||
\sethotspotunderline{on}%
|
||||
\large{
|
||||
\image{}{cpp.bmp} \helpref{Alphabetical class reference}{classref}
|
||||
|
||||
\image{}{shelves.bmp} \helpref{Classes by category}{classesbycat}
|
||||
|
||||
\image{}{book1.bmp} \helpref{Topic overviews}{overviews}
|
||||
|
||||
\image{}{hand1.bmp} \helpref{Guide to wxWindows}{wxwinchapters}
|
||||
}
|
||||
\sethotspotcolour{on}%
|
||||
\sethotspotunderline{on}%
|
||||
|
||||
\chapter*{Overview of wxWindows}\label{wxwinchapters}
|
||||
|
||||
\helpref{Introduction}{introduction}\\
|
||||
%\helpref{Resource guide}{resguide}\\
|
||||
%\helpref{Comparison with other GUI models}{comparison}\\
|
||||
%\helpref{Multi-platform development with wxWindows}{multiplat}\\
|
||||
%\helpref{Tutorial}{tutorial}\\
|
||||
\helpref{The wxWindows resource system}{resourceformats}\\
|
||||
\helpref{Utilities}{utilities}\\
|
||||
\helpref{Programming strategies}{strategies}\\
|
||||
\helpref{Bugs and future directions}{bugs}\\
|
||||
\helpref{References}{bibliography}
|
||||
}
|
||||
\end{comment}
|
||||
|
||||
\chapter*{Copyright notice}
|
||||
\setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
|
||||
\begin{center}
|
||||
Copyright (c) 1997 Julian Smart and Markus Holzem\\
|
||||
Portions (c) 1996 Artificial Intelligence Applications Institute\\
|
||||
\end{center}
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose is hereby granted without fee, provided that the
|
||||
above copyright notice, author statement and this permission notice appear in
|
||||
all copies of this software and related documentation.
|
||||
|
||||
THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
|
||||
IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
IN NO EVENT SHALL THE ARTIFICIAL INTELLIGENCE APPLICATIONS INSTITUTE OR THE
|
||||
UNIVERSITY OF EDINBURGH OR JULIAN SMART OR MARKUS HOLZEM BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR
|
||||
CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF
|
||||
DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH
|
||||
THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
\input{body.tex}
|
||||
\helpinput{classes.tex}
|
||||
\helpinput{category.tex}
|
||||
\helpinput{topics.tex}
|
||||
|
||||
\newpage
|
||||
|
||||
% Puts books in the bibliography without needing to cite them in the
|
||||
% text
|
||||
\nocite{helpbook}%
|
||||
\nocite{wong93}%
|
||||
\nocite{pree94}%
|
||||
\nocite{gamma95}%
|
||||
\nocite{smart95a}%
|
||||
\nocite{smart95b}%
|
||||
|
||||
\bibliography{refs}
|
||||
\addcontentsline{toc}{chapter}{Bibliography}
|
||||
\setheader{{\it REFERENCES}}{}{}{}{}{{\it REFERENCES}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
|
||||
\newpage
|
||||
\addcontentsline{toc}{chapter}{Index}
|
||||
\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
|
||||
\setfooter{\thepage}{}{}{}{}{\thepage}%
|
||||
\printindex
|
||||
\end{document}
|
76
docs/latex/wx/mask.tex
Normal file
@ -0,0 +1,76 @@
|
||||
\section{\class{wxMask}}\label{wxmask}
|
||||
|
||||
This class encapsulates a monochrome mask bitmap, where the masked area is black and
|
||||
the unmasked area is white.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
A mask may be associated with a \helpref{wxBitmap}{wxbitmap}. It is used in \helpref{wxDC::Blit}{wxdcblit} when
|
||||
the source device context is a \helpref{wxMemoryDC}{wxmemorydc} with wxBitmap selected into it that
|
||||
contains a mask.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap}{wxbitmap}, \helpref{wxDC::Blit}{wxdcblit}, \helpref{wxMemoryDC}{wxmemorydc}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxMask::wxMask}\label{wxmaskconstr}
|
||||
|
||||
\func{}{wxMask}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxMask}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Constructs a mask from a monochrome bitmap.
|
||||
|
||||
\func{}{wxMask}{\param{const wxBitmap\& }{bitmap}, \param{const wxColour\& }{colour}}
|
||||
|
||||
Constructs a mask from a bitmap and a colour that indicates the background.
|
||||
|
||||
\func{}{wxMask}{\param{const wxBitmap\& }{bitmap}, \param{int}{ index}}
|
||||
|
||||
Constructs a mask from a bitmap and a palette index that indicates the background.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{A valid bitmap.}
|
||||
|
||||
\docparam{colour}{A colour specifying the transparency RGB values.}
|
||||
|
||||
\docparam{index}{Index into a palette, specifying the transparency colour.}
|
||||
|
||||
\membersection{wxMask::\destruct{wxMask}}
|
||||
|
||||
\func{}{\destruct{wxMask}}{\void}
|
||||
|
||||
Destroys the wxMask object and the underlying bitmap data.
|
||||
|
||||
\membersection{wxMask::Create}\label{wxmaskcreate}
|
||||
|
||||
\func{bool}{Create}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Constructs a mask from a monochrome bitmap.
|
||||
|
||||
\func{bool}{Create}{\param{const wxBitmap\& }{bitmap}, \param{const wxColour\& }{colour}}
|
||||
|
||||
Constructs a mask from a bitmap and a colour that indicates the background.
|
||||
|
||||
\func{bool}{Create}{\param{const wxBitmap\& }{bitmap}, \param{int}{ index}}
|
||||
|
||||
Constructs a mask from a bitmap and a palette index that indicates the background.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bitmap}{A valid bitmap.}
|
||||
|
||||
\docparam{colour}{A colour specifying the transparency RGB values.}
|
||||
|
||||
\docparam{index}{Index into a palette, specifying the transparency colour.}
|
||||
|
||||
|
515
docs/latex/wx/mdi.tex
Normal file
@ -0,0 +1,515 @@
|
||||
\section{\class{wxMDIChildFrame}}\label{wxmdichildframe}
|
||||
|
||||
An MDI child frame is a frame that can only exist on a \helpref{wxMDIClientWindow}{wxmdiclientwindow},
|
||||
which is itself a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxFrame}{wxframe}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.}
|
||||
\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.}
|
||||
\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).}
|
||||
\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).}
|
||||
\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.}
|
||||
\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only;
|
||||
for Windows, it is implicit in wxTHICK\_FRAME).}
|
||||
\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).}
|
||||
\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Although internally an MDI child frame is a child of the MDI client window, in wxWindows
|
||||
you create it as a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}. You can usually
|
||||
forget that the client window exists.
|
||||
|
||||
MDI child frames are clipped to the area of the MDI client window, and may be iconized
|
||||
on the client window.
|
||||
|
||||
You can associate a menubar with a child frame as usual, although an MDI child doesn't display
|
||||
its menubar under its own title bar. The MDI parent frame's menubar will be changed to
|
||||
reflect the currently active child frame. If there are currently no children, the parent
|
||||
frame's own menubar will be displayed.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIClientWindow}{wxmdiclientwindow}, \helpref{wxMDIParentFrame}{wxmdiparentframe},\rtfsp
|
||||
\helpref{wxFrame}{wxframe}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxMDIChildFrame::wxMDIChildFrame}\label{wxmdichildframeconstr}
|
||||
|
||||
\func{}{wxMDIChildFrame}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxMDIChildFrame}{\param{wxMDIParentFrame* }{parent}, \param{const wxWindowID }{id},\rtfsp
|
||||
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp
|
||||
\param{const wxString\& }{name = ``frame"}}
|
||||
|
||||
Constructor, creating the window.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{The window parent. This should not be NULL.}
|
||||
|
||||
\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.}
|
||||
|
||||
\docparam{title}{The caption to be displayed on the frame's title bar.}
|
||||
|
||||
\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by
|
||||
either the windowing system or wxWindows, depending on platform.}
|
||||
|
||||
\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by
|
||||
either the windowing system or wxWindows, depending on platform.}
|
||||
|
||||
\docparam{style}{The window style. See \helpref{wxMDIChildFrame}{wxmdichildframe}.}
|
||||
|
||||
\docparam{name}{The name of the window. This parameter is used to associate a name with the item,
|
||||
allowing the application user to set Motif resource values for
|
||||
individual windows.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
None.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIChildFrame::Create}{wxmdichildframecreate}
|
||||
|
||||
\membersection{wxMDIChildFrame::\destruct{wxMDIChildFrame}}
|
||||
|
||||
\func{}{\destruct{wxMDIChildFrame}}{\void}
|
||||
|
||||
Destructor. Destroys all child windows and menu bar if present.
|
||||
|
||||
\membersection{wxMDIChildFrame::Activate}\label{wxmdichildframeactivate}
|
||||
|
||||
\func{void}{Activate}{\void}
|
||||
|
||||
Activates this MDI child frame.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIChildFrame::Maximize}{wxmdichildframemaximize},\rtfsp
|
||||
\helpref{wxMDIChildFrame::Restore}{wxmdichildframerestore}
|
||||
|
||||
\membersection{wxMDIChildFrame::Create}\label{wxmdichildframecreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
|
||||
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE},\rtfsp
|
||||
\param{const wxString\& }{name = ``frame"}}
|
||||
|
||||
Used in two-step frame construction. See \helpref{wxMDIChildFrame::wxMDIChildFrame}{wxmdichildframeconstr}\rtfsp
|
||||
for further details.
|
||||
|
||||
\membersection{wxMDIChildFrame::Maximize}\label{wxmdichildframemaximize}
|
||||
|
||||
\func{void}{Maximize}{\void}
|
||||
|
||||
Maximizes this MDI child frame.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIChildFrame::Activate}{wxmdichildframeactivate},\rtfsp
|
||||
\helpref{wxMDIChildFrame::Restore}{wxmdichildframerestore}
|
||||
|
||||
\membersection{wxMDIChildFrame::Restore}\label{wxmdichildframerestore}
|
||||
|
||||
\func{void}{Restore}{\void}
|
||||
|
||||
Restores this MDI child frame (unmaximizes).
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIChildFrame::Activate}{wxmdichildframeactivate},\rtfsp
|
||||
\helpref{wxMDIChildFrame::Maximize}{wxmdichildframemaximize}
|
||||
|
||||
|
||||
\section{\class{wxMDIClientWindow}}\label{wxmdiclientwindow}
|
||||
|
||||
An MDI client window is a child of \helpref{wxMDIParentFrame}{wxmdiparentframe}, and manages zero or
|
||||
more \helpref{wxMDIChildFrame}{wxmdichildframe} objects.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The client window is the area where MDI child windows exist. It doesn't have to cover the whole
|
||||
parent frame; other windows such as toolbars and a help window might coexist with it.
|
||||
There can be scrollbars on a client window, which are controlled by the parent window style.
|
||||
|
||||
The {\bf wxMDIClientWindow} class is usually adequate without further derivation, and it is created
|
||||
automatically when the MDI parent frame is created. If the application needs to derive a new class,
|
||||
the function \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient} must be
|
||||
overridden in order to give an opportunity to use a different class of client window.
|
||||
|
||||
Under Windows 95, the client window will automatically have a sunken border style when
|
||||
the active child is not maximized, and no border style when a child is maximized.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIChildFrame}{wxmdichildframe}, \helpref{wxMDIParentFrame}{wxmdiparentframe},\rtfsp
|
||||
\helpref{wxFrame}{wxframe}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxMDIClientWindow::wxMDIClientWindow}\label{wxmdiclientwindowconstr}
|
||||
|
||||
\func{}{wxMDIClientWindow}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxMDIClientWindow}{\param{wxMDIParentFrame* }{parent}, \param{long}{ style = 0}}
|
||||
|
||||
Constructor, creating the window.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{The window parent.}
|
||||
|
||||
\docparam{style}{The window style. Currently unused.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The second style of constructor is called within \helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframeconstr},\rtfsp
|
||||
\helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}
|
||||
|
||||
\membersection{wxMDIClientWindow::\destruct{wxMDIClientWindow}}
|
||||
|
||||
\func{}{\destruct{wxMDIClientWindow}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxMDIClientWindow::CreateClient}\label{wxmdiclientwindowcreateclient}
|
||||
|
||||
\func{bool}{CreateClient}{\param{wxMDIParentFrame* }{parent}, \param{long}{ style = 0}}
|
||||
|
||||
Used in two-step frame construction. See \helpref{wxMDIClientWindow::wxMDIClientWindow}{wxmdiclientwindowconstr}\rtfsp
|
||||
for further details.
|
||||
|
||||
\section{\class{wxMDIParentFrame}}\label{wxmdiparentframe}
|
||||
|
||||
An MDI (Multiple Document Interface) parent frame is a window which can contain
|
||||
MDI child frames in its own `desktop'. It is a convenient way to avoid window clutter,
|
||||
and is used in many popular Windows applications, such as Microsoft Word(TM).
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxFrame}{wxframe}\\
|
||||
\helpref{wxWindow}{wxwindow}\\
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
There may be multiple MDI parent frames in a single application, but this probably only makes sense
|
||||
within programming development environments.
|
||||
|
||||
Child frames may be either \helpref{wxMDIChildFrame}{wxmdichildframe}, or \helpref{wxFrame}{wxframe}.
|
||||
|
||||
An MDI parent frame always has a \helpref{wxMDIClientWindow}{wxmdiclientwindow} associated with it, which
|
||||
is the parent for MDI client frames.
|
||||
This client window may be resized to accomodate non-MDI windows, as seen in Microsoft Visual C++ (TM) and
|
||||
Microsoft Publisher (TM), where a documentation window is placed to one side of the workspace.
|
||||
|
||||
MDI remains popular despite dire warnings from Microsoft itself that MDI is an obsolete
|
||||
user interface style.
|
||||
|
||||
The implementation is native in Windows, and simulated under Motif. Under Motif,
|
||||
the child window frames will often have a different appearance from other frames
|
||||
because the window decorations are simulated.
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
\twocolwidtha{5cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxCAPTION}}{Puts a caption on the frame.}
|
||||
\twocolitem{\windowstyle{wxDEFAULT\_FRAME\_STYLE}}{Defined as {\bf wxMINIMIZE\_BOX \pipe wxMAXIMIZE\_BOX \pipe wxTHICK\_FRAME \pipe wxSYSTEM\_MENU \pipe wxCAPTION}.}
|
||||
\twocolitem{\windowstyle{wxHSCROLL}}{Displays a horizontal scrollbar in the {\it client window}, allowing
|
||||
the user to view child frames that are off the current view.}
|
||||
\twocolitem{\windowstyle{wxICONIZE}}{Display the frame iconized (minimized) (Windows only).}
|
||||
\twocolitem{\windowstyle{wxMAXIMIZE}}{Displays the frame maximized (Windows only).}
|
||||
\twocolitem{\windowstyle{wxMAXIMIZE\_BOX}}{Displays a maximize box on the frame (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxMINIMIZE}}{Identical to {\bf wxICONIZE}.}
|
||||
\twocolitem{\windowstyle{wxMINIMIZE\_BOX}}{Displays a minimize box on the frame (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Motif only;
|
||||
for Windows, it is implicit in wxTHICK\_FRAME).}
|
||||
\twocolitem{\windowstyle{wxSTAY\_ON\_TOP}}{Stay on top of other windows (Windows only).}
|
||||
\twocolitem{\windowstyle{wxSYSTEM\_MENU}}{Displays a system menu (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxTHICK\_FRAME}}{Displays a thick frame around the window (Windows and Motif only).}
|
||||
\twocolitem{\windowstyle{wxVSCROLL}}{Displays a vertical scrollbar in the {\it client window}, allowing
|
||||
the user to view child frames that are off the current view.}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIChildFrame}{wxmdichildframe}, \helpref{wxMDIClientWindow}{wxmdiclientwindow},\rtfsp
|
||||
\helpref{wxFrame}{wxframe}, \helpref{wxDialog}{wxdialog}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxMDIParentFrame::wxMDIParentFrame}\label{wxmdiparentframeconstr}
|
||||
|
||||
\func{}{wxMDIParentFrame}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxMDIParentFrame}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
|
||||
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE \pipe wxVSCROLL \pipe wxHSCROLL},\rtfsp
|
||||
\param{const wxString\& }{name = ``frame"}}
|
||||
|
||||
Constructor, creating the window.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{The window parent. This should be NULL.}
|
||||
|
||||
\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.}
|
||||
|
||||
\docparam{title}{The caption to be displayed on the frame's title bar.}
|
||||
|
||||
\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by
|
||||
either the windowing system or wxWindows, depending on platform.}
|
||||
|
||||
\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by
|
||||
either the windowing system or wxWindows, depending on platform.}
|
||||
|
||||
\docparam{style}{The window style. See \helpref{wxMDIParentFrame}{wxmdiparentframe}.}
|
||||
|
||||
\docparam{name}{The name of the window. This parameter is used to associate a name with the item,
|
||||
allowing the application user to set Motif resource values for
|
||||
individual windows.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
During the construction of the frame, the client window will be created. To use a different class
|
||||
from \helpref{wxMDIClientWindow}{wxmdiclientwindow}, override\rtfsp
|
||||
\helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}.
|
||||
|
||||
Under Windows 95, the client window will automatically have a sunken border style when
|
||||
the active child is not maximized, and no border style when a child is maximized.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::Create}{wxmdiparentframecreate},\rtfsp
|
||||
\helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}
|
||||
|
||||
\membersection{wxMDIParentFrame::\destruct{wxMDIParentFrame}}
|
||||
|
||||
\func{}{\destruct{wxMDIParentFrame}}{\void}
|
||||
|
||||
Destructor. Destroys all child windows and menu bar if present.
|
||||
|
||||
\membersection{wxMDIParentFrame::ActivateNext}\label{wxmdiparentframeactivatenext}
|
||||
|
||||
\func{void}{ActivateNext}{\void}
|
||||
|
||||
Activates the MDI child following the currently active one.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::ActivatePrevious}{wxmdiparentframeactivateprevious}
|
||||
|
||||
\membersection{wxMDIParentFrame::ActivatePrevious}\label{wxmdiparentframeactivateprevious}
|
||||
|
||||
\func{void}{ActivatePrevious}{\void}
|
||||
|
||||
Activates the MDI child preceding the currently active one.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::ActivateNext}{wxmdiparentframeactivatenext}
|
||||
|
||||
|
||||
\membersection{wxMDIParentFrame::ArrangeIcons}\label{wxmdiparentframearrangeicons}
|
||||
|
||||
\func{void}{ArrangeIcons}{\void}
|
||||
|
||||
Arranges any iconized (minimized) MDI child windows.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::Cascade}{wxmdiparentframecascade},\rtfsp
|
||||
\helpref{wxMDIParentFrame::Tile}{wxmdiparentframetile}
|
||||
|
||||
\membersection{wxMDIParentFrame::Cascade}\label{wxmdiparentframecascade}
|
||||
|
||||
\func{void}{Cascade}{\void}
|
||||
|
||||
Arranges the MDI child windows in a cascade.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::Tile}{wxmdiparentframetile},\rtfsp
|
||||
\helpref{wxMDIParentFrame::ArrangeIcons}{wxmdiparentframearrangeicons}
|
||||
|
||||
\membersection{wxMDIParentFrame::Create}\label{wxmdiparentframecreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{const wxWindowID }{id},\rtfsp
|
||||
\param{const wxString\& }{title}, \param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
|
||||
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = wxDEFAULT\_FRAME\_STYLE \pipe wxVSCROLL \pipe wxHSCROLL},\rtfsp
|
||||
\param{const wxString\& }{name = ``frame"}}
|
||||
|
||||
Used in two-step frame construction. See \helpref{wxMDIParentFrame::wxMDIParentFrame}{wxmdiparentframeconstr}\rtfsp
|
||||
for further details.
|
||||
|
||||
\membersection{wxMDIParentFrame::GetClientSize}\label{wxmdiparentframegetclientsize}
|
||||
|
||||
\constfunc{virtual void}{GetClientSize}{\param{int* }{width}, \param{int* }{height}}
|
||||
|
||||
This gets the size of the frame `client area' in pixels.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{width}{Receives the client width in pixels.}
|
||||
|
||||
\docparam{height}{Receives the client height in pixels.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
The client area is the area which may be drawn on by the programmer, excluding title bar, border, status bar,
|
||||
and toolbar if present.
|
||||
|
||||
If you wish to manage your own toolbar (or perhaps you have more than one),
|
||||
provide an {\bf OnSize} event handler. Call {\bf GetClientSize} to
|
||||
find how much space there is for your windows and don't forget to set the size and position
|
||||
of the MDI client window as well as your toolbar and other windows (but not the status bar).
|
||||
|
||||
If you have set a toolbar with \helpref{wxMDIParentFrame::SetToolbar}{wxmdiparentframesettoolbar},
|
||||
the client size returned will have subtracted the toolbar height. However, the available positions
|
||||
for the client window and other windows of the frame do not start at zero - you must add the toolbar height.
|
||||
|
||||
The position and size of the status bar and toolbar (if known to the frame) are always managed
|
||||
by {\bf wxMDIParentFrame}, regardless of what behaviour is defined in your {\bf OnSize} event handler.
|
||||
However, the client window position and size are always set in {\bf OnSize}, so if you override this
|
||||
event handler, make sure you deal with the client window.
|
||||
|
||||
You do not have to manage the size and position of MDI child windows, since they are managed
|
||||
automatically by the client window.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::GetToolBar}{wxmdiparentframegettoolbar},\rtfsp
|
||||
\helpref{wxMDIParentFrame::SetToolBar}{wxmdiparentframesettoolbar},\rtfsp
|
||||
\helpref{wxWindow}{wxwindowonsize},\rtfsp
|
||||
\helpref{wxMDIClientWindow}{wxmdiclientwindow}
|
||||
|
||||
\membersection{wxMDIParentFrame::GetActiveChild}\label{wxmdiparentframegetactivechild}
|
||||
|
||||
\constfunc{wxMDIChildFrame*}{GetActiveChild}{\void}
|
||||
|
||||
Returns a pointer to the active MDI child, if there is one.
|
||||
|
||||
\membersection{wxMDIParentFrame::GetClientWindow}\label{wxmdiparentframegetclientwindow}
|
||||
|
||||
\constfunc{wxMDIClientWindow*}{GetClientWindow}{\void}
|
||||
|
||||
Returns a pointer to the client window.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::OnCreateClient}{wxmdiparentframeoncreateclient}
|
||||
|
||||
\membersection{wxMDIParentFrame::GetToolBar}\label{wxmdiparentframegettoolbar}
|
||||
|
||||
\constfunc{virtual wxWindow*}{GetToolBar}{\void}
|
||||
|
||||
Returns the window being used as the toolbar for this frame.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::SetToolBar}{wxmdiparentframesettoolbar}
|
||||
|
||||
\membersection{wxMDIParentFrame::OnCreateClient}\label{wxmdiparentframeoncreateclient}
|
||||
|
||||
\func{virtual wxMDIClientWindow*}{OnCreateClient}{\void}
|
||||
|
||||
Override this to return a different kind of client window.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
You might wish to derive from \helpref{wxMDIClientWindow}{wxmdiclientwindow} in order
|
||||
to implement different erase behaviour, for example, such as painting a bitmap
|
||||
on the background.
|
||||
|
||||
Note that it is probably impossible to have a client window that scrolls as well as painting
|
||||
a bitmap or pattern, since in {\bf OnScroll}, the scrollbar positions always return zero.
|
||||
(Solutions to: \verb$julian.smart@ukonline.co.uk$).
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::GetClientWindow}{wxmdiparentframegetclientwindow},\rtfsp
|
||||
\helpref{wxMDIClientWindow}{wxmdiclientwindow}
|
||||
|
||||
\membersection{wxMDIParentFrame::SetToolBar}\label{wxmdiparentframesettoolbar}
|
||||
|
||||
\func{virtual void}{SetToolBar}{\param{wxWindow*}{ toolbar}}
|
||||
|
||||
Sets the window to be used as a toolbar for this
|
||||
MDI parent window. It saves the application having to manage the positioning
|
||||
of the toolbar MDI client window.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{toolbar}{Toolbar to manage.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
When the frame is resized, the toolbar is resized to be the width of
|
||||
the frame client area, and the toolbar height is kept the same.
|
||||
|
||||
The parent of the toolbar must be this frame.
|
||||
|
||||
If you wish to manage your own toolbar (or perhaps you have more than one),
|
||||
don't call this function, and instead manage your subwindows and the MDI client window by
|
||||
providing an {\bf OnSize} event handler. Call \helpref{wxMDIParentFrame::GetClientSize}{wxmdiparentframegetclientsize} to
|
||||
find how much space there is for your windows.
|
||||
|
||||
Note that SDI (normal) frames and MDI child windows must always have their
|
||||
toolbars managed by the application.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::GetToolBar}{wxmdiparentframegettoolbar},\rtfsp
|
||||
\helpref{wxMDIParentFrame::GetClientSize}{wxmdiparentframegetclientsize}
|
||||
|
||||
\membersection{wxMDIParentFrame::Tile}\label{wxmdiparentframetile}
|
||||
|
||||
\func{void}{Tile}{\void}
|
||||
|
||||
Tiles the MDI child windows.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMDIParentFrame::Cascade}{wxmdiparentframecascade},\rtfsp
|
||||
\helpref{wxMDIParentFrame::ArrangeIcons}{wxmdiparentframearrangeicons}
|
||||
|
||||
|
57
docs/latex/wx/memorydc.tex
Normal file
@ -0,0 +1,57 @@
|
||||
\section{\class{wxMemoryDC}}\label{wxmemorydc}
|
||||
|
||||
A memory device context provides a means to draw graphics onto a bitmap.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxDC}{wxdc}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
A bitmap must be selected into the new memory DC before it may be used
|
||||
for anything. Typical usage is as follows:
|
||||
|
||||
\begin{verbatim}
|
||||
// Create a memory DC
|
||||
wxMemoryDC temp_dc;
|
||||
temp_dc.SelectObject(test_bitmap);
|
||||
|
||||
// We can now draw into the memory DC...
|
||||
// Copy from this DC to another DC.
|
||||
old_dc.Blit(250, 50, BITMAP_WIDTH, BITMAP_HEIGHT, temp_dc, 0, 0);
|
||||
\end{verbatim}
|
||||
|
||||
Note that the memory DC {\it must} be deleted (or the bitmap selected out of it) before a bitmap
|
||||
can be reselected into another memory DC.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxBitmap}{wxbitmap}, \helpref{wxDC}{wxdc}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxMemoryDC::wxMemoryDC}
|
||||
|
||||
\func{}{wxMemoryDC}{\void}
|
||||
|
||||
Constructs a new memory device context.
|
||||
|
||||
Use the {\it Ok} member to test whether the constructor was successful
|
||||
in creating a useable device context. Don't forget to select a bitmap
|
||||
into the DC before drawing on it.
|
||||
|
||||
\membersection{wxMemoryDC::SelectObject}
|
||||
|
||||
\func{}{SelectObject}{\param{const wxBitmap\& }{bitmap}}
|
||||
|
||||
Selects the given bitmap into the device context, to use as the memory
|
||||
bitmap. Selecting the bitmap into a memory DC allows you to draw into
|
||||
the DC (and therefore the bitmap) and also to use {\bf Blit} to copy
|
||||
the bitmap to a canvas. For this purpose, you may find \helpref{wxDC::DrawIcon}{wxdcdrawicon}\rtfsp
|
||||
easier to use instead.
|
||||
|
||||
If the argument is wxNullBitmap (or some other uninitialised wxBitmap) the current bitmap is selected out of the device
|
||||
context, and the original bitmap restored, allowing the current bitmap to
|
||||
be destroyed safely.
|
||||
|
611
docs/latex/wx/menu.tex
Normal file
@ -0,0 +1,611 @@
|
||||
\section{\class{wxMenu}}\label{wxmenu}
|
||||
|
||||
A menu is a popup (or pull down) list of items, one of which may be
|
||||
selected before the menu goes away (clicking elsewhere dismisses the
|
||||
menu). Menus may be used to construct either menu bars or popup menus.
|
||||
|
||||
A menu item has an integer ID associated with it which can be used to
|
||||
identify the selection, or to change the menu item in some way.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Event handling}
|
||||
|
||||
If the menu is part of a menubar, then \helpref{wxMenuBar}{wxmenubar} event processing is used.
|
||||
|
||||
With a popup menu, there is a variety of ways to handle a menu selection event
|
||||
(wxEVT\_COMMAND\_MENU\_SELECTED).
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item Define a callback of type wxFunction, which you pass to the wxMenu constructor.
|
||||
The callback takes a reference to a window, and a reference to a \helpref{wxCommandEvent}{wxcommandevent}.
|
||||
\item Derive a new class from wxMenu and define event table entries using the EVT\_MENU macro.
|
||||
\item Set a new event handler for wxMenu, using an object whose class has EVT\_MENU entries.
|
||||
\item Provide EVT\_MENU handlers in the window which pops up the menu, or in an ancestor of
|
||||
this window.
|
||||
\end{enumerate}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenuBar}{wxmenubar}, \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu},\rtfsp
|
||||
\helpref{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxMenu::wxMenu}\label{wxmenuconstr}
|
||||
|
||||
\func{}{wxMenu}{\param{const wxString\& }{title = ""}, \param{const wxFunction}{ func = NULL}}
|
||||
|
||||
Constructs a wxMenu object.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{title}{A title for the popup menu: the empty string denotes no title.}
|
||||
|
||||
\docparam{func}{A callback function if the menu is used as a popup using \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu}.}
|
||||
|
||||
\membersection{wxMenu::\destruct{wxMenu}}
|
||||
|
||||
\func{}{\destruct{wxMenu}}{\void}
|
||||
|
||||
Destructor, destroying the menu.
|
||||
|
||||
\membersection{wxMenu::Append}\label{wxmenuappend}
|
||||
|
||||
\func{void}{Append}{\param{const int}{ id}, \param{const wxString\& }{ item}, \param{const wxString\& }{helpString = ""},\rtfsp
|
||||
\param{const bool}{ checkable = FALSE}}
|
||||
|
||||
Adds a string item to the end of the menu.
|
||||
|
||||
\func{void}{Append}{\param{const int}{ id}, \param{const wxString\& }{ item}, \param{wxMenu *}{subMenu},\rtfsp
|
||||
\param{const wxString\& }{helpString = ""}}
|
||||
|
||||
Adds a pull-right submenu to the end of the menu.
|
||||
|
||||
\func{void}{Append}{\param{wxMenuItem*}{ menuItem}}
|
||||
|
||||
Adds a menu item object. You can specify various extra properties of a menu item this way,
|
||||
such as bitmaps and fonts.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu command identifier.}
|
||||
|
||||
\docparam{item}{The string to appear on the menu item.}
|
||||
|
||||
\docparam{menu}{Pull-right submenu.}
|
||||
|
||||
\docparam{checkable}{If TRUE, this item is checkable.}
|
||||
|
||||
\docparam{helpString}{An optional help string associated with the item.
|
||||
By default, \helpref{wxFrame::OnMenuHighlight}{wxframeonmenuhighlight} displays
|
||||
this string in the status line.}
|
||||
|
||||
\docparam{menuItem}{A menuitem object. It will be owned by the wxMenu object after this function
|
||||
is called, so do not delete it yourself.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This command can be used after the menu has been shown, as well as on initial
|
||||
creation of a menu or menubar.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::AppendSeparator}{wxmenuappendseparator}, \helpref{wxMenu::SetLabel}{wxmenusetlabel}, \helpref{wxMenu::GetHelpString}{wxmenugethelpstring},\rtfsp
|
||||
\helpref{wxMenu::SetHelpString}{wxmenusethelpstring}, \helpref{wxMenuItem}{wxmenuitem}
|
||||
|
||||
\membersection{wxMenu::AppendSeparator}\label{wxmenuappendseparator}
|
||||
|
||||
\func{void}{AppendSeparator}{\void}
|
||||
|
||||
Adds a separator to the end of the menu.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::Append}{wxmenuappend}
|
||||
|
||||
\membersection{wxMenu::Break}\label{wxmenubreak}
|
||||
|
||||
\func{void}{Break}{\void}
|
||||
|
||||
Inserts a break in a menu, causing the next appended item to appear in a new column.
|
||||
|
||||
\membersection{wxMenu::Check}\label{wxmenucheck}
|
||||
|
||||
\func{void}{Check}{\param{const int}{ id}, \param{const bool}{ check}}
|
||||
|
||||
Checks or unchecks the menu item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\docparam{check}{If TRUE, the item will be checked, otherwise it will be unchecked.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::IsChecked}{wxmenuischecked}
|
||||
|
||||
\membersection{wxMenu::Enable}\label{wxmenuenable}
|
||||
|
||||
\func{void}{Enable}{\param{const int}{ id}, \param{const bool}{ enable}}
|
||||
|
||||
Enables or disables (greys out) a menu item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\docparam{enable}{TRUE to enable the menu item, FALSE to disable it.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::IsEnabled}{wxmenuisenabled}
|
||||
|
||||
\membersection{wxMenu::FindItem}\label{wxmenufinditem}
|
||||
|
||||
\constfunc{int}{FindItem}{\param{const wxString\& }{itemString}}
|
||||
|
||||
Finds the menu item id for a menu item string.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{itemString}{Menu item string to find.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Menu item identifier, or -1 if none is found.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Any special menu codes are stripped out of source and target strings
|
||||
before matching.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::FindItemForId}{wxmenufinditemforid}
|
||||
|
||||
\membersection{wxMenu::FindItemForId}\label{wxmenufinditemforid}
|
||||
|
||||
\constfunc{wxMenuItem*}{FindItemForId}{\param{const int}{ id}}
|
||||
|
||||
Finds the menu item object associated with the given menu item identifier.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{Menu item identifier.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns the menu item object, or NULL if it is not found.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::FindItem}{wxmenufinditem}
|
||||
|
||||
\membersection{wxMenu::GetHelpString}\label{wxmenugethelpstring}
|
||||
|
||||
\constfunc{wxString}{GetHelpString}{\param{const int}{ id}}
|
||||
|
||||
Returns the help string associated with a menu item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The help string, or the empty string if there is no help string or the
|
||||
item was not found.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::SetHelpString}{wxmenusethelpstring}, \helpref{wxMenu::Append}{wxmenuappend}
|
||||
|
||||
\membersection{wxMenu::GetLabel}\label{wxmenugetlabel}
|
||||
|
||||
\constfunc{wxString}{GetLabel}{\param{const int}{ id}}
|
||||
|
||||
Returns a menu item label.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The item label, or the empty string if the item was not found.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::SetLabel}{wxmenusetlabel}
|
||||
|
||||
\membersection{wxMenu::GetTitle}\label{wxmenugettitle}
|
||||
|
||||
\constfunc{wxString}{GetTitle}{\void}
|
||||
|
||||
Returns the title of the menu.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This is relevant only to popup menus.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::SetTitle}{wxmenusettitle}
|
||||
|
||||
\membersection{wxMenu::IsChecked}\label{wxmenuischecked}
|
||||
|
||||
\constfunc{bool}{IsChecked}{\param{const int}{ id}}
|
||||
|
||||
Determines whether a menu item is checked.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the menu item is checked, FALSE otherwise.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::Check}{wxmenucheck}
|
||||
|
||||
\membersection{wxMenu::IsEnabled}\label{wxmenuisenabled}
|
||||
|
||||
\constfunc{bool}{IsEnabled}{\param{const int}{ id}}
|
||||
|
||||
Determines whether a menu item is enabled.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the menu item is enabled, FALSE otherwise.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::Enable}{wxmenuenable}
|
||||
|
||||
\membersection{wxMenu::SetHelpString}\label{wxmenusethelpstring}
|
||||
|
||||
\func{void}{SetHelpString}{\param{const int}{ id}, \param{const wxString\& }{helpString}}
|
||||
|
||||
Sets an item's help string.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\docparam{helpString}{The help string to set.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::GetHelpString}{wxmenugethelpstring}
|
||||
|
||||
\membersection{wxMenu::SetLabel}\label{wxmenusetlabel}
|
||||
|
||||
\func{void}{SetLabel}{\param{const int}{ id}, \param{const wxString\& }{label}}
|
||||
|
||||
Sets the label of a menu item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\docparam{label}{The menu item label to set.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::Append}{wxmenuappend}, \helpref{wxMenu::GetLabel}{wxmenugetlabel}
|
||||
|
||||
\membersection{wxMenu::SetTitle}\label{wxmenusettitle}
|
||||
|
||||
\func{void}{SetTitle}{\param{const wxString\& }{title}}
|
||||
|
||||
Sets the title of the menu.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{title}{The title to set.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
This is relevant only to popup menus.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu::SetTitle}{wxmenusettitle}
|
||||
|
||||
\section{\class{wxMenuBar}}\label{wxmenubar}
|
||||
|
||||
A menu bar is a series of menus accessible from the top of a frame.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvtHandler}{wxevthandler}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Event handling}
|
||||
|
||||
To respond to a menu selection, provide a handler for EVT\_MENU, in the frame
|
||||
that contains the menu bar.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenu}{wxmenu}, \helpref{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxMenuBar::wxMenuBar}\label{wxmenubarconstr}
|
||||
|
||||
\func{void}{wxMenuBar}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{void}{wxMenuBar}{\param{const int}{ n}, \param{wxMenu*}{ menus[]}, \param{const wxString }{titles[]}}
|
||||
|
||||
Construct a menu bar from arrays of menus and titles.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{n}{The number of menus.}
|
||||
|
||||
\docparam{menus}{An array of menus. Do not use this array again - it now belongs to the
|
||||
menu bar.}
|
||||
|
||||
\docparam{titles}{An array of title strings. Deallocate this array after creating the menu bar.}
|
||||
|
||||
\membersection{wxMenuBar::\destruct{wxMenuBar}}
|
||||
|
||||
\func{void}{\destruct{wxMenuBar}}{\void}
|
||||
|
||||
Destructor, destroying the menu bar and removing it from the parent frame (if any).
|
||||
|
||||
\membersection{wxMenuBar::Append}\label{wxmenubarappend}
|
||||
|
||||
\func{void}{Append}{\param{wxMenu *}{menu}, \param{const wxString\& }{title}}
|
||||
|
||||
Adds the item to the end of the menu bar.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{menu}{The menu to add. Do not deallocate this menu after calling {\bf Append}.}
|
||||
|
||||
\docparam{title}{The title of the menu.}
|
||||
|
||||
\membersection{wxMenuBar::Check}\label{wxmenubarcheck}
|
||||
|
||||
\func{void}{Check}{\param{const int}{ id}, \param{const bool}{ check}}
|
||||
|
||||
Checks or unchecks a menu item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\docparam{check}{If TRUE, checks the menu item, otherwise the item is unchecked.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Only use this when the menu bar has been associated
|
||||
with a frame; otherwise, use the wxMenu equivalent call.
|
||||
|
||||
\membersection{wxMenuBar::Enable}\label{wxmenubarenable}
|
||||
|
||||
\func{void}{Enable}{\param{const int}{ id}, \param{const bool}{ enable}}
|
||||
|
||||
Enables or disables (greys out) a menu item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\docparam{enable}{TRUE to enable the item, FALSE to disable it.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Only use this when the menu bar has been
|
||||
associated with a frame; otherwise, use the wxMenu equivalent call.
|
||||
|
||||
\membersection{wxMenuBar::EnableTop}\label{wxmenubarenabletop}
|
||||
|
||||
\func{void}{EnableTop}{\param{const int}{ pos}, \param{const bool}{ enable}}
|
||||
|
||||
Enables or disables a whole menu.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{pos}{The position of the menu, starting from zero.}
|
||||
|
||||
\docparam{enable}{TRUE to enable the menu, FALSE to disable it.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Only use this when the menu bar has been
|
||||
associated with a frame.
|
||||
|
||||
\membersection{wxMenuBar::FindMenuItem}\label{wxmenubarfindmenuitem}
|
||||
|
||||
\constfunc{int}{FindMenuItem}{\param{const wxString\& }{menuString}, \param{const wxString\& }{itemString}}
|
||||
|
||||
Finds the menu item id for a menu name/menu item string pair.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{menuString}{Menu title to find.}
|
||||
|
||||
\docparam{itemString}{Item to find.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The menu item identifier, or -1 if none was found.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Any special menu codes are stripped out of source and target strings
|
||||
before matching.
|
||||
|
||||
\membersection{wxMenuBar::FindItemById}\label{wxmenubarfinditembyid}
|
||||
|
||||
\constfunc{wxMenuItem *}{FindItemById}{\param{const int}{ id}}
|
||||
|
||||
Finds the menu item object associated with the given menu item identifier,
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{Menu item identifier.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The found menu item object, or NULL if one was not found.
|
||||
|
||||
\membersection{wxMenuBar::GetHelpString}\label{wxmenubargethelpstring}
|
||||
|
||||
\constfunc{wxString}{GetHelpString}{\param{const int}{ id}}
|
||||
|
||||
Gets the help string associated with the menu item identifer.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The help string, or the empty string if there was no help string or the menu item
|
||||
was not found.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenuBar::SetHelpString}{wxmenubarsethelpstring}
|
||||
|
||||
\membersection{wxMenuBar::GetLabel}\label{wxmenubargetlabel}
|
||||
|
||||
\constfunc{wxString}{GetLabel}{\param{const int}{ id}}
|
||||
|
||||
Gets the label associated with a menu item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The menu item label, or the empty string if the item was not found.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Use only after the menubar has been associated with a frame.
|
||||
|
||||
\membersection{wxMenuBar::GetLabelTop}\label{wxmenubargetlabeltop}
|
||||
|
||||
\constfunc{wxString}{GetLabelTop}{\param{const int}{ pos}}
|
||||
|
||||
Returns the label of a top-level menu.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{pos}{Position of the menu on the menu bar, starting from zero.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
The menu label, or the empty string if the menu was not found.
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Use only after the menubar has been associated with a frame.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenuBar::SetLabelTop}{wxmenubarsetlabeltop}
|
||||
|
||||
\membersection{wxMenuBar::IsChecked}\label{wxmenubarischecked}
|
||||
|
||||
\constfunc{bool}{IsChecked}{\param{const int}{ id}}
|
||||
|
||||
Determines whether an item is checked.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the item was found and is checked, FALSE otherwise.
|
||||
|
||||
\membersection{wxMenuBar::IsEnabled}\label{wxmenubarisenabled}
|
||||
|
||||
\constfunc{bool}{IsEnabled}{\param{const int}{ id}}
|
||||
|
||||
Determines whether an item is enabled.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{The menu item identifier.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
TRUE if the item was found and is enabled, FALSE otherwise.
|
||||
|
||||
\membersection{wxMenuBar::SetHelpString}\label{wxmenubarsethelpstring}
|
||||
|
||||
\func{void}{SetHelpString}{\param{const int}{ id}, \param{const wxString\& }{helpString}}
|
||||
|
||||
Sets the help string associated with a menu item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{Menu item identifier.}
|
||||
|
||||
\docparam{helpString}{Help string to associate with the menu item.}
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenuBar::GetHelpString}{wxmenubargethelpstring}
|
||||
|
||||
\membersection{wxMenuBar::SetLabel}\label{wxmenubarsetlabel}
|
||||
|
||||
\func{void}{SetLabel}{\param{const int}{ id}, \param{const wxString\& }{label}}
|
||||
|
||||
Sets the label of a menu item.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{id}{Menu item identifier.}
|
||||
|
||||
\docparam{label}{Menu item label.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Use only after the menubar has been associated with a frame.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenuBar::GetLabel}{wxmenubargetlabel}
|
||||
|
||||
\membersection{wxMenuBar::SetLabelTop}\label{wxmenubarsetlabeltop}
|
||||
|
||||
\func{void}{SetLabelTop}{\param{const int}{ pos}, \param{const wxString\& }{label}}
|
||||
|
||||
Sets the label of a top-level menu.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{pos}{The position of a menu on the menu bar, starting from zero.}
|
||||
|
||||
\docparam{label}{The menu label.}
|
||||
|
||||
\wxheading{Remarks}
|
||||
|
||||
Use only after the menubar has been associated with a frame.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxMenuBar::GetLabelTop}{wxmenubargetlabeltop}
|
||||
|
53
docs/latex/wx/menuevt.tex
Normal file
@ -0,0 +1,53 @@
|
||||
\section{\class{wxMenuEvent}}\label{wxmenuevent}
|
||||
|
||||
This class is used for a variety of menu-related events. Note that
|
||||
these do not include menu command events.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxEvent}{wxevent}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Event table macros}
|
||||
|
||||
To process a menu event, use these event handler macros to direct input to member
|
||||
functions that take a wxMenuEvent argument.
|
||||
|
||||
\twocolwidtha{7cm}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_MENU\_CHAR(func)}}{Process a wxEVT\_MENU\_CHAR event (a keypress
|
||||
when a menu is showing). Windows only. TODO}
|
||||
\twocolitem{{\bf EVT\_MENU\_INIT(func)}}{Process a wxEVT\_MENU\_INIT event (the menu
|
||||
is about to pop up). Windows only. TODO}
|
||||
\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT(func)}}{Process a wxEVT\_MENU\_HIGHLIGHT event (a menu
|
||||
item is being highlighted). Windows only.}
|
||||
\twocolitem{{\bf EVT\_POPUP\_MENU(func)}}{Process a wxEVT\_POPUP\_MENU event (a menu
|
||||
item is being highlighted). Windows only. TODO}
|
||||
\twocolitem{{\bf EVT\_CONTEXT\_MENU(func)}}{Process a wxEVT\_CONTEXT\_MENU event (F1 has
|
||||
been pressed with a particular menu item highlighted). Windows only. TODO}
|
||||
\end{twocollist}%
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxWindow::OnMenuHighlight}{wxwindowonmenuhighlight}, \helpref{Event handling overview}{eventhandlingoverview}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxMenuEvent::wxMenuEvent}
|
||||
|
||||
\func{}{wxMenuEvent}{\param{WXTYPE }{id = 0}, \param{int }{id = 0}, \param{wxDC* }{dc = NULL}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxMenuEvent::m\_menuId}
|
||||
|
||||
\member{int}{m\_menuId}
|
||||
|
||||
The relevant menu identifier.
|
||||
|
||||
\membersection{wxMenuEvent::GetMenuId}\label{wxmenueventgetmenuid}
|
||||
|
||||
\constfunc{int}{GetMenuId}{\void}
|
||||
|
||||
Returns the menu identifier associated with the event.
|
||||
|