nobody at rubyforge.org
2007-Mar-28 17:20 UTC
[Wxruby-development] [923] branches/wxruby2/wxwidgets_282: Changes 2.6 -> 2.8 Wx API; remove unsupported methods and examples from doc
<!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>[923] branches/wxruby2/wxwidgets_282: Changes 2.6 -> 2.8 Wx API;
remove unsupported methods and examples from doc</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>923</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2007-03-28 13:20:35 -0400 (Wed, 28 Mar
2007)</dd>
</dl>
<h3>Log Message</h3>
<pre>Changes 2.6 -> 2.8 Wx API; remove unsupported methods and examples
from doc</pre>
<h3>Modified Paths</h3>
<ul>
<li><a
href="#brancheswxruby2wxwidgets_282doctextilecursortxtl">branches/wxruby2/wxwidgets_282/doc/textile/cursor.txtl</a></li>
<li><a
href="#brancheswxruby2wxwidgets_282swigclassesincludewxCursorh">branches/wxruby2/wxwidgets_282/swig/classes/include/wxCursor.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a
id="brancheswxruby2wxwidgets_282doctextilecursortxtl"></a>
<div class="modfile"><h4>Modified:
branches/wxruby2/wxwidgets_282/doc/textile/cursor.txtl (922 =>
923)</h4>
<pre class="diff"><span>
<span class="info">---
branches/wxruby2/wxwidgets_282/doc/textile/cursor.txtl        2007-03-27
20:26:51 UTC (rev 922)
+++
branches/wxruby2/wxwidgets_282/doc/textile/cursor.txtl        2007-03-28
17:20:35 UTC (rev 923)
</span><span class="lines">@@ -24,17 +24,15 @@
</span><span class="cx">
</span><span class="cx"> h2. Predefined objects
</span><span class="cx">
</span><del>-Objects:
</del><ins>+The following predefined cursors are accessed via Ruby
constants. Note
+that the standard, hourglass and cross cursors are not loaded until the
+App enters its main loop.
</ins><span class="cx">
</span><del>-*NullCursor*
</del><ins>+ *Wx::NULL_CURSOR*
+ *Wx::STANDARD_CURSOR*
+ *Wx::HOURGLASS_CURSOR*
+ *Wx::CROSS_CURSOR*
</ins><span class="cx">
</span><del>-Pointers:
-
-*STANDARD_CURSOR
-
-HOURGLASS_CURSOR\\
-CROSS_CURSOR*
-
</del><span class="cx"> h2. See also
</span><span class="cx">
</span><span class="cx"> "Bitmap":bitmap.html,
"Icon":icon.html,
"Window#set_cursor":window.html#Window_setcursor,
"::SetCursor":setcursor.html
</span><span class="lines">@@ -44,40 +42,17 @@
</span><span class="cx"> h2. Methods
</span><span class="cx">
</span><span class="cx"> *
"Cursor.new":#Cursor_new
</span><del>-* "Cursor#ok":#Cursor_ok
</del><ins>+* "Cursor#is_ok":#Cursor_isok
</ins><span class="cx">
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> h3(#Cursor_new). Cursor.new
</span><span class="cx">
</span><del>- *Cursor.new*(%(arg-type)char% bits[],
%(arg-type)Integer% width, %(arg-type)Integer% height,
- %(arg-type)Integer% hotSpotX=-1,
- %(arg-type)Integer% hotSpotY=-1,
- %(arg-type)char% maskBits[]=NULL,
- %(arg-type)Colour% fg=NULL,
- %(arg-type)Colour% bg=NULL)
-
-Constructs a cursor by passing an array of bits (Motif and GTK+ only).
_maskBits_ is used only under
-Motif and GTK+. The parameters _fg_ and _bg_ are only present on GTK+, and
force the
-cursor to use particular background and foreground colours.
-
-If either _hotSpotX_ or _hotSpotY_ is -1, the hotspot will be the centre of the
cursor image (Motif only).
-
- *Cursor.new*(%(arg-type)String% cursorName, %(arg-type)Integer% type,
- %(arg-type)Integer% hotSpotX=0,
- %(arg-type)Integer% hotSpotY=0)
-
-Constructs a cursor by passing a string resource name or filename.
-
-On MacOS when specifying a string resource name, first the color cursors
''crsr'' and then the black/white cursors
''CURS'' in the resource chain are scanned through.
-
-_hotSpotX_ and _hotSpotY_ are currently only used under Windows when loading
from an
-icon file, to specify the cursor hotspot relative to the top left of the image.
-
</del><span class="cx"> *Cursor.new*(%(arg-type)Integer%
cursorId)
</span><span class="cx">
</span><del>-Constructs a cursor using a cursor identifier.
</del><ins>+Constructs a cursor using a cursor identifier; valid
constants for this
+parameter are given below.
</ins><span class="cx">
</span><span class="cx"> *Cursor.new*(%(arg-type)Image%
image)
</span><span class="cx">
</span><span class="lines">@@ -151,96 +126,18 @@
</span><span class="cx"> |*CURSOR_WATCH*|A watch cursor.|
</span><span class="cx"> |*CURSOR_ARROWWAIT*|A cursor with
both an arrow andan hourglass, (windows.)|
</span><span class="cx">
</span><del>-
</del><span class="cx"> Note that not all cursors are
available on all platforms.
</span><del>-* _cursor_ Pointer or reference to a cursor to copy.
</del><ins>+h3(#Cursor_isok). Cursor#is_ok
</ins><span class="cx">
</span><ins>+ Boolean *is_ok*()
</ins><span class="cx">
</span><del>-
-
-
-h4. Example
-
-The following is an example of creating a
-cursor from 32x32 bitmap data (@down_bits@) and a mask
-(@down_mask@) where 1 is black and 0 is white for
-the bits, and 1 is opaque and 0 is transparent for
-the mask. It works on Windows and GTK+.
-
-
- static char down_bits[] = { 255, 255, 255, 255, 31,
- 255, 255, 255, 31, 255, 255, 255, 31, 255, 255, 255,
- 31, 255, 255, 255, 31, 255, 255, 255, 31, 255, 255,
- 255, 31, 255, 255, 255, 31, 255, 255, 255, 25, 243,
- 255, 255, 19, 249, 255, 255, 7, 252, 255, 255, 15, 254,
- 255, 255, 31, 255, 255, 255, 191, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255 };
-
- static char down_mask[] = { 240, 1, 0, 0, 240, 1,
- 0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 240, 1,
- 0, 0, 240, 1, 0, 0, 240, 1, 0, 0, 255, 31, 0, 0, 255,
- 31, 0, 0, 254, 15, 0, 0, 252, 7, 0, 0, 248, 3, 0, 0,
- 240, 1, 0, 0, 224, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0 };
-
- #ifdef __WXMSW__
- Bitmap down_bitmap(down_bits, 32, 32);
- Bitmap down_mask_bitmap(down_mask, 32, 32);
-
- down_bitmap.SetMask(new Mask(down_mask_bitmap));
- Image down_image = down_bitmap.ConvertToImage();
- down_image.SetOption(IMAGE_OPTION_CUR_HOTSPOT_X, 6);
- down_image.SetOption(IMAGE_OPTION_CUR_HOTSPOT_Y, 14);
- Cursor down_cursor = Cursor(down_image);
- #else
- Cursor down_cursor = Cursor(down_bits, 32, 32,
- 6, 14, down_mask, WHITE, BLACK);
- #endif
-
-
- *destructor*()
-
-Destroys the cursor. A cursor can be reused for more
-than one window, and does not get destroyed when the window is
-destroyed. Widgets destroys all cursors on application exit, although
-it is best to clean them up explicitly.
-
-h3(#Cursor_ok). Cursor#ok
-
- Boolean *ok*()
-
</del><span class="cx"> Returns true if cursor data is
present.
</span><span class="cx">
</span><del>-h3(#Cursor_assignment). Cursor#-
- "Cursor":cursor.html *operator $=$*(%(arg-type)Cursor% cursor)
-
-Assignment operator, using reference counting. Returns a reference
-to `this''.
-
</del><span class="cx"> h3(#Cursor_equals).
Cursor#=</span><span class="cx">
</span><span class="cx"> Boolean *operator
$==$*(%(arg-type)Cursor% cursor)
</span><span class="cx">
</span><del>-Equality operator. Two cursors are equal if they
contain pointers
-to the same underlying cursor data. It does not compare each attribute,
-so two independently-created cursors using the same parameters will
-fail the test.
-
-h3(#Cursor_notequals). Cursor#!-
- Boolean *operator $!=$*(%(arg-type)Cursor% cursor)
-
-Inequality operator. Two cursors are not equal if they contain pointers
-to different underlying cursor data. It does not compare each attribute.
-
-
</del><ins>+Equality operator. Two cursors are equal if they point
to to the same
+underlying cursor data. It does not compare each attribute, so two
+independently-created cursors using the same parameters will fail the
+test.
</ins></span></pre></div>
<a
id="brancheswxruby2wxwidgets_282swigclassesincludewxCursorh"></a>
<div class="modfile"><h4>Modified:
branches/wxruby2/wxwidgets_282/swig/classes/include/wxCursor.h (922 =>
923)</h4>
<pre class="diff"><span>
<span class="info">---
branches/wxruby2/wxwidgets_282/swig/classes/include/wxCursor.h        2007-03-27
20:26:51 UTC (rev 922)
+++
branches/wxruby2/wxwidgets_282/swig/classes/include/wxCursor.h        2007-03-28
17:20:35 UTC (rev 923)
</span><span class="lines">@@ -1,9 +1,9 @@
</span><del>-// Copyright 2004-2005 by Kevin Smith
</del><ins>+// Copyright 2004-2007 by Kevin Smith
</ins><span class="cx"> // released under the MIT-style
wxruby2 license
</span><span class="cx">
</span><del>-
</del><span class="cx"> #if !defined(_wxCursor_h_)
</span><span class="cx"> #define _wxCursor_h_
</span><ins>+
</ins><span class="cx"> class wxCursor : public wxBitmap
</span><span class="cx"> {
</span><span class="cx"> public:
</span><span class="lines">@@ -14,8 +14,7 @@
</span><span class="cx"> wxCursor(const wxImage&
image ) ;
</span><span class="cx"> wxCursor(const wxCursor&
cursor ) ;
</span><span class="cx"> virtual ~wxCursor() ;
</span><del>- bool Ok() const;
</del><ins>+ bool IsOk() const;
</ins><span class="cx"> };
</span><span class="cx">
</span><del>-
</del><span class="cx"> #endif
</span></span></pre>
</div>
</div>
</body>
</html>
Reasonably Related Threads
- [990] branches/wxruby2/wxwidgets_282/samples/bigdemo/wxCursor.rbw: Use paint block instead of ClientDC; load icon file safely
- [883] branches/wxruby2/wxwidgets_282/swig: API changes for move to WxWidgets 2.8
- wxCursor files
- [843] trunk/wxruby2: Moved stock colours so they are available from library load time
- [827] trunk/wxruby2/swig: Moved NULL objects into constants so they can be used for default args
