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

📄 ceguilistheadersegment.h

📁 OGRE开发包的依赖包
💻 H
📖 第 1 页 / 共 2 页
字号:
		Nothing.
	*/
	void setClickable(bool setting);


    void setSizingCursorImage(const Image* image);
    void setSizingCursorImage(const String& imageset, const String& image);
    void setMovingCursorImage(const Image* image);
    void setMovingCursorImage(const String& imageset, const String& image);


	/*************************************************************************
		Construction & Destruction
	*************************************************************************/
	/*!
	\brief
		Constructor for list header segment base class
	*/
	ListHeaderSegment(const String& type, const String& name);


	/*!
	\brief
		Destructor for list header segment base class.
	*/
	virtual ~ListHeaderSegment(void);


protected:
	/*************************************************************************
		Implementation Methods
	*************************************************************************/
	/*!
	\brief
		Update state for drag sizing.

	\param local_mouse
		Mouse position as a pixel offset from the top-left corner of this window.

	\return
		Nothing.
	*/
	void	doDragSizing(const Point& local_mouse);


	/*!
	\brief
		Update state for drag moving.

	\param local_mouse
		Mouse position as a pixel offset from the top-left corner of this window.

	\return
		Nothing.
	*/
	void	doDragMoving(const Point& local_mouse);


	/*!
	\brief
		Initialise the required states to put the widget into drag-moving mode.
	*/
	void	initDragMoving(void);


	/*!
	\brief
		Initialise the required states when we are hovering over the sizing area.
	*/
	void	initSizingHoverState(void);


	/*!
	\brief
		Initialise the required states when we are hovering over the main segment area.
	*/
	void	initSegmentHoverState(void);


	/*!
	\brief
		Return whether the required minimum movement threshold before initiating drag-moving
		has been exceeded.

	\param local_mouse
		Mouse position as a pixel offset from the top-left corner of this window.

	\return
		true if the threshold has been exceeded and drag-moving should be initiated, or false
		if the threshold has not been exceeded.
	*/		
	bool	isDragMoveThresholdExceeded(const Point& local_mouse);


	/*!
	\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=="ListHeaderSegment")	return true;
		return Window::testClassName_impl(class_name);
	}


	/*************************************************************************
		New Event Handlers
	*************************************************************************/
	/*!
	\brief
		Handler called when segment is clicked.
	*/
	virtual void	onSegmentClicked(WindowEventArgs& e);


	/*!
	\brief
		Handler called when the sizer/splitter is double-clicked.
	*/
	virtual void	onSplitterDoubleClicked(WindowEventArgs& e);


	/*!
	\brief
		Handler called when sizing setting changes.
	*/
	virtual void	onSizingSettingChanged(WindowEventArgs& e);


	/*!
	\brief
		Handler called when the sort direction value changes.
	*/
	virtual void	onSortDirectionChanged(WindowEventArgs& e);


	/*!
	\brief
		Handler called when the drag-movable setting is changed.
	*/
	virtual void	onMovableSettingChanged(WindowEventArgs& e);


	/*!
	\brief
		Handler called when the user starts dragging the segment.
	*/
	virtual void	onSegmentDragStart(WindowEventArgs& e);


	/*!
	\brief
		Handler called when the user stops dragging the segment (releases mouse button)
	*/
	virtual void	onSegmentDragStop(WindowEventArgs& e);


	/*!
	\brief
		Handler called when the drag position changes.
	*/
	virtual void	onSegmentDragPositionChanged(WindowEventArgs& e);


	/*!
	\brief
		Handler called when the segment is sized.
	*/
	virtual void	onSegmentSized(WindowEventArgs& e);


	/*!
	\brief
		Handler called when the clickable setting for the segment changes
	*/
	virtual void	onClickableSettingChanged(WindowEventArgs& e);


	/*************************************************************************
		Overridden Event Handlers
	*************************************************************************/
	virtual void	onMouseMove(MouseEventArgs& e);
	virtual void	onMouseButtonDown(MouseEventArgs& e);
	virtual void	onMouseButtonUp(MouseEventArgs& e);
	virtual void	onMouseDoubleClicked(MouseEventArgs& e);
	virtual void	onMouseLeaves(MouseEventArgs& e);
	virtual void	onCaptureLost(WindowEventArgs& e);


	/*************************************************************************
		Implementation Data
	*************************************************************************/
	const Image*	d_sizingMouseCursor;	//!< Image to use for mouse when sizing (typically set by derived class).
	const Image*	d_movingMouseCursor;	//!< Image to use for mouse when moving (typically set by derived class).

	float	d_splitterSize;		//!< pixel width of the sizing area.
	bool	d_splitterHover;	//!< True if the mouse is over the splitter

	bool	d_dragSizing;		//!< true when we are being sized.
	Point	d_dragPoint;		//!< point we are being dragged at when sizing or moving.

	SortDirection	d_sortDir;	//!< Direction for sorting (used for deciding what icon to display).

	bool	d_segmentHover;		//!< true when the mouse is within the segment area (and not in sizing area).
	bool	d_segmentPushed;	//!< true when the left mouse button has been pressed within the confines of the segment.
	bool	d_sizingEnabled;	//!< true when sizing is enabled for this segment.
	bool	d_movingEnabled;	//!< True when drag-moving is enabled for this segment;
	bool	d_dragMoving;		//!< true when segment is being drag moved.
	Point	d_dragPosition;		//!< position of dragged segment.
	bool	d_allowClicks;		//!< true if the segment can be clicked.

private:
	/*************************************************************************
		Static Properties for this class
	*************************************************************************/
	static ListHeaderSegmentProperties::Clickable		d_clickableProperty;
	static ListHeaderSegmentProperties::Dragable		d_dragableProperty;
	static ListHeaderSegmentProperties::Sizable			d_sizableProperty;
	static ListHeaderSegmentProperties::SortDirection	d_sortDirectionProperty;
    static ListHeaderSegmentProperties::SizingCursorImage   d_sizingCursorProperty;
    static ListHeaderSegmentProperties::MovingCursorImage   d_movingCursorProperty;


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

} // End of  CEGUI namespace section

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

#endif	// end of guard _CEGUIListHeaderSegment_h_

⌨️ 快捷键说明

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