1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 03:49:56 +00:00

Adds toggle __UI_ShowInvisibleControls

This commit is contained in:
Fellippe Heitor 2018-08-31 15:56:44 -03:00 committed by GitHub
parent 21cb237d8e
commit 3ad1975015
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -207,7 +207,7 @@ DIM SHARED __UI_LastRenderedLineWidth AS LONG, __UI_LastRenderedCharCount AS LON
DIM SHARED __UI_SelectionRectangleTop AS INTEGER, __UI_SelectionRectangleLeft AS INTEGER DIM SHARED __UI_SelectionRectangleTop AS INTEGER, __UI_SelectionRectangleLeft AS INTEGER
DIM SHARED __UI_SelectionRectangle AS _BYTE DIM SHARED __UI_SelectionRectangle AS _BYTE
DIM SHARED __UI_CantShowContextMenu AS _BYTE, __UI_ShowPositionAndSize AS _BYTE DIM SHARED __UI_CantShowContextMenu AS _BYTE, __UI_ShowPositionAndSize AS _BYTE
DIM SHARED __UI_Snapped AS _BYTE DIM SHARED __UI_ShowInvisibleControls AS _BYTE, __UI_Snapped AS _BYTE
DIM SHARED __UI_SnappedByProximityX AS _BYTE, __UI_SnappedByProximityY AS _BYTE DIM SHARED __UI_SnappedByProximityX AS _BYTE, __UI_SnappedByProximityY AS _BYTE
DIM SHARED __UI_SnappedX AS INTEGER, __UI_SnappedY AS INTEGER DIM SHARED __UI_SnappedX AS INTEGER, __UI_SnappedY AS INTEGER
DIM SHARED __UI_SnappedXID AS LONG, __UI_SnappedYID AS LONG DIM SHARED __UI_SnappedXID AS LONG, __UI_SnappedYID AS LONG
@ -325,13 +325,17 @@ SUB __UI_InternalMenus
Control(__UI_NewID).Font = SetFont("segoeui.ttf?arial.ttf?/Library/Fonts/Arial.ttf?InForm/resources/NotoMono-Regular.ttf?cour.ttf", 12) Control(__UI_NewID).Font = SetFont("segoeui.ttf?arial.ttf?/Library/Fonts/Arial.ttf?InForm/resources/NotoMono-Regular.ttf?cour.ttf", 12)
'Hotkeys used: 'Hotkeys used:
'A, B, C, D, E, G, H, I, L, M, N, O, P, R, S, T, U, V, X, Y, Z 'A, B, C, D, E, G, H, I, L, M, N, O, P, R, S, T, U, V, W, X, Y, Z
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuNewMenuBar", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuNewMenuBar", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption __UI_GetID("__UI_PreviewMenuNewMenuBar"), "New &MenuBar control" SetCaption __UI_GetID("__UI_PreviewMenuNewMenuBar"), "New &MenuBar control"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuNewContextMenu", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuNewContextMenu", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption __UI_GetID("__UI_PreviewMenuNewContextMenu"), "New ContextMen&u control-" SetCaption __UI_GetID("__UI_PreviewMenuNewContextMenu"), "New ContextMen&u control-"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuShowInvisibleControls", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption __UI_GetID("__UI_PreviewMenuShowInvisibleControls"), "Sho&w invisible controls-"
ToolTip(__UI_NewID) = "Toogles the display of invisible items (e.g. ContextMenu controls)"
__UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuSetDefaultButton", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu")) __UI_NewID = __UI_NewControl(__UI_Type_MenuItem, "__UI_PreviewMenuSetDefaultButton", 0, 0, 0, 0, __UI_GetID("__UI_PreviewMenu"))
SetCaption __UI_GetID("__UI_PreviewMenuSetDefaultButton"), "&Set as default button-" SetCaption __UI_GetID("__UI_PreviewMenuSetDefaultButton"), "&Set as default button-"
ToolTip(__UI_NewID) = "The default button can be triggered with Enter even if it doesn't have focus at run time." ToolTip(__UI_NewID) = "The default button can be triggered with Enter even if it doesn't have focus at run time."
@ -1073,7 +1077,7 @@ SUB __UI_UpdateDisplay
CASE __UI_Type_MenuBar CASE __UI_Type_MenuBar
__UI_DrawMenuBar Control(i), ControlState __UI_DrawMenuBar Control(i), ControlState
CASE __UI_Type_ContextMenu CASE __UI_Type_ContextMenu
IF __UI_DesignMode = True AND LEFT$(Control(i).Name, 5) <> "__UI_" THEN IF __UI_DesignMode = True AND __UI_ShowInvisibleControls = True AND LEFT$(Control(i).Name, 5) <> "__UI_" THEN
__UI_DrawContextMenuHandle Control(i), ControlState __UI_DrawContextMenuHandle Control(i), ControlState
END IF END IF
CASE __UI_Type_PictureBox CASE __UI_Type_PictureBox
@ -1858,6 +1862,7 @@ SUB __UI_EventDispatcher
RightClickSelect = True RightClickSelect = True
GOSUB DesignModeClickToSelect GOSUB DesignModeClickToSelect
RightClickSelect = False RightClickSelect = False
Control(__UI_GetID("__UI_PreviewMenuShowInvisibleControls")).Value = __UI_ShowInvisibleControls
IF __UI_TotalSelectedControls = 0 THEN IF __UI_TotalSelectedControls = 0 THEN
Control(__UI_GetID("__UI_PreviewMenuAlignLeft")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuAlignLeft")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuAlignRight")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuAlignRight")).Hidden = True
@ -1875,6 +1880,7 @@ SUB __UI_EventDispatcher
Control(__UI_GetID("__UI_PreviewMenuImageOriginalSize")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuImageOriginalSize")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuNumericOnly")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuNumericOnly")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuSetDefaultButton")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuSetDefaultButton")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuShowInvisibleControls")).Hidden = False
Control(__UI_GetID("__UI_PreviewMenuConvertType")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuConvertType")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuNewMenuBar")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuNewMenuBar")).Hidden = False
Control(__UI_GetID("__UI_PreviewMenuNewContextMenu")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuNewContextMenu")).Hidden = False
@ -1883,7 +1889,7 @@ SUB __UI_EventDispatcher
Control(__UI_GetID("__UI_PreviewMenuAlignRight")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuAlignRight")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuAlignTops")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuAlignTops")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuAlignBottoms")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuAlignBottoms")).Hidden = True
IF Control(__UI_FirstSelectedID).Type <> __UI_Type_MenuBar AND Control(__UI_FirstSelectedID).Type <> __UI_Type_MenuItem THEN IF Control(__UI_FirstSelectedID).Type <> __UI_Type_ContextMenu AND Control(__UI_FirstSelectedID).Type <> __UI_Type_MenuBar AND Control(__UI_FirstSelectedID).Type <> __UI_Type_MenuItem THEN
Control(__UI_GetID("__UI_PreviewMenuAlignCenterV")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuAlignCenterV")).Hidden = False
Control(__UI_GetID("__UI_PreviewMenuAlignCenterH")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuAlignCenterH")).Hidden = False
SetCaption __UI_GetID("__UI_PreviewMenuAlignCenterV"), "Center &Vertically" SetCaption __UI_GetID("__UI_PreviewMenuAlignCenterV"), "Center &Vertically"
@ -1893,6 +1899,7 @@ SUB __UI_EventDispatcher
ELSE ELSE
Control(__UI_GetID("__UI_PreviewMenuNewMenuBar")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuNewMenuBar")).Hidden = False
Control(__UI_GetID("__UI_PreviewMenuNewContextMenu")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuNewContextMenu")).Hidden = False
Control(__UI_GetID("__UI_PreviewMenuShowInvisibleControls")).Hidden = False
Control(__UI_GetID("__UI_PreviewMenuAlignCenterV")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuAlignCenterV")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuAlignCenterH")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuAlignCenterH")).Hidden = True
END IF END IF
@ -1956,6 +1963,7 @@ SUB __UI_EventDispatcher
ELSEIF __UI_TotalSelectedControls = 2 THEN ELSEIF __UI_TotalSelectedControls = 2 THEN
Control(__UI_GetID("__UI_PreviewMenuNewMenuBar")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuNewMenuBar")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuNewContextMenu")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuNewContextMenu")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuShowInvisibleControls")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuAlignLeft")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuAlignLeft")).Hidden = False
Control(__UI_GetID("__UI_PreviewMenuAlignRight")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuAlignRight")).Hidden = False
Control(__UI_GetID("__UI_PreviewMenuAlignTops")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuAlignTops")).Hidden = False
@ -1978,6 +1986,7 @@ SUB __UI_EventDispatcher
ELSE ELSE
Control(__UI_GetID("__UI_PreviewMenuNewMenuBar")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuNewMenuBar")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuNewContextMenu")).Hidden = True Control(__UI_GetID("__UI_PreviewMenuNewContextMenu")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuShowInvisibleControls")).Hidden = True
Control(__UI_GetID("__UI_PreviewMenuAlignLeft")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuAlignLeft")).Hidden = False
Control(__UI_GetID("__UI_PreviewMenuAlignRight")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuAlignRight")).Hidden = False
Control(__UI_GetID("__UI_PreviewMenuAlignTops")).Hidden = False Control(__UI_GetID("__UI_PreviewMenuAlignTops")).Hidden = False
@ -2750,6 +2759,8 @@ SUB __UI_EventDispatcher
END IF END IF
CASE UCASE$("__UI_PreviewMenuNewMenuBar") CASE UCASE$("__UI_PreviewMenuNewMenuBar")
__UI_KeyPress 224 __UI_KeyPress 224
CASE UCASE$("__UI_PreviewMenuShowInvisibleControls")
__UI_KeyPress 227
CASE UCASE$("__UI_PreviewMenuConvertType") CASE UCASE$("__UI_PreviewMenuConvertType")
__UI_KeyPress 225 __UI_KeyPress 225
CASE UCASE$("__UI_PreviewMenuNewContextMenu") CASE UCASE$("__UI_PreviewMenuNewContextMenu")