Commit a7a67031 authored by claes's avatar claes

*** empty log message ***

parent 789e6bdc
/*
* Proview $Id: flow_tiptext.h,v 1.2 2008-01-24 09:33:47 claes Exp $
* Proview $Id: flow_tiptext.h,v 1.3 2008-01-28 14:55:40 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -17,20 +17,22 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#ifndef glow_tiptext_h
#define glow_tiptext_h
#ifndef flow_tiptext_h
#define flow_tiptext_h
#include <iostream.h>
#include <fstream.h>
#include "glow.h"
#include "flow.h"
class GrowCtx;
class GlowArrayElem;
#define TIPTEXT_ROWS 10
/*! \file glow_tiptext.h
\brief Contains the GlowTipText class. */
/*! \addtogroup Glow */
class FlowCtx;
class FlowArrayElem;
/*! \file flow_tiptext.h
\brief Contains the FlowTipText class. */
/*! \addtogroup Flow */
/*@{*/
......@@ -41,28 +43,29 @@ class GlowArrayElem;
The text is visible until the remove_text() or remove() function are called.
*/
class GlowTipText {
class FlowTipText {
public:
//! Constructor
/*!
\param gctx Glow context.
\param gctx Flow context.
*/
GlowTipText( GrowCtx *gctx) : ctx(gctx), active(false), timer_id(0) {}
FlowTipText( FlowCtx *gctx) : ctx(gctx), tiptext_rows(0), active(false), timer_id(0) {}
//! Destructor
/*! Removes the timer if it is set.
*/
~GlowTipText();
~FlowTipText();
GrowCtx *ctx; //!< Glow context.
FlowCtx *ctx; //!< Flow 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.
GlowArrayElem *text_object; //!< Object that activated the current tip text.
char tiptext[200]; //!< Current tip text.
FlowArrayElem *text_object; //!< Object that activated the current tip text.
int tiptext_rows; //!< Number of rows in current tiptext.
char tiptext[TIPTEXT_ROWS][256]; //!< Current tip text.
bool active; //!< Tip text is active, i.e. timer is running or text is displayed.
void *timer_id; //!< Timer id.
......@@ -77,13 +80,13 @@ class GlowTipText {
no remove function is called, the text will be displayed within 1 second, and remain until
a remove function is called.
*/
void draw_text( GlowArrayElem *e, char *text, int x, int y);
void draw_text( FlowArrayElem *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( GlowArrayElem *e);
void remove_text( FlowArrayElem *e);
//! Remove or inactivate texts for any object.
/*! If the timer is running, it is stopped. If the text is diplayed, it is erased.
......
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