⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ceguiframewindow.h

📁 OGRE开发包的依赖包
💻 H
📖 第 1 页 / 共 2 页
字号:

    \return
        Nothing.
    */
    void setNWSESizingCursorImage(const Image* image);

    /*!
    \brief
        Set the Image to be used for the northeast-southwest sizing mouse cursor.

    \param image
        Pointer to an Image object, or 0 for none.

    \return
        Nothing.
    */
    void setNESWSizingCursorImage(const Image* image);

    /*!
    \brief
        Set the image to be used for the north-south sizing mouse cursor.

    \param imageset
        String holding the name of the Imageset containing the Image to be used.

    \param image
        String holding the name of the Image to be used.

    \return
        Nothing.

    \exception UnknownObjectException thrown if either \a imageset or \a image refer to non-existant entities.
    */
    void setNSSizingCursorImage(const String& imageset, const String& image);

    /*!
    \brief
        Set the image to be used for the east-west sizing mouse cursor.

    \param imageset
        String holding the name of the Imageset containing the Image to be used.

    \param image
        String holding the name of the Image to be used.

    \return
        Nothing.

    \exception UnknownObjectException thrown if either \a imageset or \a image refer to non-existant entities.
    */
    void setEWSizingCursorImage(const String& imageset, const String& image);

    /*!
    \brief
        Set the image to be used for the northwest-southeast sizing mouse cursor.

    \param imageset
        String holding the name of the Imageset containing the Image to be used.

    \param image
        String holding the name of the Image to be used.

    \return
        Nothing.

    \exception UnknownObjectException thrown if either \a imageset or \a image refer to non-existant entities.
    */
    void setNWSESizingCursorImage(const String& imageset, const String& image);

    /*!
    \brief
        Set the image to be used for the northeast-southwest sizing mouse cursor.

    \param imageset
        String holding the name of the Imageset containing the Image to be used.

    \param image
        String holding the name of the Image to be used.

    \return
        Nothing.

    \exception UnknownObjectException thrown if either \a imageset or \a image refer to non-existant entities.
    */
    void setNESWSizingCursorImage(const String& imageset, const String& image);

    // overridden from Window class
    bool    isHit(const Point& position) const      { return Window::isHit(position) && !d_rolledup; }

    /*!
    \brief
        Return a pointer to the Titlebar component widget for this FrameWindow.

    \return
        Pointer to a Titlebar object.

    \exception UnknownObjectException
        Thrown if the Titlebar component does not exist.
    */
    Titlebar* getTitlebar() const;

    /*!
    \brief
        Return a pointer to the close button component widget for this
        FrameWindow.

    \return
        Pointer to a PushButton object.

    \exception UnknownObjectException
        Thrown if the close button component does not exist.
    */
    PushButton* getCloseButton() const;

	/*************************************************************************
		Construction / Destruction
	*************************************************************************/
	/*!
	\brief
		Constructor for FrameWindow objects.
	*/
	FrameWindow(const String& name, const String& type);

	/*!
	\brief
		Destructor for FramwWindow objects.
	*/
	virtual ~FrameWindow(void);


protected:
	/*************************************************************************
		Implementation Functions
	*************************************************************************/
	/*!
	\brief
		move the window's left edge by 'delta'.  The rest of the window does not move, thus this changes the size of the Window.

	\param delta
		float value that specifies the amount to move the window edge, and in which direction.  Positive values make window smaller.
	*/
	void	moveLeftEdge(float delta);


	/*!
	\brief
		move the window's right edge by 'delta'.  The rest of the window does not move, thus this changes the size of the Window.

	\param delta
		float value that specifies the amount to move the window edge, and in which direction.  Positive values make window larger.
	*/
	void	moveRightEdge(float delta);


	/*!
	\brief
		move the window's top edge by 'delta'.  The rest of the window does not move, thus this changes the size of the Window.

	\param delta
		float value that specifies the amount to move the window edge, and in which direction.  Positive values make window smaller.
	*/
	void	moveTopEdge(float delta);


	/*!
	\brief
		move the window's bottom edge by 'delta'.  The rest of the window does not move, thus this changes the size of the Window.

	\param delta
		float value that specifies the amount to move the window edge, and in which direction.  Positive values make window larger.
	*/
	void	moveBottomEdge(float delta);


	/*!
	\brief
		check local pixel co-ordinate point 'pt' and return one of the
		SizingLocation enumerated values depending where the point falls on
		the sizing border.

	\param pt
		Point object describing, in pixels, the window relative offset to check.

	\return
		One of the SizingLocation enumerated values that describe which part of
		the sizing border that \a pt corresponded to, if any.
	*/
	SizingLocation	getSizingBorderAtPoint(const Point& pt) const;

 
	/*!
	\brief
		return true if given SizingLocation is on left edge.

	\param loc
		SizingLocation value to be checked.

	\return
		true if \a loc is on the left edge.  false if \a loc is not on the left edge.
	*/
	bool	isLeftSizingLocation(SizingLocation loc) const			{return ((loc == SizingLeft) || (loc == SizingTopLeft) || (loc == SizingBottomLeft));}


	/*!
	\brief
		return true if given SizingLocation is on right edge.

	\param loc
		SizingLocation value to be checked.

	\return
		true if \a loc is on the right edge.  false if \a loc is not on the right edge.
	*/
	bool	isRightSizingLocation(SizingLocation loc) const			{return ((loc == SizingRight) || (loc == SizingTopRight) || (loc == SizingBottomRight));}


	/*!
	\brief
		return true if given SizingLocation is on top edge.

	\param loc
		SizingLocation value to be checked.

	\return
		true if \a loc is on the top edge.  false if \a loc is not on the top edge.
	*/
	bool	isTopSizingLocation(SizingLocation loc) const			{return ((loc == SizingTop) || (loc == SizingTopLeft) || (loc == SizingTopRight));}


	/*!
	\brief
		return true if given SizingLocation is on bottom edge.

	\param loc
		SizingLocation value to be checked.

	\return
		true if \a loc is on the bottom edge.  false if \a loc is not on the bottom edge.
	*/
	bool	isBottomSizingLocation(SizingLocation loc) const		{return ((loc == SizingBottom) || (loc == SizingBottomLeft) || (loc == SizingBottomRight));}


	/*!
	\brief
		Method to respond to close button click events and fire our close event
	*/
	bool	closeClickHandler(const EventArgs& e);


	/*!
	\brief
		Set the appropriate mouse cursor for the given window-relative pixel point.
	*/
	void	setCursorForPoint(const Point& pt) const;


	/*!
	\brief
		Return a Rect that describes, in window relative pixel co-ordinates, the outer edge of the sizing area for this window.
	*/
	virtual	Rect	getSizingRect(void) const		{return Rect(0, 0, d_pixelSize.d_width, d_pixelSize.d_height);}


	/*!
	\brief
		Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.

	\param class_name
		The class name that is to be checked.

	\return
		true if this window was inherited from \a class_name. false if not.
	*/
	virtual bool	testClassName_impl(const String& class_name) const
	{
		if (class_name=="FrameWindow")	return true;
		return Window::testClassName_impl(class_name);
	}


	/*************************************************************************
		New events for Frame Windows
	*************************************************************************/
	/*!
	\brief
		Event generated internally whenever the roll-up / shade state of the window
		changes.
	*/
	virtual void	onRollupToggled(WindowEventArgs& e);


	/*!
	\brief
		Event generated internally whenever the close button is clicked.
	*/
	virtual void	onCloseClicked(WindowEventArgs& e);


	/*************************************************************************
		Overridden event handlers
	*************************************************************************/
	virtual void	onMouseMove(MouseEventArgs& e);
	virtual void	onMouseButtonDown(MouseEventArgs& e);
	virtual void	onMouseButtonUp(MouseEventArgs& e);
	virtual void	onCaptureLost(WindowEventArgs& e);
	virtual void    onTextChanged(WindowEventArgs& e);
	virtual void	onActivated(ActivationEventArgs& e);
	virtual void	onDeactivated(ActivationEventArgs& e);


	/*************************************************************************
		Implementation Data
	*************************************************************************/
	// frame data
	bool	d_frameEnabled;		//!< true if window frame should be drawn.

	// window roll-up data
	bool	d_rollupEnabled;	//!< true if roll-up of window is allowed.
	bool	d_rolledup;			//!< true if window is rolled up.

	// drag-sizing data
	bool	d_sizingEnabled;	//!< true if sizing is enabled for this window.
	bool	d_beingSized;		//!< true if window is being sized.
	float	d_borderSize;		//!< thickness of the sizing border around this window
	Point	d_dragPoint;		//!< point window is being dragged at.

	// images for cursor when on sizing border
	const Image*	d_nsSizingCursor;		//!< North/South sizing cursor image.
	const Image*	d_ewSizingCursor;		//!< East/West sizing cursor image.
	const Image*	d_nwseSizingCursor;		//!< North-West/South-East cursor image.
	const Image*	d_neswSizingCursor;		//!< North-East/South-West cursor image.

	bool	d_dragMovable;		//!< true if the window will move when dragged by the title bar.


private:
	/*************************************************************************
		Static Properties for this class
	*************************************************************************/
	static FrameWindowProperties::SizingEnabled		d_sizingEnabledProperty;
	static FrameWindowProperties::FrameEnabled		d_frameEnabledProperty;
	static FrameWindowProperties::TitlebarEnabled	d_titlebarEnabledProperty;
	static FrameWindowProperties::CloseButtonEnabled d_closeButtonEnabledProperty;
	static FrameWindowProperties::RollUpState		d_rollUpStateProperty;
	static FrameWindowProperties::RollUpEnabled		d_rollUpEnabledProperty;
	static FrameWindowProperties::DragMovingEnabled	d_dragMovingEnabledProperty;
	static FrameWindowProperties::SizingBorderThickness d_sizingBorderThicknessProperty;
    static FrameWindowProperties::NSSizingCursorImage   d_nsSizingCursorProperty;
    static FrameWindowProperties::EWSizingCursorImage   d_ewSizingCursorProperty;
    static FrameWindowProperties::NWSESizingCursorImage d_nwseSizingCursorProperty;
    static FrameWindowProperties::NESWSizingCursorImage d_neswSizingCursorProperty;


	/*************************************************************************
		Private methods
	*************************************************************************/
	void	addFrameWindowProperties(void);
};

} // End of  CEGUI namespace section

#if defined(_MSC_VER)
#	pragma warning(pop)
#endif

#endif	// end of guard _CEGUIFrameWindow_h_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -