class FL_EXPORT Fl_Button : public Fl_Widget
++ class FL_EXPORT Fl_Return_Button : public Fl_Button

++ class FL_EXPORT Fl_Repeat_Button : public Fl_Button
++ class FL_EXPORT Fl_Light_Button : public Fl_Button
==== class FL_EXPORT Fl_Check_Button : public Fl_Light_Button
==== class FL_EXPORT Fl_Round_Button : public Fl_Light_Button
++ class Fl_Radio_Button : public Fl_Button
++ class Fl_Toggle_Button : public Fl_Button

** 方法 Method **
>> void Fl_Button::down_box(Fl_Boxtype bt),Fl_Boxtype Fl_Button::down_box() const
設定/取得 button 被按下的 box 型狀, 預設值會採用 box() 的 down 樣式。
>> void Fl_Button::down_color(unsigned c),Fl_Color Fl_Button::down_color() const
設定/取得 button 被按下的顏色,預設值為 color()。
>> void Fl_Button::type(uchar t),uchar Fl_Button::type() const
設定/取得 button 的樣式,預設值為 0。
· 0: The value is unchanged.
· FL_TOGGLE_BUTTON: The value is inverted.
· FL_RADIO_BUTTON: The value is set to 1, and all other buttons in the current group with type() == FL_RADIO_BUTTON are set to zero.
>>Fl_When Fl_Widget::when() const,void Fl_Widget::when(Fl_When w)
設定/取得 button 何時會觸發 callback 函數,預設值為 FL_WHEN_RELEASE。
· 0: The callback is not done, instead changed() is turned on.
· FL_WHEN_RELEASE: The callback is done after the user successfully clicks the button, or when a shortcut is typed.
· FL_WHEN_CHANGED : The callback is done each time the value() changes (when the user pushes and releases the button, and as the mouse is dragged around in and out of the button).

** Fl_Return_Button 會畫一個 enter 符號在按鈕上,當按 enter 鍵或滑鼠按一下會觸發 callback 函數。

台南小新 發表在 痞客邦 PIXNET 留言(0) 人氣()