arrow.cc
来自「gfc编程示例 gfc sample of Linux GFC」· CC 代码 · 共 52 行
CC
52 行
#include "arrow.hh"#include <gfc/gtk/box.hh>// ArrowButtonArrowButton::ArrowButton(Gtk::ArrowType arrow_type, Gtk::ShadowType shadow_type){ // Create an Arrow widget with the specified parameters and pack it into the button. Gtk::Arrow *arrow = new Gtk::Arrow(arrow_type, shadow_type); add(*arrow);}ArrowButton::~ArrowButton(){}// ArrowWindowArrowWindow::ArrowWindow(){ set_title("Arrow Buttons"); set_border_width(10); // Create a box to hold the arrows/buttons Gtk::HBox *hbox = new Gtk::HBox; hbox->set_border_width(2); add(*hbox); // Pack and show all the widgets. ArrowButton *button = new ArrowButton(Gtk::ARROW_UP, Gtk::SHADOW_IN); hbox->pack_start(*button, false, false, 3); button = new ArrowButton(Gtk::ARROW_DOWN, Gtk::SHADOW_OUT); hbox->pack_start(*button, false, false, 3); button = new ArrowButton(Gtk::ARROW_LEFT, Gtk::SHADOW_ETCHED_IN); hbox->pack_start(*button, false, false, 3); button = new ArrowButton(Gtk::ARROW_RIGHT, Gtk::SHADOW_ETCHED_OUT); hbox->pack_start(*button, false, false, 3); show_all();}ArrowWindow::~ArrowWindow(){}// Convenience macro for a simple main functionGFC_MAIN(ArrowWindow)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?