Esempio n. 1
0
 function __create_box()
 {
     $vbox = new GtkVBox(false, 5);
     $vbox->set_border_width(5);
     $this->size_group = new GtkSizeGroup(gtk::SIZE_GROUP_HORIZONTAL);
     $frame = new GtkFrame('Color options');
     $vbox->pack_start($frame, true, true, 0);
     $table = new GtkTable(2, 2, false);
     $table->set_border_width(5);
     $table->set_row_spacings(5);
     $table->set_col_spacings(10);
     $frame->add($table);
     $color_options = array('Red', 'Green', 'Blue');
     $this->add_row($table, 0, '_Foreground', $color_options);
     $this->add_row($table, 1, '_Background', $color_options);
     $frame = new GtkFrame('Line options');
     $vbox->pack_start($frame, true, true, 0);
     $table = new GtkTable(2, 2, false);
     $table->set_border_width(5);
     $table->set_row_spacings(5);
     $table->set_col_spacings(10);
     $frame->add($table);
     $dash_options = array('Solid', 'Dashed', 'Dotted');
     $end_options = array('Square', 'Round', 'Arrow');
     $this->add_row($table, 0, '_Dashing', $dash_options);
     $this->add_row($table, 1, '_Line ends', $end_options);
     $check_button = new GtkCheckButton('_Enable grouping');
     $check_button->set_use_underline(true);
     $vbox->pack_start($check_button, false, false, 0);
     $check_button->set_active(true);
     $check_button->connect('toggled', array($this, 'on_toggle_grouping'));
     return $vbox;
 }