This repository has been archived on 2024-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
hedera/docs/reference/hedera/first-tutorial.xml

59 lines
2.2 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="first-tutorial">
<refmeta>
<refentrytitle>First form</refentrytitle>
<manvolnum>0</manvolnum>
<refmiscinfo>Hedera Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>First form</refname>
<refpurpose>
In this first tutorial you will learn how to create a simple
form
</refpurpose>
</refnamediv>
<refsection id="defining-form">
<title>Defining a form</title>
<para>
<!-- FIXME: add description of the XML DEFINITION of a form in the module file -->
</para>
</refsection>
<refsection id="form-files">
<title>Files needed to create a form</title>
<para>
The most basic form is made up of a class that inherits from Vn.Form
and a Gtk.Builder file, which defines the UI of the form. This UI
file is expected to use the ".galde" extension and named after the
form that will use it. This .glade file must
contain a toplevel Gtk.Box with the name "main", that will be
recognized by the library as the content of the Gtk.Notebook used by
the runtime and will be autamtically inserted in a page of that
notebook while opening the form, integrating as a part of the
application.
</para>
<para>
The .glade file for a form may also contain a Vn.Batch named
"models" which the library will recognize as a group of models used
by the form, and will set the application connection to these
automatically.
</para>
<para>
Additionally, the form can add menus to the main application
by adding a Gtk.ActionGroup named "actions" in the .glade file, and
using another file named also after the form, with the extension
".ui". This file will be used to define the strcuture of the menus
and will link the options to the actions defined in the previously
mentioned "actions" Gtk.ActionGroup.
</para>
<para>
There is also the possibility to define SQL files, to set and edit
the SQL queries apart from the other parts of the module.
</para>
<!-- FIXME: add sections to explain how these things are done -->
</refsection>
</refentry>