]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/doxygen/overviews/roughguide.h
Fix broken and missing DataView interface items for Phoenix
[wxWidgets.git] / docs / doxygen / overviews / roughguide.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: roughguide.h
3// Purpose: topic overview
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10
11@page overview_roughguide A Quick Guide to Writing Applications
12
13@tableofcontents
14
15To set a wxWidgets application going, you will need to derive a wxApp class and
16override wxApp::OnInit.
17
18An application must have a top-level wxFrame or wxDialog window. Each frame may
19contain one or more instances of classes such as wxPanel, wxSplitterWindow or
20other windows and controls.
21
22A frame can have a wxMenuBar, a wxToolBar, a wxStatusBar, and a wxIcon for when
23the frame is iconized.
24
25A wxPanel is used to place controls (classes derived from wxControl) which are
26used for user interaction. Examples of controls are wxButton, wxCheckBox,
27wxChoice, wxListBox, wxRadioBox, and wxSlider.
28
29Instances of wxDialog can also be used for controls and they have the advantage
30of not requiring a separate frame.
31
32Instead of creating a dialog box and populating it with items, it is possible
33to choose one of the convenient common dialog classes, such as wxMessageDialog
34and wxFileDialog.
35
36You never draw directly onto a window - you use a <em>device context</em> (DC).
37wxDC is the base for wxClientDC, wxPaintDC, wxMemoryDC, wxPostScriptDC,
38wxMemoryDC, wxMetafileDC and wxPrinterDC. If your drawing functions have wxDC
39as a parameter, you can pass any of these DCs to the function, and thus use the
40same code to draw to several different devices. You can draw using the member
41functions of wxDC, such as wxDC::DrawLine and wxDC::DrawText. Control colour on
42a window (wxColour) with brushes (wxBrush) and pens (wxPen).
43
44To intercept events, you add a DECLARE_EVENT_TABLE macro to the window class
45declaration, and put a BEGIN_EVENT_TABLE ... END_EVENT_TABLE block in the
46implementation file. Between these macros, you add event macros which map the
47event (such as a mouse click) to a member function. These might override
48predefined event handlers such as for wxKeyEvent and wxMouseEvent.
49
50Most modern applications will have an on-line, hypertext help system; for this,
51you need wxHelp and the wxHelpController class to control wxHelp.
52
53GUI applications aren't all graphical wizardry. List and hash table needs are
54catered for by wxList and wxHashMap. You will undoubtedly need some
55platform-independent @ref group_funcmacro_file, and you may find it handy to
56maintain and search a list of paths using wxPathList. There's many
57@ref group_funcmacro_misc of operating system methods and other functions.
58
59@see @ref group_class
60
61*/