ARB
Macros | Functions | Variables
AW_advice.cxx File Reference
#include "aw_advice.hxx"
#include "aw_window.hxx"
#include "aw_awar.hxx"
#include "aw_msg.hxx"
#include "aw_root.hxx"
#include <arbdb.h>
Include dependency graph for AW_advice.cxx:

Go to the source code of this file.

Macros

#define AWAR_ADVICE_TMP   "/tmp/advices/"
 
#define AWAR_ADVICE_TEXT   AWAR_ADVICE_TMP "text"
 
#define AWAR_ADVICE_UNDERSTOOD   AWAR_ADVICE_TMP "understood"
 
#define AWAR_ADVICE_DISABLED   "/advices/disabled"
 
#define AWAR_ADVICE_SHOWN   "/tmp/advices/shown"
 

Functions

void init_Advisor (AW_root *awr)
 has to be called one time (before calling AW_advice) More...
 
AW_awarget_disabled_advices ()
 
AW_awarget_shown_advices ()
 
int advice_id_offset (const char *id, const char *idlist)
 
bool advice_id_is_set (const char *id, const char *idlist)
 
void set_advice_id (const char *id, AW_awar *var)
 
void remove_advice_id (const char *id, AW_awar *var)
 
void toggle_advice_id (const char *id, AW_awar *var)
 
bool advice_disabled (const char *id)
 
void disable_advice (const char *id)
 
bool advice_currently_shown (const char *id)
 
void toggle_advice_shown (const char *id)
 
static void advice_close_cb (AW_window *aww, const char *id, AW_Advice_Type type)
 
static void advice_hide_and_close_cb (AW_window *aww, const char *id, AW_Advice_Type type)
 
void AW_reactivate_all_advices (AW_window *)
 reactivates all advices which were disabled by the user More...
 
void AW_advice (const char *message, AW_Advice_Type type, const char *title, const char *corresponding_help)
 Show a message box with an advice for the user. More...
 

Variables

static bool initialized = false
 
static AW_rootadvice_root = NULp
 

Macro Definition Documentation

#define AWAR_ADVICE_TMP   "/tmp/advices/"

Definition at line 25 of file AW_advice.cxx.

#define AWAR_ADVICE_TEXT   AWAR_ADVICE_TMP "text"

Definition at line 27 of file AW_advice.cxx.

Referenced by AW_advice(), and init_Advisor().

#define AWAR_ADVICE_UNDERSTOOD   AWAR_ADVICE_TMP "understood"

Definition at line 28 of file AW_advice.cxx.

Referenced by advice_close_cb(), advice_hide_and_close_cb(), AW_advice(), and init_Advisor().

#define AWAR_ADVICE_DISABLED   "/advices/disabled"

Definition at line 30 of file AW_advice.cxx.

Referenced by get_disabled_advices().

#define AWAR_ADVICE_SHOWN   "/tmp/advices/shown"

Definition at line 31 of file AW_advice.cxx.

Referenced by get_shown_advices().

Function Documentation

void init_Advisor ( AW_root awr)

has to be called one time (before calling AW_advice)

Definition at line 41 of file AW_advice.cxx.

References AWAR_ADVICE_TEXT, AWAR_ADVICE_UNDERSTOOD, AW_root::awar_int(), AW_root::awar_string(), and initialized.

Referenced by AWT_create_root().

AW_awar* get_disabled_advices ( )
inline
AW_awar* get_shown_advices ( )
inline

Definition at line 56 of file AW_advice.cxx.

References AWAR_ADVICE_SHOWN, and AW_root::awar_string().

Referenced by advice_currently_shown(), and toggle_advice_shown().

int advice_id_offset ( const char id,
const char idlist 
)
inline

Definition at line 58 of file AW_advice.cxx.

References GBS_global_string().

Referenced by advice_id_is_set(), and remove_advice_id().

bool advice_id_is_set ( const char id,
const char idlist 
)
inline
void set_advice_id ( const char id,
AW_awar var 
)
inline
void remove_advice_id ( const char id,
AW_awar var 
)
inline
void toggle_advice_id ( const char id,
AW_awar var 
)
inline
bool advice_disabled ( const char id)
inline

Definition at line 100 of file AW_advice.cxx.

References advice_id_is_set(), and get_disabled_advices().

Referenced by AW_advice().

void disable_advice ( const char id)
inline

Definition at line 101 of file AW_advice.cxx.

References get_disabled_advices(), and set_advice_id().

Referenced by advice_close_cb().

bool advice_currently_shown ( const char id)
inline

Definition at line 103 of file AW_advice.cxx.

References advice_id_is_set(), and get_shown_advices().

Referenced by AW_advice().

void toggle_advice_shown ( const char id)
inline

Definition at line 104 of file AW_advice.cxx.

References get_shown_advices(), and toggle_advice_id().

Referenced by advice_close_cb(), and AW_advice().

static void advice_close_cb ( AW_window aww,
const char id,
AW_Advice_Type  type 
)
static
static void advice_hide_and_close_cb ( AW_window aww,
const char id,
AW_Advice_Type  type 
)
static

Definition at line 130 of file AW_advice.cxx.

References advice_close_cb(), AW_root::awar(), AWAR_ADVICE_UNDERSTOOD, and AW_awar::write_int().

Referenced by AW_advice().

void AW_reactivate_all_advices ( AW_window )

reactivates all advices which were disabled by the user

Definition at line 137 of file AW_advice.cxx.

References aw_assert, aw_message(), GBS_global_string(), GBS_string_eval(), get_disabled_advices(), AW_awar::read_string(), and AW_awar::write_string().

Referenced by add_common_property_menu_entries().

void AW_advice ( const char message,
AW_Advice_Type  type = AW_ADVICE_SIMPLE,
const char title = NULp,
const char corresponding_help = NULp 
)

Variable Documentation

bool initialized = false
static
AW_root* advice_root = NULp
static

Definition at line 37 of file AW_advice.cxx.