cgv
Loading...
Searching...
No Matches
resizable.h
1
#pragma once
2
3
#include <cgv/signal/signal.h>
4
#include <cgv/signal/abst_signal.h>
5
6
#include "lib_begin.h"
7
8
namespace
cgv
{
9
namespace
gui {
10
11
// abstract class to define an element that can change its size
12
// and position
13
class
CGV_API
resizable
{
14
public
:
15
// get the position of the element
16
virtual
void
get_position(
int
&pos_x,
int
&pos_y) = 0;
17
// get the extents of an element
18
virtual
void
get_extents(
int
&width,
int
&height) = 0;
19
20
// set the position
21
void
set_position(
int
pos_x,
int
pos_y);
22
23
// set the dimensions
24
void
set_extents(
int
width,
int
height);
25
26
// signal other elements can connect to if they are
27
// interested in size or position changes that come
28
// from the outside
29
cgv::signal::signal<resizable&> extents_position_change;
30
31
protected
:
32
// method for changing the size of the element
33
virtual
void
set_extents_request(
int
width,
int
height) = 0;
34
35
// method for changing the position of the element
36
virtual
void
set_position_request(
int
pos_x,
int
pos_y) = 0;
37
};
38
39
}
40
}
41
42
#include <cgv/config/lib_end.h>
cgv::gui::resizable
Definition
resizable.h:13
cgv
the cgv namespace
Definition
print.h:11
cgv
gui
resizable.h
Generated by
1.9.8