📄 window.pkg
字号:
/****************************************
Vertical alignment modes
*****************************************/
enum VerticalAlignment
{
VA_TOP,
VA_CENTRE,
VA_BOTTOM
};
/****************************************
Horizontal alignment modes
*****************************************/
enum HorizontalAlignment
{
HA_LEFT,
HA_CENTRE,
HA_RIGHT
};
/****************************************
Window
*****************************************/
class Window //: public EventSet
{
string getType() const;
string getName() const;
bool isDestroyedByParent() const;
bool isAlwaysOnTop() const;
bool isDisabled(bool localOnly=false) const;
bool isVisible(bool localOnly=false) const;
bool isActive() const;
bool isClippedByParent() const;
void setDestroyedByParent(bool setting);
void setAlwaysOnTop(bool setting);
void setEnabled(bool setting);
void enable();
void disable();
void setVisible(bool setting);
void show();
void hide();
void activate();
void deactivate();
void setClippedByParent(bool setting);
unsigned int getID() const;
void setID(unsigned int ID);
unsigned int getChildCount() const;
bool isChild(unsigned int ID) const;
bool isChild(string name) const;
bool isChild(const Window* window) const;
bool isChildRecursive(unsigned int ID) const;
void addChildWindow(string name);
void addChildWindow(Window* window);
void removeChildWindow(unsigned int ID);
void removeChildWindow(string name);
void removeChildWindow(Window* window);
tolua_throws|CEGUI::UnknownObjectException,nil| Window* getChild(unsigned int ID) const;
tolua_throws|CEGUI::UnknownObjectException,nil| Window* getChild(string name) const;
Window* getChildAtIdx(unsigned int ID) const;
Window* getActiveChild() const;
Window* getChildAtPosition(const Vector2& pos) const;
Window* getTargetChildAtPosition(const Vector2& pos) const;
Window* getChildRecursive(unsigned int ID) const;
Window* getParent() const;
bool isAncestor(unsigned int ID) const;
bool isAncestor(string name) const;
bool isAncestor(const Window* window) const;
void setFont(string name);
void setFont(Font* font);
Font* getFont() const;
void setText(string text);
string getText() const;
bool inheritsAlpha() const;
float getAlpha() const;
float getEffectiveAlpha() const;
void setAlpha(float a);
void setInheritsAlpha(bool setting);
void requestRedraw() const;
bool isZOrderingEnabled() const;
void setZOrderingEnabled(bool setting);
Rect getPixelRect() const;
Rect getInnerRect() const;
Rect getUnclippedPixelRect() const;
Rect getUnclippedInnerRect() const;
Size getParentPixelSize(void) const;
float getParentPixelWidth(void) const;
float getParentPixelHeight(void) const;
static Window* getCaptureWindow();
void setRestoreCapture(bool setting);
bool restoresOldCapture() const;
bool distributesCapturedInputs() const;
void setDistributesCapturedInputs(bool setting);
bool captureInput();
void releaseInput();
bool isCapturedByThis() const;
bool isCapturedByAncestor() const;
bool isCapturedByChild() const;
bool isHit(const Vector2& pos) const;
bool isRiseOnClickEnabled() const;
void setRiseOnClickEnabled(bool setting);
const Image* getMouseCursor() const;
void setMouseCursor(MouseCursorImage cursor);
void setMouseCursor(const Image* image);
void setMouseCursor(string imageset, string image);
void moveToFront();
void moveToBack();
bool wantsMultiClickEvents() const;
bool isMouseAutoRepeatEnabled() const;
float getAutoRepeatDelay() const;
float getAutoRepeatRate() const;
void setWantsMultiClickEvents(bool setting);
void setMouseAutoRepeatEnabled(bool setting);
void setAutoRepeatDelay(float delay);
void setAutoRepeatRate(float rate);
//void destroy();
bool isUsingDefaultTooltip() const;
Tooltip* getTooltip() const;
string getTooltipType() const;
string getTooltipText() const;
bool inheritsTooltipText() const;
void setTooltip(Tooltip* tooltip);
void setTooltipType(string tooltipType);
void setTooltipText(string tip);
void setInheritsTooltipText(bool setting);
bool testClassName(string class_name) const;
void notifyDragDropItemEnters(DragContainer* item);
void notifyDragDropItemLeaves(DragContainer* item);
void notifyDragDropItemDropped(DragContainer* item);
VerticalAlignment getVerticalAlignment() const;
HorizontalAlignment getHorizontalAlignment() const;
// these actually have a const, but tolua++ chokes on that
void setVerticalAlignment(VerticalAlignment alignment);
void setHorizontalAlignment(HorizontalAlignment alignment);
string getLookNFeel() const;
tolua_throws|CEGUI::Exception,error| void setLookNFeel(string lnf);
tolua_throws|CEGUI::Exception,error| void setWindowRenderer(string name);
string getWindowRendererName() const;
//RenderCache& getRenderCache()
bool getModalState() const;
void setModalState(bool state);
tolua_throws|CEGUI::UnknownObjectException,nil| string getUserString(string name) const;
bool isUserStringDefined(string name) const;
void setUserString(string name, string value);
void beginInitialisation();
void endInitialisation();
// unified stuff
void setArea(const UDim& xpos, const UDim& ypos, const UDim& width, const UDim& height);
void setArea(const UVector2& pos, const UVector2& size);
void setArea(const URect& area);
void setPosition(const UVector2& pos);
void setXPosition(const UDim& x);
void setYPosition(const UDim& y);
void setSize(const UVector2& size);
void setWidth(const UDim& width);
void setHeight(const UDim& height);
void setMaxSize(const UVector2& size);
void setMinSize(const UVector2& size);
const URect& getArea() const;
const UVector2& getPosition() const;
const UDim& getXPosition() const;
const UDim& getYPosition() const;
UVector2 getSize() const;
UDim getWidth() const;
UDim getHeight() const;
const UVector2& getMaxSize() const;
const UVector2& getMinSize() const;
// event pass through
bool isMousePassThroughEnabled() const;
void setMousePassThroughEnabled(bool setting);
tolua_throws|CEGUI::Exception,error| void rename(string new_name);
//////////////////////////////////////////////
// PropertySet
void setProperty(string name, string value);
string getProperty(string name) const;
string getPropertyDefault(string name) const;
string getPropertyHelp(string name) const;
bool isPropertyPresent(string name) const;
bool isPropertyDefault(string name) const;
tolua_outside PropertyIterator ceguiLua_getPropertyIterator @ getPropertyIterator() const;
//////////////////////////////////////////////
// EventSet
void addEvent(string name);
void removeEvent(string name);
void removeAllEvents();
bool isEventPresent(string name);
tolua_throws|CEGUI::UnknownObjectException,error| tolua_outside EventConnection LuaFunctorSubscribeEvent @ subscribeEvent(string name, lua_Object funcIndex, lua_Object selfIndex=LUA_NOREF, lua_State*);
tolua_throws|CEGUI::UnknownObjectException,error| EventConnection subscribeScriptedEvent @ subscribeEvent(string name, string callback_name);
void fireEvent(string name, EventArgs& args, string eventnamespace="");
bool isMuted() const;
void setMutedState(bool setting);
tolua_outside EventIterator ceguiLua_getEventIterator @ getEventIterator() const;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -