home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-05-19 | 139.3 KB | 5,133 lines |
- \hy-10{100}{wxWindows Classes}
-
-
- \hy-2{101}{wxApp: wxObject}
-
- \hy-2{139}{wxBrush: wxObject}
-
- \hy-2{170}{wxBrushList: wxList}
-
- \hy-2{187}{wxButton: wxItem}
-
- \hy-2{198}{wxCanvas: wxWindow}
-
- \hy-2{300}{wxCheckBox: wxItem}
-
- \hy-2{317}{wxChoice: wxItem}
-
- \hy-2{357}{wxClient: wxIPCObject}
-
- \hy-2{372}{wxColour: wxObject}
-
- \hy-2{386}{wxColourDatabase: wxObject}
-
- \hy-2{402}{wxConnection: wxObject}
-
- \hy-2{465}{wxCursor: wxObject}
-
- \hy-2{480}{wxDC: wxObject}
-
- \hy-2{621}{wxDialogBox: wxPanel}
-
- \hy-2{642}{wxEvent: wxObject}
-
- \hy-2{695}{wxFont: wxObject}
-
- \hy-2{707}{wxForm: wxObject}
-
- \hy-2{788}{wxFrame: wxWindow}
-
- \hy-2{830}{wxFunction}
-
- \hy-2{833}{wxIcon: wxObject}
-
- \hy-2{845}{wxHashTable: wxObject}
-
- \hy-2{888}{wxHelpInstance: wxClient}
-
- \hy-2{925}{wxItem: wxWindow}
-
- \hy-2{942}{wxList: wxObject}
-
- \hy-2{1011}{wxListBox: wxItem}
-
- \hy-2{1066}{wxMenu: wxItem}
-
- \hy-2{1091}{wxMenuBar: wxItem}
-
- \hy-2{1113}{wxMessage: wxItem}
-
- \hy-2{1121}{wxMetaFile: wxObject}
-
- \hy-2{1132}{wxMetaFileDC: wxDC}
-
- \hy-2{1145}{wxMultiText: wxText}
-
- \hy-2{1148}{wxNode: wxObject}
-
- \hy-2{1163}{wxObject}
-
- \hy-2{1165}{wxPanel: wxWindow}
-
- \hy-2{1204}{wxPathList: wxList}
-
- \hy-2{1223}{wxPen: wxObject}
-
- \hy-2{1259}{wxPenList: wxList}
-
- \hy-2{1276}{wxPoint: wxObject}
-
- \hy-2{1288}{wxServer: wxIPCObject}
-
- \hy-2{1301}{wxSlider: wxItem}
-
- \hy-2{1316}{wxStringList: wxList}
-
- \hy-2{1344}{wxText: wxWindow}
-
- \hy-2{1362}{wxTextWindow: wxWindow}
-
- \hy-2{1398}{wxTimer: wxObject}
-
- \hy-2{1419}{wxWindow: wxObject}
-
- \hy-2{1515}{File functions}
-
- \hy-2{1567}{String functions}
-
- \hy-2{1573}{Dialog functions}
-
- \hy-2{1604}{GDI functions}
-
- \hy-2{1612}{Miscellaneous}
-
-
- \hy-10{102}{wxApp: wxObject}
-
- The \hy-8{103}{wxApp} class represents the application itself. A wxWindows
- application does not have a \hy-7{104}{main} procedure; the equivalent is the \hy-7{105}{OnInit}
- member defined for a class derived from \hy-8{106}{wxApp}. \hy-7{107}{
- OnInit} must create and return a main window frame as a bare minimum.
- If NULL is returned from \hy-7{108}{OnInit}, the application will exit.
- Note that the program's command line arguments, represented by \hy-7{109}{
- argc} and \hy-7{110}{argv}, are available from within \hy-8{111}{wxApp} member functions.
-
- An application closes by destroying all windows. Because all frames
- must be destroyed for the application to exit, it is advisable to use
- parent frames wherever possible when creating new frames, so that
- deleting the top level frame will automatically delete child frames.
- In emergencies the \hy-7{112}{wxExit} function can be called to kill the
- application.
-
- An example of defining an application follows:
-
- \hy-14{113}{class DerivedApp: public wxApp
- {
- public:
- wxFrame *OnInit(void);
- };
-
- wxFrame *DerivedApp::OnInit(void)
- {
- wxFrame *the_frame = new wxFrame(argv[0]);
- ...
- return the_frame;
- }
-
- MyApp DerivedApp;
- }
- \hy-2{114}{wxApp::wxApp}
-
- \hy-2{117}{wxApp::~wxApp}
-
- \hy-2{120}{wxApp::argc}
-
- \hy-2{123}{wxApp::argv}
-
- \hy-2{126}{wxApp::Initialized}
-
- \hy-2{130}{wxApp::MainLoop}
-
- \hy-2{133}{wxApp::OnExit}
-
- \hy-2{136}{wxApp::OnInit}
-
-
- \hy-10{140}{wxBrush: wxObject}
-
- 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 - the style may be wxSOLID (normal) or wxTRANSPARENT (the
- brush isn't used). On a monochrome display, the default behaviour is
- to show all brushes as white. If you wish the policy to be `all
- non-white colours are black', as with pens, uncomment the piece of
- code documented in \hy-8{141}{SetBrush} in wx_dc.cc. Alternatively, set the
- \hy-8{142}{Colour} member of the device context to TRUE, and select
- appropriate colours.
-
- 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 \hy-7{143}{OnInit} 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 \hy-8{144}{wxTheBrushList}, and calling the member function
- \hy-8{145}{FindOrCreateBrush}. See the entry for the \hy-8{146}{wxBrushList}
- class.
-
- \hy-2{147}{wxBrush::wxBrush}
-
- \hy-2{153}{wxBrush::~wxBrush}
-
- \hy-2{156}{wxBrush::GetColour}
-
- \hy-2{159}{wxBrush::GetStyle}
-
- \hy-2{162}{wxBrush::SetColour}
-
- \hy-2{167}{wxBrush::SetStyle}
-
-
- \hy-10{171}{wxBrushList: wxList}
-
- A brush list is a list containing all brushes which have been created.
- There is only one instance of this class: \hy-8{172}{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 is best 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'.
-
- \hy-2{173}{wxBrushList::wxBrushList}
-
- \hy-2{177}{wxBrushList::AddBrush}
-
- \hy-2{180}{wxBrushList::FindOrCreateBrush}
-
- \hy-2{184}{wxBrushList::RemoveBrush}
-
-
- \hy-10{188}{wxButton: wxItem}
-
- \hy-2{189}{wxButton::wxButton}
-
- \hy-2{195}{wxButton::~wxButton}
-
-
- \hy-10{199}{wxCanvas: wxWindow}
-
- A canvas is a subwindow onto which graphics and text can be drawn, and mouse
- and keyboard input can be intercepted. At present, panel items cannot be
- placed on a canvas.
-
- To determine whether a canvas is colour or monochrome, test the canvas's
- device context \hy-8{200}{colour} Bool member variable.
-
- \hy-2{201}{wxCanvas::wxCanvas}
-
- \hy-2{204}{wxCanvas::~wxCanvas}
-
- \hy-2{207}{wxCanvas::Clear}
-
- \hy-2{210}{wxCanvas::DestroyClippingRegion}
-
- \hy-2{213}{wxCanvas::DrawEllipse}
-
- \hy-2{216}{wxCanvas::DrawLine}
-
- \hy-2{219}{wxCanvas::DrawLines}
-
- \hy-2{225}{wxCanvas::DrawPolygon}
-
- \hy-2{231}{wxCanvas::DrawPoint}
-
- \hy-2{234}{wxCanvas::DrawRectangle}
-
- \hy-2{237}{wxCanvas::DrawRoundedRectangle}
-
- \hy-2{240}{wxCanvas::DrawSpline}
-
- \hy-2{244}{wxCanvas::DrawText}
-
- \hy-2{247}{wxCanvas::GetDC}
-
- \hy-2{253}{wxCanvas::ResetContext}
-
- \hy-2{257}{wxCanvas::Scroll}
-
- \hy-2{260}{wxCanvas::SetBackground}
-
- \hy-2{263}{wxCanvas::SetClippingRegion}
-
- \hy-2{266}{wxCanvas::SetContext}
-
- \hy-2{270}{wxCanvas::SetBrush}
-
- \hy-2{273}{wxCanvas::SetFont}
-
- \hy-2{276}{wxCanvas::SetLogicalFunction}
-
- \hy-2{279}{wxCanvas::SetPen}
-
- \hy-2{282}{wxCanvas::SetScrollbars}
-
- \hy-2{286}{wxCanvas::SetTextBackground}
-
- \hy-2{290}{wxCanvas::SetTextForeground}
-
- \hy-2{294}{wxCanvas::ViewStart}
-
-
- \hy-10{301}{wxCheckBox: wxItem}
-
- A checkbox is a labelled box which is either on (checkmark is visible) or off (no checkmark).
-
- \hy-2{302}{wxCheckBox::wxCheckBox}
-
- \hy-2{308}{wxCheckBox::~wxCheckBox}
-
- \hy-2{311}{wxCheckBox::GetValue}
-
- \hy-2{314}{wxCheckBox::SetValue}
-
-
- \hy-10{318}{wxChoice: wxItem}
-
- 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. Under XView, all selections are visible when the menu
- is displayed. Under Windows 3, a scrolling list is displayed when the
- user wants to change the selection. Note that under XView, creating a
- choice item with a large number of strings takes a long time due to
- the inefficiency of Sun's implementation of the XView choice item.
-
- \hy-2{319}{wxChoice::wxChoice}
-
- \hy-2{328}{wxChoice::~wxChoice}
-
- \hy-2{331}{wxChoice::Append}
-
- \hy-2{335}{wxChoice::Clear}
-
- \hy-2{338}{wxChoice::FindString}
-
- \hy-2{341}{wxChoice::GetSelection}
-
- \hy-2{344}{wxChoice::GetStringSelection}
-
- \hy-2{347}{wxChoice::SetSelection}
-
- \hy-2{350}{wxChoice::SetStringSelection}
-
- \hy-2{353}{wxChoice::String}
-
-
- \hy-10{358}{wxClient: wxIPCObject}
-
- A wxClient object represents the client part of a client-server DDE
- (Dynamic Data Exchange) conversation (available in \hy-7{359}{both}
- Windows and UNIX).
-
- \hy-2{360}{wxClient::wxClient}
-
- \hy-2{363}{wxClient::MakeConnection}
-
- \hy-2{367}{wxClient::OnMakeConnection}
-
-
- \hy-10{373}{wxColour: wxObject}
-
- A colour is an object representing a Red, Green, Blue (RGB) combination
- of primary colours, and is used to determine drawing colours. See the
- entry for \hy-8{374}{wxColourDatabase} for how a pointer to a predefined,
- named colour may be returned instead of creating a new colour.
-
- \hy-2{375}{wxColour::wxColour}
-
- \hy-2{380}{wxColour::Get}
-
- \hy-2{383}{wxColour::Set}
-
-
- \hy-10{387}{wxColourDatabase: wxObject}
-
- 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 \hy-7{388}{Append}. There
- is only one instance of this class: \hy-8{389}{wxTheColourDatabase}.
-
- 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.
-
- Note that wxWindows' colour handling in XView canvases is poor and so
- only some of these colours are likely to show up. This should be
- improved in a subsequent release.
-
-
- \hy-2{390}{wxColourDatabase::wxColourDatabase}
-
- \hy-2{393}{wxColourDatabase::FindColour}
-
- \hy-2{396}{wxColourDatabase::FindName}
-
- \hy-2{399}{wxColourDatabase::Initialize}
-
-
- \hy-10{403}{wxConnection: wxObject}
-
- A wxConnection object represents the connection between a client and a
- server. It can be created by making a connection using a client object, or
- by the acceptance of a connection by a server object. It implements the
- bulk of a DDE (Dynamic Data Exchange) conversation (available in \hy-7{404}{
- both} Windows and UNIX).
-
- \hy-2{405}{wxConnection::wxConnection}
-
- \hy-2{411}{wxConnection::Advise}
-
- \hy-2{415}{wxConnection::Execute}
-
- \hy-2{420}{wxConnection::Disconnect}
-
- \hy-2{426}{wxConnection::OnAdvise}
-
- \hy-2{429}{wxConnection::OnDisconnect}
-
- \hy-2{432}{wxConnection::OnExecute}
-
- \hy-2{435}{wxConnection::OnPoke}
-
- \hy-2{438}{wxConnection::OnRequest}
-
- \hy-2{443}{wxConnection::OnStartAdvise}
-
- \hy-2{446}{wxConnection::OnStopAdvise}
-
- \hy-2{449}{wxConnection::Poke}
-
- \hy-2{453}{wxConnection::Request}
-
- \hy-2{457}{wxConnection::StartAdvise}
-
- \hy-2{461}{wxConnection::StopAdvise}
-
-
- \hy-10{466}{wxCursor: wxObject}
-
- 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 XView and Windows 3 are created
- in a different manner. Therefore, separate cursors will be created for the
- different environments. Platform-specific methods for creating a \hy-8{467}{
- wxCursor} object are catered for, and this is an occasion where
- conditional compilation will probably be required (see \hy-8{468}{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 XView, rather
- than to set it globally as in Windows 3, although a global \hy-8{469}{
- wxSetCursor} is also available for Windows 3 use.
-
- Run the \hy-7{470}{hello} demo program to see what stock cursors are
- available.
-
- \hy-2{471}{wxCursor::wxCursor}
-
- \hy-2{477}{wxCursor::~wxCursor}
-
-
- \hy-10{481}{wxDC: wxObject}
-
- A wxDC is \hy-7{482}{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.
-
- To determine whether a device context is colour or monochrome, test the
- \hy-8{483}{Colour} Bool member variable. To override wxWindows monochrome
- graphics drawing behaviour, set this member to TRUE.
-
- \hy-2{484}{wxDC::wxDC}
-
- \hy-2{493}{wxDC::~wxDC}
-
- \hy-2{496}{wxDC::Blit}
-
- \hy-2{501}{wxDC::Clear}
-
- \hy-2{504}{wxDC::CreateCompatibleDC}
-
- \hy-2{508}{wxDC::DestroyClippingRegion}
-
- \hy-2{511}{wxDC::DeviceToLogicalX}
-
- \hy-2{514}{wxDC::DeviceToLogicalY}
-
- \hy-2{517}{wxDC::DrawEllipse}
-
- \hy-2{520}{wxDC::DrawIcon}
-
- \hy-2{523}{wxDC::DrawLine}
-
- \hy-2{526}{wxDC::DrawLines}
-
- \hy-2{532}{wxDC::DrawPolygon}
-
- \hy-2{538}{wxDC::DrawPoint}
-
- \hy-2{541}{wxDC::DrawRectangle}
-
- \hy-2{544}{wxDC::DrawRoundedRectangle}
-
- \hy-2{547}{wxDC::DrawSpline}
-
- \hy-2{551}{wxDC::DrawText}
-
- \hy-2{554}{wxDC::EndDoc}
-
- \hy-2{557}{wxDC::EndPage}
-
- \hy-2{560}{wxDC::GetMapMode}
-
- \hy-2{565}{wxDC::LogicalToDeviceX}
-
- \hy-2{568}{wxDC::LogicalToDeviceY}
-
- \hy-2{571}{wxDC::Ok}
-
- \hy-2{574}{wxDC::SelectObject}
-
- \hy-2{580}{wxDC::SetBackground}
-
- \hy-2{583}{wxDC::SetClippingRegion}
-
- \hy-2{586}{wxDC::SetBrush}
-
- \hy-2{589}{wxDC::SetFont}
-
- \hy-2{592}{wxDC::SetLogicalFunction}
-
- \hy-2{595}{wxDC::SetMapMode}
-
- \hy-2{601}{wxDC::SetPen}
-
- \hy-2{604}{wxDC::SetTextBackground}
-
- \hy-2{608}{wxDC::SetTextForeground}
-
- \hy-2{612}{wxDC::SetUserScale}
-
- \hy-2{615}{wxDC::StartDoc}
-
- \hy-2{618}{wxDC::StartPage}
-
-
- \hy-10{622}{wxDialogBox: wxPanel}
-
- A dialog box is similar to a panel, with the following exceptions:
-
-
- -- A surrounding frame is implicitly created.
- -- Extra functionality is automatically given to the dialog box,
- such as tabbing between items (currently Windows only).
- -- If the dialog box is \hy-7{623}{modal}, the calling program is blocked
- until the dialog box is dismissed.
-
-
- Under XView, some panel items may display incorrectly in a modal dialog.
- An XView bug-fix for list boxes is supplied with wxWindows, but some
- items remain a problem.
-
- Note that under Windows 3, modal dialogs have to be emulated using
- modeless dialogs and a message loop. This is because Windows 3 expects
- the contents of a modal dialog to be loaded from a resource file or
- created on receipt of a dialog initialization message. This is too
- restrictive for wxWindows, where any window may be created and displayed
- before its contents are created.
-
- It would be easy to add a facility for loading Windows 3 dialog
- resources instead of building them programmatically, but of course this
- method is very non-portable.
-
-
-
- \hy-2{624}{wxDialogBox::wxDialogBox}
-
- \hy-2{628}{wxDialogBox::~wxDialogBox}
-
- \hy-2{631}{wxDialogBox::Iconize}
-
- \hy-2{634}{wxDialogBox::Iconized}
-
- \hy-2{637}{wxDialogBox::Show}
-
-
- \hy-10{643}{wxEvent: wxObject}
-
- An event is a general-purpose structure holding information about an
- event passed to a callback or member function. Call member functions of
- \hy-8{644}{wxEvent} to find out information appropriate to the kind of event,
- or query the wxWindow object itself (for example list box, canvas) to find out
- the status of the object.
-
- \hy-2{645}{wxEvent::wxEvent}
-
- \hy-2{648}{wxEvent::~wxEvent}
-
- \hy-2{651}{wxEvent::Button}
-
- \hy-2{655}{wxEvent::ButtonDown}
-
- \hy-2{658}{wxEvent::ControlDown}
-
- \hy-2{661}{wxEvent::Dragging}
-
- \hy-2{664}{wxEvent::IsButton}
-
- \hy-2{668}{wxEvent::LeftDown}
-
- \hy-2{671}{wxEvent::LeftUp}
-
- \hy-2{674}{wxEvent::MiddleDown}
-
- \hy-2{677}{wxEvent::MiddleUp}
-
- \hy-2{680}{wxEvent::Position}
-
- \hy-2{686}{wxEvent::RightDown}
-
- \hy-2{689}{wxEvent::RightUp}
-
- \hy-2{692}{wxEvent::ShiftDown}
-
-
- \hy-10{696}{wxFont: wxObject}
-
- A font is an object which determines the appearance of text, primarily
- when drawing text to a canvas or device context. A font is determined by
- four parameters:
-
-
- -- Point size. This is the standard way of referring to text size.
- -- Family. Supported families are:
- wxDEFAULT, wxDECORATIVE, wxROMAN, wxSCRIPT, wxSWISS, wxMODERN.
- wxMODERN is a fixed pitch font; the others are either fixed or variable pitch.
- -- Style. The value can be wxNORMAL, wxSLANT or wxITALIC.
- -- Weight. The value can be wxNORMAL, wxLIGHT or wxBOLD.
-
-
- There is currently a difference between the appearance of fonts on the
- two platforms, if the mapping mode is anything other than MM_TEXT.
- Under X, font size is always specified in points. Under Windows, the
- unit for text is points but the text is scaled according to the
- current mapping mode. However, user scaling on a device canvas will
- also scale fonts under both environments. A future version of
- wxWindows will attempt to make font appearance more consistent across
- platforms.
-
- \hy-2{697}{wxFont::wxFont}
-
- \hy-2{701}{wxFont::~wxFont}
-
- \hy-2{704}{wxFont::GetPointSize}
-
-
- \hy-10{708}{wxForm: wxObject}
-
- \hy-8{709}{The purpose of the form class}
-
- The wxForm is a stab at providing form-like functionality, relieving the
- programmer of the tedium of defining all the physical panel items and
- the callbacks handling out-of-range data. It allows the application
- writer to write form dialogs quickly (albeit programmatically) with
- panel items being chosen automatically according to the given
- constraints. The supplied form demo shows how succinct a form
- definition can be. A form gets laid out from left to right; the
- programmer can intersperse new lines and specify item sizes, but for
- brevity no more control is allowed.
-
- A form does not presuppose a particular type of panel: any window
- derived from wxPanel may be associated with a form, once the form has
- been built by adding form items. Also, a form reads from and writes to
- any C++ variables in your program - just supply pointers to the variables,
- and the form handles the rest.
-
- \hy-8{710}{Constraints on form items}
-
- Each item in a form may be supplied with zero or more constraints, where
- the range of possible constraints depends on the data type, and the
- displayed panel item depends upon the data type and the constraint(s)
- given. For example, a string form item with a list of possible strings
- as a constraint will produce a list box on the panel; an integer form
- item with a range constraint will result in a slider being displayed.
- The user may define his or her own constraint by passing a function as a
- constraint which returns FALSE if the constraint was violated, TRUE
- otherwise. The function should write an appropriate message into the
- buffer passed to it if the constraint was violated.
-
- \hy-8{711}{Form appearance}
-
- Once displayed on a panel, a form shows Ok, Cancel, Update and Revert
- buttons along the top, with the user-supplied items below. When the user
- presses Ok, the form items are checked for violation of constraints; if
- any violations are found, an appropriate error message is displayed and
- the user must correct the mistake (or press Cancel, which leaves the
- item values as they were after the last Update). Pressing Update also
- checks the constraints and updates the values, but typically does not
- dismiss the dialog. Revert causes the displayed values to take on the
- values at the last Update. By default, the OnOk and OnCancel messages
- dismiss and delete the dialog box and form, but these may be overridden
- by the application (see below).
-
- The display-type values which may be passed to a form-item creation
- function are as follows:
-
-
- -- wxFORM_DEFAULT: let wxWindows choose a suitable panel item
- -- wxFORM_SINGLE_LIST: use a single-selection listbox. Default for
- string item with a one-of constraint
- -- wxFORM_CHOICE: use a choice item
- -- wxFORM_CHECKBOX: use a checkbox. Default for boolean item
- -- wxFORM_TEXT: use a single-line text item. Default for floating
- point item, and for string and integer items with no constraints
- -- wxFORM_MULTITEXT: use a multi-line text item
- -- wxFORM_SLIDER: use a slider. Default for integer item with range
- constraint
-
-
- The wxFormItem and wxFormItemConstraint classes are not detailed in this
- manual since their members do not need to be directly accessed by the
- user. Functions for creating form items and constraints for passing to
- \hy-8{712}{wxForm::Add} are given in the next subsection.
-
- \hy-8{713}{Example}
-
- The following is an example of a form definition, taken from the form demo.
- Here, a new form \hy-8{714}{MyForm} has been derived, and a new member \hy-8{715}{
- EditForm} has been defined to edit objects of the type \hy-8{716}{MyObject},
- given a panel to display it on.
-
- \hy-14{717}{void MyForm::EditForm(MyObject *object, wxPanel *panel)
- {
- Add(wxMakeFormString("string 1", &(object->string1), wxFORM_DEFAULT,
- new wxList(wxMakeConstraintFunction(MyConstraint), 0)));
- Add(wxMakeFormNewLine());
-
- Add(wxMakeFormString("string 2", &(object->string2), wxFORM_DEFAULT,
- new wxList(wxMakeConstraintStrings("One", "Two", "Three", 0), 0)));
- Add(wxMakeFormString("string 3", &(object->string3), wxFORM_CHOICE,
- new wxList(wxMakeConstraintStrings("Pig", "Cow",
- "Aardvark", "Gorilla", 0), 0)));
- Add(wxMakeFormNewLine());
- Add(wxMakeFormShort("int 1", &(object->int1), wxFORM_DEFAULT,
- new wxList(wxMakeConstraintRange(0.0, 50.0), 0)));
- Add(wxMakeFormNewLine());
-
- Add(wxMakeFormFloat("float 1", &(object->float1), wxFORM_DEFAULT,
- new wxList(wxMakeConstraintRange(-100.0, 100.0), 0)));
- Add(wxMakeFormBool("bool 1", &(object->bool1)));
- Add(wxMakeFormNewLine());
-
- Add(wxMakeFormButton("Test button", (wxFunction)MyButtonProc));
-
- AssociatePanel(panel);
- }
- }
- \hy-2{718}{wxForm::wxForm}
-
- \hy-2{721}{wxForm::~wxForm}
-
- \hy-2{724}{wxForm::Add}
-
- \hy-2{727}{wxForm::FindItem}
-
- \hy-2{730}{wxForm::Set}
-
- \hy-2{733}{wxForm::Delete}
-
- \hy-2{736}{wxForm::AssociatePanel}
-
- \hy-2{739}{wxForm::OnCancel}
-
- \hy-2{743}{wxForm::OnOk}
-
- \hy-2{747}{wxForm::OnRevert}
-
- \hy-2{750}{wxForm::OnUpdate}
-
- \hy-2{753}{wxForm::RevertValues}
-
- \hy-2{756}{wxForm::UpdateValues}
-
-
- \hy-10{789}{wxFrame: wxWindow}
-
- A frame is a window which contains subwindows of various kinds. It has a
- title bar and, optionally, a menu bar, and a status line. Depending on
- the platform, the frame has further menus or buttons relating to window
- movement, sizing, closing, etc. Most of these events are handled by the host
- system without need for special handling by the application. However,
- the application should normally define an \hy-8{790}{OnClose} handler for the
- frame so that related data and subwindows can be cleaned up.
-
- The Windows 3 issues of Multiple Document Interface (MDI) versus Single
- Document Interface (SDI) frames are covered in section mdi and in
- the tutorial.
-
- \hy-2{791}{wxFrame::wxFrame}
-
- \hy-2{795}{wxFrame::~wxFrame}
-
- \hy-2{798}{wxFrame::Centre}
-
- \hy-2{801}{wxFrame::CreateStatusLine}
-
- \hy-2{804}{wxFrame::Iconize}
-
- \hy-2{807}{wxFrame::Iconized}
-
- \hy-2{810}{wxFrame::OnMenuCommand}
-
- \hy-2{813}{wxFrame::OnMenuSelect}
-
- \hy-2{817}{wxFrame::SetIcon}
-
- \hy-2{821}{wxFrame::SetMenuBar}
-
- \hy-2{824}{wxFrame::SetStatusText}
-
- \hy-2{827}{wxFrame::StatusLineExists}
-
-
- \hy-10{831}{wxFunction}
-
-
- \hy-10{834}{wxIcon: wxObject}
-
- An icon is a small rectangular bitmap usually used for denoting a
- minimized application. It is optional (but desirable) to associate a
- pertinent icon with a frame. Obviously icons in XView and Windows 3 are
- created in a different manner, and colour icons in XView are difficult
- to arrange. Therefore, separate icons will be created for the different
- environments. Platform-specific methods for creating a \hy-8{835}{wxIcon}
- 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 XView, this will ensure that fresh X resources
- are allocated for this frame. In Windows 3, 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 XView and in Windows 3. The alternative is to use the string
- version of the icon constructor, which loads a file under XView and a
- resource under Windows 3, but has the disadvantage of requiring the
- XView icon file to be available at run-time. If anyone can invent a
- scheme or macro which does the following more elegantly and
- platform-independently, I'd like to see it!
-
- \hy-14{836}{#ifdef wx_x
- short aiai_bits[] ={
- #include "aiai.icon"
- };
- #endif
- #ifdef wx_msw
- wxIcon *icon = new wxIcon("aiai");
- #endif
- #ifdef wx_x
- wxIcon *icon = new wxIcon(aiai_bits, 64, 64);
- #endif
- }
- \hy-2{837}{wxIcon::wxIcon}
-
- \hy-2{842}{wxIcon::~wxIcon}
-
-
- \hy-10{846}{wxHashTable: wxObject}
-
- 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. Below is an example of using a hash table.
-
- \hy-14{847}{ wxHashTable table(KEY_STRING);
-
- wxPoint *point = new wxPoint(100, 200);
- table.Put("point 1", point);
-
- ....
-
- wxPoint *found_point = (wxPoint *)table.Get("point 1");
- }
- 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.
-
- \hy-2{848}{wxHashTable::wxHashTable}
-
- \hy-2{853}{wxHashTable::~wxHashTable}
-
- \hy-2{856}{wxHashTable::BeginFind}
-
- \hy-2{862}{wxHashTable::Clear}
-
- \hy-2{865}{wxHashTable::Delete}
-
- \hy-2{869}{wxHashTable::Get}
-
- \hy-2{873}{wxHashTable::MakeKey}
-
- \hy-2{876}{wxHashTable::Next}
-
- \hy-2{884}{wxHashTable::Put}
-
-
- \hy-10{889}{wxHelpInstance: wxClient}
-
- The \hy-8{890}{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 \hy-8{891}{wxHelpInstance} is called (for example in the \hy-8{892}{
- OnClose} member of an application's main frame). Under Windows 3,
- 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 \hy-8{893}{
- wxHelpInstance} when it starts, and immediately call \hy-8{894}{Initialize}
- 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 wx_help.h to use this API, even if you have
- included wx.h.
-
- \hy-2{895}{wxHelpInstance::wxHelpInstance}
-
- \hy-2{898}{wxHelpInstance::~wxHelpInstance}
-
- \hy-2{900}{wxHelpInstance::Initialize}
-
- \hy-2{903}{wxHelpInstance::DisplayBlock}
-
- \hy-2{906}{wxHelpInstance::DisplayContents}
-
- \hy-2{909}{wxHelpInstance::DisplaySection}
-
- \hy-2{912}{wxHelpInstance::KeywordSearch}
-
- \hy-2{915}{wxHelpInstance::LoadFile}
-
- \hy-2{919}{wxHelpInstance::OnQuit}
-
- \hy-2{922}{wxHelpInstance::Quit}
-
-
- \hy-10{926}{wxItem: wxWindow}
-
- \hy-2{927}{wxItem::Centre}
-
- \hy-2{932}{wxItem::SetDefault}
-
- \hy-2{936}{wxItem::SetLabel}
-
- \hy-2{939}{wxItem::GetLabel}
-
-
- \hy-10{943}{wxList: wxObject}
-
- 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 \hy-8{944}{wxHashTable}
- for a faster method of storage when random access is required. It is very
- common to iterate on a list as follows:
-
- \hy-14{945}{ ...
- 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();
- }
- }
- To delete nodes in a list as the list is being traversed, replace
-
- \hy-14{946}{ ...
- node = node->Next();
- ...
- }
- with
-
- \hy-14{947}{ ...
- delete point;
- delete node;
- node = SomeList.First();
- ...
- }
- See \hy-8{948}{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 \hy-8{949}{wxObject} and derived types, other
- types (such as char *) may be used with appropriate casting.
-
- \hy-2{950}{wxList::wxList}
-
- \hy-2{959}{wxList::~wxList}
-
- \hy-2{962}{wxList::Append}
-
- \hy-2{969}{wxList::Clear}
-
- \hy-2{972}{wxList::DeleteContents}
-
- \hy-2{977}{wxList::DeleteNode}
-
- \hy-2{980}{wxList::DeleteObject}
-
- \hy-2{984}{wxList::Find}
-
- \hy-2{989}{wxList::First}
-
- \hy-2{992}{wxList::Insert}
-
- \hy-2{997}{wxList::Last}
-
- \hy-2{1000}{wxList::Member}
-
- \hy-2{1004}{wxList::Nth}
-
- \hy-2{1008}{wxList::Number}
-
-
- \hy-10{1012}{wxListBox: wxItem}
-
- A list box 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 list item 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).
-
- \hy-2{1013}{wxListBox::wxListBox}
-
- \hy-2{1023}{wxListBox::~wxListBox}
-
- \hy-2{1026}{wxListBox::Append}
-
- \hy-2{1032}{wxListBox::Clear}
-
- \hy-2{1035}{wxListBox::Clientdata}
-
- \hy-2{1038}{wxListBox::Deselect}
-
- \hy-2{1041}{wxListBox::FindString}
-
- \hy-2{1044}{wxListBox::GetSelection}
-
- \hy-2{1047}{wxListBox::GetSelections}
-
- \hy-2{1050}{wxListBox::GetStringSelection}
-
- \hy-2{1053}{wxListBox::Set}
-
- \hy-2{1056}{wxListBox::SetSelection}
-
- \hy-2{1059}{wxListBox::SetStringSelection}
-
- \hy-2{1062}{wxListBox::String}
-
-
- \hy-10{1067}{wxMenu: wxItem}
-
- 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). At present, menus may only
- be used to construct menu bars, but will eventually have wider use.
-
- 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.
-
- \hy-2{1068}{wxMenu::wxMenu}
-
- \hy-2{1071}{wxMenu::~wxMenu}
-
- \hy-2{1074}{wxMenu::Append}
-
- \hy-2{1080}{wxMenu::AppendSeparator}
-
- \hy-2{1083}{wxMenu::Enable}
-
- \hy-2{1087}{wxMenu::Check}
-
-
- \hy-10{1092}{wxMenuBar: wxItem}
-
- A menu bar is a series of menus accessible from the top of a frame.
- Selecting a title pulls down a menu; selecting a menu item causes a \hy-7{1093}{
- MenuSelection} message to be passed to the frame with the menu item
- integer id as the only argument.
-
- \hy-2{1094}{wxMenuBar::wxMenuBar}
-
- \hy-2{1098}{wxMenuBar::~wxMenuBar}
-
- \hy-2{1101}{wxMenuBar::Append}
-
- \hy-2{1105}{wxMenuBar::Enable}
-
- \hy-2{1109}{wxMenuBar::Check}
-
-
- \hy-10{1114}{wxMessage: wxItem}
-
- A message is a simple line of text which may be displayed in a panel. It does not
- respond to mouse clicks.
-
- \hy-2{1115}{wxMessage::wxMessage}
-
- \hy-2{1118}{wxMessage::~wxMessage}
-
-
- \hy-10{1122}{wxMetaFile: wxObject}
-
- A wxMetaFile represents the Windows 3 metafile object, so metafile
- operations have no effect in X. In wxWindows, only sufficient functionality
- has been provided for copying a graphic to the clipboard; this may be extended
- in a future version. Presently, the only way of creating a metafile
- is to use a wxMetafileDC.
-
- \hy-2{1123}{wxMetaFile::wxMetaFile}
-
- \hy-2{1126}{wxMetaFile::~wxMetaFile}
-
- \hy-2{1129}{wxMetaFile::SetClipboard}
-
-
- \hy-10{1133}{wxMetaFileDC: wxDC}
-
- This is a type of device context that allows a metafile object to be
- created (Windows only), and has most of the characteristics of a normal
- wxDC. The \hy-8{1134}{Close} member must be called after drawing into the
- device context, to return a metafile. The only purpose for this at
- present is to allow the metafile to be copied to the clipboard (see \hy-8{1135}{wxMetaFile}).
-
- Adding metafile capability to an application should be easy if you
- already write to a wxDC; simply pass the wxMetaFileDC to your drawing
- function instead. You may wish to conditionally compile this code so it
- is not compiled under X (although no harm will result if you leave it
- in).
-
- \hy-2{1136}{wxMetaFileDC::wxMetaFileDC}
-
- \hy-2{1139}{wxMetaFileDC::~wxMetaFileDC}
-
- \hy-2{1142}{wxMetaFileDC::Close}
-
-
- \hy-10{1146}{wxMultiText: wxText}
-
- Members as for \hy-8{1147}{wxText}, but allowing multiple lines of text.
-
-
- \hy-10{1149}{wxNode: wxObject}
-
- A node structure used in linked lists (see \hy-8{1150}{wxList}).
-
- \hy-2{1151}{wxNode::Data}
-
- \hy-2{1154}{wxNode::Next}
-
- \hy-2{1157}{wxNode::Previous}
-
- \hy-2{1160}{wxNode::SetData}
-
-
- \hy-10{1164}{wxObject}
-
- This is the root class of all wxWindows classes, and has no base
- functionality. It declares a virtual destructor which ensures that
- destructors get called for all derived class objects where necessary.
-
-
- \hy-10{1166}{wxPanel: wxWindow}
-
- A panel is a subwindow of a frame in which \hy-7{1167}{panel items} can be placed to allow
- the user to view and set controls. Panel items include messages, text items, list items,
- and check boxes. Use \hy-8{1168}{Fit} to fit the panel around its items.
-
- \hy-2{1169}{wxPanel::wxPanel}
-
- \hy-2{1172}{wxPanel::~wxPanel}
-
- \hy-2{1175}{wxPanel::GetCursor}
-
- \hy-2{1178}{wxPanel::GetHorizontalSpacing}
-
- \hy-2{1181}{wxPanel::GetVerticalSpacing}
-
- \hy-2{1184}{wxPanel::NewLine}
-
- \hy-2{1187}{wxPanel::SetHorizontalSpacing}
-
- \hy-2{1190}{wxPanel::SetLabelPosition}
-
- \hy-2{1198}{wxPanel::SetVerticalSpacing}
-
- \hy-2{1201}{wxPanel::Tab}
-
-
- \hy-10{1205}{wxPathList: wxList}
-
- The path list is a convenient way of storing a number of directories, and
- when presented with a filename without a directory, searching for an existing file
- in those directories. Storing the filename only in an application's files and
- using a locally-defined list of directories makes the application and its files more
- portable.
-
- Use the \hy-7{1206}{FileNameFromPath} global function to extract the filename
- from the path.
-
- \hy-2{1207}{wxPathList::wxPathList}
-
- \hy-2{1210}{wxPathList::AddEnvList}
-
- \hy-2{1213}{wxPathList::AddPath}
-
- \hy-2{1216}{wxPathList::FindValidPath}
-
- \hy-2{1220}{wxPathList::Member}
-
-
- \hy-10{1224}{wxPen: wxObject}
-
- A pen is a drawing tool for drawing outlines. It is used for drawing
- lines and painting the outline of rectangles, ellipses, etc. It has a
- colour, a width and a style. On a monochrome display, the default
- behaviour is to show all non-white pens as black. To change this,
- set the \hy-8{1225}{Colour} member of the device context to TRUE, and select
- appropriate colours.
-
- The style may be one of wxSOLID, wxDOT, wxLONG_DASH, wxSHORT_DASH and
- wxDOT_DASH. The names of these styles should be self explanatory.
-
- 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 \hy-7{1226}{OnInit} or
- when required.
-
- An application may wish to dynamically create pens with different
- characteristics, and there is the consequent danger that a large number
- of duplicate pens will be created. Therefore an application may wish to
- get a pointer to a pen by using the global list of pens \hy-8{1227}{
- wxThePenList}, and calling the member function \hy-8{1228}{FindOrCreatePen}.
- See the entry for the \hy-8{1229}{wxPenList} class.
-
- \hy-2{1230}{wxPen::wxPen}
-
- \hy-2{1236}{wxPen::~wxPen}
-
- \hy-2{1239}{wxPen::GetColour}
-
- \hy-2{1242}{wxPen::GetStyle}
-
- \hy-2{1245}{wxPen::GetWidth}
-
- \hy-2{1248}{wxPen::SetColour}
-
- \hy-2{1253}{wxPen::SetStyle}
-
- \hy-2{1256}{wxPen::SetWidth}
-
-
- \hy-10{1260}{wxPenList: wxList}
-
- A pen list is a list containing all pens which have been created. There
- is only one instance of this class: \hy-8{1261}{wxThePenList}. Use this object to search
- for a previously created pen of the desired type and create it if not already found.
- In some windowing systems, the pen may be a scarce resource, so it is best to
- reuse old resources if possible. When an application finishes, all pens will be
- deleted and their resources freed, eliminating the possibility of `memory leaks'.
-
- \hy-2{1262}{wxPenList::wxPenList}
-
- \hy-2{1266}{wxPenList::AddPen}
-
- \hy-2{1269}{wxPenList::FindOrCreatePen}
-
- \hy-2{1273}{wxPenList::RemovePen}
-
-
- \hy-10{1277}{wxPoint: wxObject}
-
- A \hy-8{1278}{wxPoint} is a useful data structure for graphics operations.
- It simply contains floating point \hy-7{1279}{x} and \hy-7{1280}{y} members.
-
- \hy-2{1281}{wxPoint::wxPoint}
-
-
- \hy-10{1289}{wxServer: wxIPCObject}
-
- A wxServer object represents the server part of a client-server DDE
- (Dynamic Data Exchange) conversation (available in \hy-7{1290}{both} Windows
- and UNIX).
-
- \hy-2{1291}{wxServer::wxServer}
-
- \hy-2{1294}{wxServer::Create}
-
- \hy-2{1297}{wxServer::OnAcceptConnection}
-
-
- \hy-10{1302}{wxSlider: wxItem}
-
- \hy-2{1303}{wxSlider::wxSlider}
-
- \hy-2{1307}{wxSlider::~wxSlider}
-
- \hy-2{1310}{wxSlider::GetValue}
-
- \hy-2{1313}{wxSlider::SetValue}
-
-
- \hy-10{1317}{wxStringList: wxList}
-
- A string list is a list which is assumed to contain strings, with a
- specific member functions. Memory is allocated when strings are added to
- the list, and deallocated by the destructor or by the \hy-8{1318}{Delete}
- member.
-
- \hy-2{1319}{wxStringList::wxStringList}
-
- \hy-2{1323}{wxStringList::~wxStringList}
-
- \hy-2{1326}{wxStringList::Add}
-
- \hy-2{1329}{wxStringList::Delete}
-
- \hy-2{1332}{wxStringList::ListToArray}
-
- \hy-2{1336}{wxStringList::Member}
-
- \hy-2{1341}{wxStringList::Sort}
-
-
- \hy-10{1345}{wxText: wxWindow}
-
- \hy-2{1346}{wxText::wxText}
-
- \hy-2{1352}{wxText::~wxText}
-
- \hy-2{1355}{wxText::GetValue}
-
- \hy-2{1358}{wxText::SetValue}
-
-
- \hy-10{1363}{wxTextWindow: wxWindow}
-
- A text window is a subwindow of a frame, offering some basic ability to
- display scrolling text. At present, editing is only possible on the XView
- implementation.
-
- \hy-2{1364}{wxTextWindow::wxTextWindow}
-
- \hy-2{1367}{wxTextWindow::~wxTextWindow}
-
- \hy-2{1370}{wxTextWindow::Clear}
-
- \hy-2{1373}{wxTextWindow::DiscardEdits}
-
- \hy-2{1377}{wxTextWindow::LoadFile}
-
- \hy-2{1380}{wxTextWindow::Modified}
-
- \hy-2{1383}{wxTextWindow::SaveFile}
-
- \hy-2{1386}{wxTextWindow::WriteText}
-
- \hy-2{1389}{wxTextWindow::<<}
-
-
- \hy-10{1399}{wxTimer: wxObject}
-
- The wxTimer object is an abstraction of Windows 3 and XView timers. To
- use it, derive a new class and override the \hy-8{1400}{Notify} member to
- perform the required action. Start with \hy-8{1401}{Start}, stop with \hy-8{1402}{
- Stop}, it's as simple as that.
-
- \hy-2{1403}{wxTimer::wxTimer}
-
- \hy-2{1406}{wxTimer::~wxTimer}
-
- \hy-2{1409}{wxTimer::Notify}
-
- \hy-2{1412}{wxTimer::Start}
-
- \hy-2{1416}{wxTimer::Stop}
-
-
- \hy-10{1420}{wxWindow: wxObject}
-
- wxWindow is the base class for all windows and panel items. Any
- children of the window will be deleted automatically by the destructor
- before the window itself is deleted.
-
- \hy-2{1421}{wxWindow::wxWindow}
-
- \hy-2{1424}{wxWindow::~wxWindow}
-
- \hy-2{1427}{wxWindow::AddChild}
-
- \hy-2{1430}{wxWindow::Center}
-
- \hy-2{1434}{wxWindow::Centre}
-
- \hy-2{1437}{wxWindow::DestroyChildren}
-
- \hy-2{1440}{wxWindow::Fit}
-
- \hy-2{1443}{wxWindow::GetClientData}
-
- \hy-2{1446}{wxWindow::GetClientSize}
-
- \hy-2{1449}{wxWindow::GetHandle}
-
- \hy-2{1452}{wxWindow::GetPosition}
-
- \hy-2{1455}{wxWindow::GetSize}
-
- \hy-2{1458}{wxWindow::GetTextExtent}
-
- \hy-2{1461}{wxWindow::OnActivate}
-
- \hy-2{1465}{wxWindow::OnChar}
-
- \hy-2{1470}{wxWindow::OnClose}
-
- \hy-2{1473}{wxWindow::OnEvent}
-
- \hy-2{1478}{wxWindow::OnKillFocus}
-
- \hy-2{1481}{wxWindow::OnPaint}
-
- \hy-2{1484}{wxWindow::OnSetFocus}
-
- \hy-2{1487}{wxWindow::OnSize}
-
- \hy-2{1491}{wxWindow::SetFocus}
-
- \hy-2{1495}{wxWindow::SetSize}
-
- \hy-2{1498}{wxWindow::SetClientData}
-
- \hy-2{1501}{wxWindow::SetClientSize}
-
- \hy-2{1505}{wxWindow::SetCursor}
-
- \hy-2{1508}{wxWindow::SetTitle}
-
- \hy-2{1511}{wxWindow::Show}
-
-
- \hy-10{1516}{File functions}
-
- See also the \hy-8{1517}{wxPathList} class.
-
- \hy-2{1518}{::Dos2UnixFilename}
-
- \hy-2{1521}{::FileExists}
-
- \hy-2{1524}{::FileNameFromPath}
-
- \hy-2{1527}{::IsAbsolutePath}
-
- \hy-2{1530}{::PathOnly}
-
- \hy-2{1533}{::Unix2DosFilename}
-
- \hy-2{1536}{::wxConcatFiles}
-
- \hy-2{1542}{::wxCopyFile}
-
- \hy-2{1547}{::wxIsWild}
-
- \hy-2{1551}{::wxMatchWild}
-
- \hy-2{1558}{::wxRemoveFile}
-
- \hy-2{1562}{::wxRenameFile}
-
-
- \hy-10{1568}{String functions}
-
- \hy-2{1569}{::copystring}
-
-
- \hy-10{1574}{Dialog functions}
-
- Below are a number of convenience functions for getting input from the
- user or displaying messages. Note that in these functions the last three
- parameters are optional. However, it is recommended to pass a parent frame
- parameter, or (in Windows 3) the wrong window frame may be brought to
- the front when the dialog box is popped up.
-
- \hy-2{1575}{::wxGetTextFromUser}
-
- \hy-2{1581}{::wxGetSingleChoice}
-
- \hy-2{1586}{::wxGetSingleChoiceIndex}
-
- \hy-2{1590}{::wxGetSingleChoiceData}
-
- \hy-2{1594}{::wxMessageBox}
-
- \hy-2{1600}{::wxFileSelector}
-
-
- \hy-10{1605}{GDI functions}
-
- The following are relevant to the GDI (Graphics Device Interface).
-
- \hy-2{1606}{::wxColourDisplay}
-
- \hy-2{1609}{::SetCursor}
-
-
- \hy-10{1613}{Miscellaneous}
-
- \hy-2{1614}{::NewId}
-
- \hy-2{1617}{::RegisterId}
-
- \hy-2{1622}{::wxDisplaySize}
-
- \hy-2{1625}{::wxGetElapsedTime}
-
- \hy-2{1630}{::wxSleep}
-
- \hy-2{1634}{::wxStartTimer}
-
- \hy-2{1638}{::wxYield}
-
- \hy-2{1641}{::wxExecute}
-
- \hy-10{115}{wxApp::wxApp}
-
- \hy-8{116}{void wxApp(void)}
-
- Constructor. Call implicitly with a definition of a wxApp object.
-
- \hy-10{118}{wxApp::~wxApp}
-
- \hy-8{119}{void ~wxApp(void)}
-
- Destructor. Will be called implicitly if the wxApp object is created on the stack.
-
- \hy-10{121}{wxApp::argc}
-
- \hy-8{122}{int argc}
-
- Number of command line arguments (after environment-specific processing).
-
- \hy-10{124}{wxApp::argv}
-
- \hy-8{125}{char ** argv}
-
- Command line arguments (after environment-specific processing).
-
- \hy-10{127}{wxApp::Initialized}
-
- \hy-8{128}{Bool Initialized(void)}
-
- Returns TRUE if the application has been initialized (i.e. if \hy-8{129}{
- OnInit} 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).
-
- \hy-10{131}{wxApp::MainLoop}
-
- \hy-8{132}{void MainLoop(void)}
-
- Called by wxWindows on creation of the application. Override this if you wish
- to provide your own (environment-dependent) main loop.
-
- \hy-10{134}{wxApp::OnExit}
-
- \hy-8{135}{void OnExit(void)}
-
- Provide this member function for any processing which needs to be done as
- the application is about to exit.
-
- \hy-10{137}{wxApp::OnInit}
-
- \hy-8{138}{wxFrame * OnInit(void)}
-
- This must be provided by the application, and must create and return the
- application's main window.
-
- \hy-10{148}{wxBrush::wxBrush}
-
- \hy-8{149}{void wxBrush(void)}
-
- \hy-8{150}{void wxBrush(wxColour &colour, int style)}
-
- \hy-8{151}{void wxBrush(char *colour_name, int style)}
-
- Constructs a brush: uninitialized, initialized with an RGB colour and
- a style, or initialized using a colour name and a style. If the named
- colour form is used, an appropriate \hy-8{152}{wxColour} structure is found
- in the colour database.
-
- \hy-10{154}{wxBrush::~wxBrush}
-
- \hy-8{155}{void ~wxBrush(void)}
-
- Destructor, destroying the brush. Note that brushes should very rarely
- be deleted since windows may contain pointers to them. All brushes
- will be deleted when the application terminates.
-
- \hy-10{157}{wxBrush::GetColour}
-
- \hy-8{158}{wxColour& GetColour(void)}
-
- Returns a reference to the brush colour.
-
- \hy-10{160}{wxBrush::GetStyle}
-
- \hy-8{161}{int GetStyle(void)}
-
- Returns the brush style (wxSOLID or wxTRANSPARENT).
-
- \hy-10{163}{wxBrush::SetColour}
-
- \hy-8{164}{void SetColour(wxColour &colour)}
-
- \hy-8{165}{void SetColour(char *colour_name)}
-
- \hy-8{166}{void SetColour(int red, int green, int blue)}
-
- The brush's colour is changed to the given colour.
-
- \hy-10{168}{wxBrush::SetStyle}
-
- \hy-8{169}{void SetStyle(int style)}
-
- Sets the brush style (wxSOLID or wxTRANSPARENT).
-
- \hy-10{174}{wxBrushList::wxBrushList}
-
- \hy-8{175}{void wxBrushList(void)}
-
- Constructor. The application should not construct its own brush list:
- use the object pointer \hy-8{176}{wxTheBrushList}.
-
- \hy-10{178}{wxBrushList::AddBrush}
-
- \hy-8{179}{void AddBrush(wxBrush *brush)}
-
- Used by wxWindows to add a brush to the list, called in the brush constructor.
-
- \hy-10{181}{wxBrushList::FindOrCreateBrush}
-
- \hy-8{182}{wxBrush * FindOrCreateBrush(wxColour *colour, int style)}
-
- \hy-8{183}{wxBrush * FindOrCreateBrush(char *colour_name, int style)}
-
- Finds a brush of the given specification, or creates one and adds it to the list.
-
- \hy-10{185}{wxBrushList::RemoveBrush}
-
- \hy-8{186}{void RemoveBrush(wxBrush *brush)}
-
- Used by wxWindows to remove a brush from the list.
-
-
- \hy-10{190}{wxButton::wxButton}
-
- \hy-8{191}{void wxButton(wxPanel *parent, wxFunction func, char *label,
- int x = -1, int y = -1, int width = -1, int height = -1)}
-
- Constructor, creating and showing a button. If \hy-7{192}{width} or \hy-7{193}{
- height} are omitted (or are less than zero), an appropriate size will
- be used for the button. \hy-7{194}{func} may be NULL; otherwise it is used
- as the callback for the button. Note that the cast (wxFunction) must
- be used when passing your callback function name, or the compiler may
- complain that the function does not match the constructor declaration.
-
- \hy-10{196}{wxButton::~wxButton}
-
- \hy-8{197}{void ~wxButton(void)}
-
- Destructor, destroying the button.
-
- \hy-10{202}{wxCanvas::wxCanvas}
-
- \hy-8{203}{void wxCanvas(wxFrame *parent, int x = -1, int y = -1,
- int width = -1, int height = -1, int style = wxRETAINED)}
-
- Constructor. The style parameter may be a combination (using the C++
- logical `or' operator) of the following flags:
-
-
- -- wxBORDER, to give the canvas a thin border (Windows 3 only)
- -- wxRETAINED, to give the canvas a backing store, making repainting much faster but
- at a memory premium (XView only)
-
-
- \hy-10{205}{wxCanvas::~wxCanvas}
-
- \hy-8{206}{void ~wxCanvas(void)}
-
- Destructor.
-
- \hy-10{208}{wxCanvas::Clear}
-
- \hy-8{209}{void Clear(void)}
-
- Clears the canvas (fills it with the current background brush).
-
- \hy-10{211}{wxCanvas::DestroyClippingRegion}
-
- \hy-8{212}{void DestroyClippingRegion(void)}
-
- Destroys the current clipping region so that none of the canvas is clipped.
-
- \hy-10{214}{wxCanvas::DrawEllipse}
-
- \hy-8{215}{void DrawEllipse(float x, float y, float width,
- float 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.
-
- \hy-10{217}{wxCanvas::DrawLine}
-
- \hy-8{218}{void DrawLine(float x1, float y1, float x2,
- float y2)}
-
- Draws a line from the first point to the second. The current pen is
- used for drawing the line.
-
- \hy-10{220}{wxCanvas::DrawLines}
-
- \hy-8{221}{void DrawLines(int n, wxPoint points[], float xoffset = 0, float yoffset = 0)}
-
- \hy-8{222}{void DrawLines(wxList *points, float xoffset = 0, float yoffset = 0)}
-
- Draw lines using an array of \hy-7{223}{points} of size \hy-7{224}{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.
-
- \hy-10{226}{wxCanvas::DrawPolygon}
-
- \hy-8{227}{void DrawPolygon(int n, wxPoint points[], float xoffset = 0, float yoffset = 0)}
-
- \hy-8{228}{void DrawPolygon(wxList *points, float xoffset = 0,
- float yoffset = 0)}
-
- Draw a filled polygon using an array of \hy-7{229}{points} of size \hy-7{230}{n},
- or list of pointers to points, adding the optional offset coordinate.
- 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 does not close the first and last points
- automatically.
-
- \hy-10{232}{wxCanvas::DrawPoint}
-
- \hy-8{233}{void DrawPoint(float x, float y)}
-
- Draws a point using the current pen.
-
- \hy-10{235}{wxCanvas::DrawRectangle}
-
- \hy-8{236}{void DrawRectangle(float x, float y, float width, float 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.
-
- \hy-10{238}{wxCanvas::DrawRoundedRectangle}
-
- \hy-8{239}{void DrawRoundedRectangle(float x, float y, float width,
- float height, float 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.
-
- \hy-10{241}{wxCanvas::DrawSpline}
-
- \hy-8{242}{void DrawSpline(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'.
-
- \hy-8{243}{void DrawSpline(float x1, float y1, float x2, float y2,
- float x3, float y3)}
-
- Draws a three-point spline using the current pen.
-
- \hy-10{245}{wxCanvas::DrawText}
-
- \hy-8{246}{void DrawText(char *text, float x, float y)}
-
- Draws a text string at the specified point, using the current text font,
- and the current text foreground and background colours.
-
- \hy-10{248}{wxCanvas::GetDC}
-
- \hy-8{249}{wxDC * GetDC(void)}
-
- Get a pointer to the canvas's device context. Note that the canvas's
- apparent device context may be temporarily replaced by the application
- using \hy-7{250}{SetContext}, so for example a printer context can be
- substituted and programs using the canvas's device context will really
- write to the printer. The canvas's \hy-7{251}{real} device context is
- unaffected by \hy-7{252}{SetContext}.
-
- \hy-10{254}{wxCanvas::ResetContext}
-
- \hy-8{255}{void ResetContext(void)}
-
- Reset a canvas's context set by \hy-7{256}{SetContext}.
-
- \hy-10{258}{wxCanvas::Scroll}
-
- \hy-8{259}{void Scroll(int x_pos, int y_pos)}
-
- Scrolls a canvas so the view start is at the given point. The
- positions are in scroll units, not pixels, so to convert to pixels you
- will have to multiply by the number of pixels per scroll increment.
- If either parameter is -1, that position will be ignored (no change in
- that direction).
-
- \hy-10{261}{wxCanvas::SetBackground}
-
- \hy-8{262}{void SetBackground(wxBrush *brush)}
-
- Sets the current background brush for the canvas. The brush should
- not be deleted while being used by a canvas. All brushes are deleted
- automatically when the application terminates.
-
- \hy-10{264}{wxCanvas::SetClippingRegion}
-
- \hy-8{265}{void SetClippingRegion(float x, float y, float width, float height)}
-
- Sets the clipping region for the canvas. 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.
-
- \hy-10{267}{wxCanvas::SetContext}
-
- \hy-8{268}{void SetContext(wxDC *dc)}
-
- Set a substitute context for the canvas, so applications which think
- they're drawing to canvases can be fooled into drawing to the printer.
- Reset with \hy-7{269}{ResetContext}.
-
- \hy-10{271}{wxCanvas::SetBrush}
-
- \hy-8{272}{void SetBrush(wxBrush *brush)}
-
- Sets the current brush for the canvas. The brush is not copied, so
- you should not delete the brush unless the canvas pen has been set to
- another brush, or to NULL. Note that all pens and brushes are
- automatically deleted when the program is exited.
-
- \hy-10{274}{wxCanvas::SetFont}
-
- \hy-8{275}{void SetFont(wxFont *font)}
-
- Sets the current font for the canvas. The font is not copied, so you
- should not delete the font unless the canvas pen has been set to
- another font, or to NULL.
-
- \hy-10{277}{wxCanvas::SetLogicalFunction}
-
- \hy-8{278}{void SetLogicalFunction(int function)}
-
- Sets the current logical function for the canvas. The possible values
- are:
-
-
- -- wxXOR
- -- wxINVERT
- -- wxOR_REVERSE
- -- wxAND_REVERSE
- -- wxCOPY
-
-
- 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.
-
- \hy-10{280}{wxCanvas::SetPen}
-
- \hy-8{281}{void SetPen(wxPen *pen)}
-
- Sets the current pen for the canvas. The pen is not copied, so you
- should not delete the pen unless the canvas pen has been set to
- another pen, or to NULL. Note that all pens and brushes are
- automatically deleted when the program is exited.
-
- \hy-10{283}{wxCanvas::SetScrollbars}
-
- \hy-8{284}{void SetScrollbars(int horiz_pixels, int vert_pixels, int x_length, int y_length,
- int x_page, int y_page)}
-
- Sets up vertical and/or horizontal scrollbars. The first pair of
- parameters give the number of pixels per `scroll step', i.e. amount
- moved when the up or down scroll arrows are pressed. These may be 0 or
- less for no scrollbar. The second pair gives the length of scrollbar
- in scroll steps, which effectively sets the size of the `virtual
- canvas'. The third pair gives the number of scroll steps in a `page',
- i.e. amount moved when pressing above or below the scrollbar control,
- or using page up/page down (not yet implemented).
-
- For example, the following gives a canvas horizontal and vertical
- scrollbars with 20 pixels per scroll step, a size of 50 steps (1000
- pixels) in each direction, and 4 steps (80 pixels) to a page.
-
- \hy-14{285}{canvas->SetScrollbars(20, 20, 50, 50, 4, 4);
- }
-
- \hy-10{287}{wxCanvas::SetTextBackground}
-
- \hy-8{288}{void SetTextBackground(wxColour *colour)}
-
- Sets the current text background colour for the canvas. Do not
- delete \hy-7{289}{colour}.
-
- \hy-10{291}{wxCanvas::SetTextForeground}
-
- \hy-8{292}{void SetTextForeground(wxColour *colour)}
-
- Sets the current text foreground colour for the canvas. Do not
- delete \hy-7{293}{colour}.
-
- \hy-10{295}{wxCanvas::ViewStart}
-
- \hy-8{296}{void ViewStart(int *x, int * y)}
-
- Get the position at which the visible portion of the canvas starts. If
- either of the scrollbars is not at the home position, \hy-7{297}{x} and/or
- \hy-7{298}{y} will be greater than zero. Combined with \hy-8{299}{GetClientSize},
- the application can use this function to efficiently redraw only the
- visible portion of the canvas. The positions are in scroll units, not
- pixels, so to convert to pixels you will have to multiply by the
- number of pixels per scroll increment.
-
- \hy-10{303}{wxCheckBox::wxCheckBox}
-
- \hy-8{304}{void wxCheckBox(wxPanel *parent, wxFunction func,
- char *label, int x = -1, int y = -1, int width = -1, int height = -1)}
-
- Constructor, creating and showing a checkbox. If \hy-7{305}{width} or \hy-7{306}{
- height} are omitted (or are less than zero), an appropriate size will
- be used for the check box. \hy-7{307}{func} may be NULL; otherwise it is
- used as the callback for the check box. Note that the cast
- (wxFunction) must be used when passing your callback function name, or
- the compiler may complain that the function does not match the
- constructor declaration.
-
- \hy-10{309}{wxCheckBox::~wxCheckBox}
-
- \hy-8{310}{void ~wxCheckBox(void)}
-
- Destructor, destroying the checkbox.
-
- \hy-10{312}{wxCheckBox::GetValue}
-
- \hy-8{313}{Bool GetValue(void)}
-
- Gets the state of the checkbox, TRUE if it is checked, FALSE otherwise.
-
- \hy-10{315}{wxCheckBox::SetValue}
-
- \hy-8{316}{void SetValue(Bool state)}
-
- Sets the checkbox to the given state: if the state is TRUE, the check is on,
- otherwise it is off.
-
-
- \hy-10{320}{wxChoice::wxChoice}
-
- \hy-8{321}{void wxChoice(wxPanel *parent, wxFunction func,
- char *label, int x = -1, int y = -1, int width = -1, int height = -1, int n, char *choices[])}
-
- Constructor, creating and showing a choice. If \hy-7{322}{width} or \hy-7{323}{
- height} are omitted (or are less than zero), an appropriate size will be
- used for the choice. \hy-7{324}{func} may be NULL; otherwise it is used as
- the callback for the choice. Note that the cast (wxFunction) must be
- used when passing your callback function name, or the compiler may
- complain that the function does not match the constructor declaration.
-
- \hy-7{325}{n} is the number of possible choices, and \hy-7{326}{choices} is an
- array of strings of size \hy-7{327}{n}. wxWindows allocates its own memory
- for these strings so the calling program must deallocate the array
- itself.
-
- \hy-10{329}{wxChoice::~wxChoice}
-
- \hy-8{330}{void ~wxChoice(void)}
-
- Destructor, destroying the choice item.
-
- \hy-10{332}{wxChoice::Append}
-
- \hy-8{333}{void Append(char * item)}
-
- Adds the item to the end of the choice item. \hy-7{334}{item} must be
- deallocated by the calling program, i.e. wxWindows makes its own copy.
-
- \hy-10{336}{wxChoice::Clear}
-
- \hy-8{337}{void Clear(void)}
-
- Clears the strings from the choice item. Under XView, this is done
- by deleting and reconstructing the item, but it doesn't redisplay
- properly until the user refreshes the window.
-
- \hy-10{339}{wxChoice::FindString}
-
- \hy-8{340}{int FindString(char *s)}
-
- Finds a choice matching the given string, returning the position if found, or
- -1 if not found.
-
- \hy-10{342}{wxChoice::GetSelection}
-
- \hy-8{343}{int GetSelection(void)}
-
- Gets the id (position) of the selected string.
-
- \hy-10{345}{wxChoice::GetStringSelection}
-
- \hy-8{346}{char * GetStringSelection(void)}
-
- Gets the selected string. This must be copied by the calling program
- if long term use is to be made of it.
-
- \hy-10{348}{wxChoice::SetSelection}
-
- \hy-8{349}{void SetSelection(int n)}
-
- Sets the choice by passing the desired string position.
-
- \hy-10{351}{wxChoice::SetStringSelection}
-
- \hy-8{352}{void SetStringSelection(char * s)}
-
- Sets the choice by passing the desired string.
-
- \hy-10{354}{wxChoice::String}
-
- \hy-8{355}{char * String(int n)}
-
- Returns a temporary pointer to the string at position \hy-7{356}{n}.
-
- \hy-10{361}{wxClient::wxClient}
-
- \hy-8{362}{void wxClient(void)}
-
- Constructs a client object.
-
- \hy-10{364}{wxClient::MakeConnection}
-
- \hy-8{365}{wxConnection * MakeConnection(char *host, char *service, char *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 wxConnection object will be returned.
- The type of wxConnection returned can be altered by deriving the \hy-8{366}{
- OnMakeConnection} member to return your own derived connection object.
-
- \hy-10{368}{wxClient::OnMakeConnection}
-
- \hy-8{369}{wxConnection * OnMakeConnection(void)}
-
- The type of wxConnection returned from a \hy-8{370}{MakeConnection} call can
- be altered by deriving the \hy-8{371}{OnMakeConnection} member to return your
- own derived connection object. By default, an ordinary wxConnection
- object is returned.
-
- \hy-10{376}{wxColour::wxColour}
-
- \hy-8{377}{void wxColour(char red, char green, char blue)}
-
- \hy-8{378}{void wxColour(char * colour_name)}
-
- Construct a colour object from the RGB values or using a colour name
- (uses \hy-8{379}{wxTheColourDatabase}).
-
- \hy-10{381}{wxColour::Get}
-
- \hy-8{382}{void Get(char * red, char * green, char * blue)}
-
- Gets the RGB values - pass pointers to three char variables.
-
- \hy-10{384}{wxColour::Set}
-
- \hy-8{385}{void Set(char red, char green, char blue)}
-
- Sets the RGB value.
-
- \hy-10{391}{wxColourDatabase::wxColourDatabase}
-
- \hy-8{392}{void wxColourDatabase(void)}
-
- Constructs the colour database. Should not need to be used by an
- application.
-
- \hy-10{394}{wxColourDatabase::FindColour}
-
- \hy-8{395}{wxColour * FindColour(char *colour_name)}
-
- Finds a colour given the name. Returns NULL if not found.
-
- \hy-10{397}{wxColourDatabase::FindName}
-
- \hy-8{398}{char * FindName(wxColour& colour)}
-
- Finds a colour name given the colour. Returns NULL if not found.
-
- \hy-10{400}{wxColourDatabase::Initialize}
-
- \hy-8{401}{char * Initialize(void)}
-
- Initializes the database with a number of stock colours. Called by wxWindows
- on start-up.
-
- \hy-10{406}{wxConnection::wxConnection}
-
- \hy-8{407}{void wxConnection(void)}
-
- \hy-8{408}{void wxConnection(char *buffer, int size)}
-
- Constructs a connection object. If no user-defined connection object is
- to be derived from wxConnection, 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 \hy-8{409}{Server::OnAcceptConnection}
- and/or \hy-8{410}{Client::OnMakeConnection} members should be replaced by
- functions which construct the new connection object. If the arguments of
- the wxConnection 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.
-
- \hy-10{412}{wxConnection::Advise}
-
- \hy-8{413}{Bool Advise(char *item, char *data, int size = -1, 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 \hy-8{414}{
- OnAdvise} member to be called. Returns TRUE if successful.
-
- \hy-10{416}{wxConnection::Execute}
-
- \hy-8{417}{Bool Execute(char *data, int size = -1,
- 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 \hy-8{418}{
- Poke} in that respect). Causes the server connection's \hy-8{419}{OnExecute} member
- to be called. Returns TRUE if successful.
-
- \hy-10{421}{wxConnection::Disconnect}
-
- \hy-8{422}{Bool Disconnect(void)}
-
- Called by the client or server application to disconnect from the other
- program; it causes the \hy-8{423}{OnDisconnect} message to be sent to the
- corresponding connection object in the other program. The default
- behaviour of \hy-8{424}{OnDisconnect} is to delete the connection, but the
- calling application must explicitly delete its side of the connection
- having called \hy-8{425}{Disconnect}. Returns TRUE if successful.
-
- \hy-10{427}{wxConnection::OnAdvise}
-
- \hy-8{428}{Bool OnAdvise(char *topic, char *item, char *data, int size, int format)}
-
- Message sent to the client application when the server notifies it of a
- change in the data associated with the given item.
-
- \hy-10{430}{wxConnection::OnDisconnect}
-
- \hy-8{431}{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.
-
- \hy-10{433}{wxConnection::OnExecute}
-
- \hy-8{434}{Bool OnExecute(char *topic, char *data, int size, 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.
-
- \hy-10{436}{wxConnection::OnPoke}
-
- \hy-8{437}{Bool OnPoke(char *topic, char *item, char *data, int size, int format)}
-
- Message sent to the server application when the client
- notifies it to accept the given data.
-
- \hy-10{439}{wxConnection::OnRequest}
-
- \hy-8{440}{char * OnRequest(char *topic, char *item, int *size, int format)}
-
- Message sent to the server application when the client calls \hy-8{441}{
- Request}. The server should respond by returning a character string from
- \hy-8{442}{OnRequest}, or NULL to indicate no data.
-
- \hy-10{444}{wxConnection::OnStartAdvise}
-
- \hy-8{445}{Bool OnStartAdvise(char *topic, char *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.
-
- \hy-10{447}{wxConnection::OnStopAdvise}
-
- \hy-8{448}{Bool OnStopAdvise(char *topic, char *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.
-
- \hy-10{450}{wxConnection::Poke}
-
- \hy-8{451}{Bool Poke(char *item, char *data, int size = -1, 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 \hy-8{452}{OnPoke} member to be called. Returns TRUE if
- successful.
-
- \hy-10{454}{wxConnection::Request}
-
- \hy-8{455}{char * Request(char *item, int *size, int format = wxCF_TEXT)}
-
- Called by the client application to request data from the server. Causes
- the server connection's \hy-8{456}{OnRequest} member to be called. Returns a
- character string (actually a pointer to the connection's buffer) if
- successful, NULL otherwise.
-
- \hy-10{458}{wxConnection::StartAdvise}
-
- \hy-8{459}{Bool StartAdvise(char *item)}
-
- Called by the client application to ask if an advise loop can be started
- with the server. Causes the server connection's \hy-8{460}{OnStartAdvise}
- member to be called. Returns TRUE if the server okays it, FALSE
- otherwise.
-
- \hy-10{462}{wxConnection::StopAdvise}
-
- \hy-8{463}{Bool StopAdvise(char *item)}
-
- Called by the client application to ask if an advise loop can be
- stopped. Causes the server connection's \hy-8{464}{OnStopAdvise} member to be
- called. Returns TRUE if the server okays it, FALSE otherwise.
-
- \hy-10{472}{wxCursor::wxCursor}
-
- \hy-8{473}{void wxCursor(short bits[], intwidth,
- int height)}
-
- \hy-8{474}{void wxCursor(char * cursor_name)}
-
- \hy-8{475}{void wxCursor(int id)}
-
- Constructor. A cursor can be created by passing an array of bits (XView
- only) by passing a string name, or by passing a stock cursor id. \hy-7{476}{
- cursor_name} refers to a filename in XView, or a resource name in Windows
- 3.
-
- The following stock cursor ids may be used:
-
-
- -- wxCURSOR_ARROW
- -- wxCURSOR_BULLSEYE
- -- wxCURSOR_CHAR
- -- wxCURSOR_CROSS
- -- wxCURSOR_HAND
- -- wxCURSOR_IBEAM
- -- wxCURSOR_LEFT_BUTTON
- -- wxCURSOR_MAGNIFIER
- -- wxCURSOR_MIDDLE_BUTTON
- -- wxCURSOR_NO_ENTRY
- -- wxCURSOR_PAINT_BRUSH
- -- wxCURSOR_PENCIL
- -- wxCURSOR_POINT_LEFT
- -- wxCURSOR_POINT_RIGHT
- -- wxCURSOR_QUESTION_ARROW
- -- wxCURSOR_RIGHT_BUTTON
- -- wxCURSOR_SIZENESW
- -- wxCURSOR_SIZENS
- -- wxCURSOR_SIZENWSE
- -- wxCURSOR_SIZEWE
- -- wxCURSOR_SIZING
- -- wxCURSOR_SPRAYCAN
- -- wxCURSOR_WAIT
- -- wxCURSOR_WATCH
-
-
- \hy-10{478}{wxCursor::~wxCursor}
-
- \hy-8{479}{void ~wxCursor(void)}
-
- Destroys the cursor. Unlike an icon, 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.
-
- \hy-10{485}{wxDC::wxDC}
-
- \hy-8{486}{void wxDC(void)}
-
- \hy-8{487}{void wxDC(wxCanvas *canvas)}
-
- \hy-8{488}{void wxDC(char *driver, char *device, char *output, Bool interactive = TRUE)}
-
- Constructor. The third form may be called with three NULLs to put up a
- default printer dialog in Windows or UNIX. The only supported printer
- type in UNIX is ``PostScript''; in Windows, specifying ``PostScript''
- uses wxWindow's own Encapsulated PostScript driver, writing to a file
- only. Otherwise, \hy-7{489}{device} indicates the type of printer and \hy-7{490}{
- output} is an optional file for printing to. The \hy-7{491}{driver} parameter
- is currently unused. Use the \hy-7{492}{Ok} member to test whether the
- constructor was successful in creating a useable device context.
-
- The following global variables are defined in wxWindows, edited by the
- user in the printer dialog and used by the PostScript driver. An
- application may wish to set them to appropriate default values.
-
-
- -- char *wx_portrait = TRUE
- -- char *wx_printer_command =``lpr''
- -- char *wx_printer_flags = ``''
- -- Bool wx_preview = TRUE
- -- char *wx_preview_command = ``ghostview''
- -- float wx_printer_scale_x = 1.0
- -- float wx_printer_scale_y = 1.0
- -- float wx_printer_translate_x = 0.0
- -- float wx_printer_translate_y = 0.0
- -- Bool wx_print_to_file = FALSE
-
-
- \hy-10{494}{wxDC::~wxDC}
-
- \hy-8{495}{void ~wxDC(void)}
-
- Destructor.
-
- \hy-10{497}{wxDC::Blit}
-
- \hy-8{498}{Bool Blit(float xdest, float ydest, float width, float height,
- wxDC *source, float xsrc, float ysrc, int logical_func)}
-
- Copy from a source DC to this DC, specifying the destination
- coordinates, size of area to copy, source DC, source coordinates, and
- logical function (see \hy-8{499}{SetLogicalFunction}). See
- \hy-8{500}{CreateCompatibleDC} for typical usage.
-
- \hy-10{502}{wxDC::Clear}
-
- \hy-8{503}{void Clear(void)}
-
- \hy-10{505}{wxDC::CreateCompatibleDC}
-
- \hy-8{506}{wxDC * CreateCompatibleDC(void)}
-
- Creates and returns a device context compatible with this DC.
- A bitmap must be selected into the new DC before it may be used for
- anything. Typical usage is as follows:
-
- \hy-14{507}{ wxDC *temp_dc = dc.CreateCompatibleDC();
- temp_dc->SelectObject(test_bitmap);
- dc.Blit(250, 50, BITMAP_WIDTH, BITMAP_HEIGHT, temp_dc, 0, 0);
- delete temp_dc;
- }
- In future versions of wxWindows, this kind of DC will be used for
- drawing graphics in memory, then copying to visible windows.
-
-
- \hy-10{509}{wxDC::DestroyClippingRegion}
-
- \hy-8{510}{void DestroyClippingRegion(void)}
-
- Destroys the current clipping region so that none of the DC is clipped.
-
-
- \hy-10{512}{wxDC::DeviceToLogicalX}
-
- \hy-8{513}{float DeviceToLogicalX(int x)}
-
- Convert device X coordinate to logical coordinate, using the current
- mapping mode.
-
- \hy-10{515}{wxDC::DeviceToLogicalY}
-
- \hy-8{516}{float DeviceToLogicalY(int y)}
-
- Converts device Y coordinate to logical coordinate, using the current
- mapping mode.
-
- \hy-10{518}{wxDC::DrawEllipse}
-
- \hy-8{519}{void DrawEllipse(float x, float y, float width, float 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.
-
- \hy-10{521}{wxDC::DrawIcon}
-
- \hy-8{522}{void DrawIcon(wxIcon *icon, float x, float 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. Icons and bitmaps in
- X are currently monochrome only.
-
- \hy-10{524}{wxDC::DrawLine}
-
- \hy-8{525}{void DrawLine(float x1, float y1, float x2, float y2)}
-
- Draws a line from the first point to the second. The current pen is used
- for drawing the line.
-
- \hy-10{527}{wxDC::DrawLines}
-
- \hy-8{528}{void DrawLines(int n, wxPoint points[], float xoffset = 0, float yoffset = 0)}
-
- \hy-8{529}{void DrawLines(wxList *points, float xoffset = 0, float yoffset = 0)}
-
- Draws lines using an array of \hy-7{530}{points} of size \hy-7{531}{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.
-
- \hy-10{533}{wxDC::DrawPolygon}
-
- \hy-8{534}{void DrawPolygon(int n, wxPoint points[], float xoffset = 0, float yoffset = 0)}
-
- \hy-8{535}{void DrawPolygon(wxList *points, float xoffset = 0, float yoffset = 0)}
-
- Draws a filled polygon using an array of \hy-7{536}{points} of size \hy-7{537}{n},
- or list of pointers to points, adding the optional offset coordinate.
- 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 does not close the first and last points automatically.
-
- \hy-10{539}{wxDC::DrawPoint}
-
- \hy-8{540}{void DrawPoint(float x, float y)}
-
- Draws a point using the current pen.
-
- \hy-10{542}{wxDC::DrawRectangle}
-
- \hy-8{543}{void DrawRectangle(float x, float y, float width, float 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.
-
- \hy-10{545}{wxDC::DrawRoundedRectangle}
-
- \hy-8{546}{void DrawRoundedRectangle(float x, float y, float width, float height, float 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.
-
- \hy-10{548}{wxDC::DrawSpline}
-
- \hy-8{549}{void DrawSpline(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'.
-
- \hy-8{550}{void DrawSpline(float x1, float y1, float x2, float y2, float x3, float y3)}
-
- Draws a three-point spline using the current pen.
-
- \hy-10{552}{wxDC::DrawText}
-
- \hy-8{553}{void DrawText(char *text, float x, float y)}
-
- Draws a text string at the specified point, using the current text font,
- and the current text foreground and background colours.
-
- \hy-10{555}{wxDC::EndDoc}
-
- \hy-8{556}{void EndDoc(void)}
-
- Ends a document (only relevant when outputting to a printer).
-
- \hy-10{558}{wxDC::EndPage}
-
- \hy-8{559}{void EndPage(void)}
-
- Ends a document page (only relevant when outputting to a printer).
-
- \hy-10{561}{wxDC::GetMapMode}
-
- \hy-8{562}{int GetMapMode(void)}
-
- Gets the \hy-7{563}{mapping mode} for the device context (see \hy-8{564}{SetMapMode}).
-
- \hy-10{566}{wxDC::LogicalToDeviceX}
-
- \hy-8{567}{int LogicalToDeviceX(float x)}
-
- Converts logical X coordinate to device coordinate, using the current
- mapping mode.
-
- \hy-10{569}{wxDC::LogicalToDeviceY}
-
- \hy-8{570}{int LogicalToDeviceY(float y)}
-
- Converts logical Y coordinate to device coordinate, using the current
- mapping mode.
-
- \hy-10{572}{wxDC::Ok}
-
- \hy-8{573}{Bool Ok(void)}
-
- Returns TRUE if the DC is ok to use.
-
- \hy-10{575}{wxDC::SelectObject}
-
- \hy-8{576}{void SelectObject(wxBitmap *bitmap)}
-
- Selects the given bitmap into the device context, to use as the memory
- bitmap. Drawing onto the DC is not yet allowed, but selecting the bitmap
- into a DC created by using \hy-8{577}{CreateCompatibleDC} allows you to then
- use \hy-8{578}{Blit} to copy the bitmap to a canvas. For this purpose, you
- may find \hy-8{579}{DrawIcon} easier to use instead, if your Windows bitmaps can
- be converted to icon format.
-
- \hy-10{581}{wxDC::SetBackground}
-
- \hy-8{582}{void SetBackground(wxBrush *brush)}
-
- Sets the current background brush for the DC. Do not delete the brush - it will be
- deleted automatically when the application terminates.
-
- \hy-10{584}{wxDC::SetClippingRegion}
-
- \hy-8{585}{void SetClippingRegion(float x, float y, float width, float 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.
-
- \hy-10{587}{wxDC::SetBrush}
-
- \hy-8{588}{void SetBrush(wxBrush *brush)}
-
- Sets the current brush for the DC. The brush is not copied, so you should not delete
- the brush unless the DC pen has been set to another brush, or to NULL. Note that
- all pens and brushes are automatically deleted when the program is exited.
-
- \hy-10{590}{wxDC::SetFont}
-
- \hy-8{591}{void SetFont(wxFont *font)}
-
- Sets the current font for the DC. The font is not copied, so you should not delete
- the font unless the DC pen has been set to another font, or to NULL.
-
- \hy-10{593}{wxDC::SetLogicalFunction}
-
- \hy-8{594}{void SetLogicalFunction(int function)}
-
- Sets the current logical function for the DC. The possible values are:
-
-
- -- wxXOR
- -- wxINVERT
- -- wxOR_REVERSE
- -- wxAND_REVERSE
- -- wxCOPY
-
-
- 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.
-
- \hy-10{596}{wxDC::SetMapMode}
-
- \hy-8{597}{void SetMapMode(int int)}
-
- The \hy-7{598}{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 \hy-7{599}{
- user scale} (see \hy-8{600}{SetUserScale}) 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:
-
-
- -- MM_TWIPS - each logical unit is 1/20 of a point, or 1/1440 of
- an inch
- -- MM_POINTS - each logical unit is a point, or 1/72 of an inch
- -- MM_METRIC - each logical unit is 1 mm
- -- MM_LOMETRIC - each logical unit is 1/10 of a mm
- -- MM_TEXT - each logical unit is 1 pixel
-
-
-
- \hy-10{602}{wxDC::SetPen}
-
- \hy-8{603}{void SetPen(wxPen *pen)}
-
- Sets the current pen for the DC. The pen is not copied, so you should
- not delete the pen unless the DC pen has been set to another pen, or
- to NULL. Note that all pens and brushes are automatically deleted when
- the program is exited.
-
- \hy-10{605}{wxDC::SetTextBackground}
-
- \hy-8{606}{void SetTextBackground(wxColour *colour)}
-
- Sets the current text background colour for the DC. Do not delete \hy-7{607}{
- colour} while selected for use by a DC.
-
- \hy-10{609}{wxDC::SetTextForeground}
-
- \hy-8{610}{void SetTextForeground(wxColour *colour)}
-
- Sets the current text foreground colour for the DC. Do not delete \hy-7{611}{
- colour} while selected for use by a DC.
-
- \hy-10{613}{wxDC::SetUserScale}
-
- \hy-8{614}{void SetUserScale(float x_scale, floaty_scale)}
-
- Sets the user scaling factor, useful for applications which require
- `zooming'.
-
- \hy-10{616}{wxDC::StartDoc}
-
- \hy-8{617}{Bool StartDoc(char *message)}
-
- Starts a document (only relevant when outputting to a printer).
- Message is a message to show whilst printing.
-
- \hy-10{619}{wxDC::StartPage}
-
- \hy-8{620}{Bool StartPage(void)}
-
- Starts a document page (only relevant when outputting to a printer).
-
- \hy-10{625}{wxDialogBox::wxDialogBox}
-
- \hy-8{626}{void wxDialogBox(wxFrame *parent, char *title,
- Bool modal=FALSE, int x=300, int y=300,
- int width=500, int height=500)}
-
- Constructor. If \hy-7{627}{modal} is TRUE, the dialog box will wait to be
- dismissed (using Show(FALSE)) before returning control to the
- calling program.
-
- \hy-10{629}{wxDialogBox::~wxDialogBox}
-
- \hy-8{630}{void ~wxDialogBox(void)}
-
- Destructor. Deletes any panel items before deleting the physical window.
-
- \hy-10{632}{wxDialogBox::Iconize}
-
- \hy-8{633}{void Iconize(Bool iconize)}
-
- If TRUE, iconizes the dialog box; if FALSE, shows and restores it. Note
- that in Windows, iconization has no effect since dialog boxes cannot be
- iconized. However, applications may need to explicitly restore dialog
- boxes under XView which have user-iconizable frames, and under Windows
- calling Iconize(FALSE) will bring the window to the front, as does
- Show(TRUE).
-
- \hy-10{635}{wxDialogBox::Iconized}
-
- \hy-8{636}{Bool Iconized(void)}
-
- Returns TRUE if the dialog box is iconized. Always returns FALSE under
- Windows for the reasons given above.
-
- \hy-10{638}{wxDialogBox::Show}
-
- \hy-8{639}{void Show(Bool show)}
-
-
- If \hy-7{640}{show} is TRUE, the dialog box is shown and brought to the front;
- otherwise the box is hidden. If \hy-7{641}{show} is FALSE and the dialog is
- modal, control is returned to the calling program.
-
- \hy-10{646}{wxEvent::wxEvent}
-
- \hy-8{647}{void wxEvent(void)}
-
- Constructor. Should not need to be used by an application.
-
- \hy-10{649}{wxEvent::~wxEvent}
-
- \hy-8{650}{void ~wxEvent(void)}
-
- Destructor. Should not need to be used by an application.
-
- \hy-10{652}{wxEvent::Button}
-
- \hy-8{653}{Bool Button(int button)}
-
- Returns TRUE if the identified mouse button is changing state. Valid values of \hy-7{654}{button}
- are:
-
-
- -- Left button
- -- Middle button
- -- Right button
-
-
- Not all mice have middle buttons so a portable application should avoid
- this one.
-
- \hy-10{656}{wxEvent::ButtonDown}
-
- \hy-8{657}{Bool ButtonDown(void)}
-
- Returns TRUE if the event was a mouse button down event.
-
- \hy-10{659}{wxEvent::ControlDown}
-
- \hy-8{660}{Bool ControlDown(void)}
-
- Returns TRUE if the control button was down at the time of the event.
-
- \hy-10{662}{wxEvent::Dragging}
-
- \hy-8{663}{Bool Dragging(void)}
-
- Returns TRUE if this was a dragging event.
-
- \hy-10{665}{wxEvent::IsButton}
-
- \hy-8{666}{Bool IsButton(void)}
-
- Returns TRUE if the event was a mouse button event (not necessarily a button down event -
- that may be tested using \hy-7{667}{ButtonDown}).
-
- \hy-10{669}{wxEvent::LeftDown}
-
- \hy-8{670}{Bool LeftDown(void)}
-
- Returns TRUE if the left mouse button changed to down.
-
- \hy-10{672}{wxEvent::LeftUp}
-
- \hy-8{673}{Bool LeftUp(void)}
-
- Returns TRUE if the left mouse button changed to up.
-
- \hy-10{675}{wxEvent::MiddleDown}
-
- \hy-8{676}{Bool MiddleDown(void)}
-
- Returns TRUE if the middle mouse button changed to down.
-
- \hy-10{678}{wxEvent::MiddleUp}
-
- \hy-8{679}{Bool MiddleUp(void)}
-
- Returns TRUE if the middle mouse button changed to up.
-
- \hy-10{681}{wxEvent::Position}
-
- \hy-8{682}{void Position(float *x, float *y)}
-
- Sets *x and *y to the position at which the event occurred. If the
- window is a canvas, the position is converted to logical units
- (according to the current mapping mode) with scrolling taken into
- account. To get back to device units (for example to calculate where on the
- screen to place a dialog box associated with a canvas mouse event), use
- \hy-8{683}{wxDC::LogicalToDeviceX} and \hy-8{684}{wxDC::LogicalToDeviceY}.
-
- For example, the following code calculates screen pixel coordinates
- from the frame position, canvas view start (assuming the canvas is the only
- subwindow on the frame and therefore at the top left of it), and the
- logical event position. A menu is popped up at the position where the
- mouse click occurred. (Note that the application should also check that
- the dialog box will be visible on the screen, since the click could have
- occurred near the screen edge!)
-
- \hy-14{685}{float event_x, event_y;
- event.Position(&event_x, &event_y);
- frame->GetPosition(&x, &y);
- canvas->ViewStart(&x1, &y1);
- int mouse_x = (int)(canvas->GetDC()->LogicalToDeviceX(event_x + x - x1);
- int mouse_y = (int)(canvas->GetDC()->LogicalToDeviceY(event_y + y - y1);
-
- char *choice = wxGetSingleChoice("Menu", "Pick a node action",
- no_choices, choices, frame, mouse_x, mouse_y);
- }
- \hy-10{687}{wxEvent::RightDown}
-
- \hy-8{688}{Bool RightDown(void)}
-
- Returns TRUE if the right mouse button changed to down.
-
- \hy-10{690}{wxEvent::RightUp}
-
- \hy-8{691}{Bool RightUp(void)}
-
- Returns TRUE if the right mouse button changed to up.
-
-
- \hy-10{693}{wxEvent::ShiftDown}
-
- \hy-8{694}{Bool ShiftDown(void)}
-
- Returns TRUE if the shift button was down at the time of the event.
-
- \hy-10{698}{wxFont::wxFont}
-
- \hy-8{699}{void wxFont(void)}
-
- \hy-8{700}{void wxFont(int point_size, int family, int style, int weight)}
-
- Creates a font object. If the desired font does not
- exist, the closest match will be chosen. Under XView, this may result
- in a number of XView warnings during the matching process; these should
- be ignored, and will only occur the first time wxWindows attempts to
- use an absent font in a given size. Under Windows 3, only scaleable
- TrueType fonts are used.
-
- \hy-10{702}{wxFont::~wxFont}
-
- \hy-8{703}{void ~wxFont(void)}
-
- Destroys a font object. Do not manually destroy a font which has been
- assigned to a canvas. All GDI objects, including fonts, are
- automatically destroyed on program exit, so there is no danger of memory
- leakage as in conventional Windows programming.
-
- \hy-10{705}{wxFont::GetPointSize}
-
- \hy-8{706}{int GetPointSize(void)}
-
- Gets the point size.
-
-
- \hy-10{719}{wxForm::wxForm}
-
- \hy-8{720}{void wxForm(void)}
-
- Constructor.
-
- \hy-10{722}{wxForm::~wxForm}
-
- \hy-8{723}{void ~wxForm(void)}
-
- Destructor. Does not delete the associated panel or any panel items, but
- does delete all form items.
-
- \hy-10{725}{wxForm::Add}
-
- \hy-8{726}{void Add(wxFormItem *item, long id = -1)}
-
- Adds a form item to the form. If an id is given this is associated with
- the form item; otherwise a new id is generated, by which the item may be
- identified later.
-
- \hy-10{728}{wxForm::FindItem}
-
- \hy-8{729}{wxNode * FindItem(long id)}
-
- Given a form item id, returns a list node containing the form item.
-
- \hy-10{731}{wxForm::Set}
-
- \hy-8{732}{Bool Set(long id, wxFormItem *item)}
-
- Given a form item id, replaces an existing item with that id with the
- given form item. Returns TRUE if successful.
-
- \hy-10{734}{wxForm::Delete}
-
- \hy-8{735}{Bool Delete(long id)}
-
- Deletes the given form item by id. Returns TRUE if successful.
-
- \hy-10{737}{wxForm::AssociatePanel}
-
- \hy-8{738}{void AssociatePanel(wxPanel *panel)}
-
- Associates the form with the given panel (or window derived from wxPanel, such as
- wxDialogBox). This causes a number of items to be created on the panel
- using information from the list of form items. The panel should be shown
- after this has been called.
-
- \hy-10{740}{wxForm::OnCancel}
-
- \hy-8{741}{void OnCancel(void)}
-
- This member may be derived by the application. When the user presses the
- Cancel button, this is called, allowing the application to take action.
- By default, \hy-8{742}{OnCancel} deletes the form and the panel associated with
- it, probably the normal desired behaviour.
-
- \hy-10{744}{wxForm::OnOk}
-
- \hy-8{745}{void OnOk(void)}
-
- This member may be derived by the application. When the user presses the
- OK button, this is called, allowing the application to take action.
- By default, \hy-8{746}{OnOk} deletes the form and the panel associated with
- it, probably the normal desired behaviour. Note that if any form item
- constraints were violated when the user pressed OK, the member does not
- get called.
-
- \hy-10{748}{wxForm::OnRevert}
-
- \hy-8{749}{void OnRevert(void)}
-
- This member may be derived by the application. When the user presses the
- Revert button, the C++ form item variable values in effect before the
- last Update are restored. Then this member is called, allowing the
- application to take further action.
-
- \hy-10{751}{wxForm::OnUpdate}
-
- \hy-8{752}{void OnUpdate(void)}
-
- This member may be derived by the application. When the user presses the
- Update button, the C++ form item variable values are updated to the
- values on the panel. Then this member is called, allowing the
- application to take further action.
-
- \hy-10{754}{wxForm::RevertValues}
-
- \hy-8{755}{void RevertValues(void)}
-
- Internal function for displaying the C++ form item values in the
- displayed panel items. Should not need to be called by the user.
-
- \hy-10{757}{wxForm::UpdateValues}
-
- \hy-8{758}{Bool UpdateValues(void)}
-
- Internal function for setting the C++ form item values to the values set
- in the panel items. Should not need to be called by the user.
-
- \hy-8{759}{Functions for making form items and constraints}
-
- These functions make form items and their associated constraints for
- passing to \hy-8{760}{wxForm::Add}.
-
- \hy-8{761}{wxFormItem * wxMakeFormButton(char *label,
- wxFunction fun)}
-
- Makes a button with a conventional callback.
-
- \hy-8{762}{wxFormItem * wxMakeFormMessage(char *label)}
-
- Makes a message.
-
- \hy-8{763}{wxFormItem * wxMakeFormNewLine(void)}
-
- Adds a newline.
-
- \hy-8{764}{wxFormItem * wxMakeFormLong(char *label, long *var,
- int item_type = wxFORM_DEFAULT, wxList *constraints = NULL,
- char *help_string = NULL, wxEditFunction editor = NULL, int width = -1,
- int height = -1)}
-
- Makes a long integer form item, given a label, a pointer to the variable
- holding the value, an item type, and a list of constraints (see below).
- \hy-7{765}{help_string} and \hy-7{766}{editor} are currently not used.
-
-
- \hy-8{767}{wxFormItem * wxMakeFormShort(char *label, int *var,
- int item_type = wxFORM_DEFAULT, wxList *constraints = NULL,
- char *help_string = NULL, wxEditFunction editor = NULL, int width = -1,
- int height = -1)}
-
- Makes an integer form item, given a label, a pointer to the variable
- holding the value, an item type, and a list of constraints (see below).
- \hy-7{768}{help_string} and \hy-7{769}{editor} are currently not used.
-
-
- \hy-8{770}{wxFormItem * wxMakeFormFloat(char *label, float *var,
- int item_type = wxFORM_DEFAULT, wxList *constraints = NULL,
- char *help_string = NULL, wxEditFunction editor = NULL,
- int width = -1,
- int height = -1)}
-
- Makes a floating-point form item, given a label, a pointer to the variable
- holding the value, an item type, and a list of constraints (see below).
- \hy-7{771}{help_string} and \hy-7{772}{editor} are currently not used.
-
-
- \hy-8{773}{wxFormItem * wxMakeFormBool(char *label, Bool *var,
- int item_type = wxFORM_DEFAULT, wxList *constraints = NULL,
- char *help_string = NULL, wxEditFunction editor = NULL, int width = -1,
- int height = -1)}
-
- Makes a boolean form item, given a label, a pointer to the variable
- holding the value, an item type, and a list of constraints (see below).
- \hy-7{774}{help_string} and \hy-7{775}{editor} are currently not used.
-
- \hy-8{776}{wxFormItem * wxMakeFormString(char *label, char **var,
- int item_type = wxFORM_DEFAULT, wxList *constraints = NULL,
- char *help_string = NULL, wxEditFunction editor = NULL,
- int width = -1,
- int height = -1)}
-
- Makes a string form item, given a label, a pointer to the variable
- holding the value, an item type, and a list of constraints (see below).
- \hy-7{777}{help_string} and \hy-7{778}{editor} are currently not used.
-
-
- \hy-8{779}{wxFormItemConstraint * wxMakeConstraintStrings(wxList *list)}
-
- Makes a constraint specifying that the value must be one of the strings
- given in the list.
-
- \hy-8{780}{wxFormItemConstraint * wxMakeConstraintStrings(char *first, ...)}
-
- Makes a constraint specifying that the value must be one of the strings
- given in the variable-length argument list,\hy-7{781}{terminated with a zero}.
-
- \hy-8{782}{wxFormItemConstraint * wxMakeConstraintFunction(wxConstraintFunction func)}
-
- Makes a constraint with a function that gets called when the value is
- being checked. The function should return FALSE if the constraint was
- violated, TRUE otherwise. The function should also write an appropriate
- message into the buffer passed to it if the constraint was violated.
- The type \hy-8{783}{wxConstraintFunction} is defined as follows:
-
- \hy-8{784}{typedef Bool (*wxConstraintFunction)(int type, char *value, char *label, char *msg)}
-
- \hy-7{785}{type} is the type of the item, for instance wxFORM_STRING. \hy-7{786}{value} is
- the address of the variable containing the value, and should be coerced
- to the correct type, except for wxFORM_STRING, where no coercion is required.
-
- \hy-8{787}{wxFormItemConstraint * wxMakeConstraintRange(float lo, float hi)}
-
- Makes a range constraint; can be used for integer and floating point
- form items.
-
- \hy-10{792}{wxFrame::wxFrame}
-
- \hy-8{793}{void wxFrame(wxFrame *parent, char *title, int x = -1, int y = -1,
- int width = -1, int height = -1, int style = wxSDI)}
-
- Constructor. The \hy-7{794}{parent} parameter can be NULL or an existing frame.
- The final parameter determines whether, under Windows, the frame is an
- SDI frame (wxSDI), an MDI parent frame (wxMDI_PARENT) or an MDI child
- frame (wxMDI_CHILD).
-
- \hy-10{796}{wxFrame::~wxFrame}
-
- \hy-8{797}{void ~wxFrame(void)}
-
- Destructor. Destroys all child windows and menu bar if present.
-
- \hy-10{799}{wxFrame::Centre}
-
- \hy-8{800}{void Centre(int direction = wxBOTH)}
-
- Centres the frame on the display. The parameter may be
- wxHORIZONTAL, wxVERTICAL or wxBOTH.
-
- \hy-10{802}{wxFrame::CreateStatusLine}
-
- \hy-8{803}{void CreateStatusLine(void)}
-
- Creates a status line at the bottom of the frame. The width of the
- status line is the whole width of the frame (adjusted automatically when
- resizing), and the height and text size are chosen by the host system.
- Does not work for MDI parent frames.
-
- \hy-10{805}{wxFrame::Iconize}
-
- \hy-8{806}{void Iconize(Bool iconize)}
-
- If TRUE, iconizes the frame; if FALSE, shows and restores it.
-
- \hy-10{808}{wxFrame::Iconized}
-
- \hy-8{809}{Bool Iconized(void)}
-
- Returns TRUE if the frame is iconized.
-
-
- \hy-10{811}{wxFrame::OnMenuCommand}
-
- \hy-8{812}{void OnMenuCommand(int id)}
-
- Sent to the window when an item on the window's menu has been chosen.
- Derive your own frame class to handle this message.
-
- \hy-10{814}{wxFrame::OnMenuSelect}
-
- \hy-8{815}{void OnMenuSelect(int id)}
-
- Sent to the window when an item on the window's menu has been selected
- (i.e. the cursor is on the item, but the left button has not been
- released). Derive your own frame class to handle this message.
- See the \hy-7{816}{hello} sample for an example of using this to implement a
- line of explanation about each menu item.
-
- This function is only called under Windows 3.
-
- \hy-10{818}{wxFrame::SetIcon}
-
- \hy-8{819}{void SetIcon(wxIcon * icon)}
-
- Sets the icon for this frame, deleting any existing one. Note an
- important difference between XView and Windows 3 behaviour. In Windows
- 3, the title of the frame is the icon label, wrapping if necessary for a
- long title. If the frame title changes, the icon label changes. In
- XView, the icon label cannot be changed once the icon has been
- associated with the frame. Also, there is no wrapping, and icon labels
- must therefore be short.
-
- The best thing to do to accommodate both situations is to have the frame
- title set to a short string when setting the icon. Then, set the frame
- title to the desired text. In XView, the icon will keep its short text.
- In Windows 3, the longer (probably more meaningful) title will be
- shown.
-
- Note also that in Windows 3, icons cannot be associated with a window
- after window initialization, except by explicitly drawing the icon onto
- the iconized window, which is what wxWindows does. Because of this
- workaround, the background of the icon will be white rather than the
- usual transparent. It was felt limiting to have to pass an icon name at
- frame create time.
-
- However, drawing the icon like this does not work (for some unknown
- reason) with MDI parent and child frames, and so for MDI applications
- the following lines need to be added to the Windows 3 resource file:
-
- \hy-14{820}{wxSTD_FRAME ICON icon1.ico
- wxSTD_MDICHILDFRAME ICON icon2.ico
- }
- where icon1.ico will be used for SDI frames or the MDI parent frame, and
- icon2.ico will be used for MDI child frames.
-
- \hy-10{822}{wxFrame::SetMenuBar}
-
- \hy-8{823}{void SetMenuBar(wxMenuBar *frame)}
-
- Tells the frame to show the given menu bar. 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).
-
- \hy-10{825}{wxFrame::SetStatusText}
-
- \hy-8{826}{void SetStatusText(char * text)}
-
- Sets the status line text and redraws the status line. Use an empty (not NULL) string
- to clear the status line.
-
- \hy-10{828}{wxFrame::StatusLineExists}
-
- \hy-8{829}{Bool StatusLineExists(void)}
-
- Returns TRUE if the status line has previously been created.
-
- \hy-8{832}{typedef void (*wxFunction)(wxObject&, wxEvent&)}
-
- The type of a callback function.
-
- \hy-10{838}{wxIcon::wxIcon}
-
- \hy-8{839}{void wxIcon(short bits[], int width, int height)}
-
- \hy-8{840}{void wxIcon(char * icon_name)}
-
- Constructor. An icon can be created by passing an array of bits (XView only)
- or by passing a string name. \hy-7{841}{icon_name} refers to a filename in XView,
- a resource name in Windows 3.
-
- \hy-10{843}{wxIcon::~wxIcon}
-
- \hy-8{844}{void ~wxIcon(void)}
-
- Destroys the icon. Do not explicitly delete an icon pointer which has
- been passed to a frame - the frame will delete the icon when it is
- destroyed. If assigning a new icon to a frame, the old icon will be
- destroyed.
-
- \hy-10{849}{wxHashTable::wxHashTable}
-
- \hy-8{850}{void wxHashTable(unsigned int key_type, int size = 1000)}
-
- Constructor. \hy-7{851}{key_type} is one of wxKEY_INTEGER, or wxKEY_STRING,
- and indicates what sort of keying is required. \hy-7{852}{size} is optional.
-
- \hy-10{854}{wxHashTable::~wxHashTable}
-
- \hy-8{855}{void ~wxHashTable(void)}
-
- Destroys the hash table.
-
- \hy-10{857}{wxHashTable::BeginFind}
-
- \hy-8{858}{void BeginFind(void)}
-
- The counterpart of \hy-7{859}{Next}. If the application wishes to iterate
- through all the data in the hash table, it can call \hy-7{860}{BeginFind} and
- then loop on \hy-7{861}{Next}.
-
- \hy-10{863}{wxHashTable::Clear}
-
- \hy-8{864}{void Clear(void)}
-
- Clears the hash table of all nodes (but as usual, doesn't delete user data).
-
- \hy-10{866}{wxHashTable::Delete}
-
- \hy-8{867}{wxObject * Delete(long key)}
-
- \hy-8{868}{wxObject * Delete(char * key)}
-
- Deletes entry in hash table and returns the user's data (if found).
-
- \hy-10{870}{wxHashTable::Get}
-
- \hy-8{871}{wxObject * Get(long key)}
-
- \hy-8{872}{wxObject * Get(char * key)}
-
- Gets data from the hash table, using an integer or string key (depending on which
- has table constructor was used).
-
- \hy-10{874}{wxHashTable::MakeKey}
-
- \hy-8{875}{long MakeKey(char *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).
-
- \hy-10{877}{wxHashTable::Next}
-
- \hy-8{878}{wxNode * Next(void)}
-
- If the application wishes to iterate through all the data in the hash
- table, it can call \hy-7{879}{BeginFind} and then loop on \hy-7{880}{Next}. This function
- returns a \hy-8{881}{wxNode} pointer (or NULL if there are no more nodes). See the
- \hy-8{882}{wxNode} description. The user will probably only wish to use the
- \hy-8{883}{wxNode::Data} function to retrieve the data; the node may also be deleted.
-
- \hy-10{885}{wxHashTable::Put}
-
- \hy-8{886}{void Put(long key, wxObject *object)}
-
- \hy-8{887}{void Put(char * key, wxObject *object)}
-
- Inserts data into the hash table, using an integer or string key (depending on which
- has table constructor was used). Note that only the pointer to the string key
- is stored, so it should not be deallocated by the calling program.
-
- \hy-10{896}{wxHelpInstance::wxHelpInstance}
-
- \hy-8{897}{void wxHelpInstance(void)}
-
- Constructs a help instance object, but does not invoke wxHelp.
-
- \hy-10{899}{wxHelpInstance::~wxHelpInstance}
-
- Destroys the help instance, closing down wxHelp for this application
- if it is running.
-
- \hy-10{901}{wxHelpInstance::Initialize}
-
- \hy-8{902}{void Initialize(char *file, 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.
-
- \hy-10{904}{wxHelpInstance::DisplayBlock}
-
- \hy-8{905}{Bool DisplayBlock(long blockNo)}
-
- If wxHelp is not running, runs wxHelp and displays the file at the given block number.
-
- \hy-10{907}{wxHelpInstance::DisplayContents}
-
- \hy-8{908}{Bool DisplayContents(void)}
-
- If wxHelp is not running, runs wxHelp and displays the contents (the first section
- of the file).
-
- \hy-10{910}{wxHelpInstance::DisplaySection}
-
- \hy-8{911}{Bool DisplaySection(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.
-
- \hy-10{913}{wxHelpInstance::KeywordSearch}
-
- \hy-8{914}{Bool KeywordSearch(char *keyWord)}
-
- If wxHelp is not running, runs wxHelp, 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.
-
- \hy-10{916}{wxHelpInstance::LoadFile}
-
- \hy-8{917}{Bool LoadFile(char *file = NULL)}
-
- If wxHelp is not running, runs wxHelp, and loads the given file. If the filename is
- not supplied or is NULL, the file specified in \hy-8{918}{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.
-
- \hy-10{920}{wxHelpInstance::OnQuit}
-
- \hy-8{921}{Bool OnQuit(void)}
-
- Overridable member called when this application's wxHelp is quit.
-
- \hy-10{923}{wxHelpInstance::Quit}
-
- \hy-8{924}{Bool Quit(void)}
-
- If wxHelp is running, quits wxHelp by disconnecting.
-
- \hy-10{928}{wxItem::Centre}
-
- \hy-8{929}{void Centre(int direction = wxHORIZONTAL)}
-
- Centres the frame on the panel or dialog box. The parameter may be
- wxHORIZONTAL, wxVERTICAL or wxBOTH.
-
- You may still use \hy-8{930}{Fit} in conjunction with this call, but call \hy-8{931}{Fit}
- first before centring items.
-
- \hy-10{933}{wxItem::SetDefault}
-
- \hy-8{934}{void SetDefault(void)}
-
- This sets the window to be the default item for the panel or dialog
- box. Under XView, the default item is highlighted, and pressing the
- return key executes the callback for the item (but with no visual
- feedback, and only if a text item does not have the focus).
-
- Under Windows 3, only dialog box buttons respond to this function. As
- normal under Windows 3, pressing return causes the default button to
- be depressed when the return key is pressed. See also \hy-8{935}{wxWindow::SetFocus}
- which sets the keyboard focus for windows and text panel items.
-
- \hy-10{937}{wxItem::SetLabel}
-
- \hy-8{938}{void wxItem(char *label)}
-
- Sets the item's label. A copy of the label is taken.
-
- \hy-10{940}{wxItem::GetLabel}
-
- \hy-8{941}{char * wxItem(void)}
-
- Gets a temporary pointer to the item's label.
-
- \hy-10{951}{wxList::wxList}
-
- \hy-8{952}{void wxList(void)}
-
- \hy-8{953}{void wxList(unsigned int key_type)}
-
- \hy-8{954}{void wxList(int n, wxObject *objects[])}
-
- \hy-8{955}{void wxList(wxObject *object, ...)}
-
- Constructors. \hy-7{956}{key_type} is one of wxKEY_NONE, wxKEY_INTEGER, or wxKEY_STRING,
- and indicates what sort of keying is required (if any).
-
- \hy-7{957}{objects} is an array of \hy-7{958}{n} objects with which to initialize the list.
-
- The variable-length argument list constructor must be supplied with a
- terminating NULL.
-
- \hy-10{960}{wxList::~wxList}
-
- \hy-8{961}{void ~wxList(void)}
-
- Destroys list. Also destroys any remaining nodes, but does not destroy
- client data held in the nodes.
-
- \hy-10{963}{wxList::Append}
-
- \hy-8{964}{wxNode * Append(wxObject *object)}
-
- \hy-8{965}{wxNode * Append(long key, wxObject *object)}
-
- \hy-8{966}{wxNode * Append(char *key, wxObject *object)}
-
- Appends a new \hy-8{967}{wxNode} to the end of the list and puts a pointer to the
- \hy-7{968}{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.
-
- \hy-10{970}{wxList::Clear}
-
- \hy-8{971}{void Clear(void)}
-
- Clears the list (but does not delete the client data stored with each node).
-
- \hy-10{973}{wxList::DeleteContents}
-
- \hy-8{974}{void DeleteContents(Bool destroy)}
-
- If \hy-7{975}{destroy} is TRUE, instructs the list to call \hy-7{976}{delete} on the client contents of
- a node whenever the node is destroyed. The default is FALSE.
-
- \hy-10{978}{wxList::DeleteNode}
-
- \hy-8{979}{Bool DeleteNode(wxNode *node)}
-
- Deletes the given node from the list, returning TRUE if successful.
-
- \hy-10{981}{wxList::DeleteObject}
-
- \hy-8{982}{Bool DeleteObject(wxObject *object)}
-
- Finds the given client \hy-7{983}{object} and deletes the appropriate node from the list, returning
- TRUE if successful. The application must delete the actual object separately.
-
- \hy-10{985}{wxList::Find}
-
- \hy-8{986}{wxNode * Find(long key)}
-
- \hy-8{987}{wxNode * Find(char *key)}
-
- Returns the node whose stored key matches \hy-7{988}{key}. Use on a keyed list only.
-
- \hy-10{990}{wxList::First}
-
- \hy-8{991}{wxNode * First(void)}
-
- Returns the first node in the list (NULL if the list is empty).
-
- \hy-10{993}{wxList::Insert}
-
- \hy-8{994}{wxNode * Insert(wxObject *object)}
-
- Insert object at front of list.
-
- \hy-8{995}{wxNode * Insert(wxNode *position, wxObject *object)}
-
- Insert object before \hy-7{996}{position}.
-
-
- \hy-10{998}{wxList::Last}
-
- \hy-8{999}{wxNode * Last(void)}
-
- Returns the last node in the list (NULL if the list is empty).
-
- \hy-10{1001}{wxList::Member}
-
- \hy-8{1002}{Bool Member(wxObject *object)}
-
- Returns TRUE if the client data \hy-7{1003}{object} is in the list.
-
- \hy-10{1005}{wxList::Nth}
-
- \hy-8{1006}{wxNode * Nth(int n)}
-
- Returns the \hy-7{1007}{nth} node in the list, indexing from zero (NULL if the list is empty
- or the nth node could not be found).
-
- \hy-10{1009}{wxList::Number}
-
- \hy-8{1010}{int Number(void)}
-
- Returns the number of elements in the list.
-
- \hy-10{1014}{wxListBox::wxListBox}
-
- \hy-8{1015}{void wxListBox(wxPanel *parent, wxFunction func,
- char *label,
- Bool multiple_selection = FALSE, int x = -1, int y = -1,
- int width = -1, int height = -1, int n, char *choices[])}
-
- Constructor, creating and showing a list box. If \hy-7{1016}{width} or \hy-7{1017}{
- height} are omitted (or are less than zero), an appropriate size will be
- used for the list box. \hy-7{1018}{func} may be NULL; otherwise it is used as
- the callback for the list box. Note that the cast (wxFunction) must be
- used when passing your callback function name, or the compiler may
- complain that the function does not match the constructor declaration.
-
- \hy-7{1019}{n} is the number of possible choices, and \hy-7{1020}{choices} is an array of strings
- of size \hy-7{1021}{n}. wxWindows allocates its own memory for these strings so the
- calling program must deallocate the array itself.
-
- \hy-7{1022}{multiple_selection} is TRUE for a multiple selection list box, FALSE for
- a single selection list box.
-
- \hy-10{1024}{wxListBox::~wxListBox}
-
- \hy-8{1025}{void ~wxListBox(void)}
-
- Destructor, destroying the list box.
-
- \hy-10{1027}{wxListBox::Append}
-
- \hy-8{1028}{void Append(char * item)}
-
- Adds the item to the end of the list box. \hy-7{1029}{item} must be deallocated by the calling
- program, i.e. wxWindows makes its own copy.
-
- \hy-8{1030}{void Append(char * item, char *client_data)}
-
- Adds the item to the end of the list box, associating the given data
- with the item. \hy-7{1031}{item} must be deallocated by the calling program.
-
- \hy-10{1033}{wxListBox::Clear}
-
- \hy-8{1034}{void Clear(void)}
-
- Clears all strings from the list box.
-
- \hy-10{1036}{wxListBox::Clientdata}
-
- \hy-8{1037}{char * Clientdata(int n)}
-
- Returns a pointer to the client data associated with the given item (if any).
-
- \hy-10{1039}{wxListBox::Deselect}
-
- \hy-8{1040}{void Deselect(int n)}
-
- Deselects the given item in the list box.
-
- \hy-10{1042}{wxListBox::FindString}
-
- \hy-8{1043}{int FindString(int char *s)}
-
- Finds a choice matching the given string, returning the position if found, or
- -1 if not found.
-
- \hy-10{1045}{wxListBox::GetSelection}
-
- \hy-8{1046}{int GetSelection(void)}
-
- Gets the id (position) of the selected string - for single selection list boxes only.
-
- \hy-10{1048}{wxListBox::GetSelections}
-
- \hy-8{1049}{int GetSelections(int **selections)}
-
- Gets an array containing the positions of the selected strings. The number of selections
- is returned. Pass a pointer to an integer array, and do not deallocate the returned array.
-
- \hy-10{1051}{wxListBox::GetStringSelection}
-
- \hy-8{1052}{char * 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.
-
- \hy-10{1054}{wxListBox::Set}
-
- \hy-8{1055}{void Set(int n, char *choices[])}
-
- Clears the list box and adds the given strings. Deallocate the array from the calling program
- after this function has been called.
-
- \hy-10{1057}{wxListBox::SetSelection}
-
- \hy-8{1058}{void SetSelection(int n)}
-
- Sets the choice by passing the desired string position.
-
- \hy-10{1060}{wxListBox::SetStringSelection}
-
- \hy-8{1061}{void SetStringSelection(char * s)}
-
- Sets the choice by passing the desired string.
-
- \hy-10{1063}{wxListBox::String}
-
- \hy-8{1064}{char * String(int n)}
-
- Returns a temporary pointer to the string at position \hy-7{1065}{n}.
-
- \hy-10{1069}{wxMenu::wxMenu}
-
- \hy-8{1070}{void wxMenu(char *title = NULL, wxFunction func = NULL)}
-
- Both arguments are presently ignored.
-
- \hy-10{1072}{wxMenu::~wxMenu}
-
- \hy-8{1073}{void ~wxMenu(void)}
-
- Destructor, destroying the menu.
-
- \hy-10{1075}{wxMenu::Append}
-
- \hy-8{1076}{void Append(int id, char * item)}
-
- \hy-8{1077}{void Append(int id, char * item, wxMenu *submenu)}
-
- Adds the item to the end of the menu. \hy-7{1078}{item} must be deallocated by the calling
- program. If the second form is used, the given menu will be a pullright submenu (must be
- created already). Do not use \hy-7{1079}{submenu} after this call: it will be deallocated by
- wxWindows.
-
- \hy-10{1081}{wxMenu::AppendSeparator}
-
- \hy-8{1082}{void AppendSeparator(void)}
-
- Adds a separator to the end of the menu. Works in Windows 3 but has no
- effect in XView.
-
- \hy-10{1084}{wxMenu::Enable}
-
- \hy-8{1085}{void Enable(int id, Bool flag)}
-
- If \hy-7{1086}{flag} is TRUE, enables the given menu item, else disables it
- (greys it).
-
- \hy-10{1088}{wxMenu::Check}
-
- \hy-8{1089}{void Check(int id, Bool flag)}
-
- If \hy-7{1090}{flag} is TRUE, checks the given menu item, else unchecks it.
- Works in Windows 3 but has no effect in XView.
-
- \hy-10{1095}{wxMenuBar::wxMenuBar}
-
- \hy-8{1096}{void wxMenuBar(void)}
-
- \hy-8{1097}{void wxMenuBar(int n, wxMenu *menus[], char *titles[])}
-
- Construct a menu bar. In the second form, the calling program must have
- created an array of menus and an array of titles. Do not use the
- submenus again after this call.
-
- \hy-10{1099}{wxMenuBar::~wxMenuBar}
-
- \hy-8{1100}{void ~wxMenuBar(void)}
-
- Destructor, destroying the menu bar and removing it from the parent frame (if any).
-
- \hy-10{1102}{wxMenuBar::Append}
-
- \hy-8{1103}{void Append(wxMenu *menu, char *title)}
-
- Adds the item to the end of the menu bar. Do not use \hy-7{1104}{menu} after
- this call: it will be deallocated by wxWindows.
-
- \hy-10{1106}{wxMenuBar::Enable}
-
- \hy-8{1107}{void Enable(int id, Bool flag)}
-
- If \hy-7{1108}{flag} is TRUE, enables the given menu item, else disables it
- (greys it). Only use this when the menu bar has been associated with a
- frame; otherwise, use the wxMenu equivalent call.
-
- \hy-10{1110}{wxMenuBar::Check}
-
- \hy-8{1111}{void Check(int id, Bool flag)}
-
- If \hy-7{1112}{flag} is TRUE, checks the given menu item, else unchecks it.
- Works in Windows but has no effect in XView. Only use this when the menu
- bar has been associated with a frame; otherwise, use the wxMenu
- equivalent call.
-
- \hy-10{1116}{wxMessage::wxMessage}
-
- \hy-8{1117}{void wxMessage(wxPanel *panel, char *message, int x = -1, int y = -1)}
-
- Creates and displays the message at the given coordinate.
-
- \hy-10{1119}{wxMessage::~wxMessage}
-
- \hy-8{1120}{void ~wxMessage(void)}
-
- Destroys the message.
-
- \hy-10{1124}{wxMetaFile::wxMetaFile}
-
- \hy-8{1125}{void wxMetaFile(void)}
-
- Constructor.
-
- \hy-10{1127}{wxMetaFile::~wxMetaFile}
-
- \hy-8{1128}{void ~wxMetaFile(void)}
-
- Destructor.
-
- \hy-10{1130}{wxMetaFile::SetClipboard}
-
- \hy-8{1131}{Bool SetClipboard(int width = 0,
- int height = 0)}
-
- Passes the metafile data to the clipboard. The metafile can no longer be
- used for anything, but the wxMetaFile object must still be destroyed by
- the application.
-
- \hy-10{1137}{wxMetaFileDC::wxMetaFileDC}
-
- \hy-8{1138}{void wxMetaFileDC(char *filename = NULL)}
-
- Constructor. If no filename is passed, the metafile is created
- in memory.
-
- \hy-10{1140}{wxMetaFileDC::~wxMetaFileDC}
-
- \hy-8{1141}{void ~wxMetaFileDC(void)}
-
- Destructor.
-
- \hy-10{1143}{wxMetaFileDC::Close}
-
- \hy-8{1144}{wxMetaFile * Close(void)}
-
- This must be called after the device context is finished with. A
- metafile is returned, and ownership of it passes to the calling
- application (so it should be destroyed explicitly).
-
- \hy-10{1152}{wxNode::Data}
-
- \hy-8{1153}{wxObject * Data(void)}
-
- Retrieves the client data pointer associated with the node. This will
- have to be cast to the correct type.
-
- \hy-10{1155}{wxNode::Next}
-
- \hy-8{1156}{wxNode * Next(void)}
-
- Retrieves the next node (NULL if at end of list).
-
- \hy-10{1158}{wxNode::Previous}
-
- \hy-8{1159}{wxNode * Previous(void)}
-
- Retrieves the previous node (NULL if at start of list).
-
- \hy-10{1161}{wxNode::SetData}
-
- \hy-8{1162}{void SetData(void)}
-
- Sets the data associated with the node (usually the pointer will have been
- set when the node was created).
-
- \hy-10{1170}{wxPanel::wxPanel}
-
- \hy-8{1171}{void wxPanel(wxFrame *parent, int x = -1, int y = -1, int width = -1, int height = -1,
- int style = 0)}
-
- Constructor. Set style to wxBORDER to draw a thin border in Windows 3.
-
- \hy-10{1173}{wxPanel::~wxPanel}
-
- \hy-8{1174}{void ~wxPanel(void)}
-
- Destructor. Deletes any panel items before deleting the physical window.
-
- \hy-10{1176}{wxPanel::GetCursor}
-
- \hy-8{1177}{void GetCursor(int *x, int *y)}
-
- Gets the current panel `cursor' position, i.e. where the next panel item
- will be placed.
-
- \hy-10{1179}{wxPanel::GetHorizontalSpacing}
-
- \hy-8{1180}{int GetHorizontalSpacing(void)}
-
- Gets the horizontal spacing for placing items on a panel.
-
- \hy-10{1182}{wxPanel::GetVerticalSpacing}
-
- \hy-8{1183}{int GetVerticalSpacing(void)}
-
- Gets the vertical spacing for placing items on a panel.
-
- \hy-10{1185}{wxPanel::NewLine}
-
- \hy-8{1186}{void NewLine(void)}
-
- Cause the next item to be positioned at the beginning of the next line,
- using the current vertical spacing. More than one new line in succession
- causes extra vertical spacing to be inserted.
-
- \hy-10{1188}{wxPanel::SetHorizontalSpacing}
-
- \hy-8{1189}{void SetHorizontalSpacing(int sp)}
-
- Sets the horizontal spacing for placing items on a panel.
-
- \hy-10{1191}{wxPanel::SetLabelPosition}
-
- \hy-8{1192}{void SetLabelPosition(int position)}
-
- Determines the current method of placing labels on panel items: if \hy-7{1193}{
- position} is wxHORIZONTAL, labels are placed to the left of the
- item value. If \hy-7{1194}{position} is wxVERTICAL, the label is placed
- above the item value. The default behaviour is to have horizontal label
- placing.
-
- Under Windows 3, this function words for \hy-8{1195}{wxText}, \hy-8{1196}{wxChoice}
- and \hy-8{1197}{wxListBox}. Under XView, absolute positioning must be used
- for the wxVERTICAL position to work in some cases. This is because of
- some strange behaviour in XView where setting a horizontal layout
- orientation but a vertical label position causes items after list box
- to appear too low on the panel. So, where it is necessary to have
- vertical labels, use absolute positioning where results are not as
- expected.
-
- \hy-10{1199}{wxPanel::SetVerticalSpacing}
-
- \hy-8{1200}{void SetVerticalSpacing(int sp)}
-
- Sets the vertical spacing for placing items on a panel.
-
- \hy-10{1202}{wxPanel::Tab}
-
- \hy-8{1203}{void Tab(int pixels)}
-
- Tabs by the given number of pixels.
-
- \hy-10{1208}{wxPathList::wxPathList}
-
- \hy-8{1209}{void wxPathList(void)}
-
- Constructor.
-
- \hy-10{1211}{wxPathList::AddEnvList}
-
- \hy-8{1212}{void AddEnvList(char *env_variable)}
-
- Finds the value of the given environment variable, and adds all paths
- to the path list. Useful for finding files in the PATH variable, for
- example.
-
- \hy-10{1214}{wxPathList::AddPath}
-
- \hy-8{1215}{void AddPath(char *path)}
-
- Adds the given directory to the path list.
-
- \hy-10{1217}{wxPathList::FindValidPath}
-
- \hy-8{1218}{char * FindValidPath(char *file)}
-
- Searches for a full path for an existing file by appending \hy-7{1219}{file} to
- successive members of the path list. If the file exists, a temporary
- pointer to the full path is returned.
-
- \hy-10{1221}{wxPathList::Member}
-
- \hy-8{1222}{Bool Member(char *file)}
-
- TRUE if the path is in the path list (ignoring case).
-
- \hy-10{1231}{wxPen::wxPen}
-
- \hy-8{1232}{void wxPen(void)}
-
- \hy-8{1233}{void wxPen(wxColour &colour, int style)}
-
- \hy-8{1234}{void wxPen(char *colour_name, int style)}
-
- Constructs a pen, uninitialized, initialized with a width, initialized
- with an RGB colour, a width and a style, or initialized using a colour
- name, a width and a style. If the named colour form is used, an appropriate \hy-8{1235}{
- wxColour} structure is found in the colour database.
-
- \hy-10{1237}{wxPen::~wxPen}
-
- \hy-8{1238}{void ~wxPen(void)}
-
- Destructor, destroying the pen. Note that pens should very rarely be deleted
- since windows may contain pointers to them. All pens will be deleted when the
- application terminates.
-
- \hy-10{1240}{wxPen::GetColour}
-
- \hy-8{1241}{wxColour& GetColour(void)}
-
- Returns a reference to the pen colour.
-
- \hy-10{1243}{wxPen::GetStyle}
-
- \hy-8{1244}{int GetStyle(void)}
-
- Returns the pen style.
-
- \hy-10{1246}{wxPen::GetWidth}
-
- \hy-8{1247}{int GetWidth(void)}
-
- Returns the pen width.
-
- \hy-10{1249}{wxPen::SetColour}
-
- \hy-8{1250}{void SetColour(wxColour &colour)}
-
- \hy-8{1251}{void SetColour(char *colour_name)}
-
- \hy-8{1252}{void SetColour(int red, int green, int blue)}
-
- The pen's colour is changed to the given colour.
-
- \hy-10{1254}{wxPen::SetStyle}
-
- \hy-8{1255}{void SetStyle(int style)}
-
- Set the pen style (wxSOLID or wxTRANSPARENT).
-
- \hy-10{1257}{wxPen::SetWidth}
-
- \hy-8{1258}{void SetWidth(int width)}
-
- Set the pen width.
- \hy-10{1263}{wxPenList::wxPenList}
-
- \hy-8{1264}{void wxPenList(void)}
-
- Constructor. The application should not construct its own pen list:
- use the object pointer \hy-8{1265}{wxThePenList}.
-
- \hy-10{1267}{wxPenList::AddPen}
-
- \hy-8{1268}{void AddPen(wxPen *pen)}
-
- Used by wxWindows to add a pen to the list, called in the pen constructor.
-
- \hy-10{1270}{wxPenList::FindOrCreatePen}
-
- \hy-8{1271}{wxPen * FindOrCreatePen(wxColour *colour, int width, int style)}
-
- \hy-8{1272}{wxPen * FindOrCreatePen(char *colour_name, int width, int style)}
-
- Finds a pen of the given specification, or creates one and adds it to the list.
-
- \hy-10{1274}{wxPenList::RemovePen}
-
- \hy-8{1275}{void RemovePen(wxPen *pen)}
-
- Used by wxWindows to remove a pen from the list.
-
- \hy-10{1282}{wxPoint::wxPoint}
-
- \hy-8{1283}{void wxPoint(void)}
-
- \hy-8{1284}{void wxPoint(float x, float y)}
-
- Create a point.
-
- \hy-8{1285}{float x}
-
- \hy-8{1286}{float y}
-
- Members of the \hy-8{1287}{wxPoint} object.
-
-
- \hy-10{1292}{wxServer::wxServer}
-
- \hy-8{1293}{void wxServer(void)}
-
- Constructs a server object.
-
- \hy-10{1295}{wxServer::Create}
-
- \hy-8{1296}{Bool Create(char *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).
-
- \hy-10{1298}{wxServer::OnAcceptConnection}
-
- \hy-8{1299}{wxConnection * OnAcceptConnection(char *topic)}
-
- When a client calls \hy-8{1300}{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 wxConnection 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.
-
-
- \hy-10{1304}{wxSlider::wxSlider}
-
- A slider is, as its name suggests, an item with a handle which can be pulled
- back and forth to change a value. It is currently horizontal only. In Windows 3,
- a scrollbar is used to simulate the slider.
-
- \hy-8{1305}{void wxSlider(wxPanel *parent, wxFunction func, char *label,
- int value, int min_value, int max_value, int width, int x = -1, int y = -1)}
-
- Constructor, creating and showing a horizontal slider. The \hy-7{1306}{width} is in pixels,
- and the scroll increment will be adjusted to a suitable value given the minimum and
- maximum integer values.
-
- \hy-10{1308}{wxSlider::~wxSlider}
-
- \hy-8{1309}{void ~wxSlider(void)}
-
- Destructor, destroying the slider.
-
- \hy-10{1311}{wxSlider::GetValue}
-
- \hy-8{1312}{int GetValue(void)}
-
- Gets the current slider value.
-
- \hy-10{1314}{wxSlider::SetValue}
-
- \hy-8{1315}{void SetValue(int value)}
-
- Sets the value (and displayed position) of the slider).
-
-
- \hy-10{1320}{wxStringList::wxStringList}
-
- \hy-8{1321}{void wxStringList(void)}
-
- Constructor.
-
- \hy-8{1322}{void wxStringList(char *first, ...)}
-
- Constructor, taking NULL-terminated string argument list. wxStringList
- allocates memory for the strings.
-
- \hy-10{1324}{wxStringList::~wxStringList}
-
- \hy-8{1325}{void ~wxStringList(void)}
-
- Deletes string list, deallocating strings.
-
- \hy-10{1327}{wxStringList::Add}
-
- \hy-8{1328}{void Add(char *s)}
-
- Adds string to list, allocating memory.
-
- \hy-10{1330}{wxStringList::Delete}
-
- \hy-8{1331}{void Delete(char *s)}
-
- Searches for string and deletes from list, deallocating memory.
-
- \hy-10{1333}{wxStringList::ListToArray}
-
- \hy-8{1334}{char ** ListToArray(Bool new_copies = FALSE)}
-
- Converts the list to an array of strings, only allocating new memory if
- \hy-8{1335}{new_copies} is TRUE.
-
- \hy-10{1337}{wxStringList::Member}
-
- \hy-8{1338}{Bool Member(char *s)}
-
- Returns TRUE if \hy-8{1339}{s} is a member of the list (tested using \hy-8{1340}{strcmp}).
-
- \hy-10{1342}{wxStringList::Sort}
-
- \hy-8{1343}{void Sort(void)}
-
- Sorts the strings in ascending alphabetical order. Note that all nodes
- (but not strings) get deallocated and new ones allocated.
-
- \hy-10{1347}{wxText::wxText}
-
- A text item is an area of editable text, with an optional label
- displayed in front of it.
-
- \hy-8{1348}{void wxText(wxPanel *parent, wxFunction func, char *label,
- char *value = "", int x = -1, int y = -1, int width = -1, int height = -1)}
-
- Constructor, creating and showing a text item with the given string
- value. If \hy-7{1349}{width} or \hy-7{1350}{height} are omitted (or are less than
- zero), an appropriate size will be used for the item. \hy-7{1351}{func}
- may be NULL; otherwise it is used as the callback for the list box.
- Note that the cast (wxFunction) must be used when passing your callback
- function name, or the compiler may complain that the function does not
- match the constructor declaration.
-
- \hy-10{1353}{wxText::~wxText}
-
- \hy-8{1354}{void ~wxText(void)}
-
- Destructor, destroying the text item.
-
- \hy-10{1356}{wxText::GetValue}
-
- \hy-8{1357}{char * GetValue(void)}
-
- Gets a temporary pointer to the current value.
-
- \hy-10{1359}{wxText::SetValue}
-
- \hy-8{1360}{void SetValue(char * value)}
-
- Sets the text. \hy-7{1361}{value} must be deallocated by the calling program.
-
-
- \hy-10{1365}{wxTextWindow::wxTextWindow}
-
- \hy-8{1366}{void wxTextWindow(wxFrame *parent, int x = -1, int y = -1,
- int width = -1, int height = -1, int style = 0)}
-
- Constructor. Set style to wxBORDER to draw a thin border in Windows 3.
-
- \hy-10{1368}{wxTextWindow::~wxTextWindow}
-
- \hy-8{1369}{void ~wxTextWindow(void)}
-
- Destructor. Deletes any stored text before deleting the physical window.
-
- \hy-10{1371}{wxTextWindow::Clear}
-
- \hy-8{1372}{void Clear(void)}
-
- Clears the window and deletes the stored text.
-
- \hy-10{1374}{wxTextWindow::DiscardEdits}
-
- \hy-8{1375}{void DiscardEdits(void)}
-
- Clears the window and deletes the stored text (same as \hy-8{1376}{Clear}).
-
- \hy-10{1378}{wxTextWindow::LoadFile}
-
- \hy-8{1379}{Bool LoadFile(char * file)}
-
- Loads and displays the named file, if it exists. Success is indicated by a return
- value of TRUE.
-
- \hy-10{1381}{wxTextWindow::Modified}
-
- \hy-8{1382}{Bool Modified(void)}
-
- Returns TRUE if the text has been modified. Under Windows 3, this always returns
- FALSE.
-
- \hy-10{1384}{wxTextWindow::SaveFile}
-
- \hy-8{1385}{Bool SaveFile(char * file)}
-
- Saves the text in the named file. Success is indicated by a return
- value of TRUE.
-
- \hy-10{1387}{wxTextWindow::WriteText}
-
- \hy-8{1388}{void WriteText(char * text)}
-
- Writes the text into the text window. Presently there is no means of writing
- text to other than the end of the existing text. Newlines in the text string
- are the only control characters allowed, and they will cause appropriate
- line breaks. See the << operators for more convenient ways of writing to the
- window.
-
- \hy-10{1390}{wxTextWindow::<<}
-
- \hy-8{1391}{wxTextWindow& <<(char *s)}
-
- \hy-8{1392}{wxTextWindow& <<(int i)}
-
- \hy-8{1393}{wxTextWindow& <<(long i)}
-
- \hy-8{1394}{wxTextWindow& <<(float f)}
-
- \hy-8{1395}{wxTextWindow& <<(double d)}
-
- \hy-8{1396}{wxTextWindow& <<(char c)}
-
- Operator definitions for writing to a text window, for example:
-
- \hy-14{1397}{ wxTextWindow wnd(my_frame);
-
- wnd << "Welcome to text window number " << 1 << ".\n";
- }
- \hy-10{1404}{wxTimer::wxTimer}
-
- \hy-8{1405}{void wxTimer(void)}
-
- Constructor.
-
- \hy-10{1407}{wxTimer::~wxTimer}
-
- \hy-8{1408}{void ~wxTimer(void)}
-
- Destructor. Stops the timer if activated.
-
- \hy-10{1410}{wxTimer::Notify}
-
- \hy-8{1411}{void Notify(void)}
-
- This member should be overridden by the user. It is called on timeout.
-
- \hy-10{1413}{wxTimer::Start}
-
- \hy-8{1414}{Bool Start(int milliseconds = -1)}
-
- (Re)starts the timer. If \hy-7{1415}{milliseconds} is absent or -1, the
- previous value is used. Returns FALSE if the timer could not be started,
- TRUE otherwise (in Windows 3 timers are a limited resource).
-
- \hy-10{1417}{wxTimer::Stop}
-
- \hy-8{1418}{void Stop(void)}
-
- Stops the timer.
-
- \hy-10{1422}{wxWindow::wxWindow}
-
- \hy-8{1423}{void wxWindow(void)}
-
- Constructor.
-
- \hy-10{1425}{wxWindow::~wxWindow}
-
- \hy-8{1426}{void ~wxWindow(void)}
-
- Destructor. Deletes all subwindows, then deletes itself.
-
- \hy-10{1428}{wxWindow::AddChild}
-
- \hy-8{1429}{void AddChild(wxWindow *child)}
-
- Adds a child window. This is called automatically by window creation
- functions so should not be required by the application programmer.
-
- \hy-10{1431}{wxWindow::Center}
-
- \hy-8{1432}{void Center(int direction)}
-
- See \hy-8{1433}{Centre}.
-
- \hy-10{1435}{wxWindow::Centre}
-
- \hy-8{1436}{void Centre(int direction)}
-
- Centres the window. The parameter may be wxHORIZONTAL, wxVERTICAL
- or wxBOTH.
-
- The actual behaviour depends on the derived window. For a frame or dialog box,
- centring is relative to the whole display. For a panel item, centring is
- relative to the panel.
-
- \hy-10{1438}{wxWindow::DestroyChildren}
-
- \hy-8{1439}{void DestroyChildren(void)}
-
- Destroys all children of a window. Called automatically by the destructor.
-
- \hy-10{1441}{wxWindow::Fit}
-
- \hy-8{1442}{void Fit(void)}
-
- Sizes the window to fit the content (for panels and frames).
-
- \hy-10{1444}{wxWindow::GetClientData}
-
- \hy-8{1445}{char * GetClientData(void)}
-
- Gets user-supplied client data. Normally, any extra data the programmer wishes
- to associate with the window should be made available by deriving a new class
- with new data members.
-
- \hy-10{1447}{wxWindow::GetClientSize}
-
- \hy-8{1448}{void GetClientSize(int *width, int *height)}
-
- This gets the size of the window `client area' in pixels. The client area is the
- area which may be drawn on by the programmer, excluding title bar, border etc.
-
- \hy-10{1450}{wxWindow::GetHandle}
-
- \hy-8{1451}{char * GetHandle(void)}
-
- Gets the platform-specific handle of the physical window.
-
- \hy-10{1453}{wxWindow::GetPosition}
-
- \hy-8{1454}{void GetPosition(int *x, int *y)}
-
- This gets the position of the window in pixels, relative to the parent window or
- if no parent, relative to the whole display.
-
- \hy-10{1456}{wxWindow::GetSize}
-
- \hy-8{1457}{void GetSize(int *width, int *height)}
-
- This gets the size of the entire window in pixels.
-
- \hy-10{1459}{wxWindow::GetTextExtent}
-
- \hy-8{1460}{void GetTextExtent(char *string, int *x, int *y)}
-
- Gets the width and height of the string as it would be drawn on the window with the
- currently selected font.
-
- \hy-10{1462}{wxWindow::OnActivate}
-
- \hy-8{1463}{void OnActivate(Bool active)}
-
- Called when a window is activated or deactivated (Windows 3
- only). If the window is being activated, \hy-7{1464}{active} is TRUE, else it
- is FALSE.
-
- \hy-10{1466}{wxWindow::OnChar}
-
- \hy-8{1467}{void OnChar(int ch)}
-
- Sent to the window when the user has pressed a key. \hy-7{1468}{ch} gives the
- ASCII code (function key identifiers not yet implemented). See
- \hy-8{1469}{OnEvent} for mouse event notification. Currently applicable
- to canvas subwindows only.
-
- \hy-10{1471}{wxWindow::OnClose}
-
- \hy-8{1472}{Bool OnClose(void)}
-
- Sent to the window when the user has tried to close the window. If TRUE is returned,
- the window will be deleted by the system, otherwise the attempt will be ignored.
- Derive your own class to handle this message; the default handler returns TRUE.
- Really only relevant to wxFrames.
-
- \hy-10{1474}{wxWindow::OnEvent}
-
- \hy-8{1475}{void OnEvent(wxEvent& event)}
-
- Sent to the window when the user has initiated an event with the
- mouse. Derive your own class to handle this message. So far,
- only relevant to the wxCanvas class. See \hy-8{1476}{OnChar} for character
- events, and also \hy-8{1477}{wxEvent} for how to access event information.
-
- \hy-10{1479}{wxWindow::OnKillFocus}
-
- \hy-8{1480}{void OnKillFocus(void)}
-
- Called when a window's focus is being killed.
-
- \hy-10{1482}{wxWindow::OnPaint}
-
- \hy-8{1483}{void OnPaint(void)}
-
- Sent to the window when the window must be refreshed.
- Derive your own class to handle this message. So far, only
- relevant to the wxCanvas class.
-
- \hy-10{1485}{wxWindow::OnSetFocus}
-
- \hy-8{1486}{void OnSetFocus(void)}
-
- Called when a window's focus is being set.
-
- \hy-10{1488}{wxWindow::OnSize}
-
- \hy-8{1489}{void OnSize(int x, int y)}
-
- Sent to the window when the window has been resized. You may wish to use
- this for frames to resize their child windows as appropriate. Derive
- your own class to handle this message. Note that the size passed is of
- the whole window: call \hy-8{1490}{GetClientSize} for the area which may be
- used by the application. A window is sent both an OnPaint and an OnSize message
- when a resize occurs.
-
- \hy-10{1492}{wxWindow::SetFocus}
-
- \hy-8{1493}{void SetFocus(void)}
-
- This sets the window to receive keyboard input. The only panel item that will
- respond to this under XView is the \hy-8{1494}{wxText} item and derived items.
-
- \hy-10{1496}{wxWindow::SetSize}
-
- \hy-8{1497}{void SetSize(int x, int y, int width, int height)}
-
- This sets the size of the entire window in pixels.
-
- \hy-10{1499}{wxWindow::SetClientData}
-
- \hy-8{1500}{void SetClientData(char *data)}
-
- Sets user-supplied client data. Normally, any extra data the programmer wishes
- to associate with the window should be made available by deriving a new class
- with new data members.
-
- \hy-10{1502}{wxWindow::SetClientSize}
-
- \hy-8{1503}{void SetClientSize(int x, int y, int width, int height)}
-
- This sets the size of the window client area in pixels. Using this function to size a window
- tends to be more device-independent than \hy-8{1504}{SetSize}, since the application need not
- worry about what dimensions the border or title bar have when trying to fit the window
- around panel items, for example.
-
- \hy-10{1506}{wxWindow::SetCursor}
-
- \hy-8{1507}{wxCursor * SetCursor(wxCursor *cursor)}
-
- Sets the window's cursor, returning the previous cursor (if any). This
- function applies to all subwindows.
-
- \hy-10{1509}{wxWindow::SetTitle}
-
- \hy-8{1510}{void SetTitle(char *title)}
-
- Sets the window's title, allocating its own string storage. Currently
- applicable only to frames.
-
- \hy-10{1512}{wxWindow::Show}
-
- \hy-8{1513}{void Show(Bool show)}
-
- If \hy-7{1514}{show} is TRUE, displays the window and brings it to the front. Otherwise,
- hides the window.
-
-
-
- \hy-10{1519}{::Dos2UnixFilename}
-
- \hy-8{1520}{void Dos2UnixFilename(char *s)}
-
- Converts a DOS to a UNIX filename by replacing backslashes with forward
- slashes.
-
- \hy-10{1522}{::FileExists}
-
- \hy-8{1523}{Bool FileExists(char *filename)}
-
- Returns TRUE if the file exists.
-
- \hy-10{1525}{::FileNameFromPath}
-
- \hy-8{1526}{char * FileNameFromPath(char *path)}
-
- Returns the filename for a full path (returns a new string).
-
- \hy-10{1528}{::IsAbsolutePath}
-
- \hy-8{1529}{Bool IsAbsolutePath(char *filename)}
-
- Returns TRUE if the argument is an absolute filename, i.e. with a slash
- or drive name at the beginning.
-
- \hy-10{1531}{::PathOnly}
-
- \hy-8{1532}{char * PathOnly(char *path)}
-
- Returns the directory part of the filename (returns a new string).
-
- \hy-10{1534}{::Unix2DosFilename}
-
- \hy-8{1535}{void Unix2DosFilename(char *s)}
-
- Converts a UNIX to a DOS filename by replacing forward
- slashes with backslashes.
-
- \hy-10{1537}{::wxConcatFiles}
-
- \hy-8{1538}{Bool wxConcatFiles(char *file1, char *file2,
- char *file3)}
-
- Concatenates \hy-7{1539}{file1} and \hy-7{1540}{file2} to \hy-7{1541}{file3}, returning
- TRUE if successful.
-
- \hy-10{1543}{::wxCopyFile}
-
- \hy-8{1544}{Bool wxCopyFile(char *file1, char *file2)}
-
- Copies \hy-7{1545}{file1} to \hy-7{1546}{file2}, returning TRUE if successful.
-
- \hy-10{1548}{::wxIsWild}
-
- \hy-8{1549}{Bool wxIsWild(char *pattern)}
-
- Returns TRUE if the pattern contains wildcards. See \hy-8{1550}{wxMatchWild}.
-
- \hy-10{1552}{::wxMatchWild}
-
- \hy-8{1553}{Bool wxMatchWild(char *pattern, char *text, Bool dot_special)}
-
- Returns TRUE if the \hy-7{1554}{pattern} matches the \hy-7{1555}{text}; if \hy-7{1556}{
- dot_special} is TRUE, filenames beginning with a dot are not matched
- with wildcard characters. See \hy-8{1557}{wxIsWild}.
-
- \hy-10{1559}{::wxRemoveFile}
-
- \hy-8{1560}{Bool wxRemoveFile(char *file)}
-
- Removes \hy-7{1561}{file}, returning TRUE if successful.
-
- \hy-10{1563}{::wxRenameFile}
-
- \hy-8{1564}{Bool wxRenameFile(char *file1, char *file2)}
-
- Renames \hy-7{1565}{file1} to \hy-7{1566}{file2}, returning TRUE if successful.
-
- \hy-10{1570}{::copystring}
-
- \hy-8{1571}{char * copystring(char *s)}
-
- Makes a copy of the string \hy-7{1572}{s} using the C++ new operator, so it can be
- deleted with the delete operator.
-
- \hy-10{1576}{::wxGetTextFromUser}
-
- \hy-8{1577}{char * wxGetTextFromUser(char *message, char *caption = "Input text",
- char *default_value = "", wxFrame *parent = NULL, int x = -1, int y = -1)}
-
- Pop up a dialog box with title set to \hy-7{1578}{caption}, message \hy-7{1579}{message}, and a
- \hy-7{1580}{default_value}. The user may type in text and press OK to return this text,
- or press Cancel to return NULL.
-
- \hy-10{1582}{::wxGetSingleChoice}
-
- \hy-8{1583}{char * wxGetSingleChoice(char *message, char *caption, int n, char *choices[],
- wxFrame *parent = NULL, int x = -1, int y = -1)}
-
- Pops up a dialog box containing a message, OK/Cancel buttons and a single-selection
- listbox. The user may choose an item and press OK to return a string or
- Cancel to return NULL.
-
- \hy-7{1584}{choices} is an array of \hy-7{1585}{n} strings for the listbox.
-
- \hy-10{1587}{::wxGetSingleChoiceIndex}
-
- \hy-8{1588}{int wxGetSingleChoiceIndex(char *message, char *caption, int n, char *choices[],
- wxFrame *parent = NULL, int x = -1, int y = -1)}
-
- As \hy-8{1589}{wxGetSingleChoice} but returns the index representing the selected string.
-
- \hy-10{1591}{::wxGetSingleChoiceData}
-
- \hy-8{1592}{char * wxGetSingleChoiceData(char *message, char *caption, int n, char *choices[],
- char *client_data[], wxFrame *parent = NULL, int x = -1, int y = -1)}
-
- As \hy-8{1593}{wxGetSingleChoice} but takes an array of client data pointers
- corresponding to the strings, and returns one of these pointers.
-
- \hy-10{1595}{::wxMessageBox}
-
- \hy-8{1596}{int wxMessageBox(char *message, char *caption = "Message", int type = wxOK,
- wxFrame *parent = NULL, int x = -1, int y = -1)}
-
- General purpose message dialog. \hy-7{1597}{type} may be one or more of the
- following identifiers or'ed together: wxYES_NO, wxCANCEL, wxOK.
-
- The return value is one of: wxYES, wxNO, wxCANCEL, wxOK.
-
- For example:
- \hy-14{1598}{ ...
- int answer = wxMessageBox("Quit program?", "Confirm",
- wxYES_NO | wxCANCEL, main_frame);
- if (answer == wxYES)
- delete main_frame;
- ...
- }
- \hy-7{1599}{message} may contain newline characters, in which case the
- message will be split into separate lines and centred in the dialog
- box, to cater for large messages.
-
- \hy-10{1601}{::wxFileSelector}
-
- \hy-8{1602}{char * wxFileSelector(char *message, char *default_path = NULL,
- char *default_filename = NULL, char *default_extension = NULL,
- char *wildcard = ``*.*'', int flags = 0, wxFrame *parent = NULL,
- int x = -1, int y = -1)}
-
- 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 NULL, the current directory will be used. If filename is NULL,
- 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.
-
- The application must check for a NULL return value (the user pressed
- Cancel). For example:
-
- \hy-14{1603}{char *s = wxFileSelector("Choose a file to open");
- if (s)
- {
- ...
- }
- }
-
- \hy-10{1607}{::wxColourDisplay}
-
- \hy-8{1608}{Bool wxColourDisplay(void)}
-
- Returns TRUE if the display is colour, FALSE otherwise.
-
- \hy-10{1610}{::SetCursor}
-
- \hy-8{1611}{void wxSetCursor(wxCursor *cursor)}
-
- Globally sets the cursor; only works in Windows 3.
-
-
- \hy-10{1615}{::NewId}
-
- \hy-8{1616}{long NewId(void)}
-
- Generates an integer identifier unique to this run of the program.
-
- \hy-10{1618}{::RegisterId}
-
- \hy-8{1619}{void RegisterId(long id)}
-
- Ensures that ids subsequently generated by \hy-8{1620}{NewId} do not clash with
- the given \hy-8{1621}{id}.
-
- \hy-10{1623}{::wxDisplaySize}
-
- \hy-8{1624}{void wxDisplaySize(int *width, int *height)}
-
- Gets the physical size of the display in pixels.
-
- \hy-10{1626}{::wxGetElapsedTime}
-
- \hy-8{1627}{long wxGetElapsedTime(void)}
-
- Gets the time in milliseconds since the last \hy-8{1628}{wxGetElapsedTime} or
- \hy-8{1629}{wxStartTimer}.
-
- \hy-10{1631}{::wxSleep}
-
- \hy-8{1632}{void wxSleep(int secs)}
-
- Under XView, sleeps for the specified number of seconds using the
- technique specified in the XView manual, not UNIX \hy-8{1633}{sleep}.
-
- \hy-10{1635}{::wxStartTimer}
-
- \hy-8{1636}{void wxStartTimer(void)}
-
- Starts a stopwatch; use \hy-8{1637}{wxGetElapsedTime} to get the elapsed time.
-
- \hy-10{1639}{::wxYield}
-
- \hy-8{1640}{void wxYield(void)}
-
- Yields control to other applications (has no effect under XView).
-
- \hy-10{1642}{::wxExecute}
-
- \hy-8{1643}{void wxExecute(char *command)}
- \hyindex{
- "wxWindows Help"
- 101 102
- 114 115
- 117 118
- 120 121
- 123 124
- 126 127
- 130 131
- 133 134
- 136 137
- 139 140
- 147 148
- 153 154
- 156 157
- 159 160
- 162 163
- 167 168
- 170 171
- 173 174
- 177 178
- 180 181
- 184 185
- 187 188
- 189 190
- 195 196
- 198 199
- 201 202
- 204 205
- 207 208
- 210 211
- 213 214
- 216 217
- 219 220
- 225 226
- 231 232
- 234 235
- 237 238
- 240 241
- 244 245
- 247 248
- 253 254
- 257 258
- 260 261
- 263 264
- 266 267
- 270 271
- 273 274
- 276 277
- 279 280
- 282 283
- 286 287
- 290 291
- 294 295
- 300 301
- 302 303
- 308 309
- 311 312
- 314 315
- 317 318
- 319 320
- 328 329
- 331 332
- 335 336
- 338 339
- 341 342
- 344 345
- 347 348
- 350 351
- 353 354
- 357 358
- 360 361
- 363 364
- 367 368
- 372 373
- 375 376
- 380 381
- 383 384
- 386 387
- 390 391
- 393 394
- 396 397
- 399 400
- 402 403
- 405 406
- 411 412
- 415 416
- 420 421
- 426 427
- 429 430
- 432 433
- 435 436
- 438 439
- 443 444
- 446 447
- 449 450
- 453 454
- 457 458
- 461 462
- 465 466
- 471 472
- 477 478
- 480 481
- 484 485
- 493 494
- 496 497
- 501 502
- 504 505
- 508 509
- 511 512
- 514 515
- 517 518
- 520 521
- 523 524
- 526 527
- 532 533
- 538 539
- 541 542
- 544 545
- 547 548
- 551 552
- 554 555
- 557 558
- 560 561
- 565 566
- 568 569
- 571 572
- 574 575
- 580 581
- 583 584
- 586 587
- 589 590
- 592 593
- 595 596
- 601 602
- 604 605
- 608 609
- 612 613
- 615 616
- 618 619
- 621 622
- 624 625
- 628 629
- 631 632
- 634 635
- 637 638
- 642 643
- 645 646
- 648 649
- 651 652
- 655 656
- 658 659
- 661 662
- 664 665
- 668 669
- 671 672
- 674 675
- 677 678
- 680 681
- 686 687
- 689 690
- 692 693
- 695 696
- 697 698
- 701 702
- 704 705
- 707 708
- 718 719
- 721 722
- 724 725
- 727 728
- 730 731
- 733 734
- 736 737
- 739 740
- 743 744
- 747 748
- 750 751
- 753 754
- 756 757
- 788 789
- 791 792
- 795 796
- 798 799
- 801 802
- 804 805
- 807 808
- 810 811
- 813 814
- 817 818
- 821 822
- 824 825
- 827 828
- 830 831
- 833 834
- 837 838
- 842 843
- 845 846
- 848 849
- 853 854
- 856 857
- 862 863
- 865 866
- 869 870
- 873 874
- 876 877
- 884 885
- 888 889
- 895 896
- 898 899
- 900 901
- 903 904
- 906 907
- 909 910
- 912 913
- 915 916
- 919 920
- 922 923
- 925 926
- 927 928
- 932 933
- 936 937
- 939 940
- 942 943
- 950 951
- 959 960
- 962 963
- 969 970
- 972 973
- 977 978
- 980 981
- 984 985
- 989 990
- 992 993
- 997 998
- 1000 1001
- 1004 1005
- 1008 1009
- 1011 1012
- 1013 1014
- 1023 1024
- 1026 1027
- 1032 1033
- 1035 1036
- 1038 1039
- 1041 1042
- 1044 1045
- 1047 1048
- 1050 1051
- 1053 1054
- 1056 1057
- 1059 1060
- 1062 1063
- 1066 1067
- 1068 1069
- 1071 1072
- 1074 1075
- 1080 1081
- 1083 1084
- 1087 1088
- 1091 1092
- 1094 1095
- 1098 1099
- 1101 1102
- 1105 1106
- 1109 1110
- 1113 1114
- 1115 1116
- 1118 1119
- 1121 1122
- 1123 1124
- 1126 1127
- 1129 1130
- 1132 1133
- 1136 1137
- 1139 1140
- 1142 1143
- 1145 1146
- 1148 1149
- 1151 1152
- 1154 1155
- 1157 1158
- 1160 1161
- 1163 1164
- 1165 1166
- 1169 1170
- 1172 1173
- 1175 1176
- 1178 1179
- 1181 1182
- 1184 1185
- 1187 1188
- 1190 1191
- 1198 1199
- 1201 1202
- 1204 1205
- 1207 1208
- 1210 1211
- 1213 1214
- 1216 1217
- 1220 1221
- 1223 1224
- 1230 1231
- 1236 1237
- 1239 1240
- 1242 1243
- 1245 1246
- 1248 1249
- 1253 1254
- 1256 1257
- 1259 1260
- 1262 1263
- 1266 1267
- 1269 1270
- 1273 1274
- 1276 1277
- 1281 1282
- 1288 1289
- 1291 1292
- 1294 1295
- 1297 1298
- 1301 1302
- 1303 1304
- 1307 1308
- 1310 1311
- 1313 1314
- 1316 1317
- 1319 1320
- 1323 1324
- 1326 1327
- 1329 1330
- 1332 1333
- 1336 1337
- 1341 1342
- 1344 1345
- 1346 1347
- 1352 1353
- 1355 1356
- 1358 1359
- 1362 1363
- 1364 1365
- 1367 1368
- 1370 1371
- 1373 1374
- 1377 1378
- 1380 1381
- 1383 1384
- 1386 1387
- 1389 1390
- 1398 1399
- 1403 1404
- 1406 1407
- 1409 1410
- 1412 1413
- 1416 1417
- 1419 1420
- 1421 1422
- 1424 1425
- 1427 1428
- 1430 1431
- 1434 1435
- 1437 1438
- 1440 1441
- 1443 1444
- 1446 1447
- 1449 1450
- 1452 1453
- 1455 1456
- 1458 1459
- 1461 1462
- 1465 1466
- 1470 1471
- 1473 1474
- 1478 1479
- 1481 1482
- 1484 1485
- 1487 1488
- 1491 1492
- 1495 1496
- 1498 1499
- 1501 1502
- 1505 1506
- 1508 1509
- 1511 1512
- 1515 1516
- 1518 1519
- 1521 1522
- 1524 1525
- 1527 1528
- 1530 1531
- 1533 1534
- 1536 1537
- 1542 1543
- 1547 1548
- 1551 1552
- 1558 1559
- 1562 1563
- 1567 1568
- 1569 1570
- 1573 1574
- 1575 1576
- 1581 1582
- 1586 1587
- 1590 1591
- 1594 1595
- 1600 1601
- 1604 1605
- 1606 1607
- 1609 1610
- 1612 1613
- 1614 1615
- 1617 1618
- 1622 1623
- 1625 1626
- 1630 1631
- 1634 1635
- 1638 1639
- 1641 1642
- }
-