File: overview_roughguide.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (73 lines) | stat: -rw-r--r-- 10,734 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: A Quick Guide to Writing Applications</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
 <tbody>
 <tr>
  <td id="projectlogo">
    <a href="http://www.wxwidgets.org/" target="_new">
      <img alt="wxWidgets" src="logo.png"/>
    </a>
  </td>
  <td style="padding-left: 0.5em; text-align: right;">
   <span id="projectnumber">Version: 3.0.2</span>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Categories</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="index.html">Documentation</a></li><li class="navelem"><a class="el" href="page_topics.html">Programming Guides</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">A Quick Guide to Writing Applications </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>To set a wxWidgets application going, you will need to derive a <a class="el" href="classwx_app.html" title="The wxApp class represents the application itself when wxUSE_GUI=1.">wxApp</a> class and override <a class="el" href="classwx_app_console.html#a99953775a2fd83fa2456e390779afe15" title="This must be provided by the application, and will usually create the application&#39;s main window...">wxApp::OnInit</a>.</p>
<p>An application must have a top-level <a class="el" href="classwx_frame.html" title="A frame is a window whose size and position can (usually) be changed by the user.">wxFrame</a> or <a class="el" href="classwx_dialog.html" title="A dialog box is a window with a title bar and sometimes a system menu, which can be moved around the ...">wxDialog</a> window. Each frame may contain one or more instances of classes such as <a class="el" href="classwx_panel.html" title="A panel is a window on which controls are placed.">wxPanel</a>, <a class="el" href="classwx_splitter_window.html" title="This class manages up to two subwindows.">wxSplitterWindow</a> or other windows and controls.</p>
<p>A frame can have a <a class="el" href="classwx_menu_bar.html" title="A menu bar is a series of menus accessible from the top of a frame.">wxMenuBar</a>, a <a class="el" href="classwx_tool_bar.html" title="A toolbar is a bar of buttons and/or other controls usually placed below the menu bar in a wxFrame...">wxToolBar</a>, a <a class="el" href="classwx_status_bar.html" title="A status bar is a narrow window that can be placed along the bottom of a frame to give small amounts ...">wxStatusBar</a>, and a <a class="el" href="classwx_icon.html" title="An icon is a small rectangular bitmap usually used for denoting a minimized application.">wxIcon</a> for when the frame is iconized.</p>
<p>A <a class="el" href="classwx_panel.html" title="A panel is a window on which controls are placed.">wxPanel</a> is used to place controls (classes derived from <a class="el" href="classwx_control.html" title="This is the base class for a control or &quot;widget&quot;.">wxControl</a>) which are used for user interaction. Examples of controls are <a class="el" href="classwx_button.html" title="A button is a control that contains a text string, and is one of the most common elements of a GUI...">wxButton</a>, <a class="el" href="classwx_check_box.html" title="A checkbox is a labelled box which by default is either on (checkmark is visible) or off (no checkmar...">wxCheckBox</a>, <a class="el" href="classwx_choice.html" title="A choice item is used to select one of a list of strings.">wxChoice</a>, <a class="el" href="classwx_list_box.html" title="A listbox is used to select one or more of a list of strings.">wxListBox</a>, <a class="el" href="classwx_radio_box.html" title="A radio box item is used to select one of number of mutually exclusive choices.">wxRadioBox</a>, and <a class="el" href="classwx_slider.html" title="A slider is a control with a handle which can be pulled back and forth to change the value...">wxSlider</a>.</p>
<p>Instances of <a class="el" href="classwx_dialog.html" title="A dialog box is a window with a title bar and sometimes a system menu, which can be moved around the ...">wxDialog</a> can also be used for controls and they have the advantage of not requiring a separate frame.</p>
<p>Instead of creating a dialog box and populating it with items, it is possible to choose one of the convenient common dialog classes, such as <a class="el" href="classwx_message_dialog.html" title="This class represents a dialog that shows a single or multi-line message, with a choice of OK...">wxMessageDialog</a> and <a class="el" href="classwx_file_dialog.html" title="This class represents the file chooser dialog.">wxFileDialog</a>.</p>
<p>You never draw directly onto a window - you use a <em>device context</em> (DC). <a class="el" href="classwx_d_c.html" title="A wxDC is a &quot;device context&quot; onto which graphics and text can be drawn.">wxDC</a> is the base for <a class="el" href="classwx_client_d_c.html" title="A wxClientDC must be constructed if an application wishes to paint on the client area of a window fro...">wxClientDC</a>, <a class="el" href="classwx_paint_d_c.html" title="A wxPaintDC must be constructed if an application wishes to paint on the client area of a window from...">wxPaintDC</a>, <a class="el" href="classwx_memory_d_c.html" title="A memory device context provides a means to draw graphics onto a bitmap.">wxMemoryDC</a>, <a class="el" href="classwx_post_script_d_c.html" title="This defines the wxWidgets Encapsulated PostScript device context, which can write PostScript files o...">wxPostScriptDC</a>, <a class="el" href="classwx_memory_d_c.html" title="A memory device context provides a means to draw graphics onto a bitmap.">wxMemoryDC</a>, <a class="el" href="classwx_metafile_d_c.html" title="This is a type of device context that allows a metafile object to be created (Windows only)...">wxMetafileDC</a> and <a class="el" href="classwx_printer_d_c.html" title="A printer device context is specific to MSW and Mac, and allows access to any printer with a Windows ...">wxPrinterDC</a>. If your drawing functions have <a class="el" href="classwx_d_c.html" title="A wxDC is a &quot;device context&quot; onto which graphics and text can be drawn.">wxDC</a> as a parameter, you can pass any of these DCs to the function, and thus use the same code to draw to several different devices. You can draw using the member functions of <a class="el" href="classwx_d_c.html" title="A wxDC is a &quot;device context&quot; onto which graphics and text can be drawn.">wxDC</a>, such as <a class="el" href="classwx_d_c.html#a12f2c236d4d320acec0bc6fe20e8399d" title="Draws a line from the first point to the second.">wxDC::DrawLine</a> and <a class="el" href="classwx_d_c.html#a11d35ce34fccb57b0efc7dc91168660b" title="Draws a text string at the specified point, using the current text font, and the current text foregro...">wxDC::DrawText</a>. Control colour on a window (<a class="el" href="classwx_colour.html" title="A colour is an object representing a combination of Red, Green, and Blue (RGB) intensity values...">wxColour</a>) with brushes (<a class="el" href="classwx_brush.html" title="A brush is a drawing tool for filling in areas.">wxBrush</a>) and pens (<a class="el" href="classwx_pen.html" title="A pen is a drawing tool for drawing outlines.">wxPen</a>).</p>
<p>To intercept events, you add a DECLARE_EVENT_TABLE macro to the window class declaration, and put a BEGIN_EVENT_TABLE ... END_EVENT_TABLE block in the implementation file. Between these macros, you add event macros which map the event (such as a mouse click) to a member function. These might override predefined event handlers such as for <a class="el" href="classwx_key_event.html" title="This event class contains information about key press and release events.">wxKeyEvent</a> and <a class="el" href="classwx_mouse_event.html" title="This event class contains information about the events generated by the mouse: they include mouse but...">wxMouseEvent</a>.</p>
<p>Most modern applications will have an on-line, hypertext help system; for this, you need wxHelp and the <a class="el" href="classwx_help_controller.html" title="This is an alias for one of a family of help controller classes which is most appropriate for the cur...">wxHelpController</a> class to control wxHelp.</p>
<p>GUI applications aren't all graphical wizardry. List and hash table needs are catered for by wxList and <a class="el" href="classwx_hash_map.html" title="This is a simple, type-safe, and reasonably efficient hash map class, whose interface is a subset of ...">wxHashMap</a>. You will undoubtedly need some platform-independent <a class="el" href="group__group__funcmacro__file.html">Files and Directories</a>, and you may find it handy to maintain and search a list of paths using <a class="el" href="classwx_path_list.html" title="The path list is a convenient way of storing a number of directories, and when presented with a filen...">wxPathList</a>. There's many <a class="el" href="group__group__funcmacro__misc.html">Miscellaneous</a> of operating system methods and other functions.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__class.html">Class List by Category</a> </dd></dl>
</div></div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:46:42 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
	</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>