XenevaOS
Loading...
Searching...
No Matches
notes_ui.h
Go to the documentation of this file.
1#ifndef __NOTES_UI_H__
2#define __NOTES_UI_H__
3
4#include <chitralekha.h>
5#include <widgets/window.h>
6#include <widgets/sidebar.h>
7#include <widgets/textbox.h>
8#include <widgets/button.h>
9#include "notes_editor.h"
10
17
21extern int currentNoteSection;
22extern int currentNoteIdx;
23
24/* Initialize the XENotes User Interface */
26
27/* Callback when a sidebar item is selected */
29
30/* Create and add a new note to the sidebar */
31void NotesCreateNew(const char* title, ChWindow* mainWin);
32
33/* Action callbacks for sidebar buttons */
38
39/* Handle key input for title bar if focused */
40bool NotesTitleBarHandleKey(int ascii_code, ChWindow* win);
41
42#endif
ChWindow * mainWin
Definition main.cpp:58
char title[128]
Definition d_main.c:877
ChWindow * win
Definition namdapha.cpp:60
struct _notes_title_bar_ ChNotesTitleBar
void OnNewNoteClicked(ChWidget *wid, ChWindow *win)
Definition notes_ui.cpp:175
void OnSaveNoteClicked(ChWidget *wid, ChWindow *win)
Definition notes_ui.cpp:208
ChNotesTitleBar * notesTitleBar
Definition notes_ui.cpp:15
void OnDeleteNoteClicked(ChWidget *wid, ChWindow *win)
Definition notes_ui.cpp:238
void NotesInitializeUI(ChWindow *mainWin)
Definition notes_ui.cpp:398
int currentNoteIdx
Definition notes_ui.cpp:17
bool NotesTitleBarHandleKey(int ascii_code, ChWindow *win)
Definition notes_ui.cpp:294
void OnNoteSelected(ChSidebarItem *item, ChWindow *mainWin)
Definition notes_ui.cpp:120
ChNotesEditor * notesEditor
Definition notes_ui.cpp:14
int currentNoteSection
Definition notes_ui.cpp:16
ChSidebar * notesSidebar
Definition notes_ui.cpp:13
void NotesCreateNew(const char *title, ChWindow *mainWin)
Definition notes_ui.cpp:361
void OnRenameNoteClicked(ChWidget *wid, ChWindow *win)
Definition notes_ui.cpp:226
#define SIDEBAR_MAX_LABEL
Definition sidebar.h:43
Definition window.h:130
Definition window.h:106
Definition notes_editor.h:22
Definition notes_ui.h:11
bool focused
Definition notes_ui.h:14
int cursorIndex
Definition notes_ui.h:15
char title[SIDEBAR_MAX_LABEL]
Definition notes_ui.h:13
ChWidget base
Definition notes_ui.h:12
Definition sidebar.h:66
Definition sidebar.h:49