Displaying 14 results from an estimated 14 matches for "evt_siz".
Did you mean:
evt_size
2004 Jun 11
9
Handling Events that don''t take an ID
Hey Kevin,
Am I correct in assuming that if I want a particular widget to respond to an
event which doesn''t take an ID as an argument (like evt_size or
evt_left_down), that I have to inherit a new widget and define the event
handler within the inherited class? Here''s a little contrived code example
to illustrate what I mean:
class MyCtrl < Wx::TextCtrl
def initialize()
evt_size {|event| on_size(event)}
end
def on_...
2007 May 31
0
[1040] trunk/wxruby2/swig/Events.i: Add List and Splitter constants, also EVT_SIZING and EVT_MOVING
...und:#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>[1040] trunk/wxruby2/swig/Events.i: Add List and Splitter constants, also EVT_SIZING and EVT_MOVING</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>1040</dd>
<dt>Author</dt> <dd>brokentoy</dd>
<dt>Date</dt> <dd>2007-05-31 17:14:53 -0400 (Thu, 31 May 2007)&l...
2007 Sep 10
2
syntax II
...lers
In most real apps, I think the most normal way to set up event handlers
is for the event to be dealt with by a corresponding method. At the
moment this has to be done using a block:
evt_button(AN_ID) { on_button_click }
evt_button(my_button.get_id) do | event |
on_button_click(event)
end
evt_size { | event | on_size(event) }
This is a sensible way to organise classes but it seems to have
redundancy in it. The bigger one is having to create a block, with
param, just to call a method; the smaller one is having to call a method
to get a window id. So I''d like to suggest as altern...
2007 Jun 28
0
[1091] trunk/wxruby2/lib/wx/classes/evthandler.rb: Add interim event type mappings for a few obscure oddities
...quot;cx"> EventType[''evt_set_focus'', 0,
</span><span class="cx"> Wx::EVT_SET_FOCUS,
</span><span class="cx"> Wx::FocusEvent],
</span><span class="cx"> EventType[''evt_size'', 0,
</span><span class="cx"> Wx::EVT_SIZE,
</span><span class="cx"> Wx::SizeEvent],
</span><ins>+ EventType[''evt_sizing'', 0,
+ Wx::EVT_SIZING,
+ Wx::SizeEv...
2007 Jun 06
0
[1054] trunk/wxruby2: Add missing EraseEvent and mapping for EVT_ERASE_BACKGROUND, fix unknown
...t;<span class="cx"> Wx::EVT_PAINT => Wx::PaintEvent,
</span><ins>+ Wx::EVT_ERASE_BACKGROUND => Wx::EraseEvent,
</ins><span class="cx"> Wx::EVT_UPDATE_UI => Wx::UpdateUIEvent,
</span><span class="cx"> Wx::EVT_SIZE => Wx::SizeEvent,
</span><span class="cx"> Wx::EVT_SIZING => Wx::SizeEvent,
</span></span></pre></div>
<a id="trunkwxruby2swigclassesEraseEventi"></a>
<div class="addfile"><h4>Added: trunk/wxruby2/s...
2007 Sep 17
7
Re : syntax II
...nk the most normal way to set up event handlers
>is for the event to be dealt with by a corresponding method. At the
>moment this has to be done using a block:
>
>evt_button(AN_ID) { on_button_click }
>evt_button(my_button.get_id) do | event |
> on_button_click(event)
>end
>evt_size { | event | on_size(event) }
>
>So I''d like to suggest as alternatives:
>
>evt_button(AN_ID, :on_button_click)
>evt_button my_button, :on_button_click
>evt_size :on_size
These are very useful additions especially the second one which
removes the need for getting the id...
2004 Apr 21
2
Resizing a ListCtrl
...0),
LC_REPORT | LC_SINGLE_SEL)
fillListCtrl()
centerSizer.add(@fileList, 6, GROW|EXPAND)
# }}}
@dlgSizer.add(centerSizer, 1)
@dlgSizer.set_size_hints(self)
set_sizer(@dlgSizer)
# end main layout }}}
## global events {{{
evt_close {onClose}
evt_size() {|event| onSize(event) }
# }}}
end ## }}}
def onClose ## {{{
destroy()
end ## }}}
def onSize(event=nil)
frame_size = event.get_size
x = frame_size.x - 10
y = frame_size.y - 10
@fileList.set_size_xy(x, y)
event.skip() if event
end
def fillListCtrl...
2007 Jun 25
0
[1067] trunk/wxruby2: Set up event handlers in Ruby rather than by post-processing SWIG output
...x::EVT_COMMAND_COMBOBOX_SELECTED => Wx::CommandEvent,
- Wx::EVT_COMMAND_TEXT_URL => Wx::TextUrlEvent,
- Wx::EVT_IDLE => Wx::IdleEvent,
- Wx::EVT_PAINT => Wx::PaintEvent,
- Wx::EVT_ERASE_BACKGROUND => Wx::EraseEvent,
- Wx::EVT_UPDATE_UI => Wx::UpdateUIEvent,
- Wx::EVT_SIZE => Wx::SizeEvent,
- Wx::EVT_SIZING => Wx::SizeEvent,
- Wx::EVT_MOVE => Wx::MoveEvent,
- Wx::EVT_MOVING => Wx::MoveEvent,
- Wx::EVT_TIMER => Wx::TimerEvent,
- Wx::EVT_CHAR => Wx::KeyEvent,
- Wx::EVT_CHAR_HOOK => Wx::KeyEvent,
- Wx::EVT_KEY_DOWN => Wx::Ke...
2009 Dec 12
4
grid et boxsizer
Bonjour.
Une fois mon application ouverte, je voudrais savoir, si cela est
possible, comment dimensionner automatiquement la totalité des colonnes
du grid à la taille de mon boxsizer, quand je change la taille de mon
application? (puique mon grid est inséré dans mon boxsizer).
merci
2007 May 29
0
[1035] trunk/wxruby2/swig/classes/EvtHandler.i: Removed a heap of redundant stuff that''s been #if 0''d for a while
...-static VALUE evt_show(int argc, VALUE *argv, VALUE self)
-{
- return internal_evt_no_parameters(argc, argv, self, wxEVT_SHOW);
-}
-
-static VALUE evt_window_create(int argc, VALUE *argv, VALUE self)
-{
- return internal_evt_no_parameters(argc, argv, self, wxEVT_CREATE);
-}
-
-static VALUE evt_size(int argc, VALUE *argv, VALUE self)
-{
- return internal_evt_no_parameters(argc, argv, self, wxEVT_SIZE);
-}
-
-static VALUE evt_key_down(int argc, VALUE *argv, VALUE self)
-{
- return internal_evt_no_parameters(argc, argv, self, wxEVT_KEY_DOWN);
-}
-
-static VALUE evt_key_up(int argc, VALU...
2007 May 31
0
[1042] trunk/wxruby2: Overhaul of the event handling WxType->RubyClass mapping to make it
...MAND_SPINCTRL_UPDATED => Wx::CommandEvent,
+ Wx::EVT_COMMAND_COMBOBOX_SELECTED => Wx::CommandEvent,
+ Wx::EVT_COMMAND_TEXT_URL => Wx::TextUrlEvent,
+ Wx::EVT_IDLE => Wx::IdleEvent,
+ Wx::EVT_PAINT => Wx::PaintEvent,
+ Wx::EVT_UPDATE_UI => Wx::UpdateUIEvent,
+ Wx::EVT_SIZE => Wx::SizeEvent,
+ Wx::EVT_SIZING => Wx::SizeEvent,
+ Wx::EVT_MOVE => Wx::MoveEvent,
+ Wx::EVT_MOVING => Wx::MoveEvent,
+ Wx::EVT_TIMER => Wx::TimerEvent,
+ Wx::EVT_CHAR => Wx::KeyEvent,
+ Wx::EVT_CHAR_HOOK => Wx::KeyEvent,
+ Wx::EVT_KEY_DOWN => Wx::Ke...
2007 Jan 09
6
help w/push_event_handler plus doc update request
Hi,
1) Can the online api docs get updated? Specifically can the overview
pages get added in to the main http://wxruby.rubyforge.org/doc/
index.html page? I happened upon the link to the Event Overview page
while browsing some class and wished that it had been listed in the
Event section of the index page.I don''t know how many other
"overview" pages there are but it
2007 Mar 22
0
[916] branches/wxruby2/wxwidgets_282: More Wx::AUI classes, event hooks and sample
...rr
+ end
+end
+
+# A resizable control that displays its current size, and, if an AUI
+# arrangement, its position and layer
+class SizeReportCtrl < Wx::Control
+ def initialize(parent, id, pos, size, mgr = nil)
+ super(parent, id, pos, size)
+ @mgr = mgr
+ evt_paint { on_paint }
+ evt_size { on_size }
+ end
+
+ def on_paint
+ paint do | dc |
+ size = get_client_size
+
+ dc.set_font Wx::NORMAL_FONT
+ dc.set_brush Wx::WHITE_BRUSH
+ dc.set_pen Wx::WHITE_PEN
+ dc.draw_rectangle(0, 0, size.x, size.y)
+ dc.set_pen Wx::LIGHT_GREY_PEN
+ dc.set_pen...
2007 Mar 17
0
[883] branches/wxruby2/wxwidgets_282/swig: API changes for move to WxWidgets 2.8
..., 2, "wxEVT_SCROLL_THUMBTRACK"],
</span><del>-["EVT_LIST_GET_INFO", 2, "wxEVT_COMMAND_LIST_GET_INFO"],
</del><ins>+#["EVT_LIST_GET_INFO", 2, "wxEVT_COMMAND_LIST_GET_INFO"],
</ins><span class="cx"> ["EVT_SIZE", 1, "wxEVT_SIZE"],
</span><span class="cx"> ["EVT_RIGHT_DOWN", 1, "wxEVT_RIGHT_DOWN"],
</span><span class="cx"> ["EVT_ENTER_WINDOW", 1, "wxEVT_ENTER_WINDOW"],
</span><span class="lines...