Murga-Projects Forums
How to keep track of a window? - Printable Version

+- Murga-Projects Forums (http://www.murga-projects.com/forum)
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: How to keep track of a window? (/showthread.php?tid=260)


How to keep track of a window? - iGame3D - 12-31-2007 04:33 PM

What calls do we make to get the rectangle of a window once we've made it?
If the user changes sizes during runtime how can I track that?

I tried getting data from quadmap:size_range() and quadmap:get_size_range()
and they both crashed.

Don't know what else to try.


RE: How to keep track of a window? - mikshaw - 01-01-2008 01:20 AM

I can't recall specifically right now...there are some very similarly named functions in FLTK.

Here are a few you could try...

widget:x()
widget:y()
widget:h()
widget:w()
widgetTongueosition()


RE: How to keep track of a window? - iGame3D - 01-01-2008 12:42 PM

Thanks I wonder what those would be called in the docs.

I get so lost in the land of FLTK.

widgetTongueosition() is illegal however.

But those others are just the values I need right now.
Thanks again.


RE: How to keep track of a window? - mikshaw - 01-02-2008 11:14 AM

I've found the FLTK docs to be a little confusing at times, but the one thing that has made them most clear to me is keeping in mind that they show a hierarchy.
If you think of "widget" as being the top level of FLTK widgets, practically all of the other widgets fall under that label. Most methods used by the "widget" object are also used by other widgets. Most any method used by "Input" is also used by Output and Multiline_Input, and on and on like that. So you might find some methods not described under a specific widget, but under the parent widget, or the parent of a parent of that widget.