Sash XB for Linux
Home |  Documentation  ... Contact

Using the SashXB Glade extension

The SashXB Glade extension allows the loading of user interfaces at runtime from special XML files (.glade) created using the glade user interface builder.

The main task of the extension is to load Glade files and to return the GTK widgets described there. Naturally, this extension requires the installation of the GTK extension. When using the Glade extension, the Console location is appropriate; the locations (window application and panel application) use Mozilla to render an HTML-based interface.

1. Sash.Glade

Constructor
GladeFile(string filename)
Creates a Glade object.

var coolUI = new Sash.Glade.GladeFile("cool.glade");

Methods
void signalDisconnect(sashIGtkObject signalObject, string signalName)
Detaches the signal specified by signalName from the object signalObject
void MessageDialog(string messageText)
Pops up a dialog box with one OK button that displays messageText
boolean YesNoDialog(string messageText)
Pops up a dialog with an Yes and a No button and displays the message specified by messageText; Returns true if Yes was clicked, false otherwise
string FileDialog(string defaultFileName)
Pops up a dialog that lets the user enter a filename or browse through directories to find one. The default filename is specified by  defaultFileName ; Returns the selected file name as a string

Please note that the Dialog methods provided by the Glade extension are deprecated. Sash.Core.UI provides similar functionality.

2. Sash.Glade.GladeFile

Method
sashIGtkWidget getWidget(string widgetName)
Returns a GtkWidget object with name widgetName specified in the .glade file and automatically connects all specified signal handlers


Wing Yung, Stefan Atev
Last modified: Thu Mar 21 15:32:34 EST 2002

  
© Copyright 2002, All Rights Reserved. Contact