![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <gtk/gtk.h>
Include dependency graph for doc_screenshot.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Typedefs | |
| typedef void(* | dt_gui_doc_screenshot_source_t) (void *inventory) |
Functions | |
| void | dt_gui_doc_screenshot_enable (void) |
| gboolean | dt_gui_doc_screenshot_enabled (void) |
| void | dt_gui_doc_screenshot_set_directory (const char *path) |
| void | dt_gui_doc_screenshot_window_show (void) |
| void | dt_gui_doc_screenshot_add_target (void *inventory, GtkWidget *widget, const char *name) |
| void | dt_gui_doc_screenshot_register_source (const char *section, dt_gui_doc_screenshot_source_t source) |
Documentation screenshot mode: a capture panel that renders individual GUI widgets (panels, tool modules, darkroom modules, the application's windows) to image files, so the manual's illustrations can be re-generated from the running application instead of being cropped by hand out of full-screen captures.
Where the destination is a documentation tree, a plain-text map (DOC_SCREENSHOT_MAP_FILE at its root) binds a widget to the illustration it stands for, and the language code the GUI currently runs in is inserted before the extension – exposure.fr.jpg next to exposure.en.jpg. Running the application once per language and capturing the same selection therefore refreshes the whole illustrated documentation, language by language.
The whole feature is inert unless --doc was passed on the command line: this module owns that flag (the orchestrator only announces it), and gui/actions/run.c asks for it before adding the entry to the "Run" menu. Nothing else in the application knows the mode exists.
Definition in file doc_screenshot.h.
Collect one section's worth of targets by calling dt_gui_doc_screenshot_add_target() with the inventory handed in. Called every time the panel refreshes, so it reads the live module lists rather than a snapshot taken at registration time.
Definition at line 80 of file doc_screenshot.h.
Hand the panel one capture target. Call it from a source callback, once per widget; name is copied. A NULL widget is ignored, so a source can pass a module's optional container without testing it first.
The sink a source calls back into, once per widget. inventory is the section iterator handed to the source; the name is copied into the widget-to-name table the capture and the file naming both read.
Definition at line 722 of file doc_screenshot.c.
References _append_row(), _g, IS_NULL_PTR, and name.
Referenced by _doc_screenshot_iop_modules(), and _doc_screenshot_lib_modules().
Announce that --doc was given. Called once by the argument parser, before the GUI is built – the menu is assembled later and reads the flag back.
Definition at line 131 of file doc_screenshot.c.
Referenced by dt_init().
| gboolean dt_gui_doc_screenshot_enabled | ( | void | ) |
TRUE when --doc was given, i.e. when the capture panel may be offered.
Definition at line 137 of file doc_screenshot.c.
References _g.
Referenced by append_run().
| void dt_gui_doc_screenshot_register_source | ( | const char * | section, |
| dt_gui_doc_screenshot_source_t | source | ||
| ) |
Register a named section of the panel's tree and the callback that fills it. The order of registration is the order the sections appear in. section is copied.
Definition at line 709 of file doc_screenshot.c.
References _sources, _doc_source_t::fill, IS_NULL_PTR, and _doc_source_t::section.
Referenced by dt_init().
| void dt_gui_doc_screenshot_set_directory | ( | const char * | path | ) |
Root of the documentation tree to write into, as given after --doc. It pre-fills the panel's destination folder and is where the widget-to-page map is looked for, so a documentation pass is one command away from being ready to capture.
Definition at line 143 of file doc_screenshot.c.
Referenced by dt_init().
Show (or raise) the capture panel: a tree of screenshotable widgets going from the whole window down to a single slider, with a check box on every row, a destination folder and a capture button.
Definition at line 1274 of file doc_screenshot.c.
References _g, _load_selection(), _on_capture(), _on_destroy(), _on_row_expanded(), _on_row_selected(), _on_select(), _on_toggled(), _populate(), COL_CAPTURABLE, COL_CHECKED, COL_COUNT, COL_ENABLED, COL_LABEL, COL_PAGE, DOC_SCREENSHOT_MAP_FILE, DOC_SCREENSHOT_PREVIEW_SIZE, dt_free, dt_gui_main_window(), FALSE, IS_NULL_PTR, pages, tooltip, and TRUE.
Referenced by doc_screenshot_callback().