noreply at rubyforge.org
2008-May-26 14:32 UTC
[wxruby-development] [ wxruby-Feature Requests-20367 ] wxToolBarTool (wxToolBarToolBase) missing, thus anti-OO
Feature Requests item #20367, was opened at 26/05/2008 16:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=221&aid=20367&group_id=35 Category: Missing class(es) Group: None Status: Open Priority: 3 Submitted By: Pascal Hurni (phi) Assigned to: Kevin Smith (qualitycode) Summary: wxToolBarTool (wxToolBarToolBase) missing, thus anti-OO Initial Comment: The fact that WxToolBarTool is missing (these object represent a tool in a toolbar) makes it anti-OO and thus less rubyesque to manage toolbars. Toolbars are the last component (as I''v seen) that requires concrete ID''s. This is a pain to handle in ruby. We want objects (propaganda). Example: tb = Wx::Toolbar.new(frame) tb.add_tool(1000, "Click me", fancy_bitmap) tb.add_tool(1001, "Don''t click here", fancy_bitmap) evt_tool(1000) { puts "Great job" } evt_tool(1001) { puts "I warned you" } Those IDs: 1000, 1001 may clash with other toolbars on the same frame. For a fixed app this may be not a great problem, but for generated apps it''s a mess. I really want to be able to do tb = Wx::Toolbar.new(frame) tryme = tb.add_tool(Wx::ID_ANY, "Click me", fancy_bitmap) dangerous = tb.add_tool(Wx::ID_ANY, "Don''t click here", fancy_bitmap) evt_tool(tryme) { puts "Great job" } evt_tool(dangerous) { puts "I warned you" } (Well, those ID_ANY should also go away, but this can be done with keyed constructor arguments) That''s it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=221&aid=20367&group_id=35
Possibly Parallel Threads
- [1056] trunk/wxruby2/swig/classes/include/wxToolBar.h: Add missing param to InsertTool long version; uncomment some methods now
- [916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
- [1055] trunk/wxruby2/swig/classes/ToolBar.i: Chnage methods returning ToolBarToolBase to return position of new tool;
- [1059] trunk/wxruby2/doc/textile/toolbar.txtl: Update ToolBar documentation to reflect recent changes in API
- copy & paste event