1
<page xmlns="http://projectmallard.org/1.0/"
2
type="topic" style="task"
3
id="anjuta-glade-start">
5
<info xmlns:facet="http://projectmallard.org/facet/1.0/">
6
<facet:tag key="all-pages" value="whatever"/> <!--Include page in index-->
7
<link type="guide" xref="index#anjuta-glade" group="first"/>
8
<revision pkgversion="3.0" version="0.1" date="2011-03-27" status="incomplete"/>
10
<name>Johannes Schmid</name>
11
<email>jhs@gnome.org</email>
15
<title>Getting started with the user interface editor</title>
18
<title>Start the user-interface editor</title>
21
<title>Create a new user-interface file</title>
25
<title>Open an existing user-interface file</title>
31
<title>Add widgets</title>
34
<title>Organize widgets in containers</title>
38
<title>Common widgets and what they are used for</title>
44
<title>Add widget properties</title>
48
<title>Generating code for widgets</title>
51
<title>Introduction</title>
52
<p>In a GUI program, sometimes, some widgets are only important for
53
generating events (eg: static buttons) while other ones are needed to
54
get or show data to the user (eg: a text entry). In this later case,
55
some code has to be generated so that these widgets can be accessed at
56
runtime. With the glade plug-in, <app>Anjuta</app> is able to automatically
62
<title>Automatic generation</title>
63
<p>To automatically generate code for a widget, some conditions must be
64
met: the glade plug-in must be running and the source file that will
65
hold the code must be opened. To make sure that the glade plug-in is
66
running, it is enough to open the <file>.ui</file> file that holds the UI for the
67
current project. By default, the file that will hold the code for the
68
widgets is the same one where callbacks will be created (eg:
69
<file>application.c</file>). Both files can easily be found in the project file list
70
and are automatically created by the project template.
73
<p>Once the glade plug-in is running and the file that will hold the code
74
is being viewed, simply double click a widget in the glade inspector.
75
The file being viewed will then be scanned for some marker comments
76
(/* ANJUTA: Widgets declaration for application.ui - DO NOT REMOVE */ and
77
/* ANJUTA: Widgets initialization for application.ui - DO NOT REMOVE */) and, if
78
found, code will be added right after such comments. So, for this feature to work
79
correctly, it is important not to modify such marker comments.