Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
501b6be2
Commit
501b6be2
authored
Feb 27, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Next and prevous topic added, and new toolbar in helpwindow
parent
6788c995
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
503 additions
and
12 deletions
+503
-12
src/lib/co/gtk/co_xhelp_gtk.cpp
src/lib/co/gtk/co_xhelp_gtk.cpp
+98
-1
src/lib/co/gtk/co_xhelp_gtk.h
src/lib/co/gtk/co_xhelp_gtk.h
+4
-1
src/lib/co/src/co_nav_help.cpp
src/lib/co/src/co_nav_help.cpp
+231
-3
src/lib/co/src/co_nav_help.h
src/lib/co/src/co_nav_help.h
+5
-1
src/lib/co/src/co_xhelp.cpp
src/lib/co/src/co_xhelp.cpp
+16
-1
src/lib/co/src/co_xhelp.h
src/lib/co/src/co_xhelp.h
+4
-1
src/lib/co/src/co_xhelpnav.cpp
src/lib/co/src/co_xhelpnav.cpp
+137
-3
src/lib/co/src/co_xhelpnav.h
src/lib/co/src/co_xhelpnav.h
+8
-1
No files found.
src/lib/co/gtk/co_xhelp_gtk.cpp
View file @
501b6be2
/**
/**
* Proview $Id: co_xhelp_gtk.cpp,v 1.
2 2007-02-05 09:28:43
claes Exp $
* Proview $Id: co_xhelp_gtk.cpp,v 1.
3 2008-02-27 06:24:37
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -66,6 +66,27 @@ void CoXHelpGtk::activate_close( GtkWidget *w, gpointer data)
...
@@ -66,6 +66,27 @@ void CoXHelpGtk::activate_close( GtkWidget *w, gpointer data)
// delete xhelp;
// delete xhelp;
}
}
void
CoXHelpGtk
::
activate_back
(
GtkWidget
*
w
,
gpointer
data
)
{
CoXHelpGtk
*
xhelp
=
(
CoXHelpGtk
*
)
data
;
xhelp
->
back
();
}
void
CoXHelpGtk
::
activate_nexttopic
(
GtkWidget
*
w
,
gpointer
data
)
{
CoXHelpGtk
*
xhelp
=
(
CoXHelpGtk
*
)
data
;
xhelp
->
next_topic
();
}
void
CoXHelpGtk
::
activate_previoustopic
(
GtkWidget
*
w
,
gpointer
data
)
{
CoXHelpGtk
*
xhelp
=
(
CoXHelpGtk
*
)
data
;
xhelp
->
previous_topic
();
}
void
CoXHelpGtk
::
activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
)
void
CoXHelpGtk
::
activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
)
{
{
CoXHelpGtk
*
xhelp
=
(
CoXHelpGtk
*
)
data
;
CoXHelpGtk
*
xhelp
=
(
CoXHelpGtk
*
)
data
;
...
@@ -214,6 +235,7 @@ CoXHelpGtk::CoXHelpGtk(
...
@@ -214,6 +235,7 @@ CoXHelpGtk::CoXHelpGtk(
{
{
int
sts
;
int
sts
;
char
title
[
80
];
char
title
[
80
];
pwr_tFileName
fname
;
strcpy
(
title
,
Lng
::
translate
(
"Help"
));
strcpy
(
title
,
Lng
::
translate
(
"Help"
));
...
@@ -235,13 +257,35 @@ CoXHelpGtk::CoXHelpGtk(
...
@@ -235,13 +257,35 @@ CoXHelpGtk::CoXHelpGtk(
gtk_window_add_accel_group
(
GTK_WINDOW
(
toplevel
),
accel_g
);
gtk_window_add_accel_group
(
GTK_WINDOW
(
toplevel
),
accel_g
);
GtkMenuBar
*
menu_bar
=
(
GtkMenuBar
*
)
g_object_new
(
GTK_TYPE_MENU_BAR
,
NULL
);
GtkMenuBar
*
menu_bar
=
(
GtkMenuBar
*
)
g_object_new
(
GTK_TYPE_MENU_BAR
,
NULL
);
GtkToolbar
*
tools
=
(
GtkToolbar
*
)
g_object_new
(
GTK_TYPE_TOOLBAR
,
NULL
);
// File entry
// File entry
GtkWidget
*
file_close
=
gtk_image_menu_item_new_from_stock
(
GTK_STOCK_CLOSE
,
accel_g
);
GtkWidget
*
file_close
=
gtk_image_menu_item_new_from_stock
(
GTK_STOCK_CLOSE
,
accel_g
);
g_signal_connect
(
file_close
,
"activate"
,
G_CALLBACK
(
CoXHelpGtk
::
activate_close
),
this
);
g_signal_connect
(
file_close
,
"activate"
,
G_CALLBACK
(
CoXHelpGtk
::
activate_close
),
this
);
GtkWidget
*
file_back
=
gtk_menu_item_new_with_mnemonic
(
"_Back"
);
g_signal_connect
(
file_back
,
"activate"
,
G_CALLBACK
(
activate_back
),
this
);
gtk_widget_add_accelerator
(
file_back
,
"activate"
,
accel_g
,
'b'
,
GDK_CONTROL_MASK
,
GTK_ACCEL_VISIBLE
);
GtkWidget
*
file_nexttopic
=
gtk_menu_item_new_with_mnemonic
(
"_Next Topic"
);
g_signal_connect
(
file_nexttopic
,
"activate"
,
G_CALLBACK
(
activate_nexttopic
),
this
);
gtk_widget_add_accelerator
(
file_nexttopic
,
"activate"
,
accel_g
,
'n'
,
GDK_CONTROL_MASK
,
GTK_ACCEL_VISIBLE
);
GtkWidget
*
file_prevtopic
=
gtk_menu_item_new_with_mnemonic
(
"_Previous Topic"
);
g_signal_connect
(
file_prevtopic
,
"activate"
,
G_CALLBACK
(
activate_previoustopic
),
this
);
gtk_widget_add_accelerator
(
file_prevtopic
,
"activate"
,
accel_g
,
'p'
,
GDK_CONTROL_MASK
,
GTK_ACCEL_VISIBLE
);
GtkMenu
*
file_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
GtkMenu
*
file_menu
=
(
GtkMenu
*
)
g_object_new
(
GTK_TYPE_MENU
,
NULL
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_close
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_close
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_back
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_nexttopic
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
file_menu
),
file_prevtopic
);
GtkWidget
*
file
=
gtk_menu_item_new_with_mnemonic
(
"_File"
);
GtkWidget
*
file
=
gtk_menu_item_new_with_mnemonic
(
"_File"
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu_bar
),
file
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu_bar
),
file
);
...
@@ -306,6 +350,58 @@ CoXHelpGtk::CoXHelpGtk(
...
@@ -306,6 +350,58 @@ CoXHelpGtk::CoXHelpGtk(
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu_bar
),
help
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu_bar
),
help
);
gtk_menu_item_set_submenu
(
GTK_MENU_ITEM
(
help
),
GTK_WIDGET
(
help_menu
));
gtk_menu_item_set_submenu
(
GTK_MENU_ITEM
(
help
),
GTK_WIDGET
(
help_menu
));
// Toolbar
GtkWidget
*
tools_back
=
gtk_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_back.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_back
),
gtk_image_new_from_file
(
fname
));
g_signal_connect
(
tools_back
,
"clicked"
,
G_CALLBACK
(
activate_back
),
this
);
g_object_set
(
tools_back
,
"can-focus"
,
FALSE
,
NULL
);
gtk_toolbar_append_widget
(
tools
,
tools_back
,
CoWowGtk
::
translate_utf8
(
"Go back"
),
""
);
GtkWidget
*
tools_previous
=
gtk_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_previous.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_previous
),
gtk_image_new_from_file
(
fname
));
g_signal_connect
(
tools_previous
,
"clicked"
,
G_CALLBACK
(
activate_previoustopic
),
this
);
g_object_set
(
tools_previous
,
"can-focus"
,
FALSE
,
NULL
);
gtk_toolbar_append_widget
(
tools
,
tools_previous
,
CoWowGtk
::
translate_utf8
(
"Previous topic"
),
""
);
GtkWidget
*
tools_next
=
gtk_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_next.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_next
),
gtk_image_new_from_file
(
fname
));
g_signal_connect
(
tools_next
,
"clicked"
,
G_CALLBACK
(
activate_nexttopic
),
this
);
g_object_set
(
tools_next
,
"can-focus"
,
FALSE
,
NULL
);
gtk_toolbar_append_widget
(
tools
,
tools_next
,
CoWowGtk
::
translate_utf8
(
"Next topic"
),
""
);
GtkWidget
*
tools_zoom_in
=
gtk_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_zoom_in.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_zoom_in
),
gtk_image_new_from_file
(
fname
));
g_signal_connect
(
tools_zoom_in
,
"clicked"
,
G_CALLBACK
(
activate_zoom_in
),
this
);
g_object_set
(
tools_zoom_in
,
"can-focus"
,
FALSE
,
NULL
);
gtk_toolbar_append_widget
(
tools
,
tools_zoom_in
,
CoWowGtk
::
translate_utf8
(
"Zoom in"
),
""
);
GtkWidget
*
tools_zoom_out
=
gtk_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_zoom_out.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_zoom_out
),
gtk_image_new_from_file
(
fname
));
g_signal_connect
(
tools_zoom_out
,
"clicked"
,
G_CALLBACK
(
activate_zoom_out
),
this
);
g_object_set
(
tools_zoom_out
,
"can-focus"
,
FALSE
,
NULL
);
gtk_toolbar_append_widget
(
tools
,
tools_zoom_out
,
CoWowGtk
::
translate_utf8
(
"Zoom out"
),
""
);
GtkWidget
*
tools_zoom_reset
=
gtk_button_new
();
dcli_translate_filename
(
fname
,
"$pwr_exe/xtt_zoom_reset.png"
);
gtk_container_add
(
GTK_CONTAINER
(
tools_zoom_reset
),
gtk_image_new_from_file
(
fname
));
g_signal_connect
(
tools_zoom_reset
,
"clicked"
,
G_CALLBACK
(
activate_zoom_reset
),
this
);
g_object_set
(
tools_zoom_reset
,
"can-focus"
,
FALSE
,
NULL
);
gtk_toolbar_append_widget
(
tools
,
tools_zoom_reset
,
CoWowGtk
::
translate_utf8
(
"Zoom reset"
),
""
);
GtkWidget
*
vbox
=
gtk_vbox_new
(
FALSE
,
0
);
GtkWidget
*
vbox
=
gtk_vbox_new
(
FALSE
,
0
);
xhelpnav
=
new
CoXHelpNavGtk
(
(
void
*
)
this
,
vbox
,
title
,
utility
,
&
brow_widget
,
xhelpnav
=
new
CoXHelpNavGtk
(
(
void
*
)
this
,
vbox
,
title
,
utility
,
&
brow_widget
,
...
@@ -313,6 +409,7 @@ CoXHelpGtk::CoXHelpGtk(
...
@@ -313,6 +409,7 @@ CoXHelpGtk::CoXHelpGtk(
xhelpnav
->
open_URL_cb
=
CoXHelp
::
open_URL
;
xhelpnav
->
open_URL_cb
=
CoXHelp
::
open_URL
;
gtk_box_pack_start
(
GTK_BOX
(
vbox
),
GTK_WIDGET
(
menu_bar
),
FALSE
,
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
vbox
),
GTK_WIDGET
(
menu_bar
),
FALSE
,
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
vbox
),
GTK_WIDGET
(
tools
),
FALSE
,
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
vbox
),
GTK_WIDGET
(
brow_widget
),
TRUE
,
TRUE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
vbox
),
GTK_WIDGET
(
brow_widget
),
TRUE
,
TRUE
,
0
);
gtk_container_add
(
GTK_CONTAINER
(
toplevel
),
vbox
);
gtk_container_add
(
GTK_CONTAINER
(
toplevel
),
vbox
);
...
...
src/lib/co/gtk/co_xhelp_gtk.h
View file @
501b6be2
/**
/**
* Proview $Id: co_xhelp_gtk.h,v 1.
1 2007-01-04 07:51:41
claes Exp $
* Proview $Id: co_xhelp_gtk.h,v 1.
2 2008-02-27 06:24:37
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -53,6 +53,9 @@ class CoXHelpGtk : public CoXHelp {
...
@@ -53,6 +53,9 @@ class CoXHelpGtk : public CoXHelp {
char
*
init_text
,
char
*
init_text
,
void
(
*
ok_cb
)(
CoXHelp
*
,
char
*
));
void
(
*
ok_cb
)(
CoXHelp
*
,
char
*
));
static
void
activate_close
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_close
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_back
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_nexttopic
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_previoustopic
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_in
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_out
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_out
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_reset
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_zoom_reset
(
GtkWidget
*
w
,
gpointer
data
);
...
...
src/lib/co/src/co_nav_help.cpp
View file @
501b6be2
/**
/**
* Proview $Id: co_nav_help.cpp,v 1.1
0 2006-02-23 14:35:42
claes Exp $
* Proview $Id: co_nav_help.cpp,v 1.1
1 2008-02-27 06:24:37
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -152,8 +152,10 @@ int NavHelp::help( char *help_key, char *help_bookmark,
...
@@ -152,8 +152,10 @@ int NavHelp::help( char *help_key, char *help_bookmark,
dcli_get_defaultfilename
(
base_file
,
filestr
,
NULL
);
dcli_get_defaultfilename
(
base_file
,
filestr
,
NULL
);
else
if
(
file_type
==
navh_eHelpFile_Project
)
else
if
(
file_type
==
navh_eHelpFile_Project
)
dcli_get_defaultfilename
(
project_file
,
filestr
,
NULL
);
dcli_get_defaultfilename
(
project_file
,
filestr
,
NULL
);
else
else
if
(
file_name
)
dcli_get_defaultfilename
(
file_name
,
filestr
,
NULL
);
dcli_get_defaultfilename
(
file_name
,
filestr
,
NULL
);
else
dcli_get_defaultfilename
(
base_file
,
filestr
,
NULL
);
// Replace symbol for language
// Replace symbol for language
if
(
strncmp
(
filestr
,
"$pwr_lang/"
,
10
)
==
0
)
{
if
(
strncmp
(
filestr
,
"$pwr_lang/"
,
10
)
==
0
)
{
...
@@ -556,6 +558,230 @@ int NavHelp::help( char *help_key, char *help_bookmark,
...
@@ -556,6 +558,230 @@ int NavHelp::help( char *help_key, char *help_bookmark,
}
}
int
NavHelp
::
get_next_key
(
char
*
help_key
,
navh_eHelpFile
file_type
,
char
*
file_name
,
bool
strict
,
char
*
next_key
)
{
char
filestr
[
200
];
FILE
*
file
;
char
line
[
200
];
char
key
[
80
];
char
key_part
[
4
][
40
];
char
include_file
[
80
];
char
subject
[
80
];
char
subject_part
[
4
][
40
];
int
key_nr
;
int
subject_nr
;
int
hit
=
0
;
int
next_hit
=
0
;
int
sts
;
int
i
;
char
*
s
;
if
(
help_key
)
{
cdh_ToLower
(
key
,
help_key
);
}
// Open file
if
(
file_type
==
navh_eHelpFile_Base
)
dcli_get_defaultfilename
(
base_file
,
filestr
,
NULL
);
else
if
(
file_type
==
navh_eHelpFile_Project
)
dcli_get_defaultfilename
(
project_file
,
filestr
,
NULL
);
else
if
(
file_name
)
dcli_get_defaultfilename
(
file_name
,
filestr
,
NULL
);
else
dcli_get_defaultfilename
(
base_file
,
filestr
,
NULL
);
// Replace symbol for language
if
(
strncmp
(
filestr
,
"$pwr_lang/"
,
10
)
==
0
)
{
char
lng_filestr
[
200
];
sprintf
(
lng_filestr
,
"$pwr_exe/%s/%s"
,
Lng
::
get_language_str
(),
&
filestr
[
10
]);
strcpy
(
filestr
,
lng_filestr
);
}
dcli_translate_filename
(
filestr
,
filestr
);
file
=
fopen
(
filestr
,
"r"
);
if
(
file
==
0
)
return
NAV__NOFILE
;
key_nr
=
dcli_parse
(
key
,
" "
,
""
,
(
char
*
)
key_part
,
sizeof
(
key_part
)
/
sizeof
(
key_part
[
0
]),
sizeof
(
key_part
[
0
]),
0
);
sts
=
dcli_read_line
(
line
,
sizeof
(
line
),
file
);
while
(
ODD
(
sts
))
{
if
(
cdh_NoCaseStrncmp
(
line
,
"<include>"
,
9
)
==
0
)
{
help_remove_spaces
(
&
line
[
9
],
include_file
);
// Replace symbol for language
if
(
strncmp
(
include_file
,
"$pwr_lang/"
,
10
)
==
0
)
{
char
lng_include_file
[
200
];
sprintf
(
lng_include_file
,
"$pwr_exe/%s/%s"
,
Lng
::
get_language_str
(),
&
include_file
[
10
]);
strcpy
(
include_file
,
lng_include_file
);
}
if
(
!
noprop
)
{
sts
=
get_next_key
(
help_key
,
navh_eHelpFile_Other
,
include_file
,
strict
,
next_key
);
if
(
ODD
(
sts
))
{
fclose
(
file
);
return
sts
;
}
}
hit
=
0
;
}
if
(
cdh_NoCaseStrncmp
(
line
,
"<topic>"
,
7
)
==
0
)
{
if
(
(
s
=
strstr
(
line
,
"<style>"
))
||
(
s
=
strstr
(
line
,
"<STYLE>"
)))
{
*
s
=
0
;
}
help_remove_spaces
(
&
line
[
7
],
subject
);
if
(
hit
)
{
strcpy
(
next_key
,
subject
);
next_hit
=
1
;
break
;
}
cdh_ToLower
(
subject
,
subject
);
subject_nr
=
dcli_parse
(
subject
,
" "
,
""
,
(
char
*
)
subject_part
,
sizeof
(
subject_part
)
/
sizeof
(
subject_part
[
0
]),
sizeof
(
subject_part
[
0
]),
0
);
if
(
key_nr
==
subject_nr
)
{
for
(
i
=
0
;
i
<
key_nr
;
i
++
)
{
if
(
(
!
strict
&&
strncmp
(
subject_part
[
i
],
key_part
[
i
],
strlen
(
key_part
[
i
]))
==
0
)
||
(
strict
&&
strcmp
(
subject_part
[
i
],
key_part
[
i
])
==
0
))
{
if
(
i
==
key_nr
-
1
)
hit
=
1
;
}
else
break
;
}
}
}
sts
=
dcli_read_line
(
line
,
sizeof
(
line
),
file
);
}
fclose
(
file
);
if
(
!
next_hit
)
return
NAV__TOPICNOTFOUND
;
return
NAV__SUCCESS
;
}
int
NavHelp
::
get_previous_key
(
char
*
help_key
,
navh_eHelpFile
file_type
,
char
*
file_name
,
bool
strict
,
char
*
prev_key
)
{
char
filestr
[
200
];
FILE
*
file
;
char
line
[
200
];
char
key
[
80
];
char
key_part
[
4
][
40
];
char
include_file
[
80
];
char
subject
[
80
];
char
subject_part
[
4
][
40
];
int
key_nr
;
int
subject_nr
;
int
hit
=
0
;
int
sts
;
int
i
;
char
*
s
;
char
prev
[
80
]
=
""
;
if
(
help_key
)
{
cdh_ToLower
(
key
,
help_key
);
}
// Open file
if
(
file_type
==
navh_eHelpFile_Base
)
dcli_get_defaultfilename
(
base_file
,
filestr
,
NULL
);
else
if
(
file_type
==
navh_eHelpFile_Project
)
dcli_get_defaultfilename
(
project_file
,
filestr
,
NULL
);
else
if
(
file_name
)
dcli_get_defaultfilename
(
file_name
,
filestr
,
NULL
);
else
dcli_get_defaultfilename
(
base_file
,
filestr
,
NULL
);
// Replace symbol for language
if
(
strncmp
(
filestr
,
"$pwr_lang/"
,
10
)
==
0
)
{
char
lng_filestr
[
200
];
sprintf
(
lng_filestr
,
"$pwr_exe/%s/%s"
,
Lng
::
get_language_str
(),
&
filestr
[
10
]);
strcpy
(
filestr
,
lng_filestr
);
}
dcli_translate_filename
(
filestr
,
filestr
);
file
=
fopen
(
filestr
,
"r"
);
if
(
file
==
0
)
return
NAV__NOFILE
;
key_nr
=
dcli_parse
(
key
,
" "
,
""
,
(
char
*
)
key_part
,
sizeof
(
key_part
)
/
sizeof
(
key_part
[
0
]),
sizeof
(
key_part
[
0
]),
0
);
sts
=
dcli_read_line
(
line
,
sizeof
(
line
),
file
);
while
(
ODD
(
sts
))
{
if
(
cdh_NoCaseStrncmp
(
line
,
"<include>"
,
9
)
==
0
)
{
help_remove_spaces
(
&
line
[
9
],
include_file
);
// Replace symbol for language
if
(
strncmp
(
include_file
,
"$pwr_lang/"
,
10
)
==
0
)
{
char
lng_include_file
[
200
];
sprintf
(
lng_include_file
,
"$pwr_exe/%s/%s"
,
Lng
::
get_language_str
(),
&
include_file
[
10
]);
strcpy
(
include_file
,
lng_include_file
);
}
if
(
!
noprop
)
{
sts
=
get_next_key
(
help_key
,
navh_eHelpFile_Other
,
include_file
,
strict
,
prev_key
);
if
(
ODD
(
sts
))
{
fclose
(
file
);
return
sts
;
}
}
hit
=
0
;
}
if
(
cdh_NoCaseStrncmp
(
line
,
"<topic>"
,
7
)
==
0
)
{
if
(
(
s
=
strstr
(
line
,
"<style>"
))
||
(
s
=
strstr
(
line
,
"<STYLE>"
)))
{
*
s
=
0
;
}
help_remove_spaces
(
&
line
[
7
],
subject
);
cdh_ToLower
(
subject
,
subject
);
subject_nr
=
dcli_parse
(
subject
,
" "
,
""
,
(
char
*
)
subject_part
,
sizeof
(
subject_part
)
/
sizeof
(
subject_part
[
0
]),
sizeof
(
subject_part
[
0
]),
0
);
if
(
key_nr
==
subject_nr
)
{
for
(
i
=
0
;
i
<
key_nr
;
i
++
)
{
if
(
(
!
strict
&&
strncmp
(
subject_part
[
i
],
key_part
[
i
],
strlen
(
key_part
[
i
]))
==
0
)
||
(
strict
&&
strcmp
(
subject_part
[
i
],
key_part
[
i
])
==
0
))
{
if
(
i
==
key_nr
-
1
)
{
hit
=
1
;
strcpy
(
prev_key
,
prev
);
}
}
else
break
;
}
}
if
(
hit
)
break
;
strcpy
(
prev
,
subject
);
}
sts
=
dcli_read_line
(
line
,
sizeof
(
line
),
file
);
}
fclose
(
file
);
if
(
!
hit
||
strcmp
(
prev
,
""
)
==
0
)
return
NAV__TOPICNOTFOUND
;
return
NAV__SUCCESS
;
}
int
NavHelp
::
help_index
(
navh_eHelpFile
file_type
,
char
*
file_name
)
int
NavHelp
::
help_index
(
navh_eHelpFile
file_type
,
char
*
file_name
)
{
{
char
filestr
[
80
];
char
filestr
[
80
];
...
@@ -571,8 +797,10 @@ int NavHelp::help_index( navh_eHelpFile file_type, char *file_name)
...
@@ -571,8 +797,10 @@ int NavHelp::help_index( navh_eHelpFile file_type, char *file_name)
dcli_get_defaultfilename
(
base_file
,
filestr
,
NULL
);
dcli_get_defaultfilename
(
base_file
,
filestr
,
NULL
);
else
if
(
file_type
==
navh_eHelpFile_Project
)
else
if
(
file_type
==
navh_eHelpFile_Project
)
dcli_get_defaultfilename
(
project_file
,
filestr
,
NULL
);
dcli_get_defaultfilename
(
project_file
,
filestr
,
NULL
);
else
else
if
(
file_name
)
dcli_get_defaultfilename
(
file_name
,
filestr
,
NULL
);
dcli_get_defaultfilename
(
file_name
,
filestr
,
NULL
);
else
dcli_get_defaultfilename
(
base_file
,
filestr
,
NULL
);
if
(
strncmp
(
filestr
,
"$pwr_lang/"
,
10
)
==
0
)
{
if
(
strncmp
(
filestr
,
"$pwr_lang/"
,
10
)
==
0
)
{
char
lng_file
[
200
];
char
lng_file
[
200
];
...
...
src/lib/co/src/co_nav_help.h
View file @
501b6be2
/**
/**
* Proview $Id: co_nav_help.h,v 1.
7 2005-09-01 14:57:52
claes Exp $
* Proview $Id: co_nav_help.h,v 1.
8 2008-02-27 06:24:37
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -75,6 +75,10 @@ class NavHelp {
...
@@ -75,6 +75,10 @@ class NavHelp {
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
,
void
**
bookmark
,
bool
strict
=
false
);
char
*
file_name
,
void
**
bookmark
,
bool
strict
=
false
);
int
get_next_key
(
char
*
help_key
,
navh_eHelpFile
file_type
,
char
*
file_name
,
bool
strict
,
char
*
next_key
);
int
get_previous_key
(
char
*
help_key
,
navh_eHelpFile
file_type
,
char
*
file_name
,
bool
strict
,
char
*
prev_key
);
int
help_index
(
navh_eHelpFile
file_type
,
char
*
file_name
);
int
help_index
(
navh_eHelpFile
file_type
,
char
*
file_name
);
void
set_propagate
(
int
prop
)
{
noprop
=
!
prop
;}
void
set_propagate
(
int
prop
)
{
noprop
=
!
prop
;}
};
};
...
...
src/lib/co/src/co_xhelp.cpp
View file @
501b6be2
/**
/**
* Proview $Id: co_xhelp.cpp,v 1.
9 2007-02-07 15:45:44
claes Exp $
* Proview $Id: co_xhelp.cpp,v 1.
10 2008-02-27 06:24:37
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -74,6 +74,21 @@ int CoXHelp::help( char *key, char *help_bookmark, navh_eHelpFile file_type,
...
@@ -74,6 +74,21 @@ int CoXHelp::help( char *key, char *help_bookmark, navh_eHelpFile file_type,
file_name
,
0
,
strict
);
file_name
,
0
,
strict
);
}
}
int
CoXHelp
::
back
()
{
return
xhelpnav
->
back
();
}
int
CoXHelp
::
next_topic
()
{
return
xhelpnav
->
next_topic
();
}
int
CoXHelp
::
previous_topic
()
{
return
xhelpnav
->
previous_topic
();
}
//
//
// Static function to call help for the default xhelp
// Static function to call help for the default xhelp
//
//
...
...
src/lib/co/src/co_xhelp.h
View file @
501b6be2
/**
/**
* Proview $Id: co_xhelp.h,v 1.
7 2007-01-04 07:51:42
claes Exp $
* Proview $Id: co_xhelp.h,v 1.
8 2008-02-27 06:24:37
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -54,6 +54,9 @@ class CoXHelp {
...
@@ -54,6 +54,9 @@ class CoXHelp {
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
,
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
);
int
back
();
int
next_topic
();
int
previous_topic
();
static
void
set_default
(
CoXHelp
*
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
);
...
...
src/lib/co/src/co_xhelpnav.cpp
View file @
501b6be2
/**
/**
* Proview $Id: co_xhelpnav.cpp,v 1.1
1 2007-02-07 15:45:44
claes Exp $
* Proview $Id: co_xhelpnav.cpp,v 1.1
2 2008-02-27 06:24:37
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -376,10 +376,12 @@ static int xhelpnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
...
@@ -376,10 +376,12 @@ static int xhelpnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
free
(
node_list
);
free
(
node_list
);
break
;
break
;
}
}
case
flow_eEvent_Key_ShiftDown
:
case
flow_eEvent_Key_PageDown
:
{
case
flow_eEvent_Key_PageDown
:
{
brow_Page
(
xhelpnav
->
brow
->
ctx
,
0.95
);
brow_Page
(
xhelpnav
->
brow
->
ctx
,
0.95
);
break
;
break
;
}
}
case
flow_eEvent_Key_ShiftUp
:
case
flow_eEvent_Key_PageUp
:
{
case
flow_eEvent_Key_PageUp
:
{
brow_Page
(
xhelpnav
->
brow
->
ctx
,
-
0.95
);
brow_Page
(
xhelpnav
->
brow
->
ctx
,
-
0.95
);
break
;
break
;
...
@@ -396,16 +398,35 @@ static int xhelpnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
...
@@ -396,16 +398,35 @@ static int xhelpnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
case
flow_eEvent_Key_Right
:
case
flow_eEvent_Key_Right
:
{
{
brow_tNode
*
node_list
;
brow_tNode
*
node_list
;
brow_tNode
first
;
int
node_count
;
int
node_count
;
pwr_tStatus
sts
;
brow_GetSelectedNodes
(
xhelpnav
->
brow
->
ctx
,
&
node_list
,
&
node_count
);
brow_GetSelectedNodes
(
xhelpnav
->
brow
->
ctx
,
&
node_list
,
&
node_count
);
if
(
!
node_count
)
if
(
!
node_count
)
break
;
break
;
brow_GetUserData
(
node_list
[
0
],
(
void
**
)
&
item
);
brow_GetUserData
(
node_list
[
0
],
(
void
**
)
&
item
);
sts
=
brow_GetFirst
(
xhelpnav
->
brow
->
ctx
,
&
first
);
if
(
ODD
(
sts
)
&&
first
==
node_list
[
0
])
{
xhelpnav
->
next_topic
();
free
(
node_list
);
free
(
node_list
);
break
;
}
item
->
doubleclick_action
(
xhelpnav
->
brow
,
xhelpnav
,
0
,
0
);
item
->
doubleclick_action
(
xhelpnav
->
brow
,
xhelpnav
,
0
,
0
);
break
;
break
;
}
}
case
flow_eEvent_Key_ShiftRight
:
{
xhelpnav
->
next_topic
();
break
;
}
case
flow_eEvent_Key_ShiftLeft
:
{
xhelpnav
->
previous_topic
();
break
;
}
case
flow_eEvent_Key_Left
:
case
flow_eEvent_Key_Left
:
{
{
brow_tNode
*
node_list
;
brow_tNode
*
node_list
;
...
@@ -578,6 +599,14 @@ void CoXHelpNav::enable_events( CoXHelpNavBrow *brow)
...
@@ -578,6 +599,14 @@ void CoXHelpNav::enable_events( CoXHelpNavBrow *brow)
xhelpnav_brow_cb
);
xhelpnav_brow_cb
);
brow_EnableEvent
(
brow
->
ctx
,
flow_eEvent_Key_Left
,
flow_eEventType_CallBack
,
brow_EnableEvent
(
brow
->
ctx
,
flow_eEvent_Key_Left
,
flow_eEventType_CallBack
,
xhelpnav_brow_cb
);
xhelpnav_brow_cb
);
brow_EnableEvent
(
brow
->
ctx
,
flow_eEvent_Key_ShiftRight
,
flow_eEventType_CallBack
,
xhelpnav_brow_cb
);
brow_EnableEvent
(
brow
->
ctx
,
flow_eEvent_Key_ShiftLeft
,
flow_eEventType_CallBack
,
xhelpnav_brow_cb
);
brow_EnableEvent
(
brow
->
ctx
,
flow_eEvent_Key_ShiftUp
,
flow_eEventType_CallBack
,
xhelpnav_brow_cb
);
brow_EnableEvent
(
brow
->
ctx
,
flow_eEvent_Key_ShiftDown
,
flow_eEventType_CallBack
,
xhelpnav_brow_cb
);
brow_EnableEvent
(
brow
->
ctx
,
flow_eEvent_Key_PageUp
,
flow_eEventType_CallBack
,
brow_EnableEvent
(
brow
->
ctx
,
flow_eEvent_Key_PageUp
,
flow_eEventType_CallBack
,
xhelpnav_brow_cb
);
xhelpnav_brow_cb
);
brow_EnableEvent
(
brow
->
ctx
,
flow_eEvent_Key_PageDown
,
flow_eEventType_CallBack
,
brow_EnableEvent
(
brow
->
ctx
,
flow_eEvent_Key_PageDown
,
flow_eEventType_CallBack
,
...
@@ -964,6 +993,19 @@ int HItemHelpBold::doubleclick_action( CoXHelpNavBrow *brow, CoXHelpNav *xhelpna
...
@@ -964,6 +993,19 @@ int HItemHelpBold::doubleclick_action( CoXHelpNavBrow *brow, CoXHelpNav *xhelpna
}
}
static
void
trim
(
char
*
str
)
{
if
(
!
str
)
return
;
unsigned
char
*
s
=
(
unsigned
char
*
)
str
;
while
(
*
s
)
{
if
(
*
s
<
' '
)
*
s
=
' '
;
s
++
;
}
}
/*************************************************************************
/*************************************************************************
*
*
* Name: help()
* Name: help()
...
@@ -987,6 +1029,9 @@ void *xhelpnav_help_insert_cb( void *ctx, navh_eItemType item_type, char *text1,
...
@@ -987,6 +1029,9 @@ void *xhelpnav_help_insert_cb( void *ctx, navh_eItemType item_type, char *text1,
case
navh_eItemType_Help
:
case
navh_eItemType_Help
:
case
navh_eItemType_HelpCode
:
case
navh_eItemType_HelpCode
:
{
{
trim
(
text1
);
trim
(
text2
);
trim
(
text3
);
HItemHelp
*
item
=
new
HItemHelp
(
xhelpnav
->
brow
,
"help"
,
text1
,
text2
,
text3
,
HItemHelp
*
item
=
new
HItemHelp
(
xhelpnav
->
brow
,
"help"
,
text1
,
text2
,
text3
,
link
,
bookmark
,
file_name
,
file_type
,
help_index
,
link
,
bookmark
,
file_name
,
file_type
,
help_index
,
NULL
,
flow_eDest_IntoLast
);
NULL
,
flow_eDest_IntoLast
);
...
@@ -994,6 +1039,9 @@ void *xhelpnav_help_insert_cb( void *ctx, navh_eItemType item_type, char *text1,
...
@@ -994,6 +1039,9 @@ void *xhelpnav_help_insert_cb( void *ctx, navh_eItemType item_type, char *text1,
}
}
case
navh_eItemType_HelpBold
:
case
navh_eItemType_HelpBold
:
{
{
trim
(
text1
);
trim
(
text2
);
trim
(
text3
);
HItemHelpBold
*
item
=
new
HItemHelpBold
(
xhelpnav
->
brow
,
"help"
,
text1
,
text2
,
HItemHelpBold
*
item
=
new
HItemHelpBold
(
xhelpnav
->
brow
,
"help"
,
text1
,
text2
,
text3
,
link
,
bookmark
,
file_name
,
file_type
,
help_index
,
text3
,
link
,
bookmark
,
file_name
,
file_type
,
help_index
,
NULL
,
flow_eDest_IntoLast
);
NULL
,
flow_eDest_IntoLast
);
...
@@ -1001,18 +1049,21 @@ void *xhelpnav_help_insert_cb( void *ctx, navh_eItemType item_type, char *text1,
...
@@ -1001,18 +1049,21 @@ void *xhelpnav_help_insert_cb( void *ctx, navh_eItemType item_type, char *text1,
}
}
case
navh_eItemType_HelpHeader
:
case
navh_eItemType_HelpHeader
:
{
{
trim
(
text1
);
HItemHelpHeader
*
item
=
new
HItemHelpHeader
(
xhelpnav
->
brow
,
"help"
,
text1
,
xhelpnav
->
brow_cnt
==
1
,
HItemHelpHeader
*
item
=
new
HItemHelpHeader
(
xhelpnav
->
brow
,
"help"
,
text1
,
xhelpnav
->
brow_cnt
==
1
,
NULL
,
flow_eDest_IntoLast
);
NULL
,
flow_eDest_IntoLast
);
return
item
->
node
;
return
item
->
node
;
}
}
case
navh_eItemType_Header
:
case
navh_eItemType_Header
:
{
{
trim
(
text1
);
HItemHeader
*
item
=
new
HItemHeader
(
xhelpnav
->
brow
,
"help"
,
text1
,
HItemHeader
*
item
=
new
HItemHeader
(
xhelpnav
->
brow
,
"help"
,
text1
,
NULL
,
flow_eDest_IntoLast
);
NULL
,
flow_eDest_IntoLast
);
return
item
->
node
;
return
item
->
node
;
}
}
case
navh_eItemType_HeaderLarge
:
case
navh_eItemType_HeaderLarge
:
{
{
trim
(
text1
);
HItemHeaderLarge
*
item
=
new
HItemHeaderLarge
(
xhelpnav
->
brow
,
"help"
,
text1
,
HItemHeaderLarge
*
item
=
new
HItemHeaderLarge
(
xhelpnav
->
brow
,
"help"
,
text1
,
NULL
,
flow_eDest_IntoLast
);
NULL
,
flow_eDest_IntoLast
);
return
item
->
node
;
return
item
->
node
;
...
@@ -1060,6 +1111,7 @@ int CoXHelpNav::help( char *help_key, char *help_bookmark,
...
@@ -1060,6 +1111,7 @@ int CoXHelpNav::help( char *help_key, char *help_bookmark,
}
}
navhelp
->
insert_cb
=
xhelpnav_help_insert_cb
;
navhelp
->
insert_cb
=
xhelpnav_help_insert_cb
;
if
(
pop
)
if
(
pop
)
init_help
=
1
;
init_help
=
1
;
else
{
else
{
...
@@ -1093,11 +1145,93 @@ int CoXHelpNav::help( char *help_key, char *help_bookmark,
...
@@ -1093,11 +1145,93 @@ int CoXHelpNav::help( char *help_key, char *help_bookmark,
if
(
ODD
(
sts
))
if
(
ODD
(
sts
))
brow_CenterObject
(
brow
->
ctx
,
first
,
0.0
);
brow_CenterObject
(
brow
->
ctx
,
first
,
0.0
);
}
}
strncpy
(
brow_stack
[
brow_cnt
-
1
]
->
current_key
,
help_key
,
sizeof
(
brow_stack
[
brow_cnt
-
1
]
->
current_key
));
if
(
file_name
)
strncpy
(
brow_stack
[
brow_cnt
-
1
]
->
current_filename
,
file_name
,
sizeof
(
brow_stack
[
brow_cnt
-
1
]
->
current_filename
));
else
strcpy
(
brow_stack
[
brow_cnt
-
1
]
->
current_filename
,
""
);
brow_stack
[
brow_cnt
-
1
]
->
current_filetype
=
file_type
;
delete
navhelp
;
delete
navhelp
;
return
1
;
return
1
;
}
}
int
CoXHelpNav
::
back
()
{
brow_push
();
return
1
;
}
int
CoXHelpNav
::
next_topic
()
{
int
sts
;
NavHelp
*
navhelp
;
char
next_key
[
200
];
navh_eHelpFile
current_filetype
;
char
current_key
[
200
];
pwr_tFileName
current_filename
;
current_filetype
=
brow_stack
[
brow_cnt
-
1
]
->
current_filetype
;
strncpy
(
current_key
,
brow_stack
[
brow_cnt
-
1
]
->
current_key
,
sizeof
(
current_key
));
strncpy
(
current_filename
,
brow_stack
[
brow_cnt
-
1
]
->
current_filename
,
sizeof
(
current_filename
));
switch
(
utility
)
{
case
xhelp_eUtility_Xtt
:
navhelp
=
new
NavHelp
(
(
void
*
)
this
,
xhelp_cFile_BaseXtt
,
xhelp_cFile_Project
);
break
;
case
xhelp_eUtility_Wtt
:
navhelp
=
new
NavHelp
(
(
void
*
)
this
,
xhelp_cFile_BaseWtt
,
xhelp_cFile_Project
);
break
;
default:
return
0
;
}
sts
=
navhelp
->
get_next_key
(
current_key
,
current_filetype
,
current_filename
[
0
]
==
0
?
0
:
current_filename
,
0
,
next_key
);
delete
navhelp
;
if
(
ODD
(
sts
))
{
brow_push
();
sts
=
help
(
next_key
,
0
,
current_filetype
,
current_filename
[
0
]
==
0
?
0
:
current_filename
,
1
,
0
);
}
return
sts
;
}
int
CoXHelpNav
::
previous_topic
()
{
int
sts
;
NavHelp
*
navhelp
;
char
prev_key
[
200
];
navh_eHelpFile
current_filetype
;
char
current_key
[
200
];
pwr_tFileName
current_filename
;
current_filetype
=
brow_stack
[
brow_cnt
-
1
]
->
current_filetype
;
strncpy
(
current_key
,
brow_stack
[
brow_cnt
-
1
]
->
current_key
,
sizeof
(
current_key
));
strncpy
(
current_filename
,
brow_stack
[
brow_cnt
-
1
]
->
current_filename
,
sizeof
(
current_filename
));
switch
(
utility
)
{
case
xhelp_eUtility_Xtt
:
navhelp
=
new
NavHelp
(
(
void
*
)
this
,
xhelp_cFile_BaseXtt
,
xhelp_cFile_Project
);
break
;
case
xhelp_eUtility_Wtt
:
navhelp
=
new
NavHelp
(
(
void
*
)
this
,
xhelp_cFile_BaseWtt
,
xhelp_cFile_Project
);
break
;
default:
return
0
;
}
sts
=
navhelp
->
get_previous_key
(
current_key
,
current_filetype
,
current_filename
[
0
]
==
0
?
0
:
current_filename
,
0
,
prev_key
);
delete
navhelp
;
if
(
ODD
(
sts
))
{
brow_push
();
sts
=
help
(
prev_key
,
0
,
current_filetype
,
current_filename
[
0
]
==
0
?
0
:
current_filename
,
1
,
0
);
}
return
sts
;
}
/*************************************************************************
/*************************************************************************
*
*
* Name: help_index()
* Name: help_index()
...
...
src/lib/co/src/co_xhelpnav.h
View file @
501b6be2
/**
/**
* Proview $Id: co_xhelpnav.h,v 1.
9 2007-01-04 07:51:42
claes Exp $
* Proview $Id: co_xhelpnav.h,v 1.
10 2008-02-27 06:24:37
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -72,6 +72,7 @@ class CoXHelpNavBrow {
...
@@ -72,6 +72,7 @@ class CoXHelpNavBrow {
CoXHelpNavBrow
(
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
~CoXHelpNavBrow();
~CoXHelpNavBrow();
#endif
#endif
...
@@ -85,6 +86,9 @@ class CoXHelpNavBrow {
...
@@ -85,6 +86,9 @@ class CoXHelpNavBrow {
brow_tNodeClass
nc_line
;
brow_tNodeClass
nc_line
;
flow_sAnnotPixmap
*
pixmap_morehelp
;
flow_sAnnotPixmap
*
pixmap_morehelp
;
flow_sAnnotPixmap
*
pixmap_closehelp
;
flow_sAnnotPixmap
*
pixmap_closehelp
;
navh_eHelpFile
current_filetype
;
char
current_key
[
200
];
pwr_tFileName
current_filename
;
void
free_pixmaps
();
void
free_pixmaps
();
void
allocate_pixmaps
();
void
allocate_pixmaps
();
...
@@ -131,6 +135,9 @@ class CoXHelpNav {
...
@@ -131,6 +135,9 @@ class CoXHelpNav {
void
enable_events
(
CoXHelpNavBrow
*
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
back
();
int
next_topic
();
int
previous_topic
();
int
help_index
(
navh_eHelpFile
file_type
,
char
*
file_name
,
int
pop
);
int
help_index
(
navh_eHelpFile
file_type
,
char
*
file_name
,
int
pop
);
pwr_tStatus
search
(
char
*
str
,
bool
strict
);
pwr_tStatus
search
(
char
*
str
,
bool
strict
);
pwr_tStatus
search_next
();
pwr_tStatus
search_next
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment