nobody at rubyforge.org
2007-Mar-18 09:36 UTC
[Wxruby-development] [893] branches/wxruby2/wxwidgets_282: New hover bitmap methods in 2.6 -> 2.8 API
<!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>[893] branches/wxruby2/wxwidgets_282: New hover bitmap methods in 2.6 -> 2.8 API</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>893</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-03-18 05:36:20 -0400 (Sun, 18 Mar 2007)</dd> </dl> <h3>Log Message</h3> <pre>New hover bitmap methods in 2.6 -> 2.8 API</pre> <h3>Modified Paths</h3> <ul> <li><a href="#brancheswxruby2wxwidgets_282doctextilebitmapbuttontxtl">branches/wxruby2/wxwidgets_282/doc/textile/bitmapbutton.txtl</a></li> <li><a href="#brancheswxruby2wxwidgets_282swigclassesincludewxBitmapButtonh">branches/wxruby2/wxwidgets_282/swig/classes/include/wxBitmapButton.h</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="brancheswxruby2wxwidgets_282doctextilebitmapbuttontxtl"></a> <div class="modfile"><h4>Modified: branches/wxruby2/wxwidgets_282/doc/textile/bitmapbutton.txtl (892 => 893)</h4> <pre class="diff"><span> <span class="info">--- branches/wxruby2/wxwidgets_282/doc/textile/bitmapbutton.txtl        2007-03-18 01:42:19 UTC (rev 892) +++ branches/wxruby2/wxwidgets_282/doc/textile/bitmapbutton.txtl        2007-03-18 09:36:20 UTC (rev 893) </span><span class="lines">@@ -19,8 +19,9 @@ </span><span class="cx"> h2. Remarks </span><span class="cx"> </span><span class="cx"> A bitmap button can be supplied with a single bitmap, and Widgets will draw </span><del>-all button states using this bitmap. If the application needs more control, additional bitmaps for -the selected state, unpressed focused state, and greyed-out state may be supplied. </del><ins>+all button states using this bitmap. If the application needs more +control, additional bitmaps for the selected state, unpressed focused +state, hover state and and greyed-out disabled state may be supplied. </ins><span class="cx"> </span><span class="cx"> h2. Window styles </span><span class="cx"> </span><span class="lines">@@ -58,10 +59,12 @@ </span><span class="cx"> * "BitmapButton#create":#BitmapButton_create </span><span class="cx"> * "BitmapButton#get_bitmap_disabled":#BitmapButton_getbitmapdisabled </span><span class="cx"> * "BitmapButton#get_bitmap_focus":#BitmapButton_getbitmapfocus </span><ins>+* "BitmapButton#get_bitmap_hover":#BitmapButton_getbitmaphover </ins><span class="cx"> * "BitmapButton#get_bitmap_label":#BitmapButton_getbitmaplabel </span><span class="cx"> * "BitmapButton#get_bitmap_selected":#BitmapButton_getbitmapselected </span><span class="cx"> * "BitmapButton#set_bitmap_disabled":#BitmapButton_setbitmapdisabled </span><span class="cx"> * "BitmapButton#set_bitmap_focus":#BitmapButton_setbitmapfocus </span><ins>+* "BitmapButton#set_bitmap_hover":#BitmapButton_setbitmaphover </ins><span class="cx"> * "BitmapButton#set_bitmap_label":#BitmapButton_setbitmaplabel </span><span class="cx"> * "BitmapButton#set_bitmap_selected":#BitmapButton_setbitmapselected </span><span class="cx"> </span><span class="lines">@@ -86,7 +89,10 @@ </span><span class="cx"> </span><span class="cx"> The _bitmap_ parameter is normally the only bitmap you need to provide, and Widgets will </span><span class="cx"> draw the button correctly in its different states. If you want more control, call </span><del>-any of the functions "BitmapButton#set_bitmap_selected":bitmapbutton.html#BitmapButton_setbitmapselected, "BitmapButton#set_bitmap_focus":bitmapbutton.html#BitmapButton_setbitmapfocus, "BitmapButton#set_bitmap_disabled":bitmapbutton.html#BitmapButton_setbitmapdisabled. </del><ins>+any of the functions +"BitmapButton#set_bitmap_selected":bitmapbutton.html#BitmapButton_setbitmapselected, +"BitmapButton#set_bitmap_focus":bitmapbutton.html#BitmapButton_setbitmapfocus, +"BitmapButton#set_bitmap_hover":bitmapbutton.html#BitmapButton_setbitmaphover, "BitmapButton#set_bitmap_disabled":bitmapbutton.html#BitmapButton_setbitmapdisabled. </ins><span class="cx"> </span><span class="cx"> Note that the bitmap passed is smaller than the actual button created. </span><span class="cx"> </span><span class="lines">@@ -94,10 +100,6 @@ </span><span class="cx"> </span><span class="cx"> "BitmapButton#create":bitmapbutton.html#BitmapButton_create, "Validator":validator.html </span><span class="cx"> </span><del>- *destructor*() - -Destructor, destroying the button. - </del><span class="cx"> h3(#BitmapButton_create). BitmapButton#create </span><span class="cx"> </span><span class="cx"> Boolean *create*(%(arg-type)Window% parent, %(arg-type)Integer% id, %(arg-type)Bitmap% bitmap, </span><span class="lines">@@ -115,10 +117,6 @@ </span><span class="cx"> </span><span class="cx"> Returns the bitmap for the disabled state. </span><span class="cx"> </span><del>-h4. Return value - -A reference to the disabled state bitmap. - </del><span class="cx"> h4. See also </span><span class="cx"> </span><span class="cx"> "BitmapButton#set_bitmap_disabled":bitmapbutton.html#BitmapButton_setbitmapdisabled </span><span class="lines">@@ -129,13 +127,19 @@ </span><span class="cx"> </span><span class="cx"> Returns the bitmap for the focused state. </span><span class="cx"> </span><del>-h4. Return value </del><ins>+h4. See also </ins><span class="cx"> </span><del>-A reference to the focused state bitmap. </del><ins>+"BitmapButton#set_bitmap_focus":bitmapbutton.html#BitmapButton_setbitmapfocus </ins><span class="cx"> </span><ins>+h3(#BitmapButton_getbitmaphover). BitmapButton#get_bitmap_hover + + "Bitmap":bitmap.html *get_bitmap_hover*() + +Returns the bitmap for the focused state. + </ins><span class="cx"> h4. See also </span><span class="cx"> </span><del>-"BitmapButton#set_bitmap_focus":bitmapbutton.html#BitmapButton_setbitmapfocus </del><ins>+"BitmapButton#set_bitmap_hover":bitmapbutton.html#BitmapButton_setbitmaphover </ins><span class="cx"> </span><span class="cx"> h3(#BitmapButton_getbitmaplabel). BitmapButton#get_bitmap_label </span><span class="cx"> </span><span class="lines">@@ -143,10 +147,6 @@ </span><span class="cx"> </span><span class="cx"> Returns the label bitmap (the one passed to the constructor). </span><span class="cx"> </span><del>-h4. Return value - -A reference to the button''s label bitmap. - </del><span class="cx"> h4. See also </span><span class="cx"> </span><span class="cx"> "BitmapButton#set_bitmap_label":bitmapbutton.html#BitmapButton_setbitmaplabel </span><span class="lines">@@ -157,10 +157,6 @@ </span><span class="cx"> </span><span class="cx"> Returns the bitmap for the selected state. </span><span class="cx"> </span><del>-h4. Return value - -A reference to the selected state bitmap. - </del><span class="cx"> h4. See also </span><span class="cx"> </span><span class="cx"> "BitmapButton#set_bitmap_selected":bitmapbutton.html#BitmapButton_setbitmapselected </span><span class="lines">@@ -193,6 +189,20 @@ </span><span class="cx"> </span><span class="cx"> "BitmapButton#get_bitmap_focus":bitmapbutton.html#BitmapButton_getbitmapfocus, "BitmapButton#set_bitmap_label":bitmapbutton.html#BitmapButton_setbitmaplabel, "BitmapButton#set_bitmap_selected":bitmapbutton.html#BitmapButton_setbitmapselected, "BitmapButton#set_bitmap_disabled":bitmapbutton.html#BitmapButton_setbitmapdisabled </span><span class="cx"> </span><ins>+h3(#BitmapButton_setbitmaphover). BitmapButton#set_bitmap_hover + + *set_bitmap_focus*(%(arg-type)Bitmap% bitmap) + +Sets the bitmap for the button appearance when it has the keyboard focus. + +h4. Parameters + +* _bitmap_ The bitmap to set. + +h4. See also + +"BitmapButton#get_bitmap_focus":bitmapbutton.html#BitmapButton_getbitmapfocus, "BitmapButton#set_bitmap_label":bitmapbutton.html#BitmapButton_setbitmaplabel, "BitmapButton#set_bitmap_selected":bitmapbutton.html#BitmapButton_setbitmapselected, "BitmapButton#set_bitmap_disabled":bitmapbutton.html#BitmapButton_setbitmapdisabled + </ins><span class="cx"> h3(#BitmapButton_setbitmaplabel). BitmapButton#set_bitmap_label </span><span class="cx"> </span><span class="cx"> *set_bitmap_label*(%(arg-type)Bitmap% bitmap) </span></span></pre></div> <a id="brancheswxruby2wxwidgets_282swigclassesincludewxBitmapButtonh"></a> <div class="modfile"><h4>Modified: branches/wxruby2/wxwidgets_282/swig/classes/include/wxBitmapButton.h (892 => 893)</h4> <pre class="diff"><span> <span class="info">--- branches/wxruby2/wxwidgets_282/swig/classes/include/wxBitmapButton.h        2007-03-18 01:42:19 UTC (rev 892) +++ branches/wxruby2/wxwidgets_282/swig/classes/include/wxBitmapButton.h        2007-03-18 09:36:20 UTC (rev 893) </span><span class="lines">@@ -8,91 +8,28 @@ </span><span class="cx"> class wxBitmapButton : public wxButton </span><span class="cx"> { </span><span class="cx"> public: </span><del>-        /** -         * \brief Default constructor. -        */ - </del><span class="cx"> wxBitmapButton() ; </span><del>-        /** -         * \brief -         * \param wxWindow* -         * \param wxWindowID -         * \param const wxBitmap& -         * \param const wxPoint& -         * \param const wxSize& -         * \param long -         * \param const wxValidator& -         * \param const wxString& -        */ - </del><span class="cx"> wxBitmapButton(wxWindow* parent , wxWindowID id , const wxBitmap& bitmap , const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxT("button")) ; </span><del>-        /** -         * \brief Destructor, destroying the button. -        */ - </del><span class="cx"> virtual ~wxBitmapButton() ; </span><del>-        /** -         * \brief Button creation function for two-step creation. For more details, see . -         * \param wxWindow* -         * \param wxWindowID -         * \param const wxBitmap& -         * \param const wxPoint& -         * \param const wxSize& -         * \param long -         * \param const wxValidator& -         * \param const wxString& -        */ - </del><span class="cx"> bool Create(wxWindow* parent , wxWindowID id , const wxBitmap& bitmap , const wxPoint& pos , const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxT("button")); </span><del>-        /** -         * \brief Returns the bitmap for the disabled state. -        */ - </del><span class="cx"> const wxBitmap& GetBitmapDisabled() const; </span><del>-        /** -         * \brief Returns the bitmap for the focused state. -        */ - </del><span class="cx"> const wxBitmap& GetBitmapFocus() const; </span><del>-        /** -         * \brief Returns the label bitmap (the one passed to the constructor). -        */ - </del><ins>+ const wxBitmap& GetBitmapHover() const; </ins><span class="cx"> const wxBitmap& GetBitmapLabel() const; </span><del>-        /** -         * \brief Returns the bitmap for the selected state. -        */ - </del><span class="cx"> const wxBitmap& GetBitmapSelected() const; </span><del>-        /** -         * \brief Sets the bitmap for the disabled button appearance. -         * \param const wxBitmap& -        */ </del><span class="cx"> </span><del>- void SetBitmapDisabled(const wxBitmap& bitmap ) ; -        /** -         * \brief Sets the bitmap for the button appearance when it has the keyboard focus. -         * \param const wxBitmap& -        */ - - void SetBitmapFocus(const wxBitmap& bitmap ) ; -        /** -         * \brief Sets the bitmap label for the button. -         * \param const wxBitmap& -        */ - - void SetBitmapLabel(const wxBitmap& bitmap ) ; -        /** -         * \brief Sets the bitmap for the selected (depressed) button appearance. -         * \param const wxBitmap& -        */ - - void SetBitmapSelected(const wxBitmap& bitmap ) ; - // the following were missing from the xml </del><span class="cx"> wxBitmap& GetBitmapDisabled(); </span><span class="cx"> wxBitmap& GetBitmapFocus(); </span><ins>+ wxBitmap& GetBitmapHover(); </ins><span class="cx"> wxBitmap& GetBitmapLabel(); </span><span class="cx"> wxBitmap& GetBitmapSelected(); </span><ins>+ + void SetBitmapDisabled(const wxBitmap& bitmap ) ; + void SetBitmapFocus(const wxBitmap& bitmap ) ; + void SetBitmapHover(const wxBitmap& bitmap ) ; + void SetBitmapLabel(const wxBitmap& bitmap ) ; + void SetBitmapSelected(const wxBitmap& bitmap ) ; + </ins><span class="cx"> }; </span><span class="cx"> </span><span class="cx"> </span></span></pre> </div> </div> </body> </html>
Apparently Analagous Threads
- [ wxruby-Bugs-6808 ] Double-free segfault on closing app when BitmapButton has been used
- [916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
- [1056] trunk/wxruby2/swig/classes/include/wxToolBar.h: Add missing param to InsertTool long version; uncomment some methods now
- [1103] trunk/wxruby2: Added 2.8 methods to StaticBitmap & document them; cleanup header file
- [1057] trunk/wxruby2/swig/classes/include/wxToolBar.h: Add new methods from the 2.8 API