Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ImageBox Class Reference

#include <ImageBox.h>

Inheritance diagram for ImageBox:
ActiveWindow Window EventTarget

List of all members.

Public Member Functions

 ImageBox (ActiveWindow *p, int ax, int ay, int aw, int ah, DWORD id=0)
 ImageBox (Screen *s, int ax, int ay, int aw, int ah, DWORD id=0)
virtual ~ImageBox ()
virtual void Draw ()
virtual int OnMouseMove (int x, int y)
virtual int OnLButtonDown (int x, int y)
virtual int OnLButtonUp (int x, int y)
virtual int OnClick ()
virtual int OnMouseEnter (int x, int y)
virtual int OnMouseExit (int x, int y)
int GetBlendMode () const
void SetBlendMode (int blend)
bool GetBorder () const
void SetBorder (bool bNewValue)
Color GetBorderColor () const
void SetBorderColor (Color c)
void GetPicture (Bitmap &img) const
void SetPicture (const Bitmap &img)
int GetPictureLocation () const
void SetPictureLocation (int nNewValue)
Rect GetTargetRect () const
void SetTargetRect (const Rect &r)
- Public Member Functions inherited from ActiveWindow
 ActiveWindow (Screen *s, int ax, int ay, int aw, int ah, DWORD id=0, DWORD style=0, ActiveWindow *parent=0)
virtual ~ActiveWindow ()
int operator== (const ActiveWindow &w) const
virtual void Paint ()
virtual void Show ()
virtual void Hide ()
virtual void MoveTo (const Rect &r)
virtual void UseLayout (const std::vector< DWORD > &min_x, const std::vector< DWORD > &min_y, const std::vector< float > &weight_x, const std::vector< float > &weight_y)
virtual void UseLayout (const std::vector< float > &min_x, const std::vector< float > &min_y, const std::vector< float > &weight_x, const std::vector< float > &weight_y)
virtual void UseLayout (int ncols, int nrows, int *min_x, int *min_y, float *weight_x, float *weight_y)
virtual void DoLayout ()
virtual int OnSelect ()
virtual int OnRButtonDown (int x, int y)
virtual int OnRButtonUp (int x, int y)
virtual int OnMouseWheel (int wheel)
virtual int OnKeyDown (int vk, int flags)
virtual const char * GetDescription () const
virtual int OnDragStart (int x, int y)
virtual int OnDragDrop (int x, int y, ActiveWindow *source)
virtual ActiveWindowFindControl (int x, int y)
virtual Rect TargetRect () const
virtual ActiveWindowGetCapture ()
virtual int SetCapture ()
virtual int ReleaseCapture ()
virtual void SetFocus ()
virtual void KillFocus ()
virtual bool HasFocus () const
void SetEnabled (bool e=true)
bool IsEnabled () const
bool IsVisible () const
DWORD GetID () const
void SetStyle (DWORD s)
DWORD GetStyle () const
void SetText (const char *t)
void SetText (const Text &t)
void AddText (const char *t)
void AddText (const Text &t)
const TextGetText () const
void SetAltText (const char *t)
void SetAltText (const Text &t)
const TextGetAltText () const
void SetTexture (Bitmap *bmp)
BitmapGetTexture ()
void SetMargins (const Insets &m)
InsetsGetMargins ()
void SetTextInsets (const Insets &t)
InsetsGetTextInsets ()
List< ActiveWindow > & GetChildren ()
void SetCellInsets (const Insets &c)
InsetsGetCellInsets ()
void SetCells (int cx, int cy, int cw=1, int ch=1)
void SetCells (const Rect &r)
RectGetCells ()
void SetFixedWidth (int w)
int GetFixedWidth () const
void SetFixedHeight (int h)
int GetFixedHeight () const
void SetAlpha (double a)
double GetAlpha () const
void SetBackColor (Color c)
Color GetBackColor () const
void SetBaseColor (Color c)
Color GetBaseColor () const
void SetForeColor (Color c)
Color GetForeColor () const
void SetSingleLine (bool a)
bool GetSingleLine () const
void SetTextAlign (DWORD a)
DWORD GetTextAlign () const
void SetTransparent (bool t)
bool GetTransparent () const
void SetHidePartial (bool a)
bool GetHidePartial () const
void SetTabStop (int n, int x)
int GetTabStop (int n) const
void DrawText (const char *txt, int count, Rect &txt_rect, DWORD flags)
virtual void RegisterClient (int EID, ActiveWindow *client, PFVAWE callback)
virtual void UnregisterClient (int EID, ActiveWindow *client)
virtual void ClientEvent (int EID, int x=0, int y=0)
virtual ActiveWindowGetForm ()
virtual void SetForm (ActiveWindow *f)
virtual bool IsFormActive () const
virtual bool IsTopMost () const
virtual void SetTopMost (bool t)
virtual ActiveWindowFindChild (DWORD id)
virtual ActiveWindowFindChild (int x, int y)
- Public Member Functions inherited from Window
 Window (Screen *s, int ax, int ay, int aw, int ah)
virtual ~Window ()
int operator== (const Window &that) const
ScreenGetScreen () const
const RectGetRect () const
int X () const
int Y () const
int Width () const
int Height () const
virtual bool IsShown () const
virtual bool AddView (View *v)
virtual bool DelView (View *v)
Rect ClipRect (const Rect &r)
bool ClipLine (int &x1, int &y1, int &x2, int &y2)
bool ClipLine (double &x1, double &y1, double &x2, double &y2)
void DrawLine (int x1, int y1, int x2, int y2, Color color, int blend=0)
void DrawRect (int x1, int y1, int x2, int y2, Color color, int blend=0)
void DrawRect (const Rect &r, Color color, int blend=0)
void FillRect (int x1, int y1, int x2, int y2, Color color, int blend=0)
void FillRect (const Rect &r, Color color, int alpha=0)
void DrawBitmap (int x1, int y1, int x2, int y2, Bitmap *img, int blend=0)
void FadeBitmap (int x1, int y1, int x2, int y2, Bitmap *img, Color c, int blend)
void ClipBitmap (int x1, int y1, int x2, int y2, Bitmap *img, Color c, int blend, const Rect &clip)
void TileBitmap (int x1, int y1, int x2, int y2, Bitmap *img, int blend=0)
void DrawLines (int nPts, POINT *pts, Color color, int blend=0)
void DrawPoly (int nPts, POINT *pts, Color color, int blend=0)
void FillPoly (int nPts, POINT *pts, Color color, int blend=0)
void DrawEllipse (int x1, int y1, int x2, int y2, Color color, int blend=0)
void FillEllipse (int x1, int y1, int x2, int y2, Color color, int blend=0)
void SetFont (Font *f)
FontGetFont () const
void Print (int x1, int y1, const char *fmt,...)
- Public Member Functions inherited from EventTarget
virtual ~EventTarget ()
int operator== (const EventTarget &t) const

Protected Member Functions

virtual void DrawTabbedText ()
Rect CalcLabelRect (int img_w, int img_h)
Rect CalcPictureRect ()
- Protected Member Functions inherited from ActiveWindow
virtual Color ShadeColor (Color c, double shade)
virtual void AddChild (ActiveWindow *child)
virtual void DrawStyleRect (const Rect &r, int style)
virtual void DrawStyleRect (int x1, int y1, int x2, int y2, int style)
virtual void DrawTextureGrid ()
virtual void CalcGrid ()
- Protected Member Functions inherited from Window
virtual void ScreenToWindow (int &x, int &y)
virtual void ScreenToWindow (Rect &r)

Protected Attributes

bool border
Color border_color
Bitmap picture
int picture_loc
int blend_mode
Rect target_rect
- Protected Attributes inherited from ActiveWindow
DWORD id
DWORD style
DWORD text_align
bool single_line
bool focus
bool enabled
bool hide_partial
float alpha
Color back_color
Color base_color
Color fore_color
Text text
Text alt_text
Text desc
Bitmaptexture
Insets margins
Insets text_insets
Insets cell_insets
Rect cells
int fixed_width
int fixed_height
int tab [10]
ActiveWindowparent
ActiveWindowform
bool transparent
bool topmost
Layoutlayout
List< ActiveWindowchildren
List< AWMapclients
AWEvent event
int rows
int cols
Polypolys
VertexSetvset
Materialmtl
- Protected Attributes inherited from Window
Rect rect
Screenscreen
bool shown
Fontfont
List< Viewview_list

Additional Inherited Members

- Static Public Member Functions inherited from ActiveWindow
static const char * TYPENAME ()
static void SetSystemFont (Font *f)
static void SetSystemBackColor (Color c)
static void SetSystemForeColor (Color c)
- Static Protected Attributes inherited from ActiveWindow
static Fontsys_font = 0
static Color sys_back_color = Color(128,128,128)
static Color sys_fore_color = Color( 0, 0, 0)

Detailed Description

Definition at line 24 of file ImageBox.h.


Constructor & Destructor Documentation

ImageBox::ImageBox ( ActiveWindow p,
int  ax,
int  ay,
int  aw,
int  ah,
DWORD  id = 0 
)

Definition at line 24 of file ImageBox.cpp.

ImageBox::ImageBox ( Screen s,
int  ax,
int  ay,
int  aw,
int  ah,
DWORD  id = 0 
)

Definition at line 35 of file ImageBox.cpp.

ImageBox::~ImageBox ( )
virtual

Definition at line 48 of file ImageBox.cpp.


Member Function Documentation

Rect ImageBox::CalcLabelRect ( int  img_w,
int  img_h 
)
protected

Definition at line 136 of file ImageBox.cpp.

Rect ImageBox::CalcPictureRect ( )
protected

Definition at line 184 of file ImageBox.cpp.

void ImageBox::Draw ( )
virtual

Reimplemented from ActiveWindow.

Definition at line 54 of file ImageBox.cpp.

void ImageBox::DrawTabbedText ( )
protectedvirtual

Reimplemented from ActiveWindow.

Definition at line 108 of file ImageBox.cpp.

int ImageBox::GetBlendMode ( ) const
inline

Definition at line 43 of file ImageBox.h.

bool ImageBox::GetBorder ( ) const
inline

Definition at line 45 of file ImageBox.h.

Color ImageBox::GetBorderColor ( ) const
inline

Definition at line 47 of file ImageBox.h.

void ImageBox::GetPicture ( Bitmap img) const

Definition at line 276 of file ImageBox.cpp.

int ImageBox::GetPictureLocation ( ) const

Definition at line 288 of file ImageBox.cpp.

Rect ImageBox::GetTargetRect ( ) const
inline

Definition at line 53 of file ImageBox.h.

int ImageBox::OnClick ( )
virtual

Reimplemented from ActiveWindow.

Definition at line 259 of file ImageBox.cpp.

int ImageBox::OnLButtonDown ( int  x,
int  y 
)
virtual

Reimplemented from ActiveWindow.

Definition at line 249 of file ImageBox.cpp.

int ImageBox::OnLButtonUp ( int  x,
int  y 
)
virtual

Reimplemented from ActiveWindow.

Definition at line 254 of file ImageBox.cpp.

int ImageBox::OnMouseEnter ( int  x,
int  y 
)
virtual

Reimplemented from ActiveWindow.

Definition at line 264 of file ImageBox.cpp.

int ImageBox::OnMouseExit ( int  x,
int  y 
)
virtual

Reimplemented from ActiveWindow.

Definition at line 269 of file ImageBox.cpp.

int ImageBox::OnMouseMove ( int  x,
int  y 
)
virtual

Reimplemented from ActiveWindow.

Definition at line 244 of file ImageBox.cpp.

void ImageBox::SetBlendMode ( int  blend)
inline

Definition at line 44 of file ImageBox.h.

void ImageBox::SetBorder ( bool  bNewValue)
inline

Definition at line 46 of file ImageBox.h.

void ImageBox::SetBorderColor ( Color  c)
inline

Definition at line 48 of file ImageBox.h.

void ImageBox::SetPicture ( const Bitmap img)

Definition at line 281 of file ImageBox.cpp.

void ImageBox::SetPictureLocation ( int  nNewValue)

Definition at line 293 of file ImageBox.cpp.

void ImageBox::SetTargetRect ( const Rect r)
inline

Definition at line 54 of file ImageBox.h.


Member Data Documentation

int ImageBox::blend_mode
protected

Definition at line 66 of file ImageBox.h.

bool ImageBox::border
protected

Definition at line 62 of file ImageBox.h.

Color ImageBox::border_color
protected

Definition at line 63 of file ImageBox.h.

Bitmap ImageBox::picture
protected

Definition at line 64 of file ImageBox.h.

int ImageBox::picture_loc
protected

Definition at line 65 of file ImageBox.h.

Rect ImageBox::target_rect
protected

Definition at line 67 of file ImageBox.h.


The documentation for this class was generated from the following files: