Sophie

Sophie

distrib > Fedora > 15 > x86_64 > by-pkgid > 0d2c760c00774fa1d350bb3c66520f68 > files > 290

GtkAda-doc-2.14.1-4.fc15.noarch.rpm

<?xml version='1.0' encoding='utf-8' />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head>
 <title>GtkAda: Gtk.Font_Selection</title>
 <link rel='stylesheet' href='gtkada_rm.css' type='text/css'>
 <script src='gtkada_rm.js' type='text/javascript'></script>
</head><body>
<div id='objectName'>
 <span><a href='index.html'><img src='home.png' alt='Toc' title='Table of Contents'/></a> <a href='gallery.html'><img src='gallery.png' alt='Gallery' title='Widgets gallery'/></a>
 <a href='entities.html'><img src='entities.png' alt='Index' title='Global Index'/></a>
 <a href='tree.html'><img src='tree.png' alt='Tree' title='Widgets Inheritance Tree'/></a>
  </span>
Gtk.Font_Selection
</div> <!--  objectName -->

<div id='leftSide'>
  <div id='screenshot'>
    <h2>Screenshot</h2>
    <img src='gtk-fontsel.png' alt='No screeshot'/>
  </div>

  <div id='classHierarchy'>
   <h2>Hierarchy</h2>
<ul class='top'>
  <li><img src='childtree.png' alt='_' /><a class='tree' onclick='treetoggle(this)'><img src='treeopen.png' alt='[-]' /></a><a href='glib-object.html'>GObject_Record</a></li><ul>
  <li><img src='childtree2.png' alt='  '/><img src='childtree.png' alt='_' /><a class='tree' onclick='treetoggle(this)'><img src='treeopen.png' alt='[-]' /></a><a href='gtk-object.html'>Gtk_Object_Record</a></li><ul>
  <li><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree.png' alt='_' /><a class='tree' onclick='treetoggle(this)'><img src='treeopen.png' alt='[-]' /></a><a href='gtk-widget.html'>Gtk_Widget_Record</a></li><ul>
  <li><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree.png' alt='_' /><a class='tree' onclick='treetoggle(this)'><img src='treeopen.png' alt='[-]' /></a><a href='gtk-container.html'>Gtk_Container_Record</a></li><ul>
  <li><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree3.png' alt='_' /><a class='tree' onclick='treetoggle(this)'><img src='treeopen.png' alt='[-]' /></a><a href='gtk-box.html'>Gtk_Box_Record</a></li><ul>
  <li><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree4.png' alt='  '/><img src='childtree.png' alt='_' />Gtk_Font_Selection_Record</li></ul>
  <li><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree.png' alt='_' /><a class='tree' onclick='treetoggle(this)'><img src='treeopen.png' alt='[-]' /></a><a href='gtk-bin.html'>Gtk_Bin_Record</a></li><ul>
  <li><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree.png' alt='_' /><a class='tree' onclick='treetoggle(this)'><img src='treeopen.png' alt='[-]' /></a><a href='gtk-window.html'>Gtk_Window_Record</a></li><ul>
  <li><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree.png' alt='_' /><a class='tree' onclick='treetoggle(this)'><img src='treeopen.png' alt='[-]' /></a><a href='gtk-dialog.html'>Gtk_Dialog_Record</a></li><ul>
  <li><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree2.png' alt='  '/><img src='childtree.png' alt='_' />Gtk_Font_Selection_Dialog_Record</li></ul>
</ul>
</ul>
</ul>
</ul>
</ul>
</ul>
</ul>
  </div> <!--  classHierarchy -->

  <div id='navigation'>
   <h2>Navigation</h2>
   <ul>
     <li><a href='#Description' onclick='return switchPage("page1")'>Description</a></li>
     <li><a href='#Types' onclick='return switchPage("page1")'>Types</a></li>
     <li><a href='#Subprograms' onclick='return switchPage("page1")'>Subprograms</a>
       <ul>
        <li><a href='#Subprograms__General' onclick='return switchPage("page1")'>General</a></li>
        <li><a href='#Subprograms__Font_Selection_functions' onclick='return switchPage("page1")'>Font_Selection functions</a></li>
        <li><a href='#Subprograms__Font_Selection_Dialog_functions' onclick='return switchPage("page1")'>Font_Selection_Dialog functions</a></li>
       </ul>
   </li>
     <li><a href='#Signals' onclick='return switchPage("page2")'>Signals</a></li>
     <li><a href='#Properties' onclick='return switchPage("page3")'>Properties</a></li>
     <li><a href='#Testgtk' onclick='return switchPage("page5")'>Testgtk</a></li>
   </ul>
  </div> <!--  navigation -->

</div>  <!--  leftSide -->

<div id='documentation'>
  <ul id='notebook'>
   <li id='tab_page1' class='current'><a href='' onclick='return !switchPage("page1")'>Entities</a></li>
   <li id='tab_page2'><a href='#Signals' onclick='return !switchPage("page2")'>Signals</a></li>
   <li id='tab_page3'><a href='#Properties' onclick='return !switchPage("page3")'>Properties</a></li>
  <li id='tab_page5'><a href='#Testgtk' onclick='return !switchPage("page5")'>Testgtk</a></li>
  </ul>  <!-- notebook --> 

  <div id='notebook_page1' class='notebookPage'>
  <a name='Description'></a>
  <div class='description'>
   <h2>Description</h2>
This widget provides a nice way for the user of your application to
select fonts.
It first searches on your system for the list of fonts available, and
displays a set of boxes to select them based on their name, their
weight, their size, etc.
This widget is provided in two forms, one widget that can be embedded
in any container, a <a href='gtk-font_selection.html'>Gtk_Font_Selection</a>, whereas the other one comes
directly in its own separate window (to be popped up as a dialog).
<p>
Some filters can be applied to the widget, when you want the user to
select only a font only among a specific subset (like bitmap or
true-type fonts for instance).
There are two kinds of filters: a base filter, set in your application
and that the user can not change; a user filter that can be modified
interactively by the user.
<p>
  </div> <!-- description -->

  <a name='Types'></a>
  <div id='types'>
   <h2>Types</h2>
   <ul>
     <li><a name='Gtk_Font_Selection_'></a>
         <div class='profile'><b>type</b> Gtk_Font_Selection <b>is</b> <b>access</b> <b>all</b> Gtk_Font_Selection_Record'Class;</div>
         <div class='comment'></div></li>
     <li><a name='Gtk_Font_Selection_Dialog_'></a>
         <div class='profile'><b>type</b> Gtk_Font_Selection_Dialog <b>is</b> <b>access</b> <b>all</b>
     Gtk_Font_Selection_Dialog_Record'Class;</div>
         <div class='comment'></div></li>
     <li><a name='Gtk_Font_Selection_Dialog_Record_'></a>
         <div class='profile'><b>type</b> Gtk_Font_Selection_Dialog_Record <b>is</b> <b>new</b>
     <a href='gtk-dialog.html'>Gtk.Dialog.Gtk_Dialog_Record</a> <b>with</b> <b>private</b>;</div>
         <div class='comment'></div></li>
     <li><a name='Gtk_Font_Selection_Record_'></a>
         <div class='profile'><b>type</b> Gtk_Font_Selection_Record <b>is</b> <b>new</b>
     <a href='gtk-box.html'>Gtk.Box.Gtk_Box_Record</a> <b>with</b> <b>private</b>;</div>
         <div class='comment'></div></li>
   </ul>
  </div> <!-- types -->

  <a name='Subprograms'> </a>
  <a name='Subprograms__General'> </a>
  <div id='subprograms'>
   <h2>Subprograms</h2>
   <ul>
  <a name='Subprograms__Font_Selection_functions'></a>
  <h3>Font_Selection functions</h3>
  <div class='description'></div>

     <li><a name='Gtk_New_1_'></a>
<div class='profile'><b>procedure</b> <span class='name'>Gtk_New</span> (Widget : <b>out</b> Gtk_Font_Selection);</div>
<a name='Initialize_2_'></a>
<div class='profile'><b>procedure</b> <span class='name'>Initialize</span> (Widget : <b>access</b> Gtk_Font_Selection_Record'Class);</div>
<div class='comment'>Creates or initialises a new font selection widget.
It can be added to any existing container.
</div></li>
     <li><a name='Get_Type_3_'></a>
<div class='profile'><b>function</b> <span class='name'>Get_Type</span> <b>return</b> <a href='gtk.html'>Gtk.Gtk_Type</a>;</div>
<div class='comment'>Return the internal value associated with a <a href='gtk-font_selection.html'>Gtk_Font_Selection</a>.
</div></li>
     <li><a name='Set_Font_Name_4_'></a>
<div class='profile'><b>function</b> <span class='name'>Set_Font_Name</span>
  (Fontsel  : <b>access</b> Gtk_Font_Selection_Record;
   Fontname : String) <b>return</b> Boolean;</div>
<a name='Get_Font_Name_5_'></a>
<div class='profile'><b>function</b> <span class='name'>Get_Font_Name</span>
  (Fontsel : <b>access</b> Gtk_Font_Selection_Record) <b>return</b> String;</div>
<div class='comment'>Set the name and attributes of the selected font in <tt>Fontsel</tt>.
<tt>Fontname</tt> should have the format described in <a href='pango-font.html'>Pango.Font</a>.
Fontself must have been displayed on the screen already
</div></li>
     <li><a name='Set_Preview_Text_6_'></a>
<div class='profile'><b>procedure</b> <span class='name'>Set_Preview_Text</span>
  (Fontsel : <b>access</b> Gtk_Font_Selection_Record; Text : UTF8_String);</div>
<a name='Get_Preview_Text_7_'></a>
<div class='profile'><b>function</b> <span class='name'>Get_Preview_Text</span>
  (Fontsel : <b>access</b> Gtk_Font_Selection_Record) <b>return</b> UTF8_String;</div>
<div class='comment'>Set or Get the string used to preview the selected font in the dialog.
</div></li>
  <a name='Subprograms__Font_Selection_Dialog_functions'></a>
  <h3>Font_Selection_Dialog functions</h3>
  <div class='description'></div>

     <li><a name='Gtk_New_8_'></a>
<div class='profile'><b>procedure</b> <span class='name'>Gtk_New</span>
  (Widget : <b>out</b> Gtk_Font_Selection_Dialog; Title : UTF8_String);</div>
<a name='Initialize_9_'></a>
<div class='profile'><b>procedure</b> <span class='name'>Initialize</span>
  (Widget : <b>access</b> Gtk_Font_Selection_Dialog_Record'Class;
   Title  : UTF8_String);</div>
<div class='comment'>Creates or initialises a new dialog to select a font.
The font selection widget has its own window, whose title is chosen
by <tt>Title</tt>.
</div></li>
     <li><a name='Dialog_Get_Type_10_'></a>
<div class='profile'><b>function</b> <span class='name'>Dialog_Get_Type</span> <b>return</b> <a href='gtk.html'>Gtk.Gtk_Type</a>;</div>
<div class='comment'>Return the internal value associated with a <a href='gtk-font_selection.html'>Gtk_Font_Selection_Dialog</a>.
</div></li>
     <li><a name='Set_Font_Name_11_'></a>
<div class='profile'><b>function</b> <span class='name'>Set_Font_Name</span>
  (Fsd      : <b>access</b> Gtk_Font_Selection_Dialog_Record;
   Fontname : String) <b>return</b> Boolean;</div>
<a name='Get_Font_Name_12_'></a>
<div class='profile'><b>function</b> <span class='name'>Get_Font_Name</span>
  (Fsd : <b>access</b> Gtk_Font_Selection_Dialog_Record) <b>return</b> String;</div>
<div class='comment'>Return the name of the font selected by the user.
It returns an empty string if not font is selected.
The string has the same format as excepted in the <a href='gdk-font.html'>Gdk.Font</a> package.
This is also the standard format on X11 systems.
</div></li>
     <li><a name='Set_Preview_Text_13_'></a>
<div class='profile'><b>procedure</b> <span class='name'>Set_Preview_Text</span>
  (Fsd : <b>access</b> Gtk_Font_Selection_Dialog_Record; Text : UTF8_String);</div>
<a name='Get_Preview_Text_14_'></a>
<div class='profile'><b>function</b> <span class='name'>Get_Preview_Text</span>
  (Fsd : <b>access</b> Gtk_Font_Selection_Dialog_Record) <b>return</b> UTF8_String;</div>
<div class='comment'>Return the string used to preview the selected font in the dialog.
</div></li>
     <li><a name='Get_Cancel_Button_15_'></a>
<div class='profile'><b>function</b> <span class='name'>Get_Cancel_Button</span>
  (Fsd : <b>access</b> Gtk_Font_Selection_Dialog_Record)
   <b>return</b> <a href='gtk-button.html'>Gtk.Button.Gtk_Button</a>;</div>
<div class='comment'>Return the Id of the cancel button of the dialog.
You can use this to set up a callback on that button.
The callback should close the dialog, and ignore any value that has been
set in it.
</div></li>
     <li><a name='Get_OK_Button_16_'></a>
<div class='profile'><b>function</b> <span class='name'>Get_OK_Button</span>
  (Fsd : <b>access</b> Gtk_Font_Selection_Dialog_Record)
   <b>return</b> <a href='gtk-button.html'>Gtk.Button.Gtk_Button</a>;</div>
<div class='comment'>Return the Id of the Ok button.
The callback set on this button should close the dialog if the selected
font is valid, and do whatever if should with it.
</div></li>
     <li><a name='Get_Apply_Button_17_'></a>
<div class='profile'><b>function</b> <span class='name'>Get_Apply_Button</span>
  (Fsd : <b>access</b> Gtk_Font_Selection_Dialog_Record)
   <b>return</b> <a href='gtk-button.html'>Gtk.Button.Gtk_Button</a>;</div>
<div class='comment'>Return the Id of the Apply button.
The callback on this button should temporarily apply the font, but
should be able to cancel its effect if the Cancel button is selected.
</div></li>
    </ul>
   </div> <!--  subprograms -->

  </div> <!--  notebook_page1 --> 
  <div id='notebook_page2' class='notebookPage'>
    <a name='Signals'></a>
    <div id='signals'>
      <h2>Signals</h2>
   <ul>
   </ul>
    </div> <!-- signals -->
  </div> <!--  notebook_page2 -->

  <div id='notebook_page3' class='notebookPage'>
    <a name='Properties'></a>
    <div class='properties'>
      <h2>Properties</h2>
      <ul>
        <li><div class='name'>Font_Name_Property</div>
            <div class='profile'>String</div>
            <div class='comment'>The X string that represents this font
</div></li>
        <li><div class='name'>Font_Property</div>
            <div class='profile'>Boxed</div>
            <div class='comment'>The GdkFont that is currently selected
</div></li>
        <li><div class='name'>Preview_Text_Property</div>
            <div class='profile'>String</div>
            <div class='comment'>The text to display in order to demonstrate the selected font
</div></li>
      </ul>
    </div> <!-- properties -->
  </div> <!-- notebook_page3 -->

  <div id='notebook_page5' class='notebookPage'>
   <a name='Testgtk'></a>
   <div id='testgtk'><h2>Testgtk source code</h2><div class='description'>This code is part of testgtk, a demo application packaged with GtkAda. Testgtk demonstrates the various widgets of GtkAda</div><i>-----------------------------------------------------------------------</i>
<i>--          GtkAda - Ada95 binding for the Gimp Toolkit              --</i>
<i>--                                                                   --</i>
<i>--                     Copyright (C) 1998-1999                       --</i>
<i>--        Emmanuel Briot, Joel Brobecker and Arnaud Charlet          --</i>
<i>--                                                                   --</i>
<i>-- This library is free software; you can redistribute it and/or     --</i>
<i>-- modify it under the terms of the GNU General Public               --</i>
<i>-- License as published by the Free Software Foundation; either      --</i>
<i>-- version 2 of the License, or (at your option) any later version.  --</i>
<i>--                                                                   --</i>
<i>-- This library is distributed in the hope that it will be useful,   --</i>
<i>-- but WITHOUT ANY WARRANTY; without even the implied warranty of    --</i>
<i>-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --</i>
<i>-- General Public License for more details.                          --</i>
<i>--                                                                   --</i>
<i>-- You should have received a copy of the GNU General Public         --</i>
<i>-- License along with this library; if not, write to the             --</i>
<i>-- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --</i>
<i>-- Boston, MA 02111-1307, USA.                                       --</i>
<i>--                                                                   --</i>
<i>--                                                                          --</i>
<i>--                                                                          --</i>
<i>--                                                                          --</i>
<i>--                                                                          --</i>
<i>--                                                                          --</i>
<i>--                                                                          --</i>
<i>--                                                                          --</i>
<i>-----------------------------------------------------------------------</i>

<b>with</b> Gtk.Font_Selection;   <b>use</b> Gtk.Font_Selection;
<b>with</b> Gtk;                  <b>use</b> Gtk;

<b>package</b> <b>body</b> Create_Font_Selection <b>is</b>

<i>   ----------</i>
<i>   -- Help --</i>
<i>   ----------</i>

   <b>function</b> Help <b>return</b> String <b>is</b>
   <b>begin</b>
      <b>return</b> "A very specific widget to <b>select</b> a <b>new</b> font based on its"
        & " characteristics, like the family, weight, size, ...";
   <b>end</b> Help;

<i>   ---------</i>
<i>   -- Run --</i>
<i>   ---------</i>

   <b>procedure</b> Run (Frame : <b>access</b> Gtk.Frame.Gtk_Frame_Record'Class) <b>is</b>
      Font       : Gtk_Font_Selection;
   <b>begin</b>
      Set_Label (Frame, "Font Selection");

      Gtk_New (Font);
      Add (Frame, Font);
      Show_All (Frame);
   <b>end</b> Run;

<b>end</b> Create_Font_Selection;

</div> <!-- testgtk -->
  </div> <!-- notebook_page4 -->

</div> <!-- documentation -->

<div id='rightSide'>
 <div id='Index'>
  <h2>Alphabetical Index</h2>
  <ul>
   <li><a href='#Dialog_Get_Type_10_' onclick='return switchPage("page1")'>Dialog_Get_Type</a></li>
   <li><a href='#Get_Apply_Button_17_' onclick='return switchPage("page1")'>Get_Apply_Button</a></li>
   <li><a href='#Get_Cancel_Button_15_' onclick='return switchPage("page1")'>Get_Cancel_Button</a></li>
   <li><a href='#Get_Font_Name_12_' onclick='return switchPage("page1")'>Get_Font_Name</a></li>
   <li><a href='#Get_Font_Name_5_' onclick='return switchPage("page1")'>Get_Font_Name</a></li>
   <li><a href='#Get_OK_Button_16_' onclick='return switchPage("page1")'>Get_OK_Button</a></li>
   <li><a href='#Get_Preview_Text_14_' onclick='return switchPage("page1")'>Get_Preview_Text</a></li>
   <li><a href='#Get_Preview_Text_7_' onclick='return switchPage("page1")'>Get_Preview_Text</a></li>
   <li><a href='#Get_Type_3_' onclick='return switchPage("page1")'>Get_Type</a></li>
   <li><a href='#Gtk_New_1_' onclick='return switchPage("page1")'>Gtk_New</a></li>
   <li><a href='#Gtk_New_8_' onclick='return switchPage("page1")'>Gtk_New</a></li>
   <li><a href='#Initialize_2_' onclick='return switchPage("page1")'>Initialize</a></li>
   <li><a href='#Initialize_9_' onclick='return switchPage("page1")'>Initialize</a></li>
   <li><a href='#Set_Font_Name_11_' onclick='return switchPage("page1")'>Set_Font_Name</a></li>
   <li><a href='#Set_Font_Name_4_' onclick='return switchPage("page1")'>Set_Font_Name</a></li>
   <li><a href='#Set_Preview_Text_13_' onclick='return switchPage("page1")'>Set_Preview_Text</a></li>
   <li><a href='#Set_Preview_Text_6_' onclick='return switchPage("page1")'>Set_Preview_Text</a></li>
  </ul>
 </div> <!-- Index -->
</div> <!-- rightSide -->

   <script language='javascript'>switchPage('page1');
adjust_height()</script>
 </body>
</html>