Btk
imageview.hpp
1
#if !defined(_BTK_IMAGEVIEW_HPP_)
2
#define _BTK_IMAGEVIEW_HPP_
3
#include "widget.hpp"
4
#include "pixels.hpp"
5
#include "rect.hpp"
6
#include "defs.hpp"
7
//the image view widget
8
namespace
Btk
{
9
class
BTKAPI
ImageView
:
public
Widget
{
10
public
:
11
ImageView
(
Container
&);
12
ImageView
(
Container
&,
int
x,
int
y,
int
w,
int
h);
13
~
ImageView
();
14
//set image
15
void
set_image(
const
PixBuf
&buf);
16
//ref image
17
void
ref_image(
PixBuf
&buf);
18
//called from parent widget
19
void
draw(Renderer &);
20
//Clip this image
21
void
set_clip(
const
Rect
&r);
22
23
PixBuf
&image(){
24
return
pixelbuf;
25
}
26
const
PixBuf
&image()
const
{
27
return
pixelbuf;
28
}
29
private
:
30
PixBuf
pixelbuf;
31
Texture
texture;
32
Rect
image_rect;
33
};
34
};
35
36
#endif // _BTK_IMAGEVIEW_HPP_
Btk::Texture
Definition:
pixels.hpp:191
Btk::Rect
a SDL_Rect with methods
Definition:
rect.hpp:10
Btk::Widget
Definition:
widget.hpp:219
Btk
This header include many useful containers.
Definition:
async.hpp:7
Btk::ImageView
Definition:
imageview.hpp:9
Btk::PixBuf
Definition:
pixels.hpp:32
Btk::Container
A Container of Widget.
Definition:
widget.hpp:108
include
Btk
imageview.hpp
Generated by
1.8.13