aboutsummaryrefslogtreecommitdiffstats
path: root/Panel.h
diff options
context:
space:
mode:
Diffstat (limited to 'Panel.h')
-rw-r--r--Panel.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Panel.h b/Panel.h
index 9bb4c77..33d532e 100644
--- a/Panel.h
+++ b/Panel.h
@@ -39,6 +39,10 @@ typedef enum HandlerResult_ {
#define EVENT_IS_HEADER_CLICK(ev_) ((ev_) >= -10000 && (ev_) <= -9000)
#define EVENT_HEADER_CLICK_GET_X(ev_) ((ev_) + 10000)
+#define EVENT_SCREEN_TAB_CLICK(x_) (-20000 + (x_))
+#define EVENT_IS_SCREEN_TAB_CLICK(ev_) ((ev_) >= -20000 && (ev_) < -10000)
+#define EVENT_SCREEN_TAB_GET_X(ev_) ((ev_) + 20000)
+
typedef HandlerResult (*Panel_EventHandler)(Panel*, int);
typedef void (*Panel_DrawFunctionBar)(Panel*, bool);
typedef void (*Panel_PrintHeader)(Panel*);
@@ -61,6 +65,7 @@ typedef struct PanelClass_ {
struct Panel_ {
Object super;
int x, y, w, h;
+ int cursorX, cursorY;
Vector* items;
int selected;
int oldSelected;
@@ -69,6 +74,7 @@ struct Panel_ {
int scrollV;
int scrollH;
bool needsRedraw;
+ bool cursorOn;
bool wasFocus;
FunctionBar* currentBar;
FunctionBar* defaultBar;
@@ -90,6 +96,8 @@ void Panel_init(Panel* this, int x, int y, int w, int h, const ObjectClass* type
void Panel_done(Panel* this);
+void Panel_setCursorToSelection(Panel* this);
+
void Panel_setSelectionColor(Panel* this, ColorElements colorId);
void Panel_setHeader(Panel* this, const char* header);
@@ -130,4 +138,6 @@ bool Panel_onKey(Panel* this, int key);
HandlerResult Panel_selectByTyping(Panel* this, int ch);
+int Panel_getCh(Panel* this);
+
#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy