Commit 0a6b09b2 authored by Peter Achten's avatar Peter Achten
Browse files

(PA) Hiding/Showing controls improved.

CompoundControl/LayoutControl introduced.
Some control functions in StdWindow moved to StdControl.
parent bd389557
...@@ -156,8 +156,9 @@ OScreateGameWindow :: !Bool !(!Int,!Int) !Int !*OSToolbox -> (![DelayActivationI ...@@ -156,8 +156,9 @@ OScreateGameWindow :: !Bool !(!Int,!Int) !Int !*OSToolbox -> (![DelayActivationI
creates a CustomButtonControl in the window identified by parentWindow. creates a CustomButtonControl in the window identified by parentWindow.
OScreateCustomControl parentWindow parentPos able pos size OScreateCustomControl parentWindow parentPos able pos size
creates a CustomControl in the window identified by parentWindow. creates a CustomControl in the window identified by parentWindow.
OScreateCompoundControl parentWindow parentPos show able pos size hScrollInfo vScrollInfo OScreateCompoundControl parentWindow parentPos show able isTransparent pos size hScrollInfo vScrollInfo
creates a CompoundControl in the window identified by parentWindow. creates a CompoundControl in the window identified by parentWindow.
The Boolean isTransparent should be True iff the CompoundControl has no ControlLook attribute.
*/ */
:: OKorCANCEL :: OKorCANCEL
= OK | CANCEL | NORMAL = OK | CANCEL | NORMAL
...@@ -189,7 +190,7 @@ OScreateCustomControl :: !OSWindowPtr !(!Int,!Int) !Bool !Bool !(!Int,!Int) !(! ...@@ -189,7 +190,7 @@ OScreateCustomControl :: !OSWindowPtr !(!Int,!Int) !Bool !Bool !(!Int,!Int) !(!
, cbiState :: (Int,Int,Int,Int) // Its (min,thumb,max,thumbsize) settings , cbiState :: (Int,Int,Int,Int) // Its (min,thumb,max,thumbsize) settings
} }
OScreateCompoundControl :: !OSWindowMetrics !OSWindowPtr !(!Int,!Int) !Bool !Bool !(!Int,!Int) !(!Int,!Int) OScreateCompoundControl :: !OSWindowMetrics !OSWindowPtr !(!Int,!Int) !Bool !Bool !Bool !(!Int,!Int) !(!Int,!Int)
!ScrollbarInfo !ScrollbarInfo !*OSToolbox !ScrollbarInfo !ScrollbarInfo !*OSToolbox
-> (!OSWindowPtr,!OSWindowPtr,!OSWindowPtr,!*OSToolbox) -> (!OSWindowPtr,!OSWindowPtr,!OSWindowPtr,!*OSToolbox)
......
...@@ -580,17 +580,17 @@ OScreateCustomControl parentWindow parentPos show able (x,y) (w,h) tb ...@@ -580,17 +580,17 @@ OScreateCustomControl parentWindow parentPos show able (x,y) (w,h) tb
, cbiState :: (Int,Int,Int,Int) // Its (min,thumb,max,thumbsize) settings , cbiState :: (Int,Int,Int,Int) // Its (min,thumb,max,thumbsize) settings
} }
OScreateCompoundControl :: !OSWindowMetrics !OSWindowPtr !(!Int,!Int) !Bool !Bool !(!Int,!Int) !(!Int,!Int) OScreateCompoundControl :: !OSWindowMetrics !OSWindowPtr !(!Int,!Int) !Bool !Bool !Bool !(!Int,!Int) !(!Int,!Int)
!ScrollbarInfo !ScrollbarInfo
!ScrollbarInfo !ScrollbarInfo
!*OSToolbox !*OSToolbox
-> (!OSWindowPtr,!OSWindowPtr,!OSWindowPtr,!*OSToolbox) -> (!OSWindowPtr,!OSWindowPtr,!OSWindowPtr,!*OSToolbox)
OScreateCompoundControl wMetrics parentWindow parentPos show able (x,y) (w,h) OScreateCompoundControl wMetrics parentWindow parentPos show able isTransparent (x,y) (w,h)
hInfo=:{cbiHasScroll=hasHScroll} hInfo=:{cbiHasScroll=hasHScroll}
vInfo=:{cbiHasScroll=hasVScroll} tb vInfo=:{cbiHasScroll=hasVScroll} tb
# (x,y) = (x-fst parentPos,y-snd parentPos) # (x,y) = (x-fst parentPos,y-snd parentPos)
scrollFlags = (if hasHScroll WS_HSCROLL 0) bitor (if hasVScroll WS_VSCROLL 0) scrollFlags = (if hasHScroll WS_HSCROLL 0) bitor (if hasVScroll WS_VSCROLL 0)
createcci = Rq6Cci CcRqCREATECOMPOUND parentWindow x y w h scrollFlags createcci = Rq6Cci CcRqCREATECOMPOUND parentWindow (x<<16+(y<<16)>>16) w h scrollFlags (toInt isTransparent)
# (returncci,tb)= IssueCleanRequest2 osIgnoreCallback createcci tb # (returncci,tb)= IssueCleanRequest2 osIgnoreCallback createcci tb
compoundPtr = case returncci.ccMsg of compoundPtr = case returncci.ccMsg of
CcRETURN1 -> returncci.p1 CcRETURN1 -> returncci.p1
......
...@@ -1001,7 +1001,7 @@ where ...@@ -1001,7 +1001,7 @@ where
= (itemH.wItemNr,WItemHandle itemH) = (itemH.wItemNr,WItemHandle itemH)
// otherwise // otherwise
= (0,WItemHandle itemH) = (0,WItemHandle itemH)
| kind<>IsCompoundControl | not (isRecursiveControl kind)
= (0,WItemHandle itemH) = (0,WItemHandle itemH)
| otherwise | otherwise
# (itemNr,itemHs) = getControlsKeyFocusItemNr` activated cPtr itemH.wItems # (itemNr,itemHs) = getControlsKeyFocusItemNr` activated cPtr itemH.wItems
......
...@@ -8,9 +8,73 @@ definition module StdControl ...@@ -8,9 +8,73 @@ definition module StdControl
// ******************************************************************************** // ********************************************************************************
from StdFunc import St import StdControlClass
import StdControlDef, StdMaybe
from StdPSt import PSt, IOSt
controlSize :: !(cdef .ls (PSt .l)) !Bool
!(Maybe (Int,Int)) !(Maybe (Int,Int)) !(Maybe (Int,Int))
!(PSt .l)
-> (!Size,!PSt .l) | Controls cdef
/* controlSize calculates the size of the given control definition as it would be
opened as an element of a window/dialog.
The Boolean argument determines whether a window (True) or a dialog (False) is
intended.
The Maybe arguments are the prefered horizontal margins, vertical margins, and
item spaces (see also the (Window/Control)(H/V)Margin and
(Window/Control)ItemSpace attributes). If Nothing is specified, their
default values with respect to the window/dialog are used.
*/
/* Functions that change the set of controls in windows/dialogues.
*/
openControls :: !Id .ls (cdef .ls (PSt .l)) !(PSt .l)
-> (!ErrorReport,!PSt .l)
| Controls cdef
openCompoundControls :: !Id .ls (cdef .ls (PSt .l)) !(PSt .l)
-> (!ErrorReport,!PSt .l)
| Controls cdef
openPopUpControlItems :: !Id !Index ![PopUpControlItem (PSt .l)]
!(IOSt .l) -> IOSt .l
/* openControls
adds the given controls argument to the indicated window or dialog.
openCompoundControls
adds the given controls argument to the indicated compound control.
openPopUpControlItems
adds the PopUpControlItems to the indicated PopUpControl behind the item at
the given index position (counted from 1).
The window/dialog is not resized.
These functions have no effect in case the indicated window/dialog/compound
control could not be found (ErrorUnknownObject) or if controls are opened with
duplicate Ids (ErrorIdsInUse).
*/
closeControls :: !Id [Id] !Bool !(IOSt .l) -> IOSt .l
/* closeControls removes the indicated controls (second argument) from the
indicated window (first argument) and recalculates the layout iff the Boolean
argument is True.
*/
closeAllControls :: !Id !(IOSt .l) -> IOSt .l
/* closeAllControls removes all controls from the indicated window.
*/
closePopUpControlItems :: !Id ![Index] !(IOSt .l) -> IOSt .l
/* closePopUpControlItems closes PopUpControlItems by their Index position of the
indicated PopUpControl.
If the currently checked element of a PopUpControl is closed, the first
remaining element of that PopUpControl will be checked.
*/
setControlPos :: !Id ![(Id,ItemPos)] !(IOSt .l) -> (!Bool,!IOSt .l)
/* setControlPos changes the current layout position of the indicated controls to
their new positions.
If there are relatively laynout controls, then their layout also changes. The
window is not resized.
The Boolean result is False iff the window is unknown.
*/
/* Functions that change the state of controls. /* Functions that change the state of controls.
...@@ -304,13 +368,13 @@ getControlScrollFunction:: ! Id !WState ...@@ -304,13 +368,13 @@ getControlScrollFunction:: ! Id !WState
getControlItemSpaces :: ![Id] !WState -> [(Bool,Maybe (Int,Int))] getControlItemSpaces :: ![Id] !WState -> [(Bool,Maybe (Int,Int))]
getControlItemSpace :: ! Id !WState -> (Bool,Maybe (Int,Int)) getControlItemSpace :: ! Id !WState -> (Bool,Maybe (Int,Int))
/* getControlItemSpace(s) yields (Just (horizontal space,vertical space)) of the /* getControlItemSpace(s) yields (Just (horizontal space,vertical space)) of the
indicated CompoundControl. If the control is not such a control, then Nothing indicated (Compound/Layout)Control. If the control is not such a control, then
is yielded. Nothing is yielded.
*/ */
getControlMargins :: ![Id] !WState -> [(Bool,Maybe ((Int,Int),(Int,Int)))] getControlMargins :: ![Id] !WState -> [(Bool,Maybe ((Int,Int),(Int,Int)))]
getControlMargin :: ! Id !WState -> (Bool,Maybe ((Int,Int),(Int,Int))) getControlMargin :: ! Id !WState -> (Bool,Maybe ((Int,Int),(Int,Int)))
/* getControlMargins yields (Just (ControlHMargin,ControlVMargin)) of the /* getControlMargins yields (Just (ControlHMargin,ControlVMargin)) of the
indicated CompoundControl. If the control is not such a control, then Nothing indicated (Compound/Layout)Control. If the control is not such a control, then
is yielded. Nothing is yielded.
*/ */
This diff is collapsed.
...@@ -16,17 +16,17 @@ import StdControlDef ...@@ -16,17 +16,17 @@ import StdControlDef
/* The following functions specify the valid attributes for each standard control. /* The following functions specify the valid attributes for each standard control.
*/ */
isValidRadioControlAttribute :: !(ControlAttribute .st) -> Bool isValidButtonControlAttribute :: !(ControlAttribute .st) -> Bool
/* RadioControl (y = valid, . = invalid) /* ButtonControl (y = valid, . = invalid)
ControlActivate . | ControlKeyboard . | ControlPos y | ControlActivate . | ControlKeyboard . | ControlPos y |
ControlDeactivate . | ControlLook . | ControlResize . | ControlDeactivate . | ControlLook . | ControlResize . |
ControlFunction . | ControlMinimumSize . | ControlSelectState y | ControlFunction y | ControlMinimumSize . | ControlSelectState y |
ControlHide y | ControlModsFunction . | ControlTip y | ControlHide y | ControlModsFunction y | ControlTip y |
ControlHMargin . | ControlMouse . | ControlViewDomain . | ControlHMargin . | ControlMouse . | ControlViewDomain . |
ControlHScroll . | ControlOrigin . | ControlViewSize . | ControlHScroll . | ControlOrigin . | ControlViewSize . |
ControlId y | ControlOuterSize . | ControlVMargin . | ControlId y | ControlOuterSize . | ControlVMargin . |
ControlItemSpace . | ControlPen . | ControlVScroll . | ControlItemSpace . | ControlPen . | ControlVScroll . |
| ControlWidth . | | ControlWidth y |
*/ */
isValidCheckControlAttribute :: !(ControlAttribute .st) -> Bool isValidCheckControlAttribute :: !(ControlAttribute .st) -> Bool
...@@ -42,43 +42,43 @@ isValidCheckControlAttribute :: !(ControlAttribute .st) -> Bool ...@@ -42,43 +42,43 @@ isValidCheckControlAttribute :: !(ControlAttribute .st) -> Bool
| ControlWidth . | | ControlWidth . |
*/ */
isValidPopUpControlAttribute :: !(ControlAttribute .st) -> Bool isValidCompoundControlAttribute :: !(ControlAttribute .st) -> Bool
/* PopUpControl (y = valid, . = invalid) /* CompoundControl (y = valid, . = invalid)
ControlActivate y | ControlKeyboard . | ControlPos y | ControlActivate y | ControlKeyboard y | ControlPos y
ControlDeactivate y | ControlLook . | ControlResize . | ControlDeactivate y | ControlLook y | ControlResize y |
ControlFunction . | ControlMinimumSize . | ControlSelectState y | ControlFunction . | ControlMinimumSize y | ControlSelectState y |
ControlHide y | ControlModsFunction . | ControlTip y | ControlHide y | ControlModsFunction . | ControlTip y |
ControlHMargin . | ControlMouse . | ControlViewDomain . | ControlHMargin y | ControlMouse y | ControlViewDomain y |
ControlHScroll . | ControlOrigin . | ControlViewSize . | ControlHScroll y | ControlOrigin y | ControlViewSize y |
ControlId y | ControlOuterSize . | ControlVMargin . | ControlId y | ControlOuterSize y | ControlVMargin y |
ControlItemSpace . | ControlPen . | ControlVScroll . | ControlItemSpace y | ControlPen y | ControlVScroll y |
| ControlWidth y | | ControlWidth . |
*/ */
isValidSliderControlAttribute :: !(ControlAttribute .st) -> Bool isValidCustomButtonControlAttribute :: !(ControlAttribute .st) -> Bool
/* SliderControl (y = valid, . = invalid) /* CustomButtonControl (y = valid, . = invalid)
ControlActivate . | ControlKeyboard . | ControlPos y | ControlActivate . | ControlKeyboard . | ControlPos y |
ControlDeactivate . | ControlLook . | ControlResize y | ControlDeactivate . | ControlLook . | ControlResize y |
ControlFunction . | ControlMinimumSize . | ControlSelectState y | ControlFunction y | ControlMinimumSize y | ControlSelectState y |
ControlHide y | ControlModsFunction . | ControlTip y | ControlHide y | ControlModsFunction y | ControlTip y |
ControlHMargin . | ControlMouse . | ControlViewDomain . | ControlHMargin . | ControlMouse . | ControlViewDomain . |
ControlHScroll . | ControlOrigin . | ControlViewSize . | ControlHScroll . | ControlOrigin . | ControlViewSize . |
ControlId y | ControlOuterSize . | ControlVMargin . | ControlId y | ControlOuterSize . | ControlVMargin . |
ControlItemSpace . | ControlPen . | ControlVScroll . | ControlItemSpace . | ControlPen y | ControlVScroll . |
| ControlWidth . | | ControlWidth . |
*/ */
isValidTextControlAttribute :: !(ControlAttribute .st) -> Bool isValidCustomControlAttribute :: !(ControlAttribute .st) -> Bool
/* TextControl (y = valid, . = invalid) /* CustomControl (y = valid, . = invalid)
ControlActivate . | ControlKeyboard . | ControlPos y | ControlActivate y | ControlKeyboard . | ControlPos y |
ControlDeactivate . | ControlLook . | ControlResize . | ControlDeactivate y | ControlLook . | ControlResize y |
ControlFunction . | ControlMinimumSize . | ControlSelectState . | ControlFunction . | ControlMinimumSize y | ControlSelectState y |
ControlHide y | ControlModsFunction . | ControlTip y | ControlHide y | ControlModsFunction . | ControlTip y |
ControlHMargin . | ControlMouse . | ControlViewDomain . | ControlHMargin . | ControlMouse y | ControlViewDomain . |
ControlHScroll . | ControlOrigin . | ControlViewSize . | ControlHScroll . | ControlOrigin y | ControlViewSize . |
ControlId y | ControlOuterSize . | ControlVMargin . | ControlId y | ControlOuterSize . | ControlVMargin . |
ControlItemSpace . | ControlPen . | ControlVScroll . | ControlItemSpace . | ControlPen y | ControlVScroll . |
| ControlWidth y | | ControlWidth . |
*/ */
isValidEditControlAttribute :: !(ControlAttribute .st) -> Bool isValidEditControlAttribute :: !(ControlAttribute .st) -> Bool
...@@ -94,56 +94,69 @@ isValidEditControlAttribute :: !(ControlAttribute .st) -> Bool ...@@ -94,56 +94,69 @@ isValidEditControlAttribute :: !(ControlAttribute .st) -> Bool
| ControlWidth . | | ControlWidth . |
*/ */
isValidButtonControlAttribute :: !(ControlAttribute .st) -> Bool isValidLayoutControlAttribute :: !(ControlAttribute .st) -> Bool
/* ButtonControl (y = valid, . = invalid) /* LayoutControl (y = valid, . = invalid)
ControlActivate . | ControlKeyboard . | ControlPos y | ControlActivate . | ControlKeyboard . | ControlPos y |
ControlDeactivate . | ControlLook . | ControlResize . | ControlDeactivate . | ControlLook . | ControlResize y |
ControlFunction y | ControlMinimumSize . | ControlSelectState y | ControlFunction . | ControlMinimumSize y | ControlSelectState y |
ControlHide y | ControlModsFunction y | ControlTip y | ControlHide y | ControlModsFunction . | ControlTip . |
ControlHMargin y | ControlMouse . | ControlViewDomain . |
ControlHScroll . | ControlOrigin . | ControlViewSize y |
ControlId y | ControlOuterSize y | ControlVMargin y |
ControlItemSpace y | ControlPen . | ControlVScroll . |
| ControlWidth . |
*/
isValidPopUpControlAttribute :: !(ControlAttribute .st) -> Bool
/* PopUpControl (y = valid, . = invalid)
ControlActivate y | ControlKeyboard . | ControlPos y |
ControlDeactivate y | ControlLook . | ControlResize . |
ControlFunction . | ControlMinimumSize . | ControlSelectState y |
ControlHide y | ControlModsFunction . | ControlTip y |
ControlHMargin . | ControlMouse . | ControlViewDomain . | ControlHMargin . | ControlMouse . | ControlViewDomain . |
ControlHScroll . | ControlOrigin . | ControlViewSize . | ControlHScroll . | ControlOrigin . | ControlViewSize . |
ControlId y | ControlOuterSize . | ControlVMargin . | ControlId y | ControlOuterSize . | ControlVMargin . |
ControlItemSpace . | ControlPen . | ControlVScroll . | ControlItemSpace . | ControlPen . | ControlVScroll . |
| ControlWidth y | | ControlWidth y |
*/ */
isValidCustomButtonControlAttribute :: !(ControlAttribute .st) -> Bool isValidRadioControlAttribute :: !(ControlAttribute .st) -> Bool
/* CustomButtonControl (y = valid, . = invalid) /* RadioControl (y = valid, . = invalid)
ControlActivate . | ControlKeyboard . | ControlPos y | ControlActivate . | ControlKeyboard . | ControlPos y |
ControlDeactivate . | ControlLook . | ControlResize y | ControlDeactivate . | ControlLook . | ControlResize . |
ControlFunction y | ControlMinimumSize y | ControlSelectState y | ControlFunction . | ControlMinimumSize . | ControlSelectState y |
ControlHide y | ControlModsFunction y | ControlTip y | ControlHide y | ControlModsFunction . | ControlTip y |
ControlHMargin . | ControlMouse . | ControlViewDomain . | ControlHMargin . | ControlMouse . | ControlViewDomain . |
ControlHScroll . | ControlOrigin . | ControlViewSize . | ControlHScroll . | ControlOrigin . | ControlViewSize . |
ControlId y | ControlOuterSize . | ControlVMargin . | ControlId y | ControlOuterSize . | ControlVMargin . |
ControlItemSpace . | ControlPen y | ControlVScroll . | ControlItemSpace . | ControlPen . | ControlVScroll . |
| ControlWidth . | | ControlWidth . |
*/ */
isValidCustomControlAttribute :: !(ControlAttribute .st) -> Bool isValidSliderControlAttribute :: !(ControlAttribute .st) -> Bool
/* CustomControl (y = valid, . = invalid) /* SliderControl (y = valid, . = invalid)
ControlActivate y | ControlKeyboard . | ControlPos y | ControlActivate . | ControlKeyboard . | ControlPos y |
ControlDeactivate y | ControlLook . | ControlResize y | ControlDeactivate . | ControlLook . | ControlResize y |
ControlFunction . | ControlMinimumSize y | ControlSelectState y | ControlFunction . | ControlMinimumSize . | ControlSelectState y |
ControlHide y | ControlModsFunction . | ControlTip y | ControlHide y | ControlModsFunction . | ControlTip y |
ControlHMargin . | ControlMouse y | ControlViewDomain . | ControlHMargin . | ControlMouse . | ControlViewDomain . |
ControlHScroll . | ControlOrigin y | ControlViewSize . | ControlHScroll . | ControlOrigin . | ControlViewSize . |
ControlId y | ControlOuterSize . | ControlVMargin . | ControlId y | ControlOuterSize . | ControlVMargin . |
ControlItemSpace . | ControlPen y | ControlVScroll . | ControlItemSpace . | ControlPen . | ControlVScroll . |
| ControlWidth . | | ControlWidth . |
*/ */
isValidCompoundControlAttribute :: !(ControlAttribute .st) -> Bool isValidTextControlAttribute :: !(ControlAttribute .st) -> Bool
/* CompoundControl (y = valid, . = invalid) /* TextControl (y = valid, . = invalid)
ControlActivate y | ControlKeyboard y | ControlPos y ControlActivate . | ControlKeyboard . | ControlPos y |
ControlDeactivate y | ControlLook y | ControlResize y | ControlDeactivate . | ControlLook . | ControlResize . |
ControlFunction . | ControlMinimumSize y | ControlSelectState y | ControlFunction . | ControlMinimumSize . | ControlSelectState . |
ControlHide y | ControlModsFunction . | ControlTip y | ControlHide y | ControlModsFunction . | ControlTip y |
ControlHMargin y | ControlMouse y | ControlViewDomain y | ControlHMargin . | ControlMouse . | ControlViewDomain . |
ControlHScroll y | ControlOrigin y | ControlViewSize y | ControlHScroll . | ControlOrigin . | ControlViewSize . |
ControlId y | ControlOuterSize y | ControlVMargin y | ControlId y | ControlOuterSize . | ControlVMargin . |
ControlItemSpace y | ControlPen y | ControlVScroll y | ControlItemSpace . | ControlPen . | ControlVScroll . |
| ControlWidth . | | ControlWidth y |
*/ */
......
...@@ -12,62 +12,6 @@ implementation module StdControlAttribute ...@@ -12,62 +12,6 @@ implementation module StdControlAttribute
import StdControlDef import StdControlDef
isValidRadioControlAttribute :: !(ControlAttribute .st) -> Bool
isValidRadioControlAttribute (ControlId _) = True
isValidRadioControlAttribute (ControlPos _) = True
isValidRadioControlAttribute (ControlSelectState _) = True
isValidRadioControlAttribute ControlHide = True
isValidRadioControlAttribute (ControlTip _) = True
isValidRadioControlAttribute _ = False
isValidCheckControlAttribute :: !(ControlAttribute .st) -> Bool
isValidCheckControlAttribute (ControlId _) = True
isValidCheckControlAttribute (ControlPos _) = True
isValidCheckControlAttribute (ControlSelectState _) = True
isValidCheckControlAttribute ControlHide = True
isValidCheckControlAttribute (ControlTip _) = True
isValidCheckControlAttribute _ = False
isValidPopUpControlAttribute :: !(ControlAttribute .st) -> Bool
isValidPopUpControlAttribute (ControlId _) = True
isValidPopUpControlAttribute (ControlPos _) = True
isValidPopUpControlAttribute (ControlSelectState _) = True
isValidPopUpControlAttribute ControlHide = True
isValidPopUpControlAttribute (ControlActivate _) = True
isValidPopUpControlAttribute (ControlDeactivate _) = True
isValidPopUpControlAttribute (ControlTip _) = True
isValidPopUpControlAttribute (ControlWidth _) = True
isValidPopUpControlAttribute _ = False
isValidSliderControlAttribute :: !(ControlAttribute .st) -> Bool
isValidSliderControlAttribute (ControlId _)= True
isValidSliderControlAttribute (ControlPos _)= True
isValidSliderControlAttribute (ControlResize _)= True
isValidSliderControlAttribute (ControlSelectState _)= True
isValidSliderControlAttribute ControlHide = True
isValidSliderControlAttribute (ControlTip _)= True
isValidSliderControlAttribute _ = False
isValidTextControlAttribute :: !(ControlAttribute .st) -> Bool
isValidTextControlAttribute (ControlId _) = True
isValidTextControlAttribute (ControlPos _) = True
isValidTextControlAttribute ControlHide = True
isValidTextControlAttribute (ControlTip _) = True
isValidTextControlAttribute (ControlWidth _) = True
isValidTextControlAttribute _ = False
isValidEditControlAttribute :: !(ControlAttribute .st) -> Bool
isValidEditControlAttribute (ControlId _) = True
isValidEditControlAttribute (ControlPos _) = True
isValidEditControlAttribute (ControlResize _) = True
isValidEditControlAttribute (ControlSelectState _) = True
isValidEditControlAttribute ControlHide = True
isValidEditControlAttribute (ControlTip _) = True
isValidEditControlAttribute (ControlActivate _) = True
isValidEditControlAttribute (ControlDeactivate _) = True
isValidEditControlAttribute (ControlKeyboard _ _ _) = True
isValidEditControlAttribute _ = False
isValidButtonControlAttribute :: !(ControlAttribute .st) -> Bool isValidButtonControlAttribute :: !(ControlAttribute .st) -> Bool
isValidButtonControlAttribute (ControlId _) = True isValidButtonControlAttribute (ControlId _) = True
isValidButtonControlAttribute (ControlPos _) = True isValidButtonControlAttribute (ControlPos _) = True
...@@ -79,6 +23,19 @@ isValidButtonControlAttribute (ControlTip _) = True ...@@ -79,6 +23,19 @@ isValidButtonControlAttribute (ControlTip _) = True
isValidButtonControlAttribute (ControlWidth _) = True isValidButtonControlAttribute (ControlWidth _) = True
isValidButtonControlAttribute _ = False isValidButtonControlAttribute _ = False
isValidCheckControlAttribute :: !(ControlAttribute .st) -> Bool
isValidCheckControlAttribute (ControlId _) = True
isValidCheckControlAttribute (ControlPos _) = True
isValidCheckControlAttribute (ControlSelectState _) = True
isValidCheckControlAttribute ControlHide = True
isValidCheckControlAttribute (ControlTip _) = True
isValidCheckControlAttribute _ = False
isValidCompoundControlAttribute :: !(ControlAttribute .st) -> Bool
isValidCompoundControlAttribute (ControlFunction _) = False
isValidCompoundControlAttribute (ControlModsFunction _) = False
isValidCompoundControlAttribute _ = True
isValidCustomButtonControlAttribute :: !(ControlAttribute .st) -> Bool isValidCustomButtonControlAttribute :: !(ControlAttribute .st) -> Bool
isValidCustomButtonControlAttribute (ControlId _) = True isValidCustomButtonControlAttribute (ControlId _) = True
isValidCustomButtonControlAttribute (ControlPen _) = True isValidCustomButtonControlAttribute (ControlPen _) = True
...@@ -107,10 +64,67 @@ isValidCustomControlAttribute (ControlKeyboard _ _ _) = True ...@@ -107,10 +64,67 @@ isValidCustomControlAttribute (ControlKeyboard _ _ _) = True
isValidCustomControlAttribute (ControlTip _) = True isValidCustomControlAttribute (ControlTip _) = True
isValidCustomControlAttribute _ = False isValidCustomControlAttribute _ = False
isValidCompoundControlAttribute :: !(ControlAttribute .st) -> Bool isValidEditControlAttribute :: !(ControlAttribute .st) -> Bool
isValidCompoundControlAttribute (ControlFunction _) = False isValidEditControlAttribute (ControlId _) = True
isValidCompoundControlAttribute (ControlModsFunction _) = False isValidEditControlAttribute (ControlPos _) = True
isValidCompoundControlAttribute _ = True isValidEditControlAttribute (ControlResize _) = True
isValidEditControlAttribute (ControlSelectState _) = True
isValidEditControlAttribute ControlHide = True
isValidEditControlAttribute (ControlTip _) = True
isValidEditControlAttribute (ControlActivate _) = True
isValidEditControlAttribute (ControlDeactivate _) = True
isValidEditControlAttribute (ControlKeyboard _ _ _) = True
isValidEditControlAttribute _ = False
isValidLayoutControlAttribute :: !(ControlAttribute .st) -> Bool
isValidLayoutControlAttribute ControlHide = True
isValidLayoutControlAttribute (ControlHMargin _ _) = True
isValidLayoutControlAttribute (ControlId _) = True
isValidLayoutControlAttribute (ControlItemSpace _ _)= True
isValidLayoutControlAttribute (ControlMinimumSize _)= True
isValidLayoutControlAttribute (ControlOuterSize _)= True
isValidLayoutControlAttribute (ControlPos _) = True
isValidLayoutControlAttribute (ControlResize _) = True
isValidLayoutControlAttribute (ControlSelectState _)= True
isValidLayoutControlAttribute (ControlViewSize _) = True
isValidLayoutControlAttribute (ControlVMargin _ _)= True
isValidLayoutControlAttribute _ = False
isValidPopUpControlAttribute :: !(ControlAttribute .st) -> Bool
isValidPopUpControlAttribute (ControlId _) = True
isValidPopUpControlAttribute (ControlPos _) = True
isValidPopUpControlAttribute (ControlSelectState _) = True
isValidPopUpControlAttribute ControlHide = True
isValidPopUpControlAttribute (ControlActivate _) = True
isValidPopUpControlAttribute (ControlDeactivate _) = True
isValidPopUpControlAttribute (ControlTip _) = True
isValidPopUpControlAttribute (ControlWidth _) = True
isValidPopUpControlAttribute _ = False
isValidRadioControlAttribute :: !(ControlAttribute .st) -> Bool
isValidRadioControlAttribute (ControlId _) = True
isValidRadioControlAttribute (ControlPos _) = True
isValidRadioControlAttribute (ControlSelectState _) = True
isValidRadioControlAttribute ControlHide = True
isValidRadioControlAttribute (ControlTip _) = True
isValidRadioControlAttribute _ = False
isValidSliderControlAttribute :: !(ControlAttribute .st) -> Bool
isValidSliderControlAttribute (ControlId _)= True
isValidSliderControlAttribute (ControlPos _)= True
isValidSliderControlAttribute (ControlResize _)= True
isValidSliderControlAttribute (ControlSelectState _)= True
isValidSliderControlAttribute ControlHide = True
isValidSliderControlAttribute (ControlTip _)= True
isValidSliderControlAttribute _ = False
isValidTextControlAttribute :: !(ControlAttribute .st) -> Bool
isValidTextControlAttribute (ControlId _) = True