Ticket #1: ddoc-glade.diff

File ddoc-glade.diff, 3.5 kB (added by Mike Wey, 1 year ago)

DDoc in APILookupGlade.txt

  • gtkD/wrap/APILookupGlade.txt

    old new  
    104104nocode: glade_xml_get_widget_prefix 
    105105 
    106106code: start 
    107         /** 
     107    /** 
    108108     * This function is used to get a pointer to the GtkWidget corresponding to 
    109109     * name in the interface description. You would use this if you have to do 
    110110     * anything to the widget after loading. 
    111      * self: 
    112      *  the GladeXML object. 
    113      * name: 
    114      *  the name of the widget. 
     111     * Params: 
     112     *  name = the name of the widget. 
    115113     * Returns: 
    116114     *  the widget matching name, or NULL if none exists. 
    117115     */ 
     
    133131     * only want to build say a toolbar or menu from the XML file, but not the 
    134132     * window it is embedded in. Note also that the XML parse tree is cached 
    135133     * to speed up creating another GladeXML object for the same file 
    136      * fname: 
    137      *  the XML file name. 
    138      * root: 
    139      *  the widget node in fname to start building from (or NULL) 
    140      * domain: 
    141      *  the translation domain for the XML file (or NULL for default) 
    142      * Returns: 
    143      *  the newly created GladeXML object, or NULL on failure. 
     134     * Params: 
     135     *  fname = the XML file name. 
     136     *  root = the widget node in fname to start building from (or NULL) 
     137     *  domain = the translation domain for the XML file (or NULL for default) 
    144138     */ 
    145139    public this (char[] fname, char[] root = null, char[] domain=null) 
    146140    { 
     
    151145    } 
    152146     
    153147    /** 
    154          * This function is used to get a list of pointers to the GtkWidget(s) 
    155          * with names that start with the string name in the interface description. 
    156          * You would use this if you have to do something to all of these widgets 
    157          * after loading. 
    158          * self: 
    159          *  the GladeXML object. 
    160          * name: 
    161          *  the name of the widget. 
    162          * Returns: 
    163          *  A list of the widget that match name as the start of their 
    164          * name, or NULL if none exists. 
    165          */ 
    166         public Widget[] getWidgetPrefix(char[] name) 
    167         { 
    168                 // GList* glade_xml_get_widget_prefix (GladeXML *self,  const char *name); 
     148     * This function is used to get a list of pointers to the GtkWidget(s) 
     149     * with names that start with the string name in the interface description. 
     150     * You would use this if you have to do something to all of these widgets 
     151     * after loading. 
     152     * Params: 
     153     *  self = the GladeXML object. 
     154     *  name = the name of the widget. 
     155     * Returns: 
     156     *  A list of the widget that match name as the start of their 
     157     *  name, or NULL if none exists. 
     158     */ 
     159    public Widget[] getWidgetPrefix(char[] name) 
     160    { 
     161        // GList* glade_xml_get_widget_prefix (GladeXML *self,  const char *name); 
    169162        Widget[] ret; 
    170163        ListG widgets = new ListG( glade_xml_get_widget_prefix(gladeXML, Str.toStringz(name)) ); 
    171         for (int i=0;i < widgets.length; i++) { 
     164        for (int i=0;i < widgets.length; i++) 
     165        { 
    172166            ret ~= newFromWidget( cast(void *)widgets.nthData(i) ); 
    173167        } 
    174                 return widgets.length ? ret : null; 
    175        
     168       return widgets.length ? ret : null; 
     169   
    176170 
    177171 
    178     /** 
    179      * Utilitiy method to create objects that are castable. 
    180      *  
    181      */ 
    182172    private import gobject.Type; 
    183173    private import gtk.Container; 
    184174    private import gtk.Bin; 
     
    295285    //private import gtk.Preview; 
    296286    private import gtk.Progress; 
    297287    private import gtk.ProgressBar; 
    298   
     288 
     289    /** 
     290     * Utilitiy method to create objects that are castable. 
     291     *  
     292     */ 
    299293    Widget newFromWidget(void * ptr)  
    300294    { 
    301295        if (ptr is null) { 
     
    430424         
    431425    } 
    432426 
    433       
    434      
    435      
    436      
    437  
    438  
    439427 
    440428code: end 
    441429