Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  GTK2::EX::FORMFACTORY::DIALOGBUTTONS (3)

.ds Aq ’


Gtk2::Ex::FormFactory::DialogButtons - Standard Ok, Apply, Cancel Buttons



  Gtk2::Ex::FormFactory::DialogButtons->new (
    clicked_hook_before => CODEREF,
    clicked_hook_after  => CODEREF,
    Gtk2::Ex::FormFactory::Container attributes
    Gtk2::Ex::FormFactory::Widget attributes


This class implements a typical Ok, Apply, Cancel buttonbox in a Gtk2::Ex::FormFactory framework.

If you associate an application object attribute the value needs to be a hash which may contain the keys ’ok’, ’apply’ and ’cancel’ to control the activity of the correspondent buttons. Wheter inactive buttons should be render insensitive or invisible is controlled by the Gtk2::Ex::FormFactory::Widget attribute <B>inactiveB>.

By default the following methods of the associated Gtk2::Ex::FormFactory instance are triggered:

  Ok        Gtk2::Ex::FormFactory->ok
  Cancel    Gtk2::Ex::FormFactory->cancel
  Apply     Gtk2::Ex::FormFactory->apply


No Cancel and Apply buttons are generated if the associated Gtk2::Ex::FormFactory has the <B>syncB> attribute set. A synchronized FormFactory applies all changes immediately to the underlying objects, so there is no easy way of implementing the Apply and Cancel buttons.

You can implement these by your own e.g. by registering a copy of your object to Gtk2::Ex::FormFactory::Context and hook into the button clicks using the <B>clicked_hook_beforeB> attribute described beyond.


  +--- Gtk2::Ex::FormFactory::DialogButtons


Attributes are handled through the common get_ATTR(), set_ATTR() style accessors, but they are mostly passed once to the object constructor and must not be altered after the associated FormFactory was built.
<B>clicked_hook_beforeB> = CODEREF(‘‘ok’’|‘‘apply’’|‘‘cancel’’) Use this callback to hook into the clicked signal handler of the buttons. Argument is the name of the button actually clicked (ok, apply or cancel). If the callback returns TRUE, Gtk2::Ex::FormFactory’s default handler for the button is called afterwards. Return FALSE to prevent calling the default handler.
<B>clicked_hook_afterB> = CODEREF(‘‘ok’’|‘‘apply’’|‘‘cancel’’) This callback is called <B>afterB> the default handler. This is useful if you want to exit your program cleanly if your main dialog was closed. First Gtk2::Ex::FormFactory closes the dialog window for you, doing all necessary cleanup stuff. Afterward you simply call Gtk2->main_quit to exit the program.

The callback’s return value doesn’t matter.

For more attributes refer to Gtk2::Ex::FormFactory::Widget.


 Joern Reder <joern at zyn dot de>


Copyright 2004-2006 by Joern Reder.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.


Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 213: Non-ASCII character seen before =encoding in ’Joern’. Assuming ISO8859-1
Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 GTK2::EX::FORMFACTORY::DIALOGBUTTONS (3) 2006-02-27

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.