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