Class MyPictureBox Used to print a picture (can be stretchable). More...
#include <SDK_Manila_Sense.h>
Inherits Element.
Public Member Functions | |
MyPictureBox (int idElement, int x, int y, wstring img, int nbImg=1, bool rescall=false) | |
With this constructor, height and width are found using the picture... | |
MyPictureBox (int idElement, int x, int y, DIRECTDRAW_GDI *i, int nbImg=1) | |
With this constructor, height and width are found using the picture... | |
~MyPictureBox (void) | |
void | changeImg (DIRECTDRAW_GDI *surf) |
To change picture. | |
virtual Element * | isClicked (int x, int y) |
To test if a position is inside the element... | |
virtual void | paint (DIRECTDRAW_GDI *lpDDraw, int x, int y) |
To paint the picture... | |
void | setNumImage (int i) |
To test if a position is inside the element... | |
void | setScallingAbility (bool canScal) |
change the print behavior... |
Class MyPictureBox Used to print a picture (can be stretchable).
Definition at line 447 of file SDK_Manila_Sense.h.
MyPictureBox::MyPictureBox | ( | int | idElement, | |
int | x, | |||
int | y, | |||
wstring | img, | |||
int | nbImg = 1 , |
|||
bool | rescall = false | |||
) |
With this constructor, height and width are found using the picture...
idElement | a number used to identify the Element (Can be used to get a pointer with Element::getElementByID) | |
x | padding left of the element | |
y | padding top of the element | |
img | path to the picture to print | |
nbImg | optional, if the picture has different pattern (like buttons), see setNumImage(int i) | |
rescall | optional, if true the picture is rescaled using GlobalInformations::percentOfVGA |
Definition at line 31 of file MyPictureBox.cpp.
MyPictureBox::MyPictureBox | ( | int | idElement, | |
int | x, | |||
int | y, | |||
DIRECTDRAW_GDI * | i, | |||
int | nbImg = 1 | |||
) |
With this constructor, height and width are found using the picture...
if the picture is already loaded, use this constructor
idElement | a number used to identify the Element (Can be used to get a pointer with Element::getElementByID) | |
x | padding left of the element | |
y | padding top of the element | |
i | pointer to the already loaded picture | |
nbImg | optional, if the picture has different pattern (like buttons), see setNumImage(int i) |
Definition at line 12 of file MyPictureBox.cpp.
MyPictureBox::~MyPictureBox | ( | void | ) |
Definition at line 48 of file MyPictureBox.cpp.
void MyPictureBox::changeImg | ( | DIRECTDRAW_GDI * | surf | ) | [inline] |
To change picture.
Be careful: resources are not released !
Definition at line 507 of file SDK_Manila_Sense.h.
Element * MyPictureBox::isClicked | ( | int | x, | |
int | y | |||
) | [virtual] |
To test if a position is inside the element...
x | position of click | |
y | position of click |
Implements Element.
Definition at line 126 of file MyPictureBox.cpp.
void MyPictureBox::paint | ( | DIRECTDRAW_GDI * | lpDDraw, | |
int | x, | |||
int | y | |||
) | [virtual] |
To paint the picture...
lpDDraw | surface to print (GlobalInformations::primaryBuffer for example) | |
x | position of top-left | |
y | position of top-left |
Implements Element.
Definition at line 54 of file MyPictureBox.cpp.
void MyPictureBox::setNumImage | ( | int | i | ) | [inline] |
To test if a position is inside the element...
i | if the picture has different pattern, change index |
Definition at line 501 of file SDK_Manila_Sense.h.
void MyPictureBox::setScallingAbility | ( | bool | canScal | ) | [inline] |
change the print behavior...
canScal | set to true if you want stretch your picture |
Definition at line 512 of file SDK_Manila_Sense.h.