7 #include "ParaScriptingCommon.h" 8 #include "ParaScriptingGlobal.h" 9 #include "2dengine/GUIBase.h" 10 #if defined (USE_FLASH_MANAGER) && defined(USE_DIRECTX_RENDERER) 11 #include "ParaScriptingFlashPlayer.h" 13 #ifdef USE_DIRECTX_RENDERER 14 #include "ParaScriptingBrowserManager.h" 15 #include "ParaScriptingHTMLBrowser.h" 17 #include "ParaScriptingPainter.h" 18 #include "ParaScriptingGraphics.h" 116 bool IsValid()
const;
133 void AddTextItem(
const char*text);
139 void SetName(
const char *szName);
143 string GetName()
const;
182 void SetEnabled(
bool bEnabled);
183 bool GetEnabled()
const;
186 void SetUseTextShadow(
bool bUseTextShadow);
187 bool GetUseTextShadow()
const;
191 void SetTextScale(
float fScale);
194 float GetTextScale();
196 void SetHighlightStyle(
const char* style);
197 const char* GetHighlightStyle()
const;
200 string GetColor()
const;
205 void SetColor(
const char *strColor);
208 void SetZDepth(
float fDepth);
217 void SetAutoSize(
bool bAutosize);
218 bool GetAutoSize()
const;
221 void GetTextLineSize(
int* width,
int* height);
227 void SetVisible(
bool bVisible);
228 bool GetVisible()
const;
231 bool GetScrollable()
const;
233 string GetType()
const;
239 void SetReceiveDrag(
bool bReceiveDrag);
240 bool GetReceiveDrag()
const;
247 object GetField(
const char* sFieldname,
const object& output);
252 void SetField(
const char* sFieldname,
const object& input);
256 void CallField(
const char* sFieldname);
263 void SetDefault(
bool bDefaultButton);
270 void SetLifeTime(
int nSeconds);
276 int GetLifeTime()
const;
281 string GetText()
const;
290 void SetText3(
const char * strText,
const char * strColor,
const char * strFontAssetName);
291 void SetText1(
const object& strText);
292 void SetText(
const char* strText);
300 void SetTextAutoTranslate(
const char* strText,
const char* sConverter);
312 void SetPasswordChar(
string PasswordChar);
314 string GetPasswordChar()
const;
319 void SetTopLevel(
bool value);
331 void SetBGImage1(
const object& szBackground);
332 void SetBGImageStr(
const char * szBackground);
333 void SetBGImage5(
const char * TextFilename,
int left,
int top,
int width,
int height);
335 void SetBGImageAndRect(
ParaAssetObject pTextureEntity,
int left,
int top,
int width,
int height);
339 void SetBGImage2(
const char * TextFilename,
RECT *rect);
341 string GetBGImage()
const;
343 void SetBtnImage2(
const char * TextFilename,
RECT *rect);
344 void SetBtnImage1(
const object& szButton);
345 string GetBtnImage()
const;
353 void SetNineElementBG(
const char * TextFilename,
int left,
int top,
int toRight,
int toBottom);
360 int GetFirstVisibleCharIndex();
365 int GetCaretPosition();
371 void SetCaretPosition(
int nCharacterPos);
379 void GetPriorWordPos(
int nCP,
int PriorIn,
int &Prior );
382 void GetNextWordPos(
int nCP,
int NextIn,
int &Next);
385 void CPtoXY(
int nCP,
bool bTrail,
int XIn,
int YIn,
int &X,
int &Y);
388 void XYtoCP(
int nX,
int nY,
int CPIn,
int nTrailIn,
int & CP,
int &nTrail);
394 void SetPageSize(
int pagesize);
397 void SetStep(
int nDelta);
407 void SetTrackRange(
int nBegin,
int nEnd);
409 void GetTrackRange(
int &nBegin,
int &nEnd);
420 int GetAnimationStyle()
const;
431 void SetAnimationStyle(
int nStyle);
437 void SetScrollable(
bool bScrollable);
448 void GetAbsPosition(
float &x,
float &y,
float& width,
float& height,
float &z)
const;
454 void SetPosition(
const char * pos);
457 string GetPosition()
const;
461 void Reposition(
const char* alignment,
int left,
int top,
int width,
int height);
469 void SetValue(
int value);
479 void OnClick(
const object& strScriptName);
480 string GetOnClick()
const;
486 void OnSize(
const object& strScriptName);
487 string GetOnSize()
const;
492 void OnDestroy(
const object& strScriptName);
493 string GetOnDestroy()
const;
503 void OnActivate(
const object& strScriptName);
504 string GetOnActivate()
const;
514 void OnDoubleClick(
const object& strScriptName);
515 string GetOnDoubleClick()
const;
524 void OnKeyDown(
const object& strScriptName);
525 string GetOnKeyDown()
const;
527 void OnKeyUp(
const object& strScriptName);
528 string GetOnKeyUp()
const;
530 void OnDragBegin(
const object& strScriptName);
531 string GetOnDragBegin()
const;
533 void OnDragEnd(
const object& strScriptName);
534 string GetOnDragEnd()
const;
536 void OnDragOver(
const object& strScriptName);
537 string GetOnDragOver()
const;
538 void OnMouseMove(
const object& strScriptName);
539 string GetOnMouseMove()
const;
540 void OnMouseHover(
const object& strScriptName);
541 string GetOnMouseHover()
const;
542 void OnMouseEnter(
const object& strScriptName);
543 string GetOnMouseEnter()
const;
544 void OnMouseLeave(
const object& strScriptName);
545 string GetOnMouseLeave()
const;
546 void OnMouseDown(
const object& strScriptName);
547 string GetOnMouseDown()
const;
548 void OnMouseUp(
const object& strScriptName);
549 string GetOnMouseUp()
const;
550 void OnMouseWheel(
const object& strScriptName);
551 string GetOnMouseWheel()
const;
552 void OnFrameMove(
const object& strScriptName);
553 string GetOnFrameMove()
const;
554 void OnTouch(
const object& strScriptName);
555 string GetOnTouch()
const;
556 void OnDraw(
const object& strScriptName);
557 string GetOnDraw()
const;
558 void OnInputMethod(
const object& strScriptName);
559 string GetOnInputMethod()
const;
564 void SetCursor(
const object& szCursorFile);
565 std::string GetCursor()
const;
568 void SetCursorEx(
const char* szCursorFile,
int nHotSpotX,
int nHotSpotY);
572 void OnChange(
const object& strScriptName);
573 string GetOnChange()
const;
574 void OnSelect(
const object& strScriptName);
575 string GetOnSelect()
const;
576 void OnModify(
const object& strScriptName);
577 string GetOnModify()
const;
578 void SetCanDrag(
bool bCanDrag);
579 bool GetCanDrag()
const;
581 void SetFontString(
const char* font);
582 void SetFontString1(
const object& font);
583 void SetFontString3(
const char *fontname,DWORD fontsize,
bool isbold);
586 string ToScript()
const;
587 string GetFontString()
const;
592 bool GetReadOnly()
const;
593 void SetReadOnly(
bool readonly);
596 float GetDepth()
const;
597 void SetDepth(
float depth);
600 void SetWidth(
int width);
601 void SetHeight(
int height);
604 void SetSize(
int width,
int height);
608 void SetRotation(
float fRot);
612 float GetRotation()
const;
615 void SetRotOriginOffset(
float x,
float y);
618 void GetRotOriginOffset(
float *x,
float * y)
const;
622 void SetScaling(
float x,
float y);
626 void GetScaling(
float *x,
float * y)
const;
628 void SetScalingX(
float x);
629 float GetScalingX()
const;
630 void SetScalingY(
float y);
631 float GetScalingY()
const;
635 void SetTranslation(
float x,
float y);
639 void GetTranslation(
float *x,
float * y)
const;
641 void SetTranslationX(
float x);
642 float GetTranslationX()
const;
643 void SetTranslationY(
float y);
644 float GetTranslationY()
const;
647 void SetColorMask(
const char *strColor);
648 string GetColorMask()
const;
656 void SetSpacing(
int nSpacing );
659 int GetSpacing()
const;
662 int GetScrollbarWidth()
const;
663 void SetScrollbarWidth(
int width);
666 bool GetFixedThumb()
const;
667 void SetFixedThumb(
bool bFixed);
669 int GetThumbSize()
const;
670 void SetThumbSize(
int size);
674 void SetFastRender(
bool fastrender);
675 bool GetFastRender()
const;
677 bool GetWordbreak()
const;
678 void SetWordbreak(
bool wordbreak);
680 int GetItemHeight()
const;
681 void SetItemHeight(
int itemheight);
683 bool GetMultipleSelect()
const;
684 void SetMultipleSelect(
bool multiple);
703 void AttachTo3D_(
const char* s3DObjectName);
705 string GetToolTip()
const;
706 void SetToolTip(
const object& tooltip);
710 void RemoveItem(
int index);
712 void SetPopUp(
int popup);
716 ParaUIFont CreateFont(
const char *name,
const char *fontname);
717 ParaUITexture CreateTexture(
const char *name,
const char *texturename);
747 int GetZOrder()
const;
751 void SetZOrder(
int nOrder);
753 bool IsModified()
const;
764 void SetActiveLayer(
const char *layer);
770 bool HasLayer(
const char *layer);
782 void SetCurrentState(
const char *statename);
793 void CloneState(
const char* statename);
794 void ActivateScript(
const char* scripttype);
800 void InvalidateRect();
808 string GenGetImage(
int index)
const;
809 string GenGetFont(
int index)
const;
811 void GetEventScript(DWORD type,
string& out)
const;
812 void SetEventScript(DWORD type,
const char * strScriptName);
833 static void PlaySound(
const char * strSoundAssetName,
bool bLoop);
840 static void StopSound(
const char * strSoundAssetName);
847 static void Destroy(
const char * strObjectName);
853 static void Destroy1(
int nID);
861 static void PostDestroy(
const char * strObjectName);
870 static ParaUIObject GetUIObject_any(
const object& NameOrID);
886 static void GetMousePosition(
float &x,
float &y);
888 static void SetMousePosition(
float x,
float y);
894 static bool IsKeyPressed(
int nDikScanCode);
905 static bool IsMousePressed(
int nButton);
945 static ParaUIObject CreateUIObject(
const char* strType,
const char * strObjectName,
const char * alignment,
int x,
int y,
int width,
int height);
960 static ParaUIObject GetDefaultObject(
const char *strType);
962 static void SetCursorFont(
const char *fontname,
const char * strColor,DWORD transparency);
964 static void SetCursorTexture(
const char *texturename,
const char * strColor,DWORD transparency );
966 static void SetCursorText(
const char *strText);
974 static void SetCursorFromFile(
const char *szCursor,
int XHotSpot,
int YHotSpot);
976 static void SetCursorFromFile_(
const char *szCursor);
981 static const char* GetCursorFile();
984 static void SetUseSystemCursor(
bool bUseSystem);
987 static bool GetUseSystemCursor();
990 static string ToScript();
997 static bool SaveLayout(
const char *filename);
1003 static void SetDesignTime(
bool bDesign);
1009 static void ShowCursor(
bool bShow);
1015 static void LockMouse(
bool bLock);
1020 static bool IsMouseLocked();
1023 static void ResetUI();
1030 static void SetIMEOpenStatus(
bool bOpen);
1033 static bool GetIMEOpenStatus();
1041 static void SetUIScale(
float fScalingX,
float fScalingY);
1049 static void SetMinimumScreenSize(
int nWidth,
int nHeight,
bool bAutoUIScaling);
1056 static void AddDragReceiver(
const char* sName);
1063 static void SetToolTipBehavior(
const char* behavior);
1072 static bool SetHighlightParam(
const char* szEffectName,
const char* szParamName,
const char* szParamValue);
1074 #ifdef USE_DIRECTX_RENDERER 1075 #ifdef USE_FLASH_MANAGER 1079 static ParaFlashPlayer GetFlashPlayer(
const char* sFileName);
1084 static ParaFlashPlayer CreateFlashPlayer(
const char* sFileName);
1089 static ParaFlashPlayer GetFlashPlayer1(
int nIndex);
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
ParaUI namespace contains a list of HAPI functions to create user interface controls, such as windows, buttons, as well as event triggers.
Definition: ParaScriptingGUI.h:826
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: ManagedDef.h:18
ParaObject class: it is used to control game scene objects from scripts.
Definition: ParaScriptingScene.h:56
a GUI texture object
Definition: ParaScriptingGraphics.h:22
base object for all 2D GUI objects (1) 2D GUI object are not tested against view frustum, instead it is controlled by visibility tag automatically or through user input.
Definition: GUIBase.h:54
weak reference ptr use in a class like this: weak_ptr<CRefCounted> p; e.g.
Definition: PERef.h:105
Definition: PEtypes.h:507
Definition: enum_maker.hpp:46
it represents an attribute object associated with an object.
Definition: ParaScriptingGlobal.h:458
a GUI font object
Definition: ParaScriptingGraphics.h:50
for luabind, The main drawback of this approach is that the compilation time will increase for the fi...
Definition: luaSQLite.cpp:1971
it represents a GUI object.
Definition: ParaScriptingGUI.h:104
it represents an asset entity.
Definition: ParaScriptingCommon.h:85