Posted on 2008-05-09 15:32
RichardHe 阅读(173)
评论(0) 编辑 收藏 引用
CEGUI的设计模式:
像其中的单件模式比较容易理解.
但是像如下的设计不知道为什么要这样?
class CEGUIEXPORT DragContainer : public Window
{
public:
/*************************************************************************
Constants
*************************************************************************/
static const String WidgetTypeName; //!< Type name for DragContainer.
static const String EventNamespace; //!< Namespace for global events
static const String EventDragStarted; //!< Name of the event fired when the user begins dragging the thumb.
static const String EventDragEnded; //!< Name of the event fired when the user releases the thumb.
static const String EventDragPositionChanged; //!< Event fired when the drag position has changed.
static const String EventDragEnabledChanged; //!< Event fired when dragging is enabled or disabled.
static const String EventDragAlphaChanged; //!< Event fired when the alpha value used when dragging is changed.
static const String EventDragMouseCursorChanged;//!< Event fired when the mouse cursor used when dragging is changed.
static const String EventDragThresholdChanged; //!< Event fired when the drag pixel threshold is changed.
static const String EventDragDropTargetChanged; //!< Event fired when the drop target changes.
...
...
...
private:
/*************************************************************************
Static properties for the Spinner widget
*************************************************************************/
static DragContainerProperties::DragAlpha d_dragAlphaProperty;
static DragContainerProperties::DragCursorImage d_dragCursorImageProperty;
static DragContainerProperties::DraggingEnabled d_dragEnabledProperty;
static DragContainerProperties::DragThreshold d_dragThresholdProperty;
};
为什么上面的有的设计为public,有的又是private,
为什么又要设计为静态的呢???谁帮我解释下?