SetGadgetCursor

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

SetGadgetCursor

Post 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 :P
Windows 7 & PureBasic 4.4
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

+1 :P
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
CSAUER
Enthusiast
Enthusiast
Posts: 188
Joined: Mon Oct 18, 2004 7:23 am
Location: Germany

Post 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.
Last edited by CSAUER on Wed May 14, 2008 2:34 pm, edited 1 time in total.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PB4.1 - Win: MacBook black 2008 2,4 GHz, 4 GB RAM, MacOSX 10.5/VMWare/WinXP
PB4.1 - Mac: MacMini G4 1,4 GHz, 512 MB RAM, MacOSX 10.4
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post 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 :wink:
e.g. the normal arrow and the hand...
Windows 7 & PureBasic 4.4
CSAUER
Enthusiast
Enthusiast
Posts: 188
Joined: Mon Oct 18, 2004 7:23 am
Location: Germany

Post 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?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PB4.1 - Win: MacBook black 2008 2,4 GHz, 4 GB RAM, MacOSX 10.5/VMWare/WinXP
PB4.1 - Mac: MacMini G4 1,4 GHz, 512 MB RAM, MacOSX 10.4
milan1612
Addict
Addict
Posts: 894
Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:

Post 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 :P
Windows 7 & PureBasic 4.4
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

And of course some cursor commands like createcursor(), loadcursor(), copycursor() etc
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post 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!) :D
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
Post Reply