tools
rcdiscover-gui
help_window.cc
Go to the documentation of this file.
1
/*
2
* Roboception GmbH
3
* Munich, Germany
4
* www.roboception.com
5
*
6
* Copyright (c) 2024 Roboception GmbH
7
* All rights reserved
8
*
9
* Author: Heiko Hirschmueller
10
*/
11
12
#include "
help_window.h
"
13
14
#include "
layout.h
"
15
16
#include "
resources/help.h
"
17
18
#include <vector>
19
#include <cstring>
20
21
namespace
22
{
23
24
static
HelpWindow
*win=0;
25
26
}
27
28
void
HelpWindow::showWindow
(
const
char
*target)
29
{
30
if
(!win)
31
{
32
win=
new
HelpWindow
();
33
}
34
35
if
(target)
36
{
37
win->help->topline(target);
38
}
39
40
win->show();
41
}
42
43
void
HelpWindow::hideWindow
()
44
{
45
if
(win)
46
{
47
win->hide();
48
}
49
}
50
51
HelpWindow::HelpWindow
() : Fl_Double_Window(640, 480,
"rcdiscover Help"
)
52
{
53
int
width=640-2*
GAP_SIZE
;
54
int
height=480-2*
GAP_SIZE
;
55
56
help
=
new
Fl_Help_View(
ADD_RIGHT_XY
, width, height, 0);
57
58
std::vector<char> content(
help_html_len
+1);
59
memcpy(content.data(),
help_html
,
help_html_len
);
60
content[
help_html_len
]=
'\0'
;
61
62
help
->value(content.data());
63
64
checkGroupSize
(__func__);
65
end();
66
}
HelpWindow::hideWindow
static void hideWindow()
Definition:
help_window.cc:43
help.h
HelpWindow::help
Fl_Help_View * help
Definition:
help_window.h:30
ADD_RIGHT_XY
#define ADD_RIGHT_XY
Definition:
layout.h:120
GAP_SIZE
#define GAP_SIZE
Definition:
layout.h:21
checkGroupSize
void checkGroupSize(const char *group_name)
The size of the current group must be set before adding all children, especially resizable ones.
Definition:
layout.h:88
HelpWindow
Definition:
help_window.h:19
help_window.h
layout.h
HelpWindow::HelpWindow
HelpWindow()
Definition:
help_window.cc:51
help_html
unsigned char help_html[]
Definition:
help.h:1
help_html_len
unsigned int help_html_len
Definition:
help.h:417
HelpWindow::showWindow
static void showWindow(const char *target=0)
Definition:
help_window.cc:28
rcdiscover
Author(s): Heiko Hirschmueller
, Raphael Schaller
autogenerated on Thu Aug 1 2024 02:55:56