summaryrefslogtreecommitdiffstats
path: root/Panel.h
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2006-05-30 13:47:28 +0000
committerHisham Muhammad <hisham@gobolinux.org>2006-05-30 13:47:28 +0000
commitc2cdcd0c1d2950291243b3a8645b5f061a0cdb2a (patch)
tree390297160c9caa342217d481406c68343785b5f9 /Panel.h
parenta853faaa2d2d0321da0ff6f51be656fc40cf8663 (diff)
Rename ListBox to Panel, matching dit.
Diffstat (limited to 'Panel.h')
-rw-r--r--Panel.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/Panel.h b/Panel.h
new file mode 100644
index 00000000..2999dc33
--- /dev/null
+++ b/Panel.h
@@ -0,0 +1,101 @@
+/* Do not edit this file. It was automatically genarated. */
+
+#ifndef HEADER_Panel
+#define HEADER_Panel
+/*
+htop
+(C) 2004-2006 Hisham H. Muhammad
+Released under the GNU GPL, see the COPYING file
+in the source distribution for its full text.
+*/
+
+#include "Object.h"
+#include "Vector.h"
+#include "CRT.h"
+#include "RichString.h"
+
+#include <math.h>
+#include <sys/param.h>
+#include <stdbool.h>
+
+#include "debug.h"
+#include <assert.h>
+
+#include <curses.h>
+//#link curses
+
+
+typedef struct Panel_ Panel;
+
+typedef enum HandlerResult_ {
+ HANDLED,
+ IGNORED,
+ BREAK_LOOP
+} HandlerResult;
+
+typedef HandlerResult(*Panel_EventHandler)(Panel*, int);
+
+struct Panel_ {
+ Object super;
+ int x, y, w, h;
+ WINDOW* window;
+ Vector* items;
+ int selected;
+ int scrollV, scrollH;
+ int oldSelected;
+ bool needsRedraw;
+ RichString header;
+ Panel_EventHandler eventHandler;
+};
+
+extern char* PANEL_CLASS;
+
+
+
+Panel* Panel_new(int x, int y, int w, int h, char* type, bool owner);
+
+void Panel_delete(Object* cast);
+
+void Panel_init(Panel* this, int x, int y, int w, int h, char* type, bool owner);
+
+void Panel_done(Panel* this);
+
+void Panel_setEventHandler(Panel* this, Panel_EventHandler eh);
+
+void Panel_setRichHeader(Panel* this, RichString header);
+
+void Panel_setHeader(Panel* this, char* header);
+
+void Panel_move(Panel* this, int x, int y);
+
+void Panel_resize(Panel* this, int w, int h);
+
+void Panel_prune(Panel* this);
+
+void Panel_add(Panel* this, Object* o);
+
+void Panel_insert(Panel* this, int i, Object* o);
+
+void Panel_set(Panel* this, int i, Object* o);
+
+Object* Panel_get(Panel* this, int i);
+
+Object* Panel_remove(Panel* this, int i);
+
+Object* Panel_getSelected(Panel* this);
+
+void Panel_moveSelectedUp(Panel* this);
+
+void Panel_moveSelectedDown(Panel* this);
+
+int Panel_getSelectedIndex(Panel* this);
+
+int Panel_getSize(Panel* this);
+
+void Panel_setSelected(Panel* this, int selected);
+
+void Panel_draw(Panel* this, bool focus);
+
+void Panel_onKey(Panel* this, int key);
+
+#endif

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