<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css">
<title>
Gambas Documentation - GB_BASE
</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../help+en"><img class="flag" alt="Home" border="0" src="../../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../name+en">Up</a>&nbsp;
<a href="gb_auto_creatable+en">Previous</a>&nbsp;
<a href="gb_boolean+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
GB_BASE
</h1>
<div class="black"><font size="-2"><b>Syntax</b></font></div>
<pre class="syntax">typedef
&nbsp;&nbsp;struct {
&nbsp;&nbsp;&nbsp;&nbsp;GB_CLASS klass;
&nbsp;&nbsp;&nbsp;&nbsp;long ref;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;<b>GB_BASE</b>;</pre><p>

<p>
This structure represents the base of every <a href="../../def/gambas+en">Gambas</a> object.
It must be placed in the beginning of all object structure defined
in a component.
<p>
<ul>
<li>The <u>klass</u> field is the class of the object.
<li>The <u>ref</u> field is its reference counter.
<p>
</ul>

Do not touch them ! They are managed by the interpreter.
<p>
<div class="gray"><font size="-2"><b>Example</b></font></div>
<pre class="example">/* Here is the definition of a Control in the QT component */

typedef
  struct CWIDGET {
    GB_BASE ob;
    QWidget *widget;
    unsigned long flag;
    GB_VARIANT_VALUE tag;
    char *tooltip;
    void *cursor;
    CWIDGET *next;
    CWIDGET *prev;
    int level;
    }
  CWIDGET;</pre>

</div>
</body>
</html>

