[gtkada] gtkada resource files

Michael Bode michael.bode at laserline.de
Fri Feb 25 08:22:26 CET 2005


This is a resource file I use for Windows 98:
------------------<cut>----------------------
# Text style
style "text"
{
  font_name = "arial"
  text[NORMAL] = { 0.0, 0.0, 0.0 } # black
  fg[NORMAL]   = { 0.0, 0.0, 0.0 } # black
  base[NORMAL] = { 1.0, 1.0, 1.0 } # white : background color
}

# All widgets will have the "text" style

widget "*" style "text"
------------------<cut>----------------------

And this is the code to use it:

with Gtk.Main, Gtk.Rc;
with Gui_Package;      -- here are my app's windows and widgets

procedure Ldm_Setup is

begin
   Gtk.Main.Init;
   Gtk.Rc.Parse ("ldm_setup.rc");
   Gui_Package.Construct_Window;  -- create main window, callbacks, etc.
   Gtk.Main.Main;
end Ldm_Setup;

There is no special code besides Gtk.Rc.Parse ("ldm_setup.rc") in my 
program.

-- 
Michael Bode
Laserline GmbH
Fraunhoferstr.
56218 Mülheim-Kärlich
Phone:     +49 2630 964-2200
Fax:       +49 2630 964-2209




More information about the gtkada mailing list