Table of Contents
- N_GUI_SYNTAXVIEW_DATA
- Public Attributes
- Public Attributes Documentation
- variable width_valid
- variable text
- variable sel_start
- variable sel_end
- variable sel_dragging
- variable scroll_offset
- variable mode
- variable metrics_font
- variable lines_valid
- variable len
- variable h_scroll_dragging
- variable h_scroll
- variable cached_nb_lines
- variable cached_headers_end
- variable cached_content_w
N_GUI_SYNTAXVIEW_DATA
Module: GUI: allegro5 widget system with pseudo-windows
syntax view specific data: read-only highlighted text
#include "n_gui.h"
Public Attributes
| Name | |
|---|---|
| int | width_valid 0 when cached_content_w is stale. |
| char * | text owned copy of the text, or NULL |
| int | sel_start selection start byte offset into text, or -1 when nothing is selected |
| int | sel_end selection end byte offset (tracks the cursor while a drag is in progress) |
| int | sel_dragging 1 while a mouse drag is extending the selection, 0 otherwise |
| int | scroll_offset first visible line |
| int | mode highlighting mode: N_GUI_SYNTAX_* |
| const ALLEGRO_FONT * | metrics_font font cached_content_w was measured with (a text keeps its width only for as long as the font it was measured in stays the one in use) |
| int | lines_valid 0 when cached_nb_lines / cached_headers_end are stale (rebuild on next use). |
| size_t | len text length in bytes |
| int | h_scroll_dragging 1 while the horizontal scrollbar thumb is being dragged (so the shared scrollbar-drag handler routes the drag to h_scroll, not to the lines) |
| float | h_scroll horizontal scroll offset in pixels: the view does not wrap, so a line wider than the widget is reached by panning rather than by folding |
| int | cached_nb_lines cached line count (matches _text_line_count), valid when lines_valid |
| int | cached_headers_end cached first blank-line index (HTTP headers end), or INT_MAX; valid when lines_valid |
| float | cached_content_w cached pixel width of the widest line, valid when width_valid |
Public Attributes Documentation
variable width_valid
int width_valid;
0 when cached_content_w is stale.
Cleared by n_gui_syntaxview_set_text and whenever the widget is drawn with a font other than metrics_font.
variable text
char * text;
owned copy of the text, or NULL
variable sel_start
int sel_start;
selection start byte offset into text, or -1 when nothing is selected
variable sel_end
int sel_end;
selection end byte offset (tracks the cursor while a drag is in progress)
variable sel_dragging
int sel_dragging;
1 while a mouse drag is extending the selection, 0 otherwise
variable scroll_offset
int scroll_offset;
first visible line
variable mode
int mode;
highlighting mode: N_GUI_SYNTAX_*
variable metrics_font
const ALLEGRO_FONT * metrics_font;
font cached_content_w was measured with (a text keeps its width only for as long as the font it was measured in stays the one in use)
variable lines_valid
int lines_valid;
0 when cached_nb_lines / cached_headers_end are stale (rebuild on next use).
Zero-initialised so a freshly created widget rebuilds on first draw; set back to 0 by n_gui_syntaxview_set_text.
variable len
size_t len;
text length in bytes
variable h_scroll_dragging
int h_scroll_dragging;
1 while the horizontal scrollbar thumb is being dragged (so the shared scrollbar-drag handler routes the drag to h_scroll, not to the lines)
variable h_scroll
float h_scroll;
horizontal scroll offset in pixels: the view does not wrap, so a line wider than the widget is reached by panning rather than by folding
variable cached_nb_lines
int cached_nb_lines;
cached line count (matches _text_line_count), valid when lines_valid
variable cached_headers_end
int cached_headers_end;
cached first blank-line index (HTTP headers end), or INT_MAX; valid when lines_valid
variable cached_content_w
float cached_content_w;
cached pixel width of the widest line, valid when width_valid
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB