XenevaOS
Loading...
Searching...
No Matches
notes_editor.h
Go to the documentation of this file.
1#ifndef __NOTES_EDITOR_H__
2#define __NOTES_EDITOR_H__
3
4#include <chitralekha.h>
5#include <widgets/window.h>
6#include <font.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
21
58
59ChNotesEditor* ChCreateNotesEditor(ChWindow* win, int x, int y, int w, int h);
60void ChNotesEditorSetText(ChNotesEditor* editor, const char* text);
62void ChNotesEditorApplyFormat(ChNotesEditor* editor, int formatType, uint32_t color);
63void ChNotesEditorHandleKey(ChNotesEditor* editor, int ascii_code);
64
65#define FORMAT_BOLD 1
66#define FORMAT_ITALIC 2
67#define FORMAT_UNDERLINE 3
68#define FORMAT_COLOR 4
69#define FORMAT_SIZE_UP 5
70#define FORMAT_SIZE_DOWN 6
71#define FORMAT_LIST 7
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
int h
Definition layout.c:118
ChWindow * win
Definition namdapha.cpp:60
ChNotesEditor * ChCreateNotesEditor(ChWindow *win, int x, int y, int w, int h)
Definition notes_editor.cpp:454
void ChNotesEditorSetText(ChNotesEditor *editor, const char *text)
Definition notes_editor.cpp:481
struct _rich_char_ RichChar
char * ChNotesEditorGetText(ChNotesEditor *editor)
Definition notes_editor.cpp:510
struct _notes_editor_ ChNotesEditor
void ChNotesEditorApplyFormat(ChNotesEditor *editor, int formatType, uint32_t color)
Definition notes_editor.cpp:8
void ChNotesEditorHandleKey(ChNotesEditor *editor, int ascii_code)
Definition notes_editor.cpp:373
Definition window.h:130
Definition font.h:83
Definition window.h:106
Definition notes_editor.h:22
int contentHeight
Definition notes_editor.h:42
uint32_t selBgColor
Definition notes_editor.h:48
bool focused
Definition notes_editor.h:51
int selectionEnd
Definition notes_editor.h:32
uint32_t fgColor
Definition notes_editor.h:47
uint8_t currentUnderline
Definition notes_editor.h:36
bool mouseDown
Definition notes_editor.h:52
ChFont * italicFont
Definition notes_editor.h:56
ChWindow * win
Definition notes_editor.h:24
uint8_t currentBold
Definition notes_editor.h:34
int textLength
Definition notes_editor.h:28
int bufferCapacity
Definition notes_editor.h:27
int lastY
Definition notes_editor.h:55
uint32_t bgColor
Definition notes_editor.h:46
uint8_t currentBullet
Definition notes_editor.h:37
uint32_t currentColor
Definition notes_editor.h:39
uint32_t selFgColor
Definition notes_editor.h:49
RichChar * textBuffer
Definition notes_editor.h:26
uint8_t currentItalic
Definition notes_editor.h:35
uint8_t currentSize
Definition notes_editor.h:38
ChWidget wid
Definition notes_editor.h:23
int selectionStart
Definition notes_editor.h:31
ChFont * baseFont
Definition notes_editor.h:44
int cursorIndex
Definition notes_editor.h:30
int lastX
Definition notes_editor.h:54
int scrollY
Definition notes_editor.h:41
Definition notes_editor.h:12
uint32_t color
Definition notes_editor.h:19
uint8_t italic
Definition notes_editor.h:15
uint8_t is_bullet
Definition notes_editor.h:17
uint8_t size
Definition notes_editor.h:18
uint8_t underline
Definition notes_editor.h:16
char c
Definition notes_editor.h:13
uint8_t bold
Definition notes_editor.h:14
Definition i_video.h:141