Enum
#27
Replies: 2 comments 1 reply
-
List of Enums wget -O - https://raw.githubusercontent.com/andlabs/libui/master/ui.h 2>/dev/null \
| pcregrep -M '^_UI_ENUM[\s\S]*?}'` _UI_ENUM(uiForEach) {
uiForEachContinue,
uiForEachStop,
};
_UI_ENUM(uiWindowResizeEdge) {
uiWindowResizeEdgeLeft,
uiWindowResizeEdgeTop,
uiWindowResizeEdgeRight,
uiWindowResizeEdgeBottom,
uiWindowResizeEdgeTopLeft,
uiWindowResizeEdgeTopRight,
uiWindowResizeEdgeBottomLeft,
uiWindowResizeEdgeBottomRight,
// TODO have one for keyboard resizes?
// TODO GDK doesn't seem to have any others, including for keyboards...
// TODO way to bring up the system menu instead?
};
_UI_ENUM(uiDrawBrushType) {
uiDrawBrushTypeSolid,
uiDrawBrushTypeLinearGradient,
uiDrawBrushTypeRadialGradient,
uiDrawBrushTypeImage,
};
_UI_ENUM(uiDrawLineCap) {
uiDrawLineCapFlat,
uiDrawLineCapRound,
uiDrawLineCapSquare,
};
_UI_ENUM(uiDrawLineJoin) {
uiDrawLineJoinMiter,
uiDrawLineJoinRound,
uiDrawLineJoinBevel,
};
_UI_ENUM(uiDrawFillMode) {
uiDrawFillModeWinding,
uiDrawFillModeAlternate,
};
_UI_ENUM(uiAttributeType) {
uiAttributeTypeFamily,
uiAttributeTypeSize,
uiAttributeTypeWeight,
uiAttributeTypeItalic,
uiAttributeTypeStretch,
uiAttributeTypeColor,
uiAttributeTypeBackground,
uiAttributeTypeUnderline,
uiAttributeTypeUnderlineColor,
uiAttributeTypeFeatures,
};
_UI_ENUM(uiTextWeight) {
uiTextWeightMinimum = 0,
uiTextWeightThin = 100,
uiTextWeightUltraLight = 200,
uiTextWeightLight = 300,
uiTextWeightBook = 350,
uiTextWeightNormal = 400,
uiTextWeightMedium = 500,
uiTextWeightSemiBold = 600,
uiTextWeightBold = 700,
uiTextWeightUltraBold = 800,
uiTextWeightHeavy = 900,
uiTextWeightUltraHeavy = 950,
uiTextWeightMaximum = 1000,
};
_UI_ENUM(uiTextItalic) {
uiTextItalicNormal,
uiTextItalicOblique,
uiTextItalicItalic,
};
_UI_ENUM(uiTextStretch) {
uiTextStretchUltraCondensed,
uiTextStretchExtraCondensed,
uiTextStretchCondensed,
uiTextStretchSemiCondensed,
uiTextStretchNormal,
uiTextStretchSemiExpanded,
uiTextStretchExpanded,
uiTextStretchExtraExpanded,
uiTextStretchUltraExpanded,
};
_UI_ENUM(uiUnderline) {
uiUnderlineNone,
uiUnderlineSingle,
uiUnderlineDouble,
uiUnderlineSuggestion, // wavy or dotted underlines used for spelling/grammar checkers
};
_UI_ENUM(uiUnderlineColor) {
uiUnderlineColorCustom,
uiUnderlineColorSpelling,
uiUnderlineColorGrammar,
uiUnderlineColorAuxiliary, // for instance, the color used by smart replacements on macOS or in Microsoft Office
};
_UI_ENUM(uiDrawTextAlign) {
uiDrawTextAlignLeft,
uiDrawTextAlignCenter,
uiDrawTextAlignRight,
};
_UI_ENUM(uiModifiers) {
uiModifierCtrl = 1 << 0,
uiModifierAlt = 1 << 1,
uiModifierShift = 1 << 2,
uiModifierSuper = 1 << 3,
};
_UI_ENUM(uiExtKey) {
uiExtKeyEscape = 1,
uiExtKeyInsert, // equivalent to "Help" on Apple keyboards
uiExtKeyDelete,
uiExtKeyHome,
uiExtKeyEnd,
uiExtKeyPageUp,
uiExtKeyPageDown,
uiExtKeyUp,
uiExtKeyDown,
uiExtKeyLeft,
uiExtKeyRight,
uiExtKeyF1, // F1..F12 are guaranteed to be consecutive
uiExtKeyF2,
uiExtKeyF3,
uiExtKeyF4,
uiExtKeyF5,
uiExtKeyF6,
uiExtKeyF7,
uiExtKeyF8,
uiExtKeyF9,
uiExtKeyF10,
uiExtKeyF11,
uiExtKeyF12,
uiExtKeyN0, // numpad keys; independent of Num Lock state
uiExtKeyN1, // N0..N9 are guaranteed to be consecutive
uiExtKeyN2,
uiExtKeyN3,
uiExtKeyN4,
uiExtKeyN5,
uiExtKeyN6,
uiExtKeyN7,
uiExtKeyN8,
uiExtKeyN9,
uiExtKeyNDot,
uiExtKeyNEnter,
uiExtKeyNAdd,
uiExtKeyNSubtract,
uiExtKeyNMultiply,
uiExtKeyNDivide,
};
_UI_ENUM(uiAlign) {
uiAlignFill,
uiAlignStart,
uiAlignCenter,
uiAlignEnd,
};
_UI_ENUM(uiAt) {
uiAtLeading,
uiAtTop,
uiAtTrailing,
uiAtBottom,
};
_UI_ENUM(uiTableValueType) {
uiTableValueTypeString,
uiTableValueTypeImage,
uiTableValueTypeInt,
uiTableValueTypeColor,
}; |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think No.1 and No.5 are good. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Links
LibUI/lib/libui.rb
Lines 62 to 70 in 5c6c2ba
Beta Was this translation helpful? Give feedback.
All reactions