ARB
|
#include "GDE_proto.h"
#include <aw_window.hxx>
#include <MultiFileReader.h>
#include <arb_file.h>
#include <cctype>
Go to the source code of this file.
Macros | |
#define | THROW_IF_NO(ptr, name) do { if (!ptr) throwParseError(GBS_global_string("'%s' used w/o '" name "'", head), in); } while(0) |
#define | THROW_IF_NO_MENU() THROW_IF_NO(thismenu, "menu") |
#define | THROW_IF_NO_ITEM() THROW_IF_NO(thisitem, "item") |
#define | THROW_IF_NO_ARG() THROW_IF_NO(thisarg, "arg") |
#define | THROW_IF_NO_INPUT() THROW_IF_NO(thisinput, "in") |
#define | THROW_IF_NO_OUTPUT() THROW_IF_NO(thisoutput, "out") |
Functions | |
bool | only_whitespace (const char *line) |
static char * | readableItemname (const GmenuItem &i) |
__ATTR__NORETURN void | throwError (const char *msg) |
static __ATTR__NORETURN void | throwParseError (const char *msg, const LineReader &file) |
static __ATTR__NORETURN void | throwItemError (const GmenuItem &i, const char *error, const LineReader &file) |
static void | CheckItemConsistency (const GmenuItem *item, const LineReader &file) |
const char * | truncate_4000 (const char *str) |
void | trim (char *str) |
static void | splitEntry (const char *input, char *head, char *tail) |
static void | ParseMenus (LineReader &in) |
GB_ERROR | LoadMenus () |
bool | Find (const char *target, const char *key) |
int | Find2 (const char *target, const char *key) |
#define THROW_IF_NO | ( | ptr, | |
name | |||
) | do { if (!ptr) throwParseError(GBS_global_string("'%s' used w/o '" name "'", head), in); } while(0) |
Definition at line 71 of file GDE_ParseMenu.cxx.
#define THROW_IF_NO_MENU | ( | ) | THROW_IF_NO(thismenu, "menu") |
Definition at line 73 of file GDE_ParseMenu.cxx.
Referenced by ParseMenus().
#define THROW_IF_NO_ITEM | ( | ) | THROW_IF_NO(thisitem, "item") |
Definition at line 74 of file GDE_ParseMenu.cxx.
Referenced by ParseMenus().
#define THROW_IF_NO_ARG | ( | ) | THROW_IF_NO(thisarg, "arg") |
Definition at line 75 of file GDE_ParseMenu.cxx.
Referenced by ParseMenus().
#define THROW_IF_NO_INPUT | ( | ) | THROW_IF_NO(thisinput, "in") |
Definition at line 76 of file GDE_ParseMenu.cxx.
Referenced by ParseMenus().
#define THROW_IF_NO_OUTPUT | ( | ) | THROW_IF_NO(thisoutput, "out") |
Definition at line 77 of file GDE_ParseMenu.cxx.
Referenced by ParseMenus().
|
inline |
Definition at line 27 of file GDE_ParseMenu.cxx.
References GBS_global_string_copy(), GmenuItem::label, Gmenu::label, and GmenuItem::parent_menu.
Referenced by throwItemError().
|
inline |
Definition at line 31 of file GDE_ParseMenu.cxx.
References string().
Referenced by throwParseError().
|
static |
Definition at line 35 of file GDE_ParseMenu.cxx.
References fflush(), LineReader::getFilename(), LineReader::getLineNumber(), and throwError().
Referenced by ParseMenus(), and throwItemError().
|
static |
Definition at line 41 of file GDE_ParseMenu.cxx.
References GBS_global_string(), readableItemname(), and throwParseError().
Referenced by CheckItemConsistency().
|
static |
Definition at line 48 of file GDE_ParseMenu.cxx.
References I, GmenuItem::numinputs, GmenuItem::seqtype, and throwItemError().
Referenced by ParseMenus().
Definition at line 81 of file GDE_ParseMenu.cxx.
References buffer, BUFSIZE, and strcpy_truncate().
Referenced by ParseMenus().
|
inline |
Split "this:that[:the_other]" into: "this" and "that[:the_other]"
Definition at line 99 of file GDE_ParseMenu.cxx.
References trim().
Referenced by ParseMenus().
|
static |
Definition at line 120 of file GDE_ParseMenu.cxx.
References GmenuItemArg::active_mask, GmenuItem::active_mask, Gmenu::active_mask, GmenuItem::aligned, ARB_alloc(), ARB_calloc(), ARB_realloc(), ARB_recalloc(), ARB_strdup(), GmenuItem::arg, AWM_ALL, AWM_EXP, GmenuItem::aws, BASIC_TYPEINFO, CheckItemConsistency(), GmenuItemArg::choice, CHOICE_LIST, CHOICE_MENU, CHOICE_SAI, CHOICE_TREE, CHOICE_WEIGHTS, CHOOSER, DETAILED_TYPEINFO, FILE_SELECTOR, Find(), GfileFormat::format, GmenuItemArg::fvalue, GBS_global_string(), GBS_string_eval(), GBUFSIZ, GDE, gde_assert, GDEMAXMENU, GENBANK, LineReader::getLine(), GmenuItem::help, GmenuItem::input, Gmenu::item, GmenuItemArg::ivalue, GargChoice::label, GmenuItemArg::label, GmenuItem::label, Gmenu::label, label, GmenuItemArg::max, menu, GmenuItem::meta, Gmenu::meta, GargChoice::method, GmenuItem::method, GmenuItemArg::min, NA_FLAT, GfileFormat::name, NULp, num_menus, GmenuItem::numargs, GmenuItemArg::numchoices, GmenuItem::numinputs, Gmenu::numitems, GmenuItem::numoutputs, only_whitespace(), GmenuItem::output, GmenuItem::parent_menu, GmenuItem::popup, GfileFormat::save, GmenuItem::seqtype, SLIDER, splitEntry(), GmenuItemArg::symbol, GfileFormat::symbol, TEXT, TEXTFIELD, TEXTFIELDWIDTH, GmenuItemArg::textvalue, GmenuItemArg::textwidth, THROW_IF_NO_ARG, THROW_IF_NO_INPUT, THROW_IF_NO_ITEM, THROW_IF_NO_MENU, THROW_IF_NO_OUTPUT, throwParseError(), truncate_4000(), GmenuItemArg::type, and GfileFormat::typeinfo.
Referenced by LoadMenus().
GB_ERROR LoadMenus | ( | void | ) |
Load menu config files
loads all '*.menu' from "$ARBHOME/lib/gde" and "$ARB_PROP/gde"
Definition at line 508 of file GDE_ParseMenu.cxx.
References ARB_strdup(), error(), GB_create_directory(), GB_have_error(), GB_incur_error(), GB_is_directory(), GB_path_in_ARBLIB(), GB_path_in_arbprop(), GBS_global_string(), GBS_read_dir(), GBS_static_string(), gde_assert, NULp, and ParseMenus().
Referenced by GDE_init().
Definition at line 550 of file GDE_ParseMenu.cxx.
Referenced by FindType(), GDE_startaction_cb(), ParseMenus(), and ReadGen().
Definition at line 555 of file GDE_ParseMenu.cxx.
Referenced by LoadData(), ReplaceArgs(), and ReplaceString().