nobody at rubyforge.org
2007-May-21 19:06 UTC
[Wxruby-development] [1027] trunk/wxruby2/doc/textile/app.txtl: Ruby-specific Wx::App documentation
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type"
content="text/html; charset=utf-8" /><style
type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:'':'';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family:
verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;
font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding:
6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid;
padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family:
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch
.binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[1027] trunk/wxruby2/doc/textile/app.txtl: Ruby-specific Wx::App
documentation</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>1027</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2007-05-21 15:06:55 -0400 (Mon, 21 May
2007)</dd>
</dl>
<h3>Log Message</h3>
<pre>Ruby-specific Wx::App documentation</pre>
<h3>Modified Paths</h3>
<ul>
<li><a
href="#trunkwxruby2doctextileapptxtl">trunk/wxruby2/doc/textile/app.txtl</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwxruby2doctextileapptxtl"></a>
<div class="modfile"><h4>Modified:
trunk/wxruby2/doc/textile/app.txtl (1026 => 1027)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/doc/textile/app.txtl        2007-05-21
18:40:49 UTC (rev 1026)
+++
trunk/wxruby2/doc/textile/app.txtl        2007-05-21
19:06:55 UTC (rev 1027)
</span><span class="lines">@@ -3,20 +3,23 @@
</span><span class="cx"> The *App* class represents the
application itself. It is used
</span><span class="cx"> to:
</span><span class="cx">
</span><del>-
</del><span class="cx"> * set and get application-wide
properties;
</span><span class="cx"> * implement the windowing system
message or event loop;
</span><span class="cx"> * initiate application processing
via "App#on_init":app.html#App_oninit;
</span><del>-* allow default processing of events not handled by
other
-objects in the application.
</del><ins>+* allow default processing of events not handled by
other objects in the application.
</ins><span class="cx">
</span><ins>+To define what the App should do when it starts, define
a subclass of
+Wx::App, and describe what it should do (display frames, etc) within an
+@on_init@ method. THen create an instance of this class, and call its
+@main_loop@ method. All creation of "Windows":window.html,
+"Brushes":brush.html, "Pens":pen.html,
"Colours":colours.html, and
+"Icons":icon.html must be done after the app has been started, by
+calling main_loop.
</ins><span class="cx">
</span><del>-You should use the macro IMPLEMENT_APP(appClass) in
your application implementation
-file to tell Widgets how to create an instance of your application class.
</del><ins>+Any wxRuby program will have a single instance of
Wx::App, which can be
+accessed once the app has started by the constant @Wx::THE_APP@, or by
+the module method @Wx::get_app()@.
</ins><span class="cx">
</span><del>-Use DECLARE_APP(appClass) in a header file if you want
the GetApp function (which returns
-a reference to your application object) to be visible to other files.
-
</del><span class="cx"> h2. Derived from
</span><span class="cx">
</span><span class="cx">
"EvtHandler":evthandler.html
</span><span class="lines">@@ -248,9 +251,11 @@
</span><span class="cx">
</span><span class="cx"> Integer *main_loop*()
</span><span class="cx">
</span><del>-Called by Widgets on creation of the application.
Override this if you wish
-to provide your own (environment-dependent) main loop.
</del><ins>+Calling this method starts up the application, calling
its @on_init@
+method.
</ins><span class="cx">
</span><ins>+
+
</ins><span class="cx"> h4. Return value
</span><span class="cx">
</span><span class="cx"> Returns 0 under X, and the wParam
of the WM_QUIT message under Windows.
</span></span></pre>
</div>
</div>
</body>
</html>
Reasonably Related Threads
- [714] trunk/wxruby2/doc/textile/app.txtl: Removed create_log_target
- [908] branches/wxruby2/wxwidgets_282/doc/textile/control.txtl: Add note on use of ampersand characters in Wx::Control labels
- [800] trunk/wxruby2/doc/textile/treectrl.txtl: TreeCtrl#traverse has moved to wx sugar
- [952] branches/wxruby2/wxwidgets_282/doc/textile/gridcellattr.txtl: Doc fix from Wx 2.8
- [964] branches/wxruby2/wxwidgets_282/doc/textile/dialog.txtl: Fixed spelling mistake in sample.
