On 25 Feb 2012, at 19:32, M3taSpl0it wrote: > I was reading section 8.9 Event Propagation , and I encountered some methods > in that sections said to be controlling the leaf widgets.
Ah - I couldn't grok that section number, but I realise now you are referring to the PDF of the 1.3.0 docs? I'm not sure what the question you are asking is. All the methods are documented, and their usage seems simple enough, what is it you are struggling with? > • Fl::add_handler() Allows you to add a handler to parse events or messages (e.g. sent by the OS to your app) that fltk does not parse for you. > • Fl::belowmouse() Allows you to determine which widget the mouse is currently over, e.g. if you are doing your own event handling. > • Fl::focus() Tells you which widget currently has the focus, e.g. if you are doing your own event handling... > • Fl::grab() Tells you which widget (if any) currently has the grab active, e.g. if you are doing your own event handling... > • Fl::modal() Tells you which window (if any) is currently modal, e.g. if you are doing your own event handling... > • Fl::pushed() Tells you which widget (if any) is currently pushed, e.g. if you are doing your own event handling... > • Fl_Widget::take_focus() Allows you to try and make some specific widget take the focus, e.g. if you are doing your own event handling... > I just want to what they're all about , why we needed these function , It'd > be awesome if you could please explain by example only one of those important > methods. You probably don't need any of these methods in general use - they are more useful if you are doing something that requires special event handling. > Another question : I'm using Fl_Text_Display widget which has to have buffer > of type Fl_Text_Buffer , Which I initialize with sufficient buffer size. Now > to update the text of buffer I'm using it's Fl_Text_Buffer::insert() method. > is it OK to do that? , is this the idiom to update the buffer (exclude append > here please)? Um, I didn't understand the question - what are you asking about? > Last question : Again, I'm struggling to see what you are having difficulty with - these methods are all documented, and the descriptions seems sensible to me; where do you think this is lacking? Can you tell us what we need to do to make it clearer? > "Fl::event_button() You can get an FL_PUSH for any mouse button - so you can use this in your handler to see which button was pushed, and respond accordingly. > Fl::event_clicks() Makes it easier to detect cases where the mouse was double (or triple, or more...) clicked when the event handler was triggered. > Fl::event_dx()" , Used for handling mousewheel movement steps sizes and so forth. > these method are any useful at all? , Yes, they are useful. > since suppose my event handler gets called for some event click etc , then I > already know which event caused my handler to invoke (supposing my function > currently handles only one event at the time) , then why should I use this > call Fl::event_clicks(); at all?. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

