mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2025-12-31 14:40:49 +00:00
add seven segment
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#define MwNfixedSize "IfixedSize"
|
||||
#define MwNmargin "Imargin"
|
||||
#define MwNbitmapFont "IbitmapFont"
|
||||
#define MwNsevenSegment "IsevenSegment"
|
||||
|
||||
#define MwNtitle "Stitle"
|
||||
#define MwNtext "Stext"
|
||||
|
||||
@@ -20,6 +20,9 @@ typedef struct _MwViewport* MwViewport;
|
||||
typedef struct _MwListBox* MwListBox;
|
||||
typedef struct _MwComboBox* MwComboBox;
|
||||
typedef struct _MwTreeView* MwTreeView;
|
||||
typedef struct _MwScrollBar* MwScrollBar;
|
||||
typedef struct _MwLabel* MwLabel;
|
||||
typedef struct _MwLabelSegment MwLabelSegment;
|
||||
typedef struct _MwListBoxEntry MwListBoxEntry;
|
||||
typedef struct _MwTreeViewEntry MwTreeViewEntry;
|
||||
typedef struct _MwDirectoryEntry MwDirectoryEntry;
|
||||
@@ -164,6 +167,21 @@ struct _MwTreeView {
|
||||
MwPoint pressed;
|
||||
};
|
||||
|
||||
struct _MwScrollBar {
|
||||
MwPoint point;
|
||||
int drag;
|
||||
int pos;
|
||||
};
|
||||
|
||||
struct _MwLabel {
|
||||
MwLabelSegment* segment;
|
||||
};
|
||||
|
||||
struct _MwLabelSegment {
|
||||
int key;
|
||||
unsigned char value;
|
||||
};
|
||||
|
||||
struct _MwDirectoryEntry {
|
||||
char* name;
|
||||
int type;
|
||||
|
||||
@@ -17,6 +17,17 @@ extern "C" {
|
||||
*/
|
||||
MWDECL MwClass MwLabelClass;
|
||||
|
||||
/*!
|
||||
* @brief Sets the custom data for seven segment
|
||||
* @param handle Widget
|
||||
* @param index Index
|
||||
* @param data Data, `GFEDCBA` as 7-bit value
|
||||
* @note See https://en.wikipedia.org/wiki/File:7_Segment_Display_with_Labeled_Segments.svg for what alphabets mean here
|
||||
* */
|
||||
MwInline void MwLabelSetSevenSegment(MwWidget handle, int index, int data) {
|
||||
MwVaWidgetExecute(handle, "mwLabelSetSevenSegment", NULL, index, data);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user