' ########################################################################################
' Microsoft Windows
' File: UIRibbon.inc
' Contents: Interfaces for the Windows Ribbon Framework
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
' ########################################################################################
' Library name: UIRibbon
' Version: 1.0, Locale ID = 0
' Library GUID: {942F35C2-E83B-45EF-B085-AC295DD63D5B}
' ########################################################################################
#IF NOT %DEF(PBX_UIRibbon_PBI)
#DEFINE PBX_UIRibbon_PBI
%EQUATE `UIRIBBON_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/System/propsys.inc"
#INCLUDE ONCE "Legacy/UI/UIRibbonKeydef.inc"
$LIBID_UIRibbon = GUID$("{942F35C2-E83B-45EF-B085-AC295DD63D5B}")
$CLSID_UIRibbonFramework = GUID$("{926749FA-2615-4987-8845-C33E65F2B957}")
$CLSID_UIRibbonImageFromBitmapFactory = GUID$("{0F7434B6-59B6-4250-999E-D168D6AE4293}")
'#define DEFINE_UIPROPERTYKEY(name, type, index) EXTERN_C const PROPERTYKEY DECLSPEC_SELECTANY name = { { 0x00000000 + index, 0x7363, 0x696e, { 0x84, 0x41, 0x79, 0x8a, 0xcf, 0x5a, 0xeb, 0xb7 } }, type }
'DEFINE_UIPROPERTYKEY(UI_PKEY_Enabled, VT_BOOL, 1);
'DEFINE_UIPROPERTYKEY(UI_PKEY_LabelDescription, VT_LPWSTR, 2);
'DEFINE_UIPROPERTYKEY(UI_PKEY_Keytip, VT_LPWSTR, 3);
'DEFINE_UIPROPERTYKEY(UI_PKEY_Label, VT_LPWSTR, 4);
'DEFINE_UIPROPERTYKEY(UI_PKEY_TooltipDescription, VT_LPWSTR, 5);
'DEFINE_UIPROPERTYKEY(UI_PKEY_TooltipTitle, VT_LPWSTR, 6);
'DEFINE_UIPROPERTYKEY(UI_PKEY_LargeImage, VT_UNKNOWN, 7);
'DEFINE_UIPROPERTYKEY(UI_PKEY_LargeHighContrastImage, VT_UNKNOWN, 8);
'DEFINE_UIPROPERTYKEY(UI_PKEY_SmallImage, VT_UNKNOWN, 9);
'DEFINE_UIPROPERTYKEY(UI_PKEY_SmallHighContrastImage, VT_UNKNOWN, 10);
'DEFINE_UIPROPERTYKEY(UI_PKEY_CommandId, VT_UI4, 100);
'DEFINE_UIPROPERTYKEY(UI_PKEY_ItemsSource, VT_UNKNOWN, 101);
'DEFINE_UIPROPERTYKEY(UI_PKEY_Categories, VT_UNKNOWN, 102);
'DEFINE_UIPROPERTYKEY(UI_PKEY_CategoryId, VT_UI4, 103);
'DEFINE_UIPROPERTYKEY(UI_PKEY_SelectedItem, VT_UI4, 104);
'DEFINE_UIPROPERTYKEY(UI_PKEY_CommandType, VT_UI4, 105);
'DEFINE_UIPROPERTYKEY(UI_PKEY_ItemImage, VT_UNKNOWN, 106);
'DEFINE_UIPROPERTYKEY(UI_PKEY_BooleanValue, VT_BOOL, 200);
'DEFINE_UIPROPERTYKEY(UI_PKEY_DecimalValue, VT_DECIMAL, 201);
'DEFINE_UIPROPERTYKEY(UI_PKEY_StringValue, VT_LPWSTR, 202);
'DEFINE_UIPROPERTYKEY(UI_PKEY_MaxValue, VT_DECIMAL, 203);
'DEFINE_UIPROPERTYKEY(UI_PKEY_MinValue, VT_DECIMAL, 204);
'DEFINE_UIPROPERTYKEY(UI_PKEY_Increment, VT_DECIMAL, 205);
'DEFINE_UIPROPERTYKEY(UI_PKEY_DecimalPlaces, VT_UI4, 206);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FormatString, VT_LPWSTR, 207);
'DEFINE_UIPROPERTYKEY(UI_PKEY_RepresentativeString, VT_LPWSTR, 208);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties, VT_UNKNOWN, 300);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_Family, VT_LPWSTR, 301);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_Size, VT_DECIMAL, 302);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_Bold, VT_UI4, 303);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_Italic, VT_UI4, 304);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_Underline, VT_UI4, 305);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_Strikethrough, VT_UI4, 306);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_VerticalPositioning, VT_UI4, 307);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_ForegroundColor, VT_UI4, 308);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_BackgroundColor, VT_UI4, 309);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_ForegroundColorType, VT_UI4, 310);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_BackgroundColorType, VT_UI4, 311);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_ChangedProperties, VT_UNKNOWN, 312);
'DEFINE_UIPROPERTYKEY(UI_PKEY_FontProperties_DeltaSize, VT_UI4, 313);
'DEFINE_UIPROPERTYKEY(UI_PKEY_RecentItems, VT_ARRAY|VT_UNKNOWN, 350);
'DEFINE_UIPROPERTYKEY(UI_PKEY_Pinned, VT_BOOL, 351);
'DEFINE_UIPROPERTYKEY(UI_PKEY_Color, VT_UI4, 400);
'DEFINE_UIPROPERTYKEY(UI_PKEY_ColorType, VT_UI4, 401);
'DEFINE_UIPROPERTYKEY(UI_PKEY_ColorMode, VT_UI4, 402);
'DEFINE_UIPROPERTYKEY(UI_PKEY_ThemeColorsCategoryLabel, VT_LPWSTR, 403);
'DEFINE_UIPROPERTYKEY(UI_PKEY_StandardColorsCategoryLabel, VT_LPWSTR, 404);
'DEFINE_UIPROPERTYKEY(UI_PKEY_RecentColorsCategoryLabel, VT_LPWSTR, 405);
'DEFINE_UIPROPERTYKEY(UI_PKEY_AutomaticColorLabel, VT_LPWSTR, 406);
'DEFINE_UIPROPERTYKEY(UI_PKEY_NoColorLabel, VT_LPWSTR, 407);
'DEFINE_UIPROPERTYKEY(UI_PKEY_MoreColorsLabel, VT_LPWSTR, 408);
'DEFINE_UIPROPERTYKEY(UI_PKEY_ThemeColors, VT_VECTOR|VT_UI4, 409);
'DEFINE_UIPROPERTYKEY(UI_PKEY_StandardColors, VT_VECTOR|VT_UI4, 410);
'DEFINE_UIPROPERTYKEY(UI_PKEY_ThemeColorsTooltips, VT_VECTOR|VT_LPWSTR, 411);
'DEFINE_UIPROPERTYKEY(UI_PKEY_StandardColorsTooltips, VT_VECTOR|VT_LPWSTR, 412);
'DEFINE_UIPROPERTYKEY(UI_PKEY_Viewable, VT_BOOL, 1000);
'DEFINE_UIPROPERTYKEY(UI_PKEY_Minimized, VT_BOOL, 1001);
'DEFINE_UIPROPERTYKEY(UI_PKEY_QuickAccessToolbarDock, VT_UI4, 1002);
'DEFINE_UIPROPERTYKEY(UI_PKEY_ContextAvailable, VT_UI4, 1100);
'DEFINE_UIPROPERTYKEY(UI_PKEY_GlobalBackgroundColor, VT_UI4, 2000);
'DEFINE_UIPROPERTYKEY(UI_PKEY_GlobalHighlightColor, VT_UI4, 2001);
'DEFINE_UIPROPERTYKEY(UI_PKEY_GlobalTextColor, VT_UI4, 2002);
' Note: Defined as macros for easy assignment to PROPERTY SET structures.
' Usage: DIM t AS PROPERTY KEY : TYPE SET t = UI_PKEY_Enabled
MACRO UI_PKEY_Enabled = GUID$("{00000001-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_BOOL)
MACRO UI_PKEY_LabelDescription = GUID$("{00000002-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_Keytip = GUID$("{00000003-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_Label = GUID$("{00000004-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_TooltipDescription = GUID$("{00000005-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_TooltipTitle = GUID$("{00000006-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_LargeImage = GUID$("{00000007-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UNKNOWN)
MACRO UI_PKEY_LargeHighContrastImage = GUID$("{00000008-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UNKNOWN)
MACRO UI_PKEY_SmallImage = GUID$("{00000009-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UNKNOWN)
MACRO UI_PKEY_SmallHighContrastImage = GUID$("{00000010-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UNKNOWN)
MACRO UI_PKEY_CommandId = GUID$("{00000100-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_ItemsSource = GUID$("{00000101-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UNKNOWN)
MACRO UI_PKEY_Categories = GUID$("{00000102-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UNKNOWN)
MACRO UI_PKEY_CategoryId = GUID$("{00000103-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_SelectedItem = GUID$("{00000104-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_CommandType = GUID$("{00000105-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_ItemImage = GUID$("{00000106-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UNKNOWN)
MACRO UI_PKEY_BooleanValue = GUID$("{00000200-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_BOOL)
MACRO UI_PKEY_DecimalValue = GUID$("{00000201-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_DECIMAL)
MACRO UI_PKEY_StringValue = GUID$("{00000202-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_MaxValue = GUID$("{00000203-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_DECIMAL)
MACRO UI_PKEY_MinValue = GUID$("{00000204-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_DECIMAL)
MACRO UI_PKEY_Increment = GUID$("{00000205-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_DECIMAL)
MACRO UI_PKEY_DecimalPlaces = GUID$("{00000206-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_FormatString = GUID$("{00000207-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_RepresentativeString = GUID$("{00000208-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_FontProperties = GUID$("{00000300-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UNKNOWN)
MACRO UI_PKEY_FontProperties_Family = GUID$("{00000301-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_FontProperties_Size = GUID$("{00000302-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_DECIMAL)
MACRO UI_PKEY_FontProperties_Bold = GUID$("{00000303-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_FontProperties_Italic = GUID$("{00000304-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_FontProperties_Underline = GUID$("{00000305-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_FontProperties_Strikethrough = GUID$("{00000306-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_FontProperties_VerticalPositioning = GUID$("{00000307-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_FontProperties_ForegroundColor = GUID$("{00000308-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_FontProperties_BackgroundColor = GUID$("{00000309-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_FontProperties_ForegroundColorType = GUID$("{00000310-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_FontProperties_BackgroundColorType = GUID$("{00000311-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_FontProperties_ChangedProperties = GUID$("{00000312-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UNKNOWN)
MACRO UI_PKEY_FontProperties_DeltaSize = GUID$("{00000313-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_RecentItems = GUID$("{00000350-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_ARRAY OR %VT_UNKNOWN)
MACRO UI_PKEY_Pinned = GUID$("{00000351-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_BOOL)
MACRO UI_PKEY_Color = GUID$("{00000400-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_ColorType = GUID$("{00000401-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_ColorMode = GUID$("{00000402-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_ThemeColorsCategoryLabel = GUID$("{00000403-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_StandardColorsCategoryLabel = GUID$("{00000404-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_RecentColorsCategoryLabel = GUID$("{00000405-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_AutomaticColorLabel = GUID$("{00000406-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_NoColorLabel = GUID$("{00000407-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_MoreColorsLabel = GUID$("{00000408-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_LPWSTR)
MACRO UI_PKEY_ThemeColors = GUID$("{00000409-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_VECTOR OR %VT_UI4)
MACRO UI_PKEY_StandardColors = GUID$("{00000410-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_VECTOR OR %VT_UI4)
MACRO UI_PKEY_ThemeColorsTooltips = GUID$("{00000411-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_VECTOR OR %VT_LPWSTR)
MACRO UI_PKEY_StandardColorsTooltips = GUID$("{00000412-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_VECTOR OR %VT_LPWSTR)
MACRO UI_PKEY_Viewable = GUID$("{00001000-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_BOOL)
MACRO UI_PKEY_Minimized = GUID$("{00001001-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_BOOL)
MACRO UI_PKEY_QuickAccessToolbarDock = GUID$("{00001002-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_ContextAvailable = GUID$("{00001100-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_GlobalBackgroundColor = GUID$("{00002000-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_GlobalHighlightColor = GUID$("{00002001-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
MACRO UI_PKEY_GlobalTextColor = GUID$("{00002002-7363-696e-8441-798acf5aebb7}") & MKDWD$(%VT_UI4)
'typedef DWORD UI_HSBCOLOR;
'{
' return hue | (saturation << 8) | (brightness << 16);
'}
FUNCTION UI_HSB (BYVAL hue AS BYTE, BYVAL saturation AS BYTE, BYVAL brightness AS BYTE) AS DWORD
 SHIFT LEFT saturation, 8
 SHIFT LEFT brightness, 16
 FUNCTION = hue OR saturation OR brightness
END FUNCTION
' enum UI_CONTEXTAVAILABILITY
%EQUATE `UI_CONTEXTAVAILABILITY_NOTAVAILABLE = 0
%EQUATE `UI_CONTEXTAVAILABILITY_AVAILABLE = 1
%EQUATE `UI_CONTEXTAVAILABILITY_ACTIVE = 2
' enum UI_FONTPROPERTIES
%EQUATE `UI_FONTPROPERTIES_NOTAVAILABLE = 0
%EQUATE `UI_FONTPROPERTIES_NOTSET = 1
%EQUATE `UI_FONTPROPERTIES_SET = 2
' enum UI_FONTVERTICALPOSITION
%EQUATE `UI_FONTVERTICALPOSITION_NOTAVAILABLE = 0
%EQUATE `UI_FONTVERTICALPOSITION_NOTSET = 1
%EQUATE `UI_FONTVERTICALPOSITION_SUPERSCRIPT = 2
%EQUATE `UI_FONTVERTICALPOSITION_SUBSCRIPT = 3
' enum UI_FONTUNDERLINE
%EQUATE `UI_FONTUNDERLINE_NOTAVAILABLE = 0
%EQUATE `UI_FONTUNDERLINE_NOTSET = 1
%EQUATE `UI_FONTUNDERLINE_SET = 2
' enum UI_FONTDELTASIZE
%EQUATE `UI_FONTDELTASIZE_GROW = 0
%EQUATE `UI_FONTDELTASIZE_SHRINK = 1
' enum UI_CONTROLDOCK
%EQUATE `UI_CONTROLDOCK_TOP = 1
%EQUATE `UI_CONTROLDOCK_BOTTOM = 3
' enum UI_SWATCHCOLORTYPE
%EQUATE `UI_SWATCHCOLORTYPE_NOCOLOR = 0
%EQUATE `UI_SWATCHCOLORTYPE_AUTOMATIC = 1
%EQUATE `UI_SWATCHCOLORTYPE_RGB = 2
' enum UI_SWATCHCOLORMODE
%EQUATE `UI_SWATCHCOLORMODE_NORMAL = 0
%EQUATE `UI_SWATCHCOLORMODE_MONOCHROME = 1
' ########################################################################################
' Interface name = IUISimplePropertySet
' IID = C205BB48-5B1C-4219-A106-15BD0A5F24E2
' Simple property bag
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUISimplePropertySet_INTERFACE_DEFINED)
 %IUISimplePropertySet_INTERFACE_DEFINED = 1
$IID_IUISimplePropertySet = GUID$("{C205BB48-5B1C-4219-A106-15BD0A5F24E2}")
INTERFACE IUISimplePropertySet $IID_IUISimplePropertySet
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetValue ( ' VTable offset = 12
 BYREF key AS PROPERTYKEY
 , BYREF value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUISimplePropertySet_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUIRibbon
' IID = 803982AB-370A-4F7E-A9E7-8784036A6E26
' Windows Ribbon IUIRibbon interface
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUIRibbon_INTERFACE_DEFINED)
 %IUIRibbon_INTERFACE_DEFINED = 1
$IID_IUIRibbon = GUID$("{803982AB-370A-4F7E-A9E7-8784036A6E26}")
INTERFACE IUIRibbon $IID_IUIRibbon
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetHeight ( ' VTable offset = 12
 BYREF cy AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD LoadSettingsFromStream ( ' VTable offset = 16
 BYVAL pStream AS IStream
 ) AS LONG
 ' =====================================================================================
 METHOD SaveSettingsToStream ( ' VTable offset = 20
 BYVAL pStream AS IStream
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUIRibbon_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUIFramework
' IID = F4F0385D-6872-43A8-AD09-4C339CB3F5C5
' Windows Ribbon Application interface
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUIFramework_INTERFACE_DEFINED)
 %IUIFramework_INTERFACE_DEFINED = 1
$IID_IUIFramework = GUID$("{F4F0385D-6872-43A8-AD09-4C339CB3F5C5}")
' enum UI_INVALIDATIONS
%EQUATE `UI_INVALIDATIONS_STATE = &H1
%EQUATE `UI_INVALIDATIONS_VALUE = &H2
%EQUATE `UI_INVALIDATIONS_PROPERTY = &H4
%EQUATE `UI_INVALIDATIONS_ALLPROPERTIES = &H8
'DEFINE_ENUM_FLAG_OPERATORS(UI_INVALIDATIONS)
%EQUATE `UI_ALL_COMMANDS = 0
INTERFACE IUIFramework $IID_IUIFramework
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Initialize ( ' VTable offset = 12
 BYVAL frameWnd AS DWORD
 , BYVAL application AS IUIApplication
 ) AS LONG
 ' =====================================================================================
 METHOD Destroy ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD LoadUI ( ' VTable offset = 20
 BYVAL instance AS DWORD
 , BYREF resourceName AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetView ( ' VTable offset = 24
 BYVAL viewId AS DWORD
 , BYREF riid AS GUID
 , BYREF ppv AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD GetUICommandProperty ( ' VTable offset = 28
 BYVAL commandId AS DWORD
 , BYREF key AS PROPERTYKEY
 , BYREF value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD SetUICommandProperty ( ' VTable offset = 32
 BYVAL commandId AS DWORD
 , BYREF key AS PROPERTYKEY
 , BYREF value AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD InvalidateUICommand ( ' VTable offset = 36
 BYVAL commandId AS DWORD
 , BYVAL flags AS LONG
 , BYREF key AS PROPERTYKEY
 ) AS LONG
 ' =====================================================================================
 METHOD FlushPendingInvalidations ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
 METHOD SetModes ( ' VTable offset = 44
 BYVAL iModes AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUIFramework_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUIContextualUI
' IID = EEA11F37-7C46-437C-8E55-B52122B29293
' Provides the core functionality for the Context Popup View.
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUIContextualUI_INTERFACE_DEFINED)
 %IUIContextualUI_INTERFACE_DEFINED = 1
$IID_IUIContextualUI = GUID$("{EEA11F37-7C46-437C-8E55-B52122B29293}")
INTERFACE IUIContextualUI $IID_IUIContextualUI
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ShowAtLocation ( ' VTable offset = 12
 BYVAL x AS LONG
 , BYVAL y AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUIContextualUI_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUICollection
' IID = DF4F45BF-6F9D-4DD7-9D68-D8F9CD18C4DB
' Defines the methods for dynamically manipulating collection-based control.
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUICollection_INTERFACE_DEFINED)
 %IUICollection_INTERFACE_DEFINED = 1
$IID_IUICollection = GUID$("{DF4F45BF-6F9D-4DD7-9D68-D8F9CD18C4DB}")
INTERFACE IUICollection $IID_IUICollection
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCount ( ' VTable offset = 12
 BYREF count AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetItem ( ' VTable offset = 16
 BYVAL index AS DWORD
 , BYREF item AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD Add ( ' VTable offset = 20
 BYVAL item AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD Insert ( ' VTable offset = 24
 BYVAL index AS DWORD
 , BYVAL item AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveAt ( ' VTable offset = 28
 BYVAL index AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Replace ( ' VTable offset = 32
 BYVAL indexReplaced AS DWORD
 , BYVAL itemReplaceWith AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD Clear ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUICollection_INTERFACE_DEFINED__ */
' enum UI_COLLECTIONCHANGE
%EQUATE `UI_COLLECTIONCHANGE_INSERT = 0
%EQUATE `UI_COLLECTIONCHANGE_REMOVE = 1
%EQUATE `UI_COLLECTIONCHANGE_REPLACE = 2
%EQUATE `UI_COLLECTIONCHANGE_RESET = 3
%EQUATE `UI_COLLECTION_INVALIDINDEX = &Hffffffff
' ########################################################################################
' Interface name = IUICollectionChangedEvent
' IID = 6502AE91-A14D-44B5-BBD0-62AACC581D52
' The IUICollectionChangedEvent interface is implemented by the application and defines
' the method required to handle changes to a collection at run time.
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUICollectionChangedEvent_INTERFACE_DEFINED)
 %IUICollectionChangedEvent_INTERFACE_DEFINED = 1
$IID_IUICollectionChangedEvent = GUID$("{6502AE91-A14D-44B5-BBD0-62AACC581D52}")
INTERFACE IUICollectionChangedEvent $IID_IUICollectionChangedEvent
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnChanged( ' VTable offset = 12
 BYVAL action AS LONG
 , BYVAL oldIndex AS DWORD
 , BYVAL oldItem AS IUnknown
 , BYVAL newIndex AS DWORD
 , BYVAL newItem AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUICollectionChangedEvent_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUICommandHandler
' IID = 75AE0A2D-DC03-4C9F-8883-069660D0BEB6
' Command handler interface
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUICommandHandler_INTERFACE_DEFINED)
 %IUICommandHandler_INTERFACE_DEFINED = 1
$IID_IUICommandHandler = GUID$("{75AE0A2D-DC03-4C9F-8883-069660D0BEB6}")
' enum UI_EXECUTIONVERB
%EQUATE `UI_EXECUTIONVERB_EXECUTE = 0
%EQUATE `UI_EXECUTIONVERB_PREVIEW = 1
%EQUATE `UI_EXECUTIONVERB_CANCELPREVIEW = 2
INTERFACE IUICommandHandler $IID_IUICommandHandler
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Execute ( ' VTable offset = 12
 BYVAL commandId AS DWORD
 , BYVAL verb AS LONG
 , BYREF key AS PROPERTYKEY
 , BYREF currentValue AS PROPVARIANT
 , BYVAL commandExecutionProperties AS IUISimplePropertySet
 ) AS LONG
 ' =====================================================================================
 METHOD UpdateProperty ( ' VTable offset = 16
 BYVAL commandId AS DWORD
 , BYREF key AS PROPERTYKEY
 , BYREF currentValue AS PROPVARIANT
 , BYREF newValue AS PROPVARIANT
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUICommandHandler_INTERFACE_DEFINED__ */
' enum UI_COMMANDTYPE
%EQUATE `UI_COMMANDTYPE_UNKNOWN = 0
%EQUATE `UI_COMMANDTYPE_GROUP = 1
%EQUATE `UI_COMMANDTYPE_ACTION = 2
%EQUATE `UI_COMMANDTYPE_ANCHOR = 3
%EQUATE `UI_COMMANDTYPE_CONTEXT = 4
%EQUATE `UI_COMMANDTYPE_COLLECTION = 5
%EQUATE `UI_COMMANDTYPE_COMMANDCOLLECTION = 6
%EQUATE `UI_COMMANDTYPE_DECIMAL = 7
%EQUATE `UI_COMMANDTYPE_BOOLEAN = 8
%EQUATE `UI_COMMANDTYPE_FONT = 9
%EQUATE `UI_COMMANDTYPE_RECENTITEMS = 10
%EQUATE `UI_COMMANDTYPE_COLORANCHOR = 11
%EQUATE `UI_COMMANDTYPE_COLORCOLLECTION = 12
' enum UI_VIEWTYPE
%EQUATE `UI_VIEWTYPE_RIBBON = 1
' ########################################################################################
' Interface name = IUIApplication
' IID = D428903C-729A-491D-910D-682A08FF2522
' Application callback interface
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUIApplication_INTERFACE_DEFINED)
 %IUIApplication_INTERFACE_DEFINED = 1
$IID_IUIApplication = GUID$("{D428903C-729A-491D-910D-682A08FF2522}")
' enum UI_VIEWVERB
%EQUATE `UI_VIEWVERB_CREATE = 0
%EQUATE `UI_VIEWVERB_DESTROY = 1
%EQUATE `UI_VIEWVERB_SIZE = 2
%EQUATE `UI_VIEWVERB_ERROR = 3
INTERFACE IUIApplication $IID_IUIApplication
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnViewChanged ( ' VTable offset = 12
 BYVAL viewId AS DWORD
 , BYVAL typeID AS LONG
 , BYVAL view AS IUnknown
 , BYVAL verb AS LONG
 , BYVAL uReasonCode AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD OnCreateUICommand ( ' VTable offset = 16
 BYVAL commandId AS DWORD
 , BYVAL typeID AS LONG
 , BYREF commandHandler AS IUICommandHandler
 ) AS LONG
 ' =====================================================================================
 METHOD OnDestroyUICommand ( ' VTable offset = 20
 BYVAL commandId AS DWORD
 , BYVAL typeID AS LONG
 , BYVAL commandHandler AS IUICommandHandler
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUIApplication_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUIImage
' IID = 23C8C838-4DE6-436B-AB01-5554BB7C30DD
' Container for bitmap image
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUIImage_INTERFACE_DEFINED)
 %IUIImage_INTERFACE_DEFINED = 1
$IID_IUIImage = GUID$("{23C8C838-4DE6-436B-AB01-5554BB7C30DD}")
INTERFACE IUIImage $IID_IUIImage
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetBitmap ( ' VTable offset = 12
 BYREF bitmap AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUIImage_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IUIImageFromBitmap
' IID = 18ABA7F3-4C1C-4BA2-BF6C-F5C3326FA816
' Produces containers for bitmap images
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUIImageFromBitmap_INTERFACE_DEFINED)
 %IUIImageFromBitmap_INTERFACE_DEFINED = 1
$IID_IUIImageFromBitmap = GUID$("{18ABA7F3-4C1C-4BA2-BF6C-F5C3326FA816}")
' enum UI_OWNERSHIP
%EQUATE `UI_OWNERSHIP_TRANSFER = 0
%EQUATE `UI_OWNERSHIP_COPY = 1
INTERFACE IUIImageFromBitmap $IID_IUIImageFromBitmap
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateImage ( ' VTable offset = 12
 BYVAL bitmap AS DWORD
 , BYVAL options AS LONG
 , BYREF image AS IUIImage
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUIImageFromBitmap_INTERFACE_DEFINED__ */
'#define UI_MAKEAPPMODE(x) (1 << (x))
FUNCTION UI_MAKEAPPMODE (BYVAL x AS LONG) AS LONG
 LOCAL m AS LONG
 m = 1
 SHIFT LEFT m, x
 FUNCTION = m
END FUNCTION
#ENDIF
