libcdos-fw
CFNotification类 参考

CFNotification 控件会以矩形区域来组织其所容纳的控件。 更多...

#include <CFNotification.h>

+ 类 CFNotification 继承关系图:

Public 成员函数

 CFNotification (const Glib::ustring &icon_name, const Glib::ustring &title, const Glib::ustring &content)
 构造函数 更多...
 
Glib::DateTime getCreateDateTime ()
 获取 CFNotification 的创建时间 更多...
 
CFImagegetIcon ()
 获取 CFNotification 的图标 更多...
 
Glib::ustring getTitle ()
 获取 CFNotification 的标题 更多...
 
CFNotificationUrgency getUrgency ()
 获取 CFNotification 的紧急程度 更多...
 
void setIcon (const Glib::ustring &label, CFBuiltinIconSize icon_size)
 设置 CFNotification 的图标 更多...
 
void setReason (CFNotificationDestroyedReason reason)
 设置 CFNotification 的销毁的原因 更多...
 
void setShowTime (bool show_time)
 设置 CFNotification 的显示时间标签 更多...
 
void setTime (const Glib::ustring &time)
 设置 CFNotification 的时间标签 更多...
 
void setTimeout (CFUInt ms_time)
 设置 CFNotification 的param_cn 更多...
 
void setTitle (const Glib::ustring &title)
 设置 CFNotification 的标题 更多...
 
void setUrgency (CFNotificationUrgency urgency)
 设置 CFNotification 的紧急程度 更多...
 
sigc::signal< void, CFNotificationDestroyedReasonsignalReason ()
 槽函数类型:
void on_my_reason(CFNotificationDestroyedReason reason); 更多...
 
virtual ~CFNotification ()
 析构函数. 更多...
 
- Public 成员函数 继承自 CFButton
 CFButton (const Glib::ustring &label, bool mnemonic=false)
 
Glib::ustring getLabel ()
 
CFReliefStyle getRelief ()
 
void setLabel (const Glib::ustring &label)
 
void setRelief (CFReliefStyle newstyle)
 
sigc::signal< void > signalActivate ()
 
sigc::signal< void > signalClicked ()
 
sigc::signal< void > signalEnter ()
 
sigc::signal< void > signalLeave ()
 
sigc::signal< void > signalPressed ()
 
sigc::signal< void > signalReleased ()
 
- Public 成员函数 继承自 CFContainer
virtual void add (CFWidget &widget)
 
virtual void addCssStyleData (const Glib::ustring &data, CFUInt priority)
 
virtual void addCssStylePath (const Glib::ustring &path, CFUInt priority)
 
void forall (ForeachSlot slot)
 
void foreach (ForeachSlot slot)
 
bool isContainer ()
 判断控件是否为容器。 更多...
 
virtual void remove (CFWidget &widget)
 
- Public 成员函数 继承自 CFWidget
void addEvents (Gdk::EventMask events)
 将 events 位字段添加到控件的事件监听掩码中。 更多...
 
int getAllocatedHeight ()
 返回当前给控件分配的高度。 更多...
 
int getAllocatedWidth ()
 返回当前给控件分配的宽度。 更多...
 
bool getCanFocus ()
 获取控件是否可以拥有输入焦点。 更多...
 
CFAlign getHalign ()
 获取横向对齐方式。 更多...
 
bool getHasTooltip ()
 获取是否使用提示信息。 更多...
 
int getMarginBottom ()
 获取控件的下边距 更多...
 
int getMarginLeft ()
 获取控件的左边距 更多...
 
int getMarginRight ()
 获取控件的右边距 更多...
 
int getMarginTop ()
 获取控件的上边距 更多...
 
bool getSensitive ()
 获取控件可用状态 更多...
 
Glib::ustring getTooltipMarkup ()
 获取当前控件提示信息的内容。 更多...
 
Glib::ustring getTooltipText ()
 获取当前控件提示信息的内容。 更多...
 
CFAlign getValign ()
 获取纵向对齐方式。 更多...
 
bool getVisible ()
 判断本控件是否为可见状态。 更多...
 
void grabFocus ()
 控件获取键盘输入焦点。 更多...
 
bool hasFocus ()
 判断控件是否拥有全局输入焦点。 更多...
 
void hide ()
 隐藏控件 更多...
 
bool isFocus ()
 判断控件是否当前拥有焦点的控件。 更多...
 
bool isSensitive ()
 获取控件及其所在容器控件的可用状态 更多...
 
bool isVisible ()
 判断本控件以及控件所在容器(直到顶层容器)是否为可见状态。 更多...
 
void queueDraw ()
 请求重新描画控件 更多...
 
void queueDrawArea (int x, int y, int width, int height)
 请求重新描画的指定区域 更多...
 
void reparent (CFWidget &new_parent)
 将控件从当前的容器中移动到 newParent 指定的容器中。 更多...
 
void setCanFocus (bool can_focus=true)
 指定控件是否可以获取输入焦点。 更多...
 
void setEvents (Gdk::EventMask events)
 设置控件的事件监听掩码。 更多...
 
void setHalign (CFAlign align)
 设置控件横向对齐方式。 更多...
 
void setHasTooltip (bool has_tooltip=true)
 设置是否使用提示信息。 更多...
 
void setMarginBottom (int margin)
 设置控件的下边距 更多...
 
void setMarginLeft (int margin)
 设置控件的左边距 更多...
 
void setMarginRight (int margin)
 设置控件的右边距 更多...
 
void setMarginTop (int margin)
 设置控件的上边距 更多...
 
void setName (const Glib::ustring &name)
 设置控件的名称,以便于使用CSS文件来控制样式。 更多...
 
void setSensitive (bool sensitive=true)
 设置控件是否可用。 更多...
 
void setSizeRequest (int width=-1, int height=-1)
 设置控件的最小尺寸。 更多...
 
void setTooltipMarkup (const Glib::ustring &markup)
 设置提示信息的内容。 更多...
 
void setTooltipText (const Glib::ustring &text)
 设置提示信息的内容。 更多...
 
void setValign (CFAlign align)
 设置控件纵向对齐方式。 更多...
 
void setVisible (bool visible=true)
 设置控件的可见状态。 更多...
 
void show ()
 显示控件。 更多...
 
void showAll ()
 显示控件以及控件所容纳的所有控件(包括所容纳容器控件的所有子控件) 更多...
 
virtual ~CFWidget ()
 析构函数 更多...
 
virtual void addCssStyleName (const Glib::ustring &name)
 
virtual void addCssStyleFromPath (const Glib::ustring &css_file_path, const Glib::ustring &name, CFUInt priority)
 通过自定义css样式文件路径设置样式 更多...
 
virtual void listCssStyle ()
 查看样式列表 更多...
 
virtual std::vector< Glib::ustring > getCssStyleVector ()
 获取控件样式列表 更多...
 
virtual void removeCssStyle (const Glib::ustring &name)
 通过样式名移除样式 更多...
 
Glib::RefPtr< Gdk::Window > getWindow ()
 
sigc::signal< bool, const ::Cairo::RefPtr< ::Cairo::Context > &> signalDraw ()
 
sigc::signal< bool, GdkEvent *> signalEvent ()
 
sigc::signal< bool, GdkEventButton *> signalButtonPressEvent ()
 
sigc::signal< bool, GdkEventButton *> signalButtonReleaseEvent ()
 
sigc::signal< bool, GdkEventAny *> signalDeleteEvent ()
 
sigc::signal< bool, GdkEventKey *> signalKeyPressEvent ()
 
sigc::signal< bool, GdkEventKey *> signalKeyReleaseEvent ()
 
sigc::signal< void > signalShow ()
 
- Public 成员函数 继承自 CFObject
void * getObj ()
 获取支持库类实例所绑定的对象实例。 更多...
 
virtual ~CFObject ()
 析构函数。 更多...
 

Protected 成员函数

virtual void onClicked ()
 
virtual void onShow ()
 
virtual bool onTimeout ()
 
- Protected 成员函数 继承自 CFButton
virtual void onActivate ()
 
virtual void onEnter ()
 
virtual void onLeave ()
 
virtual void onPressed ()
 
virtual void onRealObjectFinalize ()
 对象解除绑定前的回调函数。 更多...
 
virtual void onRealObjectInit ()
 对象绑定后进行初始化的回调函数。 更多...
 
virtual void onReleased ()
 
- Protected 成员函数 继承自 CFBin
 CFBin ()
 构造函数. 更多...
 
- Protected 成员函数 继承自 CFContainer
void onApplyCssData (CFWidget *widget)
 
void onApplyCssPath (CFWidget *widget)
 
- Protected 成员函数 继承自 CFWidget
virtual bool onDraw (const ::Cairo::RefPtr< ::Cairo::Context > &cr)
 
virtual bool onEvent (GdkEvent *event)
 
virtual bool onButtonPressEvent (GdkEventButton *event)
 
virtual bool onButtonReleaseEvent (GdkEventButton *event)
 
virtual bool onDeleteEvent (GdkEventAny *event)
 
virtual bool onKeyPressEvent (GdkEventKey *event)
 
virtual bool onKeyReleaseEvent (GdkEventKey *event)
 
 CFWidget ()
 
- Protected 成员函数 继承自 CFObject
 CFObject ()
 构造函数 更多...
 
void setRealObject (void *obj)
 将自身实例与需要使用的对象实例进行绑定。 更多...
 

额外继承的成员函数

- Public 类型 继承自 CFContainer
typedef sigc::slot< void, CFWidget * > ForeachSlot
 
- 静态 Public 成员函数 继承自 CFObject
static CFObjectgetCFObject (void *realObj)
 通过对象实例获取所对应的 CFObject的子类对象实例。 更多...
 

详细描述

CFNotification 控件会以矩形区域来组织其所容纳的控件。

控件包括图标,时间标签,标题标签,内容标签。通知控件的高度会自适应内容,但并不是无限扩展。 参考ubuntu的设定,通知标题最多3行,通知内容最多10行。

构造及析构函数说明

§ CFNotification()

CFNotification::CFNotification ( const Glib::ustring &  icon_name,
const Glib::ustring &  title,
const Glib::ustring &  content 
)

构造函数

创建一个 CFNotification 类型的实例

参数
[in]icon_name图标名称
[in]title通知标题
[in]content通知内容

§ ~CFNotification()

virtual CFNotification::~CFNotification ( )
virtual

析构函数.

CFNotification 被销毁时会被自动调用。 在析构函数中进行内存释放等操作。

成员函数说明

§ getCreateDateTime()

Glib::DateTime CFNotification::getCreateDateTime ( )

获取 CFNotification 的创建时间

返回类型是 Glib::DateTime 类型。

返回
返回 CFNotification 的创建时间

§ getIcon()

CFImage& CFNotification::getIcon ( )

获取 CFNotification 的图标

返回
返回 CFNotification 的图标

§ getTitle()

Glib::ustring CFNotification::getTitle ( )

获取 CFNotification 的标题

返回
返回 CFNotification 的标题

§ getUrgency()

CFNotificationUrgency CFNotification::getUrgency ( )

获取 CFNotification 的紧急程度

返回
返回 CFNotification 的紧急程度

§ setIcon()

void CFNotification::setIcon ( const Glib::ustring &  label,
CFBuiltinIconSize  icon_size 
)

设置 CFNotification 的图标

设置通过名称设置图标,图标尺寸是 CFBuiltinIconSize 类型

参数
[in]lable图标名称
[in]icon_size图标尺寸

§ setReason()

void CFNotification::setReason ( CFNotificationDestroyedReason  reason)

设置 CFNotification 的销毁的原因

参数
[in]reason销毁的原因

§ setShowTime()

void CFNotification::setShowTime ( bool  show_time)

设置 CFNotification 的显示时间标签

参数
[in]show_time是否显示时间标签

§ setTime()

void CFNotification::setTime ( const Glib::ustring &  time)

设置 CFNotification 的时间标签

参数
[in]time设置时间标签

§ setTimeout()

void CFNotification::setTimeout ( CFUInt  ms_time)

设置 CFNotification 的param_cn

参数
[in]ms_time设置过期时间

§ setTitle()

void CFNotification::setTitle ( const Glib::ustring &  title)

设置 CFNotification 的标题

参数
[in]title通知标题

§ setUrgency()

void CFNotification::setUrgency ( CFNotificationUrgency  urgency)

设置 CFNotification 的紧急程度

参数
[in]urgency紧急程度

§ signalReason()

sigc::signal<void, CFNotificationDestroyedReason> CFNotification::signalReason ( )

槽函数类型:
void on_my_reason(CFNotificationDestroyedReason reason);

接收通知销毁的原因


该类的文档由以下文件生成: