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
fc402b1e
Commit
fc402b1e
authored
Oct 28, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New program to view helptexts
parent
b62a35e4
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
474 additions
and
0 deletions
+474
-0
src/exe/co_help/gtk/co_help_gtk.cpp
src/exe/co_help/gtk/co_help_gtk.cpp
+97
-0
src/exe/co_help/gtk/co_help_gtk.h
src/exe/co_help/gtk/co_help_gtk.h
+60
-0
src/exe/co_help/gtk/os_linux/hw_x86/makefile
src/exe/co_help/gtk/os_linux/hw_x86/makefile
+15
-0
src/exe/co_help/gtk/os_linux/link_rule.mk
src/exe/co_help/gtk/os_linux/link_rule.mk
+13
-0
src/exe/co_help/src/co_help.cpp
src/exe/co_help/src/co_help.cpp
+68
-0
src/exe/co_help/src/co_help_main.h
src/exe/co_help/src/co_help_main.h
+75
-0
src/exe/co_help/src/help_main.cpp
src/exe/co_help/src/help_main.cpp
+125
-0
src/exe/co_help/src/os_linux/hw_x86/makefile
src/exe/co_help/src/os_linux/hw_x86/makefile
+15
-0
src/exe/co_help/src/os_linux/link_rule.mk
src/exe/co_help/src/os_linux/link_rule.mk
+6
-0
No files found.
src/exe/co_help/gtk/co_help_gtk.cpp
0 → 100644
View file @
fc402b1e
/*
* Proview $Id: co_help_gtk.cpp,v 1.1 2008-10-28 09:36:12 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* co_help_gtk.cpp -- Help window */
#include "flow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "co_dcli.h"
#include "co_lng.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "co_help_gtk.h"
#include "co_xhelp_gtk.h"
void
CoHelpGtk
::
close_cb
(
void
*
ctx
,
void
*
xhelp
)
{
delete
(
CoXHelpGtk
*
)
xhelp
;
exit
(
0
);
}
void
CoHelpGtk
::
cohelp_mainloop
()
{
gtk_main
();
}
int
main
(
int
argc
,
char
*
argv
[])
{
int
sts
;
gtk_init
(
&
argc
,
&
argv
);
setlocale
(
LC_TIME
,
"en_US"
);
new
CoHelpGtk
(
argc
,
argv
,
&
sts
);
exit
(
sts
);
}
CoHelpGtk
::~
CoHelpGtk
()
{
}
CoHelpGtk
::
CoHelpGtk
(
int
argc
,
char
*
argv
[],
int
*
return_sts
)
:
CoHelpMain
(
argc
,
argv
,
return_sts
)
{
pwr_tStatus
sts
;
#if 0
const int window_width = 400;
const int window_height = 700;
char title[120] = "Xtt ";
// Gtk
toplevel = (GtkWidget *) g_object_new( GTK_TYPE_WINDOW,
"default-height", window_height,
"default-width", window_width,
"title", title,
NULL);
#endif
// Create help window
CoXHelp
*
xhelp
=
new
CoXHelpGtk
(
0
/*toplevel*/
,
this
,
xhelp_eUtility_Xtt
,
&
sts
);
// xhelp->open_URL_cb = open_URL_cb;
CoXHelp
::
set_default
(
xhelp
);
xhelp
->
close_cb
=
close_cb
;
exec_help
();
cohelp_mainloop
();
}
src/exe/co_help/gtk/co_help_gtk.h
0 → 100644
View file @
fc402b1e
/*
* Proview $Id: co_help_gtk.h,v 1.1 2008-10-28 09:36:12 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef co_help_gtk_h
#define co_help_gtk_h
/* co_help_gtk.h -- Help window */
#ifndef co_help_main_h
# include "co_help_main.h"
#endif
class
CoHelpGtk
:
public
CoHelpMain
{
public:
CoHelpGtk
(
int
argc
,
char
*
argv
[],
int
*
sts
);
~
CoHelpGtk
();
void
cohelp_mainloop
();
static
void
close_cb
(
void
*
ctx
,
void
*
xhelp
);
};
#endif
src/exe/co_help/gtk/os_linux/hw_x86/makefile
0 → 100644
View file @
fc402b1e
include
$(pwre_dir_symbols)
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq
($($(type_name)_generic_mk),)
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq
($($(type_name)_generic_mk),)
include
$(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include
../../special.mk
-include
../special.mk
-include
special.mk
src/exe/co_help/gtk/os_linux/link_rule.mk
0 → 100644
View file @
fc402b1e
ifndef
link_rule_mk
link_rule_mk
:=
1
link
=
$(ldxx)
$(elinkflags)
$(domap)
-o
$(pwr_exe)
/co_help_gtk
\
$(bld_dir)
/co_help_gtk.o
$(bld_dir)
/help_main.o
$(rt_msg_eobjs)
\
$(pwr_eobj)
/rt_io_user.o
-L
/usr/X11R6/lib
\
-L
/opt/gnome/lib
\
-lpwr_xtt_gtk
-lpwr_xtt
-lpwr_xtt_gtk
-lpwr_xtt
-lpwr_ge_gtk
-lpwr_ge
-lpwr_rt_gtk
-lpwr_rt
\
-lpwr_co_gtk
-lpwr_co
-lpwr_flow_gtk
-lpwr_flow
-lpwr_glow_gtk
-lpwr_glow
\
`
pkg-config
--libs
gtk+-2.0
`
\
-lpwr_msg_dummy
\
-ldb
-lrpcsvc
-lpthread
-lm
-lrt
-lcrypt
endif
src/exe/co_help/src/co_help.cpp
0 → 100644
View file @
fc402b1e
/*
* Proview $Id: co_help.cpp,v 1.1 2008-10-28 09:36:12 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* co_help.cpp -- Help window */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include "pwr.h"
#include "co_dcli.h"
int
main
(
int
argc
,
char
*
argv
[])
{
int
i
;
int
found
=
0
;
char
wmg
[
80
];
pwr_tFileName
file
;
if
(
argc
>
1
)
{
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
strcmp
(
argv
[
i
],
"-f"
)
==
0
)
{
if
(
i
+
1
>=
argc
)
{
printf
(
"co_help: Syntax error
\n
"
);
exit
(
0
);
}
found
=
1
;
strcpy
(
wmg
,
argv
[
i
+
1
]);
i
++
;
}
}
}
if
(
!
found
)
{
struct
stat
st
;
strcpy
(
file
,
"$pwr_exe/co_help_gtk"
);
dcli_translate_filename
(
file
,
file
);
if
(
stat
(
file
,
&
st
)
==
0
)
strcpy
(
wmg
,
"gtk"
);
else
strcpy
(
wmg
,
"motif"
);
}
strcpy
(
file
,
argv
[
0
]);
strcat
(
file
,
"_"
);
strcat
(
file
,
wmg
);
execvp
(
file
,
argv
);
}
src/exe/co_help/src/co_help_main.h
0 → 100644
View file @
fc402b1e
/*
* Proview $Id: co_help_main.h,v 1.1 2008-10-28 09:36:12 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef co_help_main_h
#define co_help_main_h
/* co_help_main.h -- Help window */
#ifndef pwr_h
# include "pwr.h"
#endif
#ifndef flow_h
#include "flow.h"
#endif
#ifndef flow_browctx_h
#include "flow_browapi.h"
#endif
#ifndef co_nav_help_h
#include "co_nav_help.h"
#endif
class
CoHelpMain
{
public:
CoHelpMain
(
int
argc
,
char
*
argv
[],
int
*
return_sts
);
virtual
~
CoHelpMain
()
{}
void
exec_help
();
char
topic
[
80
];
pwr_tFileName
helpfile
;
char
bookmark
[
80
];
int
strict
;
navh_eHelpFile
type
;
};
#endif
src/exe/co_help/src/help_main.cpp
0 → 100644
View file @
fc402b1e
/*
* Proview $Id: help_main.cpp,v 1.1 2008-10-28 09:36:12 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* rt_xtt.cpp -- Display plant and node hiererachy */
#include "flow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include "pwr.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "co_help_main.h"
#include "co_xhelp.h"
#include "co_lng.h"
#include "co_msg.h"
static
void
usage
()
{
cout
<<
"co_help Proview Help Window"
<<
endl
<<
endl
<<
"Usage:"
<<
endl
<<
endl
<<
" co_help [-t 'topic'] [-s 'sourcefile'] [-b 'bookmark']"
<<
endl
<<
endl
<<
"Arguments:"
<<
endl
<<
endl
<<
" -t Help topic, default 'index'"
<<
endl
<<
" -s Source helpfile"
<<
endl
<<
" -b Bookmark"
<<
endl
<<
" -l Language, e.g sv_se"
<<
endl
<<
" -c Open Configuration help"
<<
endl
<<
" -d Open Designer's Guide"
<<
endl
<<
" -g Open Ge Reference Manual"
<<
endl
<<
" -o Open Operator Help"
<<
endl
<<
endl
;
}
void
CoHelpMain
::
exec_help
()
{
pwr_tStatus
sts
;
sts
=
CoXHelp
::
dhelp
(
topic
,
bookmark
,
type
,
helpfile
,
strict
);
if
(
EVEN
(
sts
))
{
char
msg
[
80
];
msg_GetText
(
sts
,
msg
,
sizeof
(
msg
));
printf
(
"%s
\n
"
,
msg
);
exit
(
0
);
}
}
CoHelpMain
::
CoHelpMain
(
int
argc
,
char
*
argv
[],
int
*
return_sts
)
:
strict
(
0
),
type
(
navh_eHelpFile_Project
)
{
strcpy
(
topic
,
"index"
);
strcpy
(
helpfile
,
""
);
strcpy
(
bookmark
,
""
);
// Set language
for
(
int
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
strcmp
(
argv
[
i
],
"-l"
)
==
0
&&
i
+
1
<
argc
)
{
Lng
::
set
(
argv
[
i
+
1
]);
i
++
;
}
else
if
(
strcmp
(
argv
[
i
],
"-t"
)
==
0
&&
i
+
1
<
argc
)
{
strcpy
(
topic
,
argv
[
i
+
1
]);
i
++
;
}
else
if
(
strcmp
(
argv
[
i
],
"-s"
)
==
0
&&
i
+
1
<
argc
)
{
type
=
navh_eHelpFile_Other
;
strcpy
(
helpfile
,
argv
[
i
+
1
]);
i
++
;
}
else
if
(
strcmp
(
argv
[
i
],
"-b"
)
==
0
&&
i
+
1
<
argc
)
{
strcpy
(
bookmark
,
argv
[
i
+
1
]);
i
++
;
}
else
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
{
type
=
navh_eHelpFile_Other
;
if
(
strcmp
(
topic
,
"index"
)
==
0
)
strcpy
(
topic
,
"overview"
);
strcpy
(
helpfile
,
"$pwr_lang/wtt_help.dat"
);
}
else
if
(
strcmp
(
argv
[
i
],
"-d"
)
==
0
)
{
type
=
navh_eHelpFile_Other
;
strcpy
(
helpfile
,
"$pwr_lang/man_dg.dat"
);
}
else
if
(
strcmp
(
argv
[
i
],
"-p"
)
==
0
)
{
type
=
navh_eHelpFile_Project
;
}
else
if
(
strcmp
(
argv
[
i
],
"-o"
)
==
0
)
{
type
=
navh_eHelpFile_Other
;
if
(
strcmp
(
topic
,
"index"
)
==
0
)
strcpy
(
topic
,
"overview"
);
strcpy
(
helpfile
,
"$pwr_exe/xtt_help.dat"
);
}
else
if
(
strcmp
(
argv
[
i
],
"-g"
)
==
0
)
{
type
=
navh_eHelpFile_Other
;
strcpy
(
helpfile
,
"$pwr_lang/man_geref.dat"
);
}
else
if
(
strcmp
(
argv
[
i
],
"-h"
)
==
0
)
{
usage
();
exit
(
0
);
}
}
}
src/exe/co_help/src/os_linux/hw_x86/makefile
0 → 100644
View file @
fc402b1e
include
$(pwre_dir_symbols)
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq
($($(type_name)_generic_mk),)
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq
($($(type_name)_generic_mk),)
include
$(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include
../../special.mk
-include
../special.mk
-include
special.mk
src/exe/co_help/src/os_linux/link_rule.mk
0 → 100644
View file @
fc402b1e
ifndef
link_rule_mk
link_rule_mk
:=
1
link
=
$(ldxx)
$(elinkflags)
$(domap)
-o
$(export_exe)
\
$(export_obj)
-lpwr_co
endif
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