]> git.draconx.ca Git - gob-dx.git/blobdiff - doc/gob.1
Release 0.0.3
[gob-dx.git] / doc / gob.1
index 3257c8fb64ef17ab994ff125c177b17a11207734..f7502e343a46ee2f3e29f3934fa892e035124c96 100644 (file)
--- a/doc/gob.1
+++ b/doc/gob.1
@@ -5,7 +5,7 @@
 .\" This manual page is covered by the terms of the GNU General
 .\" Public License.  
 .\"
-.TH GOB 1 "GOB 0.0.2
+.TH GOB 1 "GOB 0.0.3
 .SH NAME
 GOB \- The GTK+ Object Builder
 .SH SYNOPSIS
@@ -15,7 +15,8 @@ GOB \- The GTK+ Object Builder
 .PP
 GTK+ Object Builder is a simple preprocessor for easily creating
 GTK+ objects.  It does not parse any C code and ignores any C errors.  It
-is in spirit similiar to things like lex or yacc.
+is in spirit similar to things like lex or yacc.
+
 .SH TYPENAMES
 .PP
 Because we need to parse out different parts of the typename, 
@@ -51,6 +52,7 @@ For example:
   %}
 
 .fi
+
 .SH MAKING A NEW CLASS
 .PP
 The class header:
@@ -90,7 +92,7 @@ be somehow solved in some future version.
 The third type is an argument type.  It is a named datamember which
 is one of the features of the GTK+ object system.  You need to define a get
 and a set handler.  They are fragments of C code that will be used to 
-get the value orset the value of the argument.  Inside them you can use the
+get the value or set the value of the argument.  Inside them you can use the
 define ARG to which you assign the data or get the data.  You can also use
 the identifier "this" as pointer to the object instance.  The type is
 defined as one of the gtk type enums, but without the GTK_TYPE_ prefix.
@@ -127,8 +129,8 @@ Argument lists:
 .PP
 For all but the init and init_class methods, you use the
 following syntax for arguments.  The first argument can be just "this",
-which gob will translateinto a pointer to the object instance.  The rest
-of the arguments are very similiar to normal C arguments.  If the
+which gob will translate into a pointer to the object instance.  The rest
+of the arguments are very similar to normal C arguments.  If the
 typename is an object pointer you should use the syntax defined above
 with the words separated by ':'
 .nf
@@ -140,7 +142,7 @@ or
 The checks are glib type preconditions, and can be the following:
 "null", which tests pointers for being NULL, "type" which checks GTK+
 object pointers for being the right type, "<test> <number>" which tests
-numberic arguments for being a certain value.  The test can be a <,>,<=,>=
+numeric arguments for being a certain value.  The test can be a <,>,<=,>=
 != or ==.  Example:
 .nf
   
@@ -178,7 +180,7 @@ so that one can override the method in derived methods.  They can be empty
 (if you put ';' instead of the C code).  A wrapper will also be defined
 which makes calling the methods he same as public methods.  This type of
 method is just a little bit "slower" then normal functions, but not as
-slow as signals.  You define them by using "virutal" keywrod before the
+slow as signals.  You define them by using "virtual" keyword before the
 prototype.
 .PP
 Signals:
@@ -197,7 +199,7 @@ of arguments>)".  If the return type is void, the type should be "NONE",
 the same should be for the argument list.  The rest of the prototype is
 the same as for other method types.  The body can also be empty, and
 also there is a public method wrapper which you can use for calling the
-signal jus tlike a public method.  Example:
+signal juslike a public method.  Example:
 .nf
 
   signal first INT(POINTER,INT)
@@ -247,12 +249,31 @@ have to type the class name before each call.  Example:
   {
          return foo(this) + i;
   }
+
+.fi
+.PP
+Making new objects:
+.PP
+You should define a new method which should be a normal public method.  Inside
+this method, you can use the GET_NEW macro that is defined for you and that
+will fetch a new object, so a fairly standard new method would look like:
+.nf
+
+  public GtkWidget *
+  new(void) {
+         GtkObject *ret;
+         ret = GTK_OBJECT (GET_NEW);
+         return ret;
+  }
+
 .fi
+
 .SH BUGS
 .PP
 The generated header file is included as the first file in the .c file, no
-matter what. ths means that you willhave to putthings that need to be included
+matter what. This means that you will have to put things that need to be included
 before that, into an %h{ } section.
+
 .SH AUTHOR
 .PP
 George Lebl <jirka@5z.com>