MeVisLab Toolbox Reference
SoView2DBorder.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13
16
17#pragma once
18
19#include "SoView2DExtension.h"
20
21
24
26{
27
28 SO_NODE_HEADER(SoView2DBorder);
29
30public:
33
36
39
42
44
45 static void initClass();
46
48
50 void draw(View2DSliceList *dsl, View2DSlice* dslice, int slice) override;
51
53 void updateValues() override;
54
55protected:
56
58 void drawBorder (View2DSlice *dslice, const float *rgbaColor, float width);
59
61 float _rgbFocusColor[4];
62};
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
SoView2D extension that draws a border with variable width and highlighting of focused viewport.
void updateValues() override
Update fields to local variables, may be reimplemented if you want to update additional local vars.
SoSFColor focusColor
Color that should be used for drawing if the view has the focus.
SoSFFloat focusBorderWidth
The width of the border that should be used for drawing if the view has the focus.
SoSFFloat borderWidth
The width of the border in pixels.
void drawBorder(View2DSlice *dslice, const float *rgbaColor, float width)
render the border on slice with given color, alpha and line width
void draw(View2DSliceList *dsl, View2DSlice *dslice, int slice) override
Draws a border on the given slice.
static void initClass()
SoSFBool evaluateFocus
Flag indicating if the focus should be evaluated.
SoView2DExtension Base class for all View2DExtensions used for drawing and event handling on the View...
a list that holds all View2DSlice objects (lazily created) of a SoView2D
a single slice that is stored in a View2DSliceList, typically created by a View2DSliceList
Definition View2DSlice.h:48
Target mlrange_cast(Source arg)
Generic version of checked ML casts.