summaryrefslogtreecommitdiff
path: root/ted-internal.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-14 12:59:35 -0300
committerpommicket <pommicket@gmail.com>2023-08-14 12:59:35 -0300
commitefe5ae8cec7221779b9a6395eeb9b10b8974dd44 (patch)
tree4fd8162d810cf0a6e11a8d2505b6eabcb6a8e1c6 /ted-internal.h
parentccf3778572d461ef6319bd8c6b34fb68baea23ad (diff)
start new selector system - search not working yet
Diffstat (limited to 'ted-internal.h')
-rw-r--r--ted-internal.h47
1 files changed, 2 insertions, 45 deletions
diff --git a/ted-internal.h b/ted-internal.h
index d35b14c..406ce55 100644
--- a/ted-internal.h
+++ b/ted-internal.h
@@ -179,49 +179,6 @@ typedef struct EditNotifyInfo {
EditNotifyID id;
} EditNotifyInfo;
-/// an entry in a selector menu (e.g. the "open" menu)
-typedef struct {
- /// label
- const char *name;
- /// if not NULL, this will show on the right side of the entry.
- const char *detail;
- /// color to draw text in
- u32 color;
- /// use this for whatever you want
- u64 userdata;
-} SelectorEntry;
-
-struct Selector {
- SelectorEntry *entries;
- u32 n_entries;
- Rect bounds;
- /// index where the selector thing is
- u32 cursor;
- float scroll;
- /// whether or not we should let the user select entries using a cursor.
- bool enable_cursor;
-};
-
-/// file entries for file selectors
-typedef struct {
- /// just the file name
- char *name;
- /// full path
- char *path;
- FsType type;
-} FileEntry;
-
-struct FileSelector {
- char title[32];
- Selector sel;
- Rect bounds;
- u32 n_entries;
- FileEntry *entries;
- char cwd[TED_PATH_MAX];
- /// indicates that this is for creating files, not opening files
- bool create_menu;
-};
-
/// max tabs per node
#define TED_MAX_TABS 100
/// max strings in all config files
@@ -334,8 +291,8 @@ struct Ted {
/// index of currently open menu, or 0 if no menu is open
u32 menu_open_idx;
void *menu_context;
- FileSelector file_selector;
- Selector command_selector;
+ FileSelector *file_selector;
+ Selector *command_selector;
/// general-purpose line buffer for inputs -- used for menus
TextBuffer *line_buffer;
/// use for "find" term in find/find+replace