MaxGUI Requests
BlitzMax Forums/MaxGUI Module/MaxGUI Requests
| ||
First, I am very happy that MaxGUI is being developed. The implementation of win32maxguiex using BlitzMax code makes it much easier to tweak and add to the module. Below are a few requests I have that would make the module even better. Numberical/decimal textfield styles This can easily be added by settings a gadget filter to filter out everything except numbers, or for a decimal style, include the "." character. GadgetState(), SetGadgetState() I think the implementation of all the gadget-specific commands was a small mistake. They can be left in, but GadgetState() could be used instead of SelectedGadgetItem(), SliderValue(), ButtonState(), etc. There's a module tweak in the appropriate forum showing how I did this. TreeView node drag I'd like to be able to create a new object by grabbing a treeview node and dragging it onto a canvas. This would really be a nice feature. More Notify() flags A question mark flag would be nice. Property Editor Gadget A property grid is the ultimate gadget. I don't know if this is something Windows actually supports, or if it is always just a hack drawn with GDI. If the latter is true, I do not think it should be included in MaxGUI. That's all I can think of. |
| ||
Oh, a wishlist thread... :o) Icon listboxes An ordinary listbox gadget that only consists of icon images (and tooltips attached to them). No text fields at all. Table gadgets Too tough, I know... :( P.S.: Seb, your're doing a great job on the new maxgui module! So everything you've done already is more than I had hoped for. |
| ||
...or for a decimal style, include the "." character. except that a "." (point) isn't a decimal separator in all countries.. F.ex., in Norway, it's "," (comma).. the point is used for thousands.. like this: 1.000,00 ..other than that; good ideas!! :) |
| ||
Numberical/decimal textfield styles This is "so easy" to code yourself to your own purpose using SetGadgetFilter, it hardly seems worth it...although I concede it might make it marginally more beginner friendly. I'd also agree with the Notify() request, and the "table" or "Listview" gadgets (including icon support). Personal requests that relate to the CE IDE that I can think of: TextAreaX/Y Obtain the current cursor graphical x & y from a text area, and / or the graphical x,y position of a given character in a text area. I realise this is almost certainly limited by the underlying gadgets. FontWidth Return the width of a fixed width GUI font (so that tabs in textareas can be set consistently!). |
| ||
There's a module tweak in the appropriate forum showing how I did this. Lets leave this as a tweak. PureBasic is hardly something we should be trying to emulate. |
| ||
Listview Gadgets These would be beyond handy. More Window gadget styles Maybe a window without any caption buttons? Or maybe a window without an icon? Tooltip implementation ie. CreateTooltip:TGadget(title:String,x:Int,y:Int,width:Int,height:Int,group:TGadget,style:Int) These are my requests at the moment. :) |
| ||
Tooltip implementation See SetGadgetTooltip in the new maxgui module for multi-line tooltips on pretty much any gadget. Okay, so you can't make them whatever size / position you want, but that's getting into platform-specific / custom GUI behaviour, and not really appropriate to the maxgui module IMHO. We'd need to be careful with window styles, as you have to remember this needs to be reasonably consistent across all 3 platforms. |
| ||
Another one: GadgetX/Y ( Desktop() ) Should yield the mouse X / Y on the desktop. This one has narced me from the early maxgui beta days. ;-) More tabber styles Specifically - being able to have the tabs aligned at the bottom or side of the gadget. Not sure if this is valid on all platforms? And it would be lovely to be able to drag tabs, although I suspect that's much harder. Even if that were just exposing the events that would enable us to handle it, that might do the job? |
| ||
That's a good idea. An optional gadget for GadgetX(), Y() commands. Here's how I did mine, though this isn't as user-friendly:Strict Import pub.win32 Import maxgui.maxgui Extern "win32" Function ScreenToClient:Int(hwnd,lpPoint:Byte Ptr)="ScreenToClient@8" Function ClientToScreen:Int(hwnd,lpPoint:Byte Ptr)="ClientToScreen@8" Function SetCursorPos:Int(x,y)="SetCursorPos@8" Function GetCursorPos:Int(lpPoint:Byte Ptr)="GetCursorPos@4" EndExtern Function coord:TCoord(x,y) Local screencoord:TCoord=New TCoord screencoord.x=x screencoord.y=y Return screencoord EndFunction Type TCoord Field x,y Method pointer:Byte Ptr() Return Varptr x EndMethod Method copy:TCoord() Return Coord(x,y) EndMethod EndType Function GetGadgetCoord:TCoord(gadget:TGadget,glob=0) If glob Return TFormCoord( Coord(GadgetX(gadget),GadgetY(gadget)),GadgetGroup(gadget),Null ) Else Return Coord(GadgetX(gadget),GadgetY(gadget)) EndIf EndFunction Function SetMouseCoord(c:TCoord,gadget:TGadget=Null) If gadget c=TFormCoord(c,gadget,Null) setcursorpos c.x,c.y EndFunction Function TFormCoord:TCoord(c:TCoord,src:TGadget,dst:TGadget) c=c.copy() If src ClientToScreen QueryGadget(src,QUERY_HWND),c.pointer() If dst ScreenToClient QueryGadget(dst,QUERY_HWND),c.pointer() Return c EndFunction |
| ||
Why did you name the TCoord creation function "coord" and why did you not put it inside of TCoord? (coord would be the same as TCoord.coord, or better formatted TCoord.Create) |
| ||
A few of my thoughts on each item: 1. Numerical/Decimal Textfield Styles Yeah - this could be really easily implemented by just having some standard built-in gadget filter function in MaxGUI. 2. TreeView Node Nice to have, but would be quite hard to devise an API for. Also, surely implementing this would mean having to implement proper drag n' drop support to the other gadgets too. 3. Notify Would be nice, but this is more of an improvement for BRL.System as oppose to MaxGUI. 4. Icon Listboxes Obviously it would be possible on Windows, will have to look into the other platforms to see if it is cross-platform compatible. 5. Table Gadgets :-) I don't think I have the expertise to even attempt to implement such a control on Windows, let alone Cocoa. 6. TextAreaX/Y I thought the main reason people wanted this was for optimizing code parsers but the new Windows text-area is so fast anyway, is there still a need? 7. Font Width Hmmmm... Really wouldn't know where to start on this one. Have you had a look at Brucey's BaH.FontConfig module? 8. Listview Gadgets I assume this is the same idea as Grisu's table gadget, or is a request for multi-column listboxes? 9. More Window Gadget Styles As Mark T said, OS X is picky about what windows should look like and is rather inflexible in this respect. A WINDOW_CENTER flag should be easy to implement. 10. Tooltip Implementation I can't really see a large demand for this now that people can assign tooltips to gadgets. Why would you want a tooltip if it wasn't describing a particular gadget? 11. Mouse X/Y Pos Again, would be welcome, but possibly more of a BRL.System tweak? 12. Vertical Tabs I'm not sure if a cross-platform solution is available - never seen a vertical tab on OS X but will look into this. |
| ||
Why did you name the TCoord creation function RSI circumvention. |
| ||
8. Listview Gadgets I assume this is the same idea as Grisu's table gadget, or is a request for multi-column listboxes? Yeah, a multi-column listbox is what I meant. |
| ||
Yeah, a multi-column listbox is what I meant. +1 |
| ||
6. TextAreaX/Y It's being able to find out the current on screen X & Y coords of a given bit of text (or the text cursor) in the text area. Useful for positioning a drop-down list of auo-complete options, also you need some Y info like this if you want to implement a gutter of some form to highlight things, possibly even if you wanted to do code-folding. Although by the time you get to the latter, you may as well have rolled your own gadget...or used scintilla... 7. Font Width I just always felt it was a very obvious gap (FontHeight exists after all), and would be useful. I did play briefly with the fontconfig modules, but got in a bit of a mess from what I recall getting things installed and working. |
| ||
If you have a window center function, please please please code in some more detailed desktop api functionality. I absolutly hate applications that presume the center should be the center of the global desktop resolution. If you don't know what I am getting at, then you might need two monitors to understand. It would be good if we could get a list of active monitors/desktops. Find the primary, and allow a window to be centered in said desktop! This could also be useful for application writters wanting to take advantage of multi-screen displays. Your program can initialize different windows on different screens. Useful for a preview window, different 3d perspectives, multi-screen games? loads of stuff. Also SECOND, thrird, until inifinity the table/multi-column gadget. Even if it didnt allow some of the stuff teh more advanced ones allow, the ability to lay data out in a grid is ESSENTIAL for probably 9/10 applications. |
| ||
Infinity+1: table/multi-column gadget |