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
b120c19c
Commit
b120c19c
authored
Jan 24, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tooltip in brow
parent
22423646
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
23 deletions
+27
-23
xtt/lib/flow/src/flow_browapi.cpp
xtt/lib/flow/src/flow_browapi.cpp
+7
-1
xtt/lib/flow/src/flow_browapi.h
xtt/lib/flow/src/flow_browapi.h
+2
-1
xtt/lib/flow/src/flow_tiptext.h
xtt/lib/flow/src/flow_tiptext.h
+18
-21
No files found.
xtt/lib/flow/src/flow_browapi.cpp
View file @
b120c19c
/*
* Proview $Id: flow_browapi.cpp,v 1.1
0 2007-05-11 15:07:21
claes Exp $
* Proview $Id: flow_browapi.cpp,v 1.1
1 2008-01-24 09:33:47
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -44,6 +44,7 @@
#include "flow_conpoint.h"
#include "flow_annot.h"
#include "flow_radiobutton.h"
#include "flow_tiptext.h"
#include "flow_draw.h"
#include "flow_browapi.h"
...
...
@@ -755,3 +756,8 @@ void brow_SetFillColor( brow_tNode node, flow_eDrawType color)
{
((
FlowNode
*
)
node
)
->
set_fillcolor
(
color
);
}
void
brow_SetTipText
(
brow_tCtx
ctx
,
brow_tObject
object
,
char
*
text
,
int
x
,
int
y
)
{
ctx
->
tiptext
->
draw_text
(
(
FlowArrayElem
*
)
object
,
text
,
x
,
y
);
}
xtt/lib/flow/src/flow_browapi.h
View file @
b120c19c
/*
* Proview $Id: flow_browapi.h,v 1.1
0 2007-05-11 15:07:21
claes Exp $
* Proview $Id: flow_browapi.h,v 1.1
1 2008-01-24 09:33:47
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -236,6 +236,7 @@ void brow_SetInputFocus( brow_tCtx ctx);
void
brow_SetClickSensitivity
(
brow_tCtx
ctx
,
int
value
);
void
brow_SetWhiteBackground
(
brow_tCtx
ctx
);
void
brow_SetFillColor
(
brow_tNode
node
,
flow_eDrawType
color
);
void
brow_SetTipText
(
brow_tCtx
ctx
,
brow_tObject
object
,
char
*
text
,
int
x
,
int
y
);
#if defined __cplusplus
}
...
...
xtt/lib/flow/src/flow_tiptext.h
View file @
b120c19c
/*
* Proview $Id: flow_tiptext.h,v 1.
1 2008-01-18 13:55:06
claes Exp $
* Proview $Id: flow_tiptext.h,v 1.
2 2008-01-24 09:33:47
claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -17,22 +17,20 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#ifndef
f
low_tiptext_h
#define
f
low_tiptext_h
#ifndef
g
low_tiptext_h
#define
g
low_tiptext_h
#include <iostream.h>
#include <fstream.h>
#include "
f
low.h"
#include "
g
low.h"
#define TIPTEXT_ROWS 3
class
GrowCtx
;
class
GlowArrayElem
;
class
FlowCtx
;
class
FlowArrayElem
;
/*! \file flow_tiptext.h
\brief Contains the FlowTipText class. */
/*! \addtogroup Flow */
/*! \file glow_tiptext.h
\brief Contains the GlowTipText class. */
/*! \addtogroup Glow */
/*@{*/
...
...
@@ -43,29 +41,28 @@ class FlowArrayElem;
The text is visible until the remove_text() or remove() function are called.
*/
class
F
lowTipText
{
class
G
lowTipText
{
public:
//! Constructor
/*!
\param gctx
F
low context.
\param gctx
G
low context.
*/
FlowTipText
(
FlowCtx
*
gctx
)
:
ctx
(
gctx
),
tiptext_rows
(
0
),
active
(
false
),
timer_id
(
0
)
{}
GlowTipText
(
GrowCtx
*
gctx
)
:
ctx
(
gctx
),
active
(
false
),
timer_id
(
0
)
{}
//! Destructor
/*! Removes the timer if it is set.
*/
~
F
lowTipText
();
~
G
lowTipText
();
FlowCtx
*
ctx
;
//!< F
low context.
GrowCtx
*
ctx
;
//!< G
low context.
int
text_x
;
//!< x coordinate in pixels for text.
int
text_y
;
//!< y coordinate in pixels for text.
int
text_width
;
//!< Text width in pixels.
int
text_height
;
//!< Text height in pixels.
int
text_descent
;
//!< Text descent in pixels.
FlowArrayElem
*
text_object
;
//!< Object that activated the current tip text.
int
tiptext_rows
;
//!< Number of rows in current tiptext.
char
tiptext
[
TIPTEXT_ROWS
][
512
];
//!< Current tip text.
GlowArrayElem
*
text_object
;
//!< Object that activated the current tip text.
char
tiptext
[
200
];
//!< Current tip text.
bool
active
;
//!< Tip text is active, i.e. timer is running or text is displayed.
void
*
timer_id
;
//!< Timer id.
...
...
@@ -80,13 +77,13 @@ class FlowTipText {
no remove function is called, the text will be displayed within 1 second, and remain until
a remove function is called.
*/
void
draw_text
(
F
lowArrayElem
*
e
,
char
*
text
,
int
x
,
int
y
);
void
draw_text
(
G
lowArrayElem
*
e
,
char
*
text
,
int
x
,
int
y
);
//! Remove or inactivate the text for the specified object.
/*!
\param e Object which the text should be removed for.
*/
void
remove_text
(
F
lowArrayElem
*
e
);
void
remove_text
(
G
lowArrayElem
*
e
);
//! Remove or inactivate texts for any object.
/*! If the timer is running, it is stopped. If the text is diplayed, it is erased.
...
...
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