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