Welcome Guest [Log In] [Register]
Welcome to Epee Engine. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
TextBox; Documentation on the TextBox Class
Topic Started: Mar 8 2007, 11:46 AM (230 Views)
Alan
Administrator
[ *  *  * ]
textBox:An object that can display text on the screen and retrieve input from the user.
textBoxes can not only display text but also a user can type text into a text box as well.
True type font is the only font format currently supported.

Inherits from: Sprockets

Function List:

protected:
textBox(int _Obj_Type,std::string _NameTextBox,int _x,int _y,int _z,std::string _TextBoxMessage=" ",unsigned int _height=-1,unsigned int _width=-1,std::string _Font=True_Type_Font_Defalut,int _FontPoint=18,unsigned int _red=255,unsigned int _blue=255 ,unsigned int _green=255,std::string _FontPath = True_Type_Font_Location);//:Sprockets(_NameTextBox,_Obj_Type);
virtual void SetModifySurFace(SDL_Surface * _ModifySurface);
//virtual void SDL_GL_SurfaceToTexture(SDL_Surface * surface);
//virtual void CreateTexture(SDL_Surface * _baseSurface,SDL_Surface * _image);

public:
textBox(std::string _NameTextBox, int _x, int _y,int _z,std::string _TextBoxMessage=" ",unsigned int _height=-1,unsigned int _width=-1,std::string _Font=True_Type_Font_Defalut,int _FontPoint=18,unsigned int _red=255,unsigned int _blue=255 ,unsigned int _green=255,std::string _FontPath = True_Type_Font_Location);//:Sprockets(_NameTextBox,Type_TextBox);
textBox();
~textBox();

bool GetClipTextHeight();
bool GetClipTextWidth();
void SetQuality(int _Quality);
int GetQuality();
void SetText(std::string _text,bool _setevent=false);
virtual void SetHeightWidth(unsigned int _Height,unsigned int _Width);
void SetHightBasedOfRenderedText();
void SetWidthBasedOfRenderedText();
int GetJustifyOffset();
int GetTextJustification();
void SetTextJustification(int _justify);
std::string GetText ();
int GetTextToInt();
float GetTextToFloat();
bool SetTextFromInt(int _value,bool _setevent=false);
bool SetTextFromFloat(float _value,bool _setevent=false);
std::string GetFont();
void SetFont(std::string _FontArg);
int GetFontPoint();
void SetFontPoint(int _FontPointArg);
SDL_Color GetBackGroundColor();
bool SetBackGroundColor(unsigned int _red,unsigned int _blue ,unsigned int _green);
SDL_Color GetTextColor();
bool SetTextColor(unsigned int _red,unsigned int _blue ,unsigned int _green);
std::string GetFontPath();
void SetFontPath(std::string _Location);
void SetEditable(bool _flag);
bool GetEditable();
void SetNumbersOnly(bool _flag);
bool GetNumbersOnly();
bool IsColorChangedOnClick();
void SetColorChangedOnClick(bool _ChangeOnClick);
void SetSelectBackGroundColor(unsigned int _red,unsigned int _blue ,unsigned int _green);
void SetSelectTextColor(unsigned int _red,unsigned int _blue ,unsigned int _green);
virtual Sprockets * WasClicked(int _mouselocationX, int _mouselocationY);

datatype GetTextToNumericData(datatype _type)

bool SetTextFromNumericData(datatype _value,bool _setevent)

bool WillTextFitIntoBox(std::string _text);
protected:
TTF_Font * GetFontPointer();
SDL_Surface * SetSurface();
void LoadFont();
protected:
void SetJustifyOffset();
Offline Profile Quote Post Goto Top
 
« Previous Topic · Documentation · Next Topic »
Add Reply