44 |
#include MAP_INC |
#include MAP_INC |
45 |
|
|
46 |
class PG_Widget; |
class PG_Widget; |
47 |
struct PG_WidgetDataInternal; |
class PG_WidgetDataInternal; |
48 |
|
|
49 |
/** |
/** |
50 |
@author Alexander Pipelka |
@author Alexander Pipelka |
582 |
|
|
583 |
/** |
/** |
584 |
Return the current text color |
Return the current text color |
585 |
@return SDL_Color struct |
@return PG_Color |
586 |
*/ |
*/ |
587 |
SDL_Color GetFontColor(); |
PG_Color GetFontColor(); |
588 |
|
|
589 |
/** |
/** |
590 |
Set font color |
Set font color |
591 |
@param Color SDL_Color structure contains color information (RGB) |
@param Color PG_Color class contains color information (RGB) |
592 |
*/ |
*/ |
593 |
void SetFontColor(const SDL_Color& Color); |
void SetFontColor(const PG_Color& Color); |
|
|
|
|
/** |
|
|
Set font color |
|
|
@param Red Red color value 0 - 255 |
|
|
@param Green Green color value 0 - 255 |
|
|
@param Blue Blue color value 0 - 255 |
|
|
*/ |
|
|
#ifdef SWIG |
|
|
%name(SetFontColorRGB) void SetFontColor(int Red, int Green, int Blue); |
|
|
#else |
|
|
void SetFontColor(int Red, int Green, int Blue); |
|
|
#endif |
|
|
|
|
|
/** |
|
|
Set font color |
|
|
@param Color Value of the color 0x00RRGGBB (RGB) |
|
|
*/ |
|
|
#ifdef SWIG |
|
|
%name(SetFontColor32) void SetFontColor(int Color); |
|
|
#else |
|
|
void SetFontColor(int Color); |
|
|
#endif |
|
594 |
|
|
595 |
/** |
/** |
596 |
Set font transparency (!!!) |
Set font transparency (!!!) |
691 |
@param color color of the rendered text |
@param color color of the rendered text |
692 |
*/ |
*/ |
693 |
#ifdef SWIG |
#ifdef SWIG |
694 |
%name(DrawTextColor) void DrawText(const PG_Rect& rect, const char* text, const SDL_Color& c); |
%name(DrawTextColor) void DrawText(const PG_Rect& rect, const char* text, const PG_Color& c); |
695 |
#else |
#else |
696 |
void DrawText(const PG_Rect& rect, const char* text, const SDL_Color& c); |
void DrawText(const PG_Rect& rect, const char* text, const PG_Color& c); |
697 |
#endif |
#endif |
698 |
|
|
699 |
/** |
/** |
704 |
@param color color of the rendered text |
@param color color of the rendered text |
705 |
*/ |
*/ |
706 |
#ifdef SWIG |
#ifdef SWIG |
707 |
%name(DrawTextXYColor) void DrawText(int x, int y, const char* text, const SDL_Color& c); |
%name(DrawTextXYColor) void DrawText(int x, int y, const char* text, const PG_Color& c); |
708 |
#else |
#else |
709 |
void DrawText(int x, int y, const char* text, const SDL_Color& c); |
void DrawText(int x, int y, const char* text, const PG_Color& c); |
710 |
#endif |
#endif |
711 |
|
|
712 |
/** */ |
/** */ |
754 |
#endif |
#endif |
755 |
|
|
756 |
/** */ |
/** */ |
757 |
void SetPixel(int x, int y, Uint8 r, Uint8 g, Uint8 b); |
void SetPixel(int x, int y, const PG_Color& c); |
758 |
|
|
759 |
/** */ |
/** */ |
760 |
void DrawHLine(int x, int y, int w, Uint8 r, Uint8 g, Uint8 b); |
void DrawHLine(int x, int y, int w, const PG_Color& c); |
761 |
|
|
762 |
/** */ |
/** */ |
763 |
void DrawVLine(int x, int y, int h, Uint8 r, Uint8 g, Uint8 b); |
void DrawVLine(int x, int y, int h, const PG_Color& c); |
764 |
|
|
765 |
/** */ |
/** */ |
766 |
void DrawRectWH(int x, int y, int w, int h, Uint8 r, Uint8 g, Uint8 b); |
void DrawRectWH(int x, int y, int w, int h, const PG_Color& c); |
767 |
|
|
768 |
/** */ |
/** */ |
769 |
void DrawLine(Uint32 x0, Uint32 y0, Uint32 x1, Uint32 y1, const SDL_Color& color, Uint8 width=1); |
void DrawLine(Uint32 x0, Uint32 y0, Uint32 x1, Uint32 y1, const PG_Color& color, Uint8 width=1); |
770 |
|
|
771 |
/** |
/** |
772 |
Enter modal mode |
Enter modal mode |
932 |
/** |
/** |
933 |
array of border colors |
array of border colors |
934 |
*/ |
*/ |
935 |
SDL_Color my_colorBorder[2][2]; |
PG_Color my_colorBorder[2][2]; |
936 |
|
|
937 |
private: |
private: |
938 |
|
|
939 |
void InitWidget(PG_Widget* parent, bool bObjectSurface); |
void InitWidget(PG_Widget* parent, bool bObjectSurface); |
940 |
void AddChildToCache(PG_Widget *child, const char *name); |
//void AddChildToCache(PG_Widget *child, const char *name); |
941 |
void AddChildToCache(PG_Widget *child, int id); |
//void AddChildToCache(PG_Widget *child, int id); |
942 |
|
|
943 |
#ifndef SWIG |
#ifndef SWIG |
944 |
PG_Widget(const PG_Widget&); |
PG_Widget(const PG_Widget&); |