apoxi/include/GuiObjectFactory.hpp
Kirill Zhumarin d7d9bcf23a apoxi headers
2025-03-27 22:28:46 +03:00

294 lines
10 KiB
C++

/* ------------------------------------------------------------------------
Copyright (C) COMNEON electronic technology GmbH & Co. OHG.
All rights reserved.
------------------------------------------------------------------------
This document contains proprietary information belonging to COMNEON.
Passing on and copying of this document, use and communication of its
contents is not permitted without prior written authorisation.
------------------------------------------------------------------------ */
#if !defined(Apoxi_GuiObjectFactory_hpp)
#define Apoxi_GuiObjectFactory_hpp
class ResourceParser;
class CTResourceParser;
class GuiObjectDescr;
class CTResourcePack;
class WString;
#include <Kernel/Types.hpp>
#include <Auxiliary/Vector.hpp>
class GuiObjectFactory {
public:
enum ClassType {
UnknownClassType = 255,
ObjectReference = 0,
AlertClassType = 1,
AnimatedTextLineClassType = 2,
CheckBoxControlClassType = 3,
ContextMenuClassType = 4,
DateEditorClassType = 5,
ImageBoxClassType = 6,
IpAddrEditorClassType = 7,
ItemGridClassType = 8,
ItemMenuClassType = 9,
ItemTreeClassType = 10,
LayouterControlClassType = 11,
LineEditorClassType = 12,
MessageBoxClassType = 13,
MultiLineEditorClassType = 14,
MultiMediaEditorClassType = 15,
PasswordEditorClassType = 16,
ProgressBarClassType = 17,
PushButtonClassType = 18,
RadioButtonControlClassType = 19,
RadioButtonGroupClassType = 20,
TextLineClassType = 21,
TimeEditorClassType = 22,
WindowClassType = 23,
ItemMenuWindowClassType = 24,
AtlWindowClassType = 25,
AbstractEditorClassType = 26,
AbstractGridClassType = 27,
AbstractItemContainerClassType = 28,
AbstractItemGridClassType = 29,
AbstractLineEditorClassType = 30,
AbstractMultiLineEditorClassType = 31,
AbstractPredictiveInputBoxClassType = 32,
AbstractTextObjectClassType = 33,
ActionClassType = 34,
ComponentClassType = 35,
ControlClassType = 36,
DispatcherClassType = 37,
DrawableObjectClassType = 38,
ImageObtainerClassType = 39,
ItemClassType = 40,
ItemContainerClassType = 41,
ItemRendererPropertiesClassType = 42,
PositionIndicatorClassType = 43,
TextFormatClassType = 44,
MenuDescClassType = 45,
MenuPropertiesClassType = 46,
FeatureItemContainerClassType = 47,
MenuMapClassType = 48,
PropertyContainerClassType = 49,
FeatureItemClassType = 50,
TextBoxClassType = 51,
CloseWindowActionClassType = 52,
OpenWindowActionClassType = 53,
RadioButtonActionClassType = 54,
ContextFeatureItemClassType = 55,
MenuResourceTableType = 56,
CtResourcePackClassType = 57,
PropertyItemClassType = 58,
ItemBoxClassType = 59,
IndicatorItemClassType = 60,
PropertyDescriptorClassType = 61,
AtlItemBoxClassType = 62,
ValueMappingPropertyDescriptorClassType = 63,
MappingPolicyClassType = 64,
RangeMappingPolicyClassType = 65,
ProgressPropertyDescriptorClassType = 66,
PasswordPropertyDescriptorClassType = 67
};
enum PropertyId {
UnknownProp = 255,
DelayProp = 0,
TextProp = 1,
TextFormatProp = 2,
TextLineAnimTypeProp = 3,
StartDelayProp = 4,
AnimSpeedProp = 5,
StepProp = 6,
BoundsProp = 7,
SelectedProp = 8,
XProp = 9,
YProp = 10,
CornerProp = 11,
ItemContProp = 12,
DateProp = 13,
ObtainerProp = 14,
AutostartProp = 15,
BufferingProp = 16,
IpAddrProp = 17,
ColumnCountProp = 18,
AdjustWinTitleProp = 19,
RowCountProp = 20,
ColCountProp = 21,
MinSizeProp = 22,
CellsProp = 23,
RowPropertiesProp = 24,
ColumnPropertiesProp = 25,
MaxTextLengthProp = 26,
FontProp = 27,
TypeProp = 28,
TitleProp = 29,
MessageProp = 30,
ReadOnlyProp = 31,
LineHeightProp = 32,
TextAttrProp = 33,
ForegroundcolorProp = 34,
BackgroundcolorProp = 35,
TopLineGapProp = 36,
BottomLineGapProp = 37,
ProgressProp = 38,
RadioButtonGroupProp = 39,
VerticalCenteredProp = 40,
TimeProp = 41,
FocusPriorityProp = 42,
SkActionsProp = 43,
LeftSoftkeyProp = 44,
RightSoftkeyProp = 45,
MenuIdProp = 46,
ActionProp = 47,
InputMapperIdProp = 48,
ItemProp = 49,
RendererPropertiesProp = 50,
PositionIndicatorEnabledProp = 51,
MEditorProp = 52,
ModeProp = 53,
ColorProp = 54,
FrameTypeProp = 55,
AutoClearEnabledProp = 56,
MaximizedProp = 57,
EnabledProp = 58,
DisabledProp = 59,
DisplayIdxProp = 60,
ComponentsProp = 61,
AutoLayoutProp = 62,
ImageUriProp = 63,
IconProp = 64,
SyncModeEnabledProp = 65,
ItemRendererDisplayTypeProp = 66,
ItemRendererAnimTypeProp = 67,
ScrollDelayProp = 68,
ScrollGapProp = 69,
FullScreenPerItemProp = 70,
TransparentProp = 71,
MultiLineProp = 72,
CenteredVerticalProp = 73,
IndicateItemContProp = 74,
BackgrColorProp = 75,
HeightProp = 76,
GapProp = 77,
OrientationProp = 78,
MinValueProp = 79,
MaxValueProp = 80,
VisibleValuesCountProp = 81,
ValueProp = 82,
TextAlignProp = 83,
FontAlignProp = 84,
FeatureItemContainerProp = 85,
MenuPropertiesProp = 86,
MenuTypeProp = 87,
FeatureItemContainerIdProp = 88,
ItemsProp = 89,
MenuPositionProp = 90,
ActualViewProp = 91,
EndUserDefineableViewsProp = 92,
IsEndUserDefineableProp = 93,
DefaultViewProp = 94,
MenuMapMenuIdsProp = 95,
MenuMapMenuDescProp = 96,
PropertyListProp = 97,
AppIdProp = 98,
FeatureIdProp = 99,
StartAnimationProp = 100,
WindowProp = 101,
ModalProp = 102,
DispatcherProp = 103,
PosProp = 104,
ItemRendererProp = 105,
ContextItemProp = 106,
CloseAfterTriggerProp = 107,
MenuResourceTableEntryProp = 108,
LargeIconProp = 109,
MenuResourceTableSizeProp = 110,
MenuResourceTableEntryResourceIdProp = 111,
MenuResourceTableEntryMenuIdProp = 112,
IsSeparatorProp = 113,
PropertyItemEditorProp = 114,
PropertyItemTypeProp = 115,
FeatureKeyProp = 116,
PropertyDescriptorProp = 117,
LabelProp = 118,
TextIconPairCountProp = 119,
TextIconPairProp = 120,
MappingPolicyProp = 121,
RangeCountProp = 122,
IconValueMapProp = 123,
BackgroundImageProp = 124,
FrameLayoutHintProp = 125,
ParentAreaProp = 126,
HorizontalProp = 127,
AlignInfoProps = 128,
PropCount = 129 // mandatory last entry
};
enum ParseType {
UnknownType,
BooleanType,
XyDimType,
IntegerType,
UInt8Type,
UInt16Type,
WStringType,
StringType,
ColorType,
RectType,
IpAddrType,
DateType,
TimeType,
SizeType,
PositionType,
FrameType,
ParentAreaType,
CornerType,
TextAttrType,
TextAlignType,
FontAlignType,
AnimatedTextLineAnimType,
MessageBoxType,
InputMapperIdType,
PredInputMapperPredModeType,
ItemRendererPropertiesType,
ItemRendererPropertiesDisplayType,
ItemRendererPropertiesAnimType,
PositionIndicatorOrientationType,
MenuType,
FontSystemFontIdType,
CellPropsType,
RowColumnPropType,
FeatureKeyType,
TextIconPairType,
AlignInfoPropsType
};
static void* Create(ResourceParser& parser, const GuiObjectDescr& descr);
static BOOLEAN Destroy(void* instance, GuiObjectFactory::ClassType class_type, BOOLEAN force);
static BOOLEAN Finalize(void* src_gui_obj,
GuiObjectFactory::ClassType src_class_type,
void* target_gui_obj,
GuiObjectFactory::PropertyId prop_id);
static BOOLEAN IsComponent(ClassType class_type);
static GuiObjectFactory::ClassType MapBinaryIdToClassType(UINT8 class_id);
static GuiObjectFactory::PropertyId MapBinaryIdToPropertyId(UINT8 prop_id);
static GuiObjectFactory::ParseType MapPropertyIdToParseType(const GuiObjectFactory::PropertyId property_id);
static BOOLEAN GetPropertyValue(ResourceParser& parser,
GuiObjectFactory::ParseType parse_type, void* value);
static CTResourcePack* CreateCtResourcePack(CTResourceParser& parser, UINT16 id);
};
#endif // Apoxi_GuiObjectFactory_hpp