GrafX2 2.9.3227
The ultimate 256-color painting program
generatedoc.c File Reference

HTML doc generator. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "global.h"
#include "hotkeys.h"
#include "helpfile.h"
#include "keyboard.h"
#include "windows.h"
#include "init_buttons.h"
+ Include dependency graph for generatedoc.c:

Macros

#define Init_button(btn, tooltip, x_offset, y_offset, width, height, shape, left_action, right_action, left_instant, right_instant, unselect_action, family)
 

Functions

static int Export_help (const char *path)
 Export the help to HTML files. More...
 
static int fputs_utf8 (const char *str, size_t len, FILE *f)
 Convert from latin1 to utf-8. More...
 
int main (int argc, char *argv[])
 
static wordFind_default_shortcut (word shortcut_number)
 similar to Shortcut() from help.c, but relying only on default shortcuts More...
 
static const char * Keyboard_default_shortcut (word shortcut_number)
 Similar to Keyboard_shortcut_value() from help.c, but relying only on default shortcuts. More...
 
static void Print_button (FILE *f, int btn)
 
static const char * Export_help_table (FILE *f, unsigned int page)
 

Variables

static T_Toolbar_button Buttons [NB_BUTTONS]
 
const char *const skins []
 available skins More...
 

Detailed Description

HTML doc generator.

Macro Definition Documentation

◆ Init_button

#define Init_button (   btn,
  tooltip,
  x_offset,
  y_offset,
  width,
  height,
  shape,
  left_action,
  right_action,
  left_instant,
  right_instant,
  unselect_action,
  family 
)
Value:
Buttons[btn].Tooltip = tooltip; \
Buttons[btn].X_offset = x_offset; \
Buttons[btn].Y_offset = y_offset; \
Buttons[btn].Width = width; \
Buttons[btn].Height = height; \
Buttons[btn].Shape = shape; \
Buttons[btn].Family = family;
static T_Toolbar_button Buttons[NB_BUTTONS]
Definition: generatedoc.c:38
const char * Tooltip
Text in status bar when button is hovered.
Definition: windows.h:149

Function Documentation

◆ Export_help()

static int Export_help ( const char *  path)
static

Export the help to HTML files.

References Buttons, Export_help_table(), Help_section, NULL, Print_button(), and skins.

Referenced by main().

◆ fputs_utf8()

static int fputs_utf8 ( const char *  str,
size_t  len,
FILE *  f 
)
static

Convert from latin1 to utf-8.

Referenced by Export_help_table().

◆ main()

int main ( int  argc,
char *  argv[] 
)

References Export_help().

◆ Find_default_shortcut()

static word * Find_default_shortcut ( word  shortcut_number)
static

similar to Shortcut() from help.c, but relying only on default shortcuts

References ConfigKey, T_Key_config::Key, NB_SHORTCUTS, NULL, and Ordering.

Referenced by Keyboard_default_shortcut().

◆ Keyboard_default_shortcut()

static const char * Keyboard_default_shortcut ( word  shortcut_number)
static

Similar to Keyboard_shortcut_value() from help.c, but relying only on default shortcuts.

References Find_default_shortcut(), Key_name(), and NULL.

Referenced by Export_help_table().

◆ Print_button()

static void Print_button ( FILE *  f,
int  btn 
)
static

◆ Export_help_table()

static const char * Export_help_table ( FILE *  f,
unsigned int  page 
)
static

Variable Documentation

◆ Buttons

◆ skins

const char* const skins[]
Initial value:
= {
"classic",
"modern",
"DPaint",
"scenish",
"Aurora",
"chrisfx",
"black",
"klin",
}
#define NULL
Definition: 6502types.h:18

available skins

Referenced by Export_help().