From: <kr_...@us...> - 2003-03-26 19:20:31
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO In directory sc8-pr-cvs1:/tmp/cvs-serv31265/gio/src/Graphics/UI/GIO Modified Files: Attributes.hs Controls.hs Log Message: Added implementation for tooltips Index: Attributes.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Attributes.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Attributes.hs 26 Mar 2003 08:54:55 -0000 1.6 --- Attributes.hs 26 Mar 2003 19:20:23 -0000 1.7 *************** *** 67,70 **** --- 67,73 ---- -- ** Able , Able, enabled + + -- ** ToolTip + , ToolTip, tooltip -- ** Selection *************** *** 257,260 **** --- 260,268 ---- -- | Enable, or disable, the widget. enabled :: Attr w Bool + + -- | Widgets that supports tooltips. + class ToolTip w where + -- | The tip text + tooltip :: Attr w String -- | Widgets that can be checked. Index: Controls.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Controls.hs 26 Mar 2003 17:11:47 -0000 1.6 --- Controls.hs 26 Mar 2003 19:20:23 -0000 1.7 *************** *** 59,62 **** --- 59,65 ---- instance Able Label where enabled = newAttr (Port.getControlEnabled . lhandle) (Port.setControlEnabled . lhandle) + + instance ToolTip Label where + tooltip = newAttr (Port.getControlTip . lhandle) (Port.setControlTip . lhandle) instance Control Label where *************** *** 93,96 **** --- 96,102 ---- instance Able Button where enabled = newAttr (Port.getControlEnabled . bhandle) (Port.setControlEnabled . bhandle) + + instance ToolTip Button where + tooltip = newAttr (Port.getControlTip . bhandle) (Port.setControlTip . bhandle) instance Control Button where *************** *** 131,134 **** --- 137,143 ---- instance Able Entry where enabled = newAttr (Port.getControlEnabled . ehandle) (Port.setControlEnabled . ehandle) + + instance ToolTip Entry where + tooltip = newAttr (Port.getControlTip . ehandle) (Port.setControlTip . ehandle) instance Control Entry where *************** *** 196,199 **** --- 205,211 ---- instance Able Popup where enabled = newAttr (Port.getControlEnabled . phandle) (Port.setControlEnabled . phandle) + + instance ToolTip Popup where + tooltip = newAttr (Port.getControlTip . phandle) (Port.setControlTip . phandle) instance Control Popup where *************** *** 347,350 **** --- 359,365 ---- instance Able Check where enabled = newAttr (Port.getControlEnabled . chandle) (Port.setControlEnabled . chandle) + + instance ToolTip Check where + tooltip = newAttr (Port.getControlTip . chandle) (Port.setControlTip . chandle) instance Control Check where *************** *** 384,387 **** --- 399,405 ---- instance Able Radio where enabled = newAttr (Port.getControlEnabled . rhandle) (Port.setControlEnabled . rhandle) + + instance ToolTip Radio where + tooltip = newAttr (Port.getControlTip . rhandle) (Port.setControlTip . rhandle) instance Control Radio where |