N_GUI_MARKDOWNVIEW_DATA
Module: GUI: allegro5 widget system with pseudo-windows
markdownview specific data. More...
#include "n_gui.h"
Public Attributes
| Name | |
|---|---|
| void * | user_data user data for on_link |
| int | theme_derived 1 while the style is still the one derived from the widget's theme, so a palette change is followed; cleared the moment the caller asks for the style in order to change it |
| char * | text the source, owned, NUL-terminated; never NULL after creation |
| N_GUI_MD_STYLE | style colours and metrics, the caller's to change through n_gui_markdownview_style() |
| float | scroll_y how far down the content the view is, in pixels |
| void(*)(int widget_id, const char *url, void *user_data) | on_link called when a link is clicked, or NULL |
| float | measured_w the width it was measured at, so a resize re-measures and nothing else has to remember to |
| N_GUI_MD_FONTS | fonts the faces, borrowed: the caller owns them and they must outlive the widget, the same rule every ALLEGRO_BITMAP in this file follows |
| int | dirty set when the text, the faces or the style changed under a measure |
| float | content_h the height the whole document last measured at |
Detailed Description
struct N_GUI_MARKDOWNVIEW_DATA;
markdownview specific data.
A read-only pane of rendered Markdown that scrolls vertically. There is no horizontal scroll and deliberately no way to ask for one: n_gui_md wraps everything it lays out, table cells included, so nothing ever overflows sideways.
Public Attributes Documentation
variable user_data
void * user_data;
user data for on_link
variable theme_derived
int theme_derived;
1 while the style is still the one derived from the widget's theme, so a palette change is followed; cleared the moment the caller asks for the style in order to change it
variable text
char * text;
the source, owned, NUL-terminated; never NULL after creation
variable style
N_GUI_MD_STYLE style;
colours and metrics, the caller's to change through n_gui_markdownview_style()
variable scroll_y
float scroll_y;
how far down the content the view is, in pixels
variable on_link
void(*)(int widget_id, const char *url, void *user_data) on_link;
called when a link is clicked, or NULL
variable measured_w
float measured_w;
the width it was measured at, so a resize re-measures and nothing else has to remember to
variable fonts
N_GUI_MD_FONTS fonts;
the faces, borrowed: the caller owns them and they must outlive the widget, the same rule every ALLEGRO_BITMAP in this file follows
variable dirty
int dirty;
set when the text, the faces or the style changed under a measure
variable content_h
float content_h;
the height the whole document last measured at
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