~ubuntu-branches/ubuntu/trusty/anjuta/trusty

« back to all changes in this revision

Viewing changes to manuals/anjuta-manual/eu/anjuta-glade-start.page

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-02-20 22:38:35 UTC
  • mfrom: (1.1.43)
  • Revision ID: package-import@ubuntu.com-20120220223835-ny223imz62qkk9ns
Tags: 2:3.3.90-0ubuntu1
* New upstream release.
* debian/rules: Watch for unstable releases

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
<title>Add widget properties</title>
44
44
</section>
45
45
 
 
46
<section>
 
47
<title>Generating code for widgets</title>
 
48
 
 
49
        <section>
 
50
                <title>Sarrera</title>
 
51
                <p>In a GUI program, sometimes, some widgets are only important for
 
52
                generating events (eg: static buttons) while other ones are needed to
 
53
                get or show data to the user (eg: a text entry). In this later case,
 
54
                some code has to be generated so that these widgets can be accessed at
 
55
                runtime. With the glade plug-in, <app>Anjuta</app> is able to automatically
 
56
                generate such code.
 
57
                </p>
 
58
        </section>
 
59
 
 
60
        <section>
 
61
                <title>Automatic generation</title>
 
62
                <p>To automatically generate code for a widget, some conditions must be
 
63
                met: the glade plug-in must be running and the source file that will
 
64
                hold the code must be opened. To make sure that the glade plug-in is
 
65
                running, it is enough to open the <file>.ui</file> file that holds the UI for the
 
66
                current project. By default, the file that will hold the code for the
 
67
                widgets is the same one where callbacks will be created (eg:
 
68
                <file>application.c</file>). Both files can easily be found in the project file list
 
69
                and are automatically created by the project template.
 
70
                </p>
 
71
 
 
72
                <p>Once the glade plug-in is running and the file that will hold the code
 
73
                is opened, simply double click a widget in the glade inspector.
 
74
                The file being viewed will then be scanned for some marker comments
 
75
                (/* ANJUTA: Widgets declaration for application.ui - DO NOT REMOVE */ and
 
76
                /* ANJUTA: Widgets initialization for application.ui - DO NOT REMOVE */) and, if
 
77
                found, code will be added right after such comments. So, for this feature to work
 
78
                correctly, it is important not to modify such marker comments.
 
79
                </p>
 
80
        </section>
 
81
 
 
82
</section>
 
83
 
 
84
 
46
85
</page>