Page 1 of 1
SetGadgetCursor
Posted: Wed May 14, 2008 1:00 pm
by milan1612
I'd love to see SetGadgetCursor (and of course GetGadgetCursor) in the regular gadget library.
Should be easy to implement on all platforms...
Thanks

Posted: Wed May 14, 2008 1:10 pm
by Fluid Byte
+1

Posted: Wed May 14, 2008 2:21 pm
by CSAUER
+1. That would be really a benefit. It should suit to all text input gadgets: ComboBox, Editor, String
Maybe it could look like this:
Code: Select all
SetGadgetCursor(#Gadget,StartCursorPos,[EndCursorPos])
CursorPos.w = GetGadgetCursor(#Gadget,[EndCursorPos])
I think it makes sense to have a start / end position, as you can have a selection.
Posted: Wed May 14, 2008 2:25 pm
by milan1612
CSAUER wrote:+1. That would be really a benefit. It should suit to all text input gadgets: ComboBox, Editor, String
Maybe it could look like this:
Code: Select all
SetGadgetCursor(Gadget,StartCursorPos,[EndCursorPos])
GetGadgetCursor(Gadget,[EndCursorPos])
I think it makes sense to have a start / end position, as you can have a selection.
Ehm, what I ment was the mouse cursor type
e.g. the normal arrow and the hand...
Posted: Wed May 14, 2008 2:33 pm
by CSAUER
This could be solved via a additional GadgetAttribute, like this:
Code: Select all
SetGadgetAttribute(#Gadget,#PB_Input_CursorType,#PB_Cursor_Default)
SetGadgetAttribute(#Gadget,#PB_Input_CursorType,#PB_Cursor_Hand)
CursorType.l = GetGadgetAttribute(#Gadget,#PB_Input_CursorType)
That would keep the commandset as big as it already is.
So my concern could look the same way, of course:
Code: Select all
SetGadgetAttribute(#Gadget,#PB_Input_CursorPosStart,StartPos.w)
SetGadgetAttribute(#Gadget,#PB_Input_CursorPosEnd,EndPos.w)
StartPos.w = GetGadgetAttribute(#Gadget,#PB_Input_CursorPosStart)
EndPos.w = GetGadgetAttribute(#Gadget,#PB_Input_CursorPosEnd)
What about this idea?
Posted: Wed May 14, 2008 2:41 pm
by milan1612
CSAUER wrote:This could be solved via a additional GadgetAttribute, like this:
Code: Select all
SetGadgetAttribute(#Gadget,#PB_Input_CursorType,#PB_Cursor_Default)
SetGadgetAttribute(#Gadget,#PB_Input_CursorType,#PB_Cursor_Hand)
CursorType.l = GetGadgetAttribute(#Gadget,#PB_Input_CursorType)
That would keep the commandset as big as it already is.
So my concern could look the same way, of course:
Code: Select all
SetGadgetAttribute(#Gadget,#PB_Input_CursorPosStart,StartPos.w)
SetGadgetAttribute(#Gadget,#PB_Input_CursorPosEnd,EndPos.w)
StartPos.w = GetGadgetAttribute(#Gadget,#PB_Input_CursorPosStart)
EndPos.w = GetGadgetAttribute(#Gadget,#PB_Input_CursorPosEnd)
What about this idea?
Looks fine for me

Posted: Wed May 14, 2008 3:02 pm
by Derek
And of course some cursor commands like createcursor(), loadcursor(), copycursor() etc
Posted: Wed May 14, 2008 3:50 pm
by Rook Zimbabwe
I would also love this, but this probaly won't happen unless someone codes a DLL... PC, Mac and Linux cursor commands are too different. (Well the older ones were in 1995!)
