virtual void
BlitzMax Forums/BlitzMax Programming/virtual void
| ||
Damn... I've "tracked" down the original source of the GUI SelectTextAreaText command and finally reach this: virtual void selectText( int pos,int len,int units )=0; DAMN... where can I see the code behind this virtual void????????? I 'm assuming this is the command used by Mark in the IDE to recenter the code: when the cursor if offscreen, if you hit an arrow keys, or add or delete some text, the text area is recentered so that the current text being modified appears on screen... and he does this knowing only the carpos and linepos of the cursor... I desperately need to know how he does this 'cause somewhere in the process he must convert this damn forsaken carpos to it's x/y pixel coordinates... so please someone tell me where to get the code behind this virtual void pleaaaaaaaaase thanks a lot |
| ||
I don't have the code right here but - that method must be overriden in a derivation... so: look for selectText in other files where it appears like this void selectText(int pos,int len,int units); it will be from another class that actually has the implementation. The problem is, it will probably be more than one - maybe one per platform? |
| ||
okay, thanks... I m beginning to think that I'll let the x,y coordinates where they are and simply bring up my menu where the mouse is, and people will have to cop up with it :) or maybe I could ask Mark directly???? |
| ||
Curious, I dug around and found brl.mod\win32maxgui.mod\win32gui\win32textarea.cpp, which is where it looks like TextAreas are really handled in Windows. Some more digging suggests that EM_POSFROMCHAR may well do what you want: it returns the x,y coords of a given character in screen units relative to the upper-left corner of the control's client area. That could probably be added most simply there, but in Help's MaxGUI Overview, it's suggested that "those wanting to interface at a lower level with the Operating System of their choice do so in the privacy of their own modules rather than becoming muddied in the source of the lowlevel platform specific BRL modules." |
| ||
As a side note, the the Windows implementation of MaxGUI was ripped ruthlessly from BlitzPlus... which is why it's all in C. skiddy is slowly converting it to real Max code, an experimental build of the (windowsmaxgui) is available by syncing for his axe mods. |