Glade_Window.php 924 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. *
  4. */
  5. /**
  6. * Auto-loading Glade window
  7. */
  8. class Glade_Window
  9. {
  10. /**
  11. * The top widget. It does not have to be
  12. * a top-level object if this is loaded
  13. * within another UI
  14. *
  15. * @var unknown_type
  16. */
  17. public $top;
  18. /**
  19. * Load the fixed structure for the actual class invoking the constructor
  20. *
  21. * @param void
  22. * @return void
  23. */
  24. public function __construct($topName = 'top')
  25. {
  26. $uiDescriptionFileName = get_class($this) . '.glade';
  27. try
  28. {
  29. $glade = new GladeXML($uiDescriptionFileName);
  30. $glade->signal_autoconnect_instance($this);
  31. $this->win = $glade->get_widget('winPgma');
  32. }
  33. catch (Exception $e)
  34. {
  35. echo "Glade_Windows/__construct(): " . $e->getMessage();
  36. die();
  37. }
  38. }
  39. /**
  40. * callback wrapper around Gtk::main_quit() for Glade
  41. */
  42. public function quit()
  43. {
  44. Gtk::main_quit();
  45. }
  46. }