Commit 9600a8df authored by claes's avatar claes

Co added to classname to avoid collision with xtt's xhelp

parent 05edceec
...@@ -43,13 +43,13 @@ extern "C" { ...@@ -43,13 +43,13 @@ extern "C" {
#include "co_xhelpnav.h" #include "co_xhelpnav.h"
#include "co_xhelp.h" #include "co_xhelp.h"
XHelp *XHelp::default_xhelp = 0; CoXHelp *CoXHelp::default_xhelp = 0;
// Prototype declarations // Prototype declarations
static void xhelp_open_input_dialog( XHelp *xhelp, char *text, char *title, static void xhelp_open_input_dialog( CoXHelp *xhelp, char *text, char *title,
char *init_text, char *init_text,
void (*ok_cb)( XHelp *, char *)) void (*ok_cb)( CoXHelp *, char *))
{ {
Arg args[10]; Arg args[10];
int i; int i;
...@@ -75,12 +75,12 @@ static void xhelp_open_input_dialog( XHelp *xhelp, char *text, char *title, ...@@ -75,12 +75,12 @@ static void xhelp_open_input_dialog( XHelp *xhelp, char *text, char *title,
xhelp->india_ok_cb = ok_cb; xhelp->india_ok_cb = ok_cb;
} }
static void xhelp_find_ok( XHelp *xhelp, char *search_str) static void xhelp_find_ok( CoXHelp *xhelp, char *search_str)
{ {
xhelp->xhelpnav->search( search_str, false); xhelp->xhelpnav->search( search_str, false);
} }
static void xhelp_activate_exit( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_activate_exit( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
if ( xhelp->close_cb) if ( xhelp->close_cb)
(xhelp->close_cb)( xhelp->parent_ctx, (void *)xhelp); (xhelp->close_cb)( xhelp->parent_ctx, (void *)xhelp);
...@@ -91,7 +91,7 @@ static void xhelp_activate_exit( Widget w, XHelp *xhelp, XmAnyCallbackStruct *da ...@@ -91,7 +91,7 @@ static void xhelp_activate_exit( Widget w, XHelp *xhelp, XmAnyCallbackStruct *da
// delete xhelp; // delete xhelp;
} }
static void xhelp_activate_zoom_in( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_activate_zoom_in( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
double zoom_factor; double zoom_factor;
...@@ -102,7 +102,7 @@ static void xhelp_activate_zoom_in( Widget w, XHelp *xhelp, XmAnyCallbackStruct ...@@ -102,7 +102,7 @@ static void xhelp_activate_zoom_in( Widget w, XHelp *xhelp, XmAnyCallbackStruct
xhelp->xhelpnav->zoom( 1.18); xhelp->xhelpnav->zoom( 1.18);
} }
static void xhelp_activate_zoom_out( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_activate_zoom_out( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
double zoom_factor; double zoom_factor;
...@@ -113,36 +113,36 @@ static void xhelp_activate_zoom_out( Widget w, XHelp *xhelp, XmAnyCallbackStruct ...@@ -113,36 +113,36 @@ static void xhelp_activate_zoom_out( Widget w, XHelp *xhelp, XmAnyCallbackStruct
xhelp->xhelpnav->zoom( 1.0 / 1.18); xhelp->xhelpnav->zoom( 1.0 / 1.18);
} }
static void xhelp_activate_zoom_reset( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_activate_zoom_reset( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
xhelp->xhelpnav->unzoom(); xhelp->xhelpnav->unzoom();
} }
static void xhelp_activate_search( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_activate_search( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
xhelp_open_input_dialog( xhelp, "Search string", "Search string", xhelp_open_input_dialog( xhelp, "Search string", "Search string",
"", &xhelp_find_ok); "", &xhelp_find_ok);
} }
static void xhelp_activate_searchnext( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_activate_searchnext( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
xhelp->xhelpnav->search_next(); xhelp->xhelpnav->search_next();
} }
static void xhelp_activate_searchprevious( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_activate_searchprevious( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
xhelp->xhelpnav->search_next_reverse(); xhelp->xhelpnav->search_next_reverse();
} }
static void xhelp_create_india_label( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_create_india_label( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
xhelp->india_label = w; xhelp->india_label = w;
} }
static void xhelp_create_india_text( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_create_india_text( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
xhelp->india_text = w; xhelp->india_text = w;
} }
static void xhelp_activate_india_ok( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_activate_india_ok( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
char *value; char *value;
...@@ -151,27 +151,27 @@ static void xhelp_activate_india_ok( Widget w, XHelp *xhelp, XmAnyCallbackStruct ...@@ -151,27 +151,27 @@ static void xhelp_activate_india_ok( Widget w, XHelp *xhelp, XmAnyCallbackStruct
(xhelp->india_ok_cb)( xhelp, value); (xhelp->india_ok_cb)( xhelp, value);
} }
static void xhelp_activate_india_cancel( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_activate_india_cancel( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
XtUnmanageChild( xhelp->india_widget); XtUnmanageChild( xhelp->india_widget);
} }
static void xhelp_activate_help( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_activate_help( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
XHelp::dhelp( "helpwindow", 0, navh_eHelpFile_Base, 0, true); CoXHelp::dhelp( "helpwindow", 0, navh_eHelpFile_Base, 0, true);
} }
static void xhelp_create_xhelpnav_form( Widget w, XHelp *xhelp, XmAnyCallbackStruct *data) static void xhelp_create_xhelpnav_form( Widget w, CoXHelp *xhelp, XmAnyCallbackStruct *data)
{ {
xhelp->xhelpnav_form = w; xhelp->xhelpnav_form = w;
} }
static void xhelp_enable_set_focus( XHelp *xhelp) static void xhelp_enable_set_focus( CoXHelp *xhelp)
{ {
xhelp->set_focus_disabled--; xhelp->set_focus_disabled--;
} }
static void xhelp_disable_set_focus( XHelp *xhelp, int time) static void xhelp_disable_set_focus( CoXHelp *xhelp, int time)
{ {
xhelp->set_focus_disabled++; xhelp->set_focus_disabled++;
xhelp->focus_timerid = XtAppAddTimeOut( xhelp->focus_timerid = XtAppAddTimeOut(
...@@ -182,7 +182,7 @@ static void xhelp_disable_set_focus( XHelp *xhelp, int time) ...@@ -182,7 +182,7 @@ static void xhelp_disable_set_focus( XHelp *xhelp, int time)
static void xhelp_action_inputfocus( Widget w, XmAnyCallbackStruct *data) static void xhelp_action_inputfocus( Widget w, XmAnyCallbackStruct *data)
{ {
Arg args[1]; Arg args[1];
XHelp *xhelp; CoXHelp *xhelp;
XtSetArg (args[0], XmNuserData, &xhelp); XtSetArg (args[0], XmNuserData, &xhelp);
XtGetValues (w, args, 1); XtGetValues (w, args, 1);
...@@ -204,19 +204,19 @@ static void xhelp_action_inputfocus( Widget w, XmAnyCallbackStruct *data) ...@@ -204,19 +204,19 @@ static void xhelp_action_inputfocus( Widget w, XmAnyCallbackStruct *data)
} }
void XHelp::pop() void CoXHelp::pop()
{ {
((XHelpNav*)xhelpnav)->pop(); ((CoXHelpNav*)xhelpnav)->pop();
displayed = 1; displayed = 1;
} }
void XHelp::clear() void CoXHelp::clear()
{ {
xhelpnav->brow_push_all(); xhelpnav->brow_push_all();
xhelpnav->clear(); xhelpnav->clear();
} }
int XHelp::help( char *key, char *help_bookmark, navh_eHelpFile file_type, int CoXHelp::help( char *key, char *help_bookmark, navh_eHelpFile file_type,
char *file_name, bool strict) char *file_name, bool strict)
{ {
return xhelpnav->help( key, help_bookmark, file_type, return xhelpnav->help( key, help_bookmark, file_type,
...@@ -226,7 +226,7 @@ int XHelp::help( char *key, char *help_bookmark, navh_eHelpFile file_type, ...@@ -226,7 +226,7 @@ int XHelp::help( char *key, char *help_bookmark, navh_eHelpFile file_type,
// //
// Static function to call help for the default xhelp // Static function to call help for the default xhelp
// //
int XHelp::dhelp( char *key, char *help_bookmark, navh_eHelpFile file_type, int CoXHelp::dhelp( char *key, char *help_bookmark, navh_eHelpFile file_type,
char *file_name, bool strict) char *file_name, bool strict)
{ {
if ( !default_xhelp) if ( !default_xhelp)
...@@ -239,12 +239,12 @@ int XHelp::dhelp( char *key, char *help_bookmark, navh_eHelpFile file_type, ...@@ -239,12 +239,12 @@ int XHelp::dhelp( char *key, char *help_bookmark, navh_eHelpFile file_type,
} }
int XHelp::help_index( navh_eHelpFile file_type, char *file_name) int CoXHelp::help_index( navh_eHelpFile file_type, char *file_name)
{ {
return xhelpnav->help_index( file_type, file_name, 0); return xhelpnav->help_index( file_type, file_name, 0);
} }
int XHelp::dhelp_index( navh_eHelpFile file_type, char *file_name) int CoXHelp::dhelp_index( navh_eHelpFile file_type, char *file_name)
{ {
if ( !default_xhelp) if ( !default_xhelp)
return 0; return 0;
...@@ -254,7 +254,7 @@ int XHelp::dhelp_index( navh_eHelpFile file_type, char *file_name) ...@@ -254,7 +254,7 @@ int XHelp::dhelp_index( navh_eHelpFile file_type, char *file_name)
return default_xhelp->help_index( file_type, file_name); return default_xhelp->help_index( file_type, file_name);
} }
void XHelp::set_dimension( int width, int height) void CoXHelp::set_dimension( int width, int height)
{ {
Arg args[3]; Arg args[3];
...@@ -268,7 +268,7 @@ void XHelp::set_dimension( int width, int height) ...@@ -268,7 +268,7 @@ void XHelp::set_dimension( int width, int height)
XtSetValues( toplevel, args,i); XtSetValues( toplevel, args,i);
} }
XHelp::~XHelp() CoXHelp::~CoXHelp()
{ {
if ( set_focus_disabled) if ( set_focus_disabled)
XtRemoveTimeOut( focus_timerid); XtRemoveTimeOut( focus_timerid);
...@@ -277,7 +277,7 @@ XHelp::~XHelp() ...@@ -277,7 +277,7 @@ XHelp::~XHelp()
XtDestroyWidget( parent_wid); XtDestroyWidget( parent_wid);
} }
XHelp::XHelp( CoXHelp::CoXHelp(
Widget xa_parent_wid, Widget xa_parent_wid,
void *xa_parent_ctx, void *xa_parent_ctx,
xhelp_eUtility utility, xhelp_eUtility utility,
...@@ -371,7 +371,7 @@ XHelp::XHelp( ...@@ -371,7 +371,7 @@ XHelp::XHelp(
XtManageChild( toplevel); XtManageChild( toplevel);
xhelpnav = new XHelpNav( (void *)this, xhelpnav_form, title, utility, &brow_widget, xhelpnav = new CoXHelpNav( (void *)this, xhelpnav_form, title, utility, &brow_widget,
&sts); &sts);
// XtPopup( parent_wid, XtGrabNone); // XtPopup( parent_wid, XtGrabNone);
......
...@@ -20,9 +20,9 @@ extern "C" { ...@@ -20,9 +20,9 @@ extern "C" {
# include "co_xhelpnav.h" # include "co_xhelpnav.h"
#endif #endif
class XHelp { class CoXHelp {
public: public:
XHelp( CoXHelp(
Widget xa_parent_wid, Widget xa_parent_wid,
void *xa_parent_ctx, void *xa_parent_ctx,
xhelp_eUtility utility, xhelp_eUtility utility,
...@@ -33,7 +33,7 @@ class XHelp { ...@@ -33,7 +33,7 @@ class XHelp {
Widget brow_widget; Widget brow_widget;
Widget form_widget; Widget form_widget;
Widget toplevel; Widget toplevel;
XHelpNav *xhelpnav; CoXHelpNav *xhelpnav;
Widget xhelpnav_form; Widget xhelpnav_form;
void *client_data; void *client_data;
void (*close_cb) ( void *, void *); void (*close_cb) ( void *, void *);
...@@ -43,9 +43,9 @@ class XHelp { ...@@ -43,9 +43,9 @@ class XHelp {
Widget india_widget; Widget india_widget;
Widget india_label; Widget india_label;
Widget india_text; Widget india_text;
void (*india_ok_cb)( XHelp *, char *); void (*india_ok_cb)( CoXHelp *, char *);
static XHelp *default_xhelp; static CoXHelp *default_xhelp;
void pop(); void pop();
void map(); void map();
...@@ -54,11 +54,11 @@ class XHelp { ...@@ -54,11 +54,11 @@ class XHelp {
char *file_name, bool strict); char *file_name, bool strict);
int help_index( navh_eHelpFile file_type, char *file_name); int help_index( navh_eHelpFile file_type, char *file_name);
void set_dimension( int width, int height); void set_dimension( int width, int height);
static void set_default( XHelp *xhelp) { default_xhelp = xhelp;} static void set_default( CoXHelp *xhelp) { default_xhelp = xhelp;}
static int dhelp( char *key, char *help_bookmark, navh_eHelpFile file_type, static int dhelp( char *key, char *help_bookmark, navh_eHelpFile file_type,
char *file_name, bool strict); char *file_name, bool strict);
static int dhelp_index( navh_eHelpFile file_type, char *file_name); static int dhelp_index( navh_eHelpFile file_type, char *file_name);
~XHelp(); ~CoXHelp();
}; };
......
This diff is collapsed.
...@@ -61,13 +61,13 @@ typedef enum { ...@@ -61,13 +61,13 @@ typedef enum {
xhelp_eUtility_Wtt xhelp_eUtility_Wtt
} xhelp_eUtility; } xhelp_eUtility;
class XHelpNavBrow { class CoXHelpNavBrow {
public: public:
XHelpNavBrow( BrowCtx *brow_ctx, void *brow_userdata) : CoXHelpNavBrow( BrowCtx *brow_ctx, void *brow_userdata) :
ctx(brow_ctx), userdata(brow_userdata) ctx(brow_ctx), userdata(brow_userdata)
{} {}
#if 0 #if 0
~XHelpNavBrow(); ~CoXHelpNavBrow();
#endif #endif
BrowCtx *ctx; BrowCtx *ctx;
...@@ -86,16 +86,16 @@ class XHelpNavBrow { ...@@ -86,16 +86,16 @@ class XHelpNavBrow {
void brow_setup(); void brow_setup();
}; };
class XHelpNav { class CoXHelpNav {
public: public:
XHelpNav( CoXHelpNav(
void *xn_parent_ctx, void *xn_parent_ctx,
Widget xn_parent_wid, Widget xn_parent_wid,
char *xn_name, char *xn_name,
xhelp_eUtility xn_utility, xhelp_eUtility xn_utility,
Widget *w, Widget *w,
pwr_tStatus *status); pwr_tStatus *status);
~XHelpNav(); ~CoXHelpNav();
void *parent_ctx; void *parent_ctx;
Widget parent_wid; Widget parent_wid;
...@@ -103,9 +103,9 @@ class XHelpNav { ...@@ -103,9 +103,9 @@ class XHelpNav {
Widget brow_widget; Widget brow_widget;
Widget form_widget; Widget form_widget;
Widget toplevel; Widget toplevel;
XHelpNavBrow *brow; CoXHelpNavBrow *brow;
XHelpNavBrow *collect_brow; CoXHelpNavBrow *collect_brow;
XHelpNavBrow *brow_stack[XHELPNAV_BROW_MAX]; CoXHelpNavBrow *brow_stack[XHELPNAV_BROW_MAX];
int brow_cnt; int brow_cnt;
int closing_down; int closing_down;
int displayed; int displayed;
...@@ -126,7 +126,7 @@ class XHelpNav { ...@@ -126,7 +126,7 @@ class XHelpNav {
int brow_push_all(); int brow_push_all();
void set_inputfocus(); void set_inputfocus();
void pop(); void pop();
void enable_events( XHelpNavBrow *brow); void enable_events( CoXHelpNavBrow *brow);
int help( char *key, char *help_bookmark, navh_eHelpFile file_type, int help( char *key, char *help_bookmark, navh_eHelpFile file_type,
char *file_name, int pop, bool strict); char *file_name, int pop, bool strict);
int help_index( navh_eHelpFile file_type, char *file_name, int pop); int help_index( navh_eHelpFile file_type, char *file_name, int pop);
...@@ -142,7 +142,7 @@ class HItem { ...@@ -142,7 +142,7 @@ class HItem {
type( xhelpnav_eHItemType_Object), type( xhelpnav_eHItemType_Object),
node(NULL) node(NULL)
{}; {};
virtual int doubleclick_action( XHelpNavBrow *brow, XHelpNav *xhelpnav, virtual int doubleclick_action( CoXHelpNavBrow *brow, CoXHelpNav *xhelpnav,
double x, double y) { return 1;} double x, double y) { return 1;}
virtual bool search( char *str, bool strict) { return false;} virtual bool search( char *str, bool strict) { return false;}
xhelpnav_eHItemType type; xhelpnav_eHItemType type;
...@@ -151,23 +151,23 @@ class HItem { ...@@ -151,23 +151,23 @@ class HItem {
class HItemHeader : public HItem { class HItemHeader : public HItem {
public: public:
HItemHeader( XHelpNavBrow *brow, char *item_name, char *title, HItemHeader( CoXHelpNavBrow *brow, char *item_name, char *title,
brow_tNode dest, flow_eDest dest_code); brow_tNode dest, flow_eDest dest_code);
}; };
class HItemHelpLine : public HItem { class HItemHelpLine : public HItem {
public: public:
HItemHelpLine( XHelpNavBrow *brow, char *item_name, HItemHelpLine( CoXHelpNavBrow *brow, char *item_name,
brow_tNode dest, flow_eDest dest_code); brow_tNode dest, flow_eDest dest_code);
}; };
class HItemHelpImage : public HItem { class HItemHelpImage : public HItem {
public: public:
HItemHelpImage( XHelpNavBrow *brow, char *item_name, brow_tNodeClass nc, HItemHelpImage( CoXHelpNavBrow *brow, char *item_name, brow_tNodeClass nc,
char *item_link, char *item_bookmark, char *item_link, char *item_bookmark,
char *item_file_name, navh_eHelpFile help_file_type, char *item_file_name, navh_eHelpFile help_file_type,
brow_tNode dest, flow_eDest dest_code); brow_tNode dest, flow_eDest dest_code);
int doubleclick_action( XHelpNavBrow *brow, XHelpNav *xhelpnav, int doubleclick_action( CoXHelpNavBrow *brow, CoXHelpNav *xhelpnav,
double x, double y); double x, double y);
char link[200]; char link[200];
char bookmark[80]; char bookmark[80];
...@@ -177,17 +177,17 @@ class HItemHelpImage : public HItem { ...@@ -177,17 +177,17 @@ class HItemHelpImage : public HItem {
class HItemHeaderLarge : public HItem { class HItemHeaderLarge : public HItem {
public: public:
HItemHeaderLarge( XHelpNavBrow *brow, char *item_name, char *title, HItemHeaderLarge( CoXHelpNavBrow *brow, char *item_name, char *title,
brow_tNode dest, flow_eDest dest_code); brow_tNode dest, flow_eDest dest_code);
bool search( char *str, bool strict); bool search( char *str, bool strict);
}; };
class HItemHelp : public HItem { class HItemHelp : public HItem {
public: public:
HItemHelp( XHelpNavBrow *brow, char *item_name, char *text, char *text2, HItemHelp( CoXHelpNavBrow *brow, char *item_name, char *text, char *text2,
char *text3, char *item_link, char *item_bookmark, char *text3, char *item_link, char *item_bookmark,
char *item_file_name, navh_eHelpFile help_file_type, int help_index, brow_tNode dest, flow_eDest dest_code); char *item_file_name, navh_eHelpFile help_file_type, int help_index, brow_tNode dest, flow_eDest dest_code);
int doubleclick_action( XHelpNavBrow *brow, XHelpNav *xhelpnav, int doubleclick_action( CoXHelpNavBrow *brow, CoXHelpNav *xhelpnav,
double x, double y); double x, double y);
bool search( char *str, bool strict); bool search( char *str, bool strict);
char link[200]; char link[200];
...@@ -199,11 +199,11 @@ class HItemHelp : public HItem { ...@@ -199,11 +199,11 @@ class HItemHelp : public HItem {
class HItemHelpBold : public HItem { class HItemHelpBold : public HItem {
public: public:
HItemHelpBold( XHelpNavBrow *brow, char *item_name, char *text, char *text2, HItemHelpBold( CoXHelpNavBrow *brow, char *item_name, char *text, char *text2,
char *text3, char *item_link, char *item_bookmark, char *text3, char *item_link, char *item_bookmark,
char *item_file_name, navh_eHelpFile help_file_type, int help_index, char *item_file_name, navh_eHelpFile help_file_type, int help_index,
brow_tNode dest, flow_eDest dest_code); brow_tNode dest, flow_eDest dest_code);
int doubleclick_action( XHelpNavBrow *brow, XHelpNav *xhelpnav, int doubleclick_action( CoXHelpNavBrow *brow, CoXHelpNav *xhelpnav,
double x, double y); double x, double y);
bool search( char *str, bool strict); bool search( char *str, bool strict);
char link[200]; char link[200];
...@@ -215,9 +215,9 @@ class HItemHelpBold : public HItem { ...@@ -215,9 +215,9 @@ class HItemHelpBold : public HItem {
class HItemHelpHeader : public HItem { class HItemHelpHeader : public HItem {
public: public:
HItemHelpHeader( XHelpNavBrow *brow, char *item_name, char *title, bool base, HItemHelpHeader( CoXHelpNavBrow *brow, char *item_name, char *title, bool base,
brow_tNode dest, flow_eDest dest_code); brow_tNode dest, flow_eDest dest_code);
int doubleclick_action( XHelpNavBrow *brow, XHelpNav *xhelpnav, double x, double y); int doubleclick_action( CoXHelpNavBrow *brow, CoXHelpNav *xhelpnav, double x, double y);
bool search( char *str, bool strict); bool search( char *str, bool strict);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment