nobody at rubyforge.org
2006-Dec-12 00:13 UTC
[Wxruby-development] [781] trunk/wxruby2: Added instance class method to avoid proliferation of help windows
<!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>[781] trunk/wxruby2: Added instance class method to avoid
proliferation of help windows</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>781</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2006-12-11 19:13:56 -0500 (Mon, 11 Dec
2006)</dd>
</dl>
<h3>Log Message</h3>
<pre>Added instance class method to avoid proliferation of help
windows</pre>
<h3>Modified Paths</h3>
<ul>
<li><a
href="#trunkwxruby2doctextilehelpcontrollertxtl">trunk/wxruby2/doc/textile/helpcontroller.txtl</a></li>
<li><a
href="#trunkwxruby2doctextilehtmlhelpcontrollertxtl">trunk/wxruby2/doc/textile/htmlhelpcontroller.txtl</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a
href="#trunkwxruby2libwxclasseshelpcontrollerrb">trunk/wxruby2/lib/wx/classes/helpcontroller.rb</a></li>
<li><a
href="#trunkwxruby2libwxclasseshtmlhelpcontrollerrb">trunk/wxruby2/lib/wx/classes/htmlhelpcontroller.rb</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwxruby2doctextilehelpcontrollertxtl"></a>
<div class="modfile"><h4>Modified:
trunk/wxruby2/doc/textile/helpcontroller.txtl (780 => 781)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/doc/textile/helpcontroller.txtl        2006-12-11
20:11:29 UTC (rev 780)
+++
trunk/wxruby2/doc/textile/helpcontroller.txtl        2006-12-12
00:13:56 UTC (rev 781)
</span><span class="lines">@@ -43,9 +43,13 @@
</span><span class="cx">
</span><span class="cx"> <div
id="methods">
</span><span class="cx">
</span><del>-h2. Methods
</del><ins>+h2. Class Methods
</ins><span class="cx">
</span><ins>+*
"HelpController.instance":#HelpController_instance
</ins><span class="cx"> *
"HelpController.new":#HelpController_new
</span><ins>+
+h2. Instance Methods
+
</ins><span class="cx"> *
"HelpController#init":#HelpController_init
</span><span class="cx"> *
"HelpController#display_block":#HelpController_displayblock
</span><span class="cx"> *
"HelpController#display_contents":#HelpController_displaycontents
</span><span class="lines">@@ -62,13 +66,29 @@
</span><span class="cx">
</span><span class="cx"> </div>
</span><span class="cx">
</span><ins>+h2(#class_methods). Class Methods
</ins><span class="cx">
</span><ins>+h3(#HelpController_new). HtmlHelpController.instance
+
+ *HelpController.instance*()
+
+Returns a new HelpController if one hasn''t already been created, or
+returns the previously created one if there is such.
+
+Users typically expect only a single help window to be running for
+any particular application, with the help shown and hidden as
+required. To avoid showing multiple help windows within a single
+application, use this method in preference to
+"new":#HelpController_new .
+
</ins><span class="cx"> h3(#HelpController_new).
HelpController.new
</span><span class="cx">
</span><del>- *destructor*()
</del><ins>+ *HelpController.new*()
</ins><span class="cx">
</span><del>-Destroys the help instance, closing down the viewer if
it is running.
</del><ins>+Constructor.
</ins><span class="cx">
</span><ins>+h2(#instance_methods). Instance Methods
+
</ins><span class="cx"> h3(#HelpController_init).
HelpController#init
</span><span class="cx">
</span><span class="cx"> *init*(%(arg-type)String% file)
</span></span></pre></div>
<a id="trunkwxruby2doctextilehtmlhelpcontrollertxtl"></a>
<div class="modfile"><h4>Modified:
trunk/wxruby2/doc/textile/htmlhelpcontroller.txtl (780 => 781)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/doc/textile/htmlhelpcontroller.txtl        2006-12-11
20:11:29 UTC (rev 780)
+++
trunk/wxruby2/doc/textile/htmlhelpcontroller.txtl        2006-12-12
00:13:56 UTC (rev 781)
</span><span class="lines">@@ -196,6 +196,7 @@
</span><span class="cx">
</span><span class="cx"> h2. Class Methods
</span><span class="cx">
</span><ins>+*
"HtmlHelpController.instance":#HtmlHelpController_instance
</ins><span class="cx"> *
"HtmlHelpController.new":#HtmlHelpController_new
</span><span class="cx">
</span><span class="cx"> h2. Instance Methods
</span><span class="lines">@@ -216,11 +217,34 @@
</span><span class="cx">
</span><span class="cx"> h2(#class_methods). Class Methods
</span><span class="cx">
</span><ins>+h3(#HtmlHelpController_instance).
HtmlHelpController.instance
+
+ *HtmlHelpController.instance*(%(arg-type)Integer% style = HF_DEFAULT_STYLE)
+
+Returns a new HtmlHelpController if one hasn''t already been created,
or
+returns the previously created one if there is such.
+
+Users typically expect only a single help window to be running for
+any particular application, with the help shown and hidden as
+required. To avoid showing multiple help windows within a single
+application, use this method in preference to
+"new":#HtmlHelpController_new .
+
+h4. Parameters
+
+_style_ defines optional styles for the help window; the options are
+described below in the "new":#HtmlHelpController_new method. Note
that
+the style argument will only be processed in the first call to this
+method - subsequent calls will return a controller with the original
+style.
+
</ins><span class="cx"> h3(#HtmlHelpController_new).
HtmlHelpController.new
</span><span class="cx">
</span><span class="cx">
*HtmlHelpController.new*(%(arg-type)Integer% style = HF_DEFAULT_STYLE)
</span><span class="cx">
</span><del>-Constructor.
</del><ins>+Constructor. To avoid a proliferation of help frames,
you may prefer
+to use the "instance":#HtmlHelpController_instance class method
instead
+to display help.
</ins><span class="cx">
</span><span class="cx"> h4. Parameters
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwxruby2libwxclasseshelpcontrollerrb"></a>
<div class="addfile"><h4>Added:
trunk/wxruby2/lib/wx/classes/helpcontroller.rb (0 => 781)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/lib/wx/classes/helpcontroller.rb        
(rev 0)
+++
trunk/wxruby2/lib/wx/classes/helpcontroller.rb        2006-12-12
00:13:56 UTC (rev 781)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+class Wx::HelpController
+ def self.instance(*args)
+ @instance ||= new(*args)
+ end
+end
</ins></span></pre></div>
<a id="trunkwxruby2libwxclasseshtmlhelpcontrollerrb"></a>
<div class="addfile"><h4>Added:
trunk/wxruby2/lib/wx/classes/htmlhelpcontroller.rb (0 => 781)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/lib/wx/classes/htmlhelpcontroller.rb        
(rev 0)
+++
trunk/wxruby2/lib/wx/classes/htmlhelpcontroller.rb        2006-12-12
00:13:56 UTC (rev 781)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+class Wx::HtmlHelpController
+ def self.instance(*args)
+ @instance ||= new(*args)
+ end
+end
</ins></span></pre>
</div>
</div>
</body>
</html>
Seemingly Similar Threads
- [761] trunk/wxruby2: Initial commit of HtmlHelpController & HelpController support + doc,
- [953] branches/wxruby2/wxwidgets_282: Additions to HelpController API 2.6 -> 2.8
- [727] trunk/wxruby2/doc/textile/index.txtl: HTML is now supported, removed reference to FS classes which are
- [784] trunk/wxruby2/Changelog: Pre 0.0.38 changes
- [ wxruby-Bugs-20211 ] Unresolved symbol due to linkage error
