vworld/vcell.c File Reference

Vcell App level helper functions. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#include "liqbase.h"
#include "vcell.h"

Functions

vcell * vcell_new ()
vcell * vcell_hold (vcell *self)
void vcell_release (vcell *self)
void vcell_free (vcell *self)
void vcell_setpos (vcell *self, int x, int y)
void vcell_setsize (vcell *self, int w, int h)
void vcell_setsize_from_inner (vcell *self, int w, int h)
void vcell_setinnersize (vcell *self, int w, int h)
void vcell_setinnersize_from_outer (vcell *self)
void vcell_adjustpos (vcell *self, int dx, int dy)
void vcell_adjustsize (vcell *self, int dw, int dh)
void vcell_adjustinnersize (vcell *self, int dw, int dh)
void vcell_setdirtyhold (vcell *self, int dirtyhold)
int vcell_getdirtyhold (vcell *self)
void vcell_setdirty (vcell *self, int dirty)
int vcell_getdirty (vcell *self)
void vcell_setrect (vcell *self, int x, int y, int w, int h)
void vcell_setname (vcell *self, char *name)
void vcell_setcaption (vcell *self, char *caption)
void vcell_setclassname (vcell *self, char *classname)
void vcell_setcontext (vcell *self, char *context)
void vcell_setdata (vcell *self, void *data)
void vcell_setsketch (vcell *self, liqsketch *sketch)
void vcell_setimage (vcell *self, liqimage *image)
void vcell_setfont (vcell *self, liqfont *font)
void vcell_setcontent (vcell *self, vcell *content)
void vcell_setselected (vcell *self, int arg)
int vcell_getselected (vcell *self)
void vcell_setkinetic (vcell *self, int kx, int ky)
void vcell_setshown (vcell *self, int arg)
int vcell_getshown (vcell *self)
vcell * vcell_getlinkparent (vcell *self)
vcell * vcell_getlinkprev (vcell *self)
vcell * vcell_getlinknext (vcell *self)
vcell * vcell_getlinkchild (vcell *self)
void * vcell_getdata (vcell *self)
int vcell_getvisible (vcell *self)
char * vcell_getname (vcell *self)
int vcell_getqualifiedname (vcell *self, char *buff, int buffmax)
char * vcell_getclassname (vcell *self)
char * vcell_getcaption (vcell *self)
liqsketch * vcell_getsketch (vcell *self)
liqimage * vcell_getimage (vcell *self)
liqfont * vcell_getfont (vcell *self)
vcell * vcell_getcontent (vcell *self)
int vcell_getx (vcell *self)
int vcell_gety (vcell *self)
int vcell_getw (vcell *self)
int vcell_geth (vcell *self)
int vcell_getinnerw (vcell *self)
int vcell_getinnerh (vcell *self)
vcell * vcell_lastchild (vcell *self)
void vcell_zorder_totop (vcell *self)
vcell * vcell_child_insert (vcell *self, vcell *child)
vcell * vcell_child_append (vcell *self, vcell *c)
void vcell_child_remove (vcell *self, vcell *child)
vcell * vcell_child_insertsorted (vcell *self, vcell *ch)
vcell * vcell_child_lookup (vcell *self, char *name)
vcell * vcell_child_lookup_nameclass (vcell *self, char *name, char *classname)
vcell * vcell_local_lookup (vcell *self, char *name)
vcell * vcell_local_lookup_nameclass (vcell *self, char *name, char *classname)
vcell * vcell_global_lookup (vcell *self, char *name)
vcell * vcell_global_lookup_nameclass (vcell *self, char *name, char *classname)
vcell * vcell_quickcreatewidget (char *name, char *classname, int innerw, int innerh)
vcell * vcell_quickcreatevis (char *name, char *classname, int x, int y, int w, int h)
vcell * vcell_quickcreatenameclass (char *name, char *classname)
vcell * vcell_quickcreatedata (char *name, char *classname, void *data)
vcell * vcell_quickcreatefull (char *name, char *classname, char *context, void *data)
int vcell_iskind (vcell *self, int cellkind)
void vcell_print (vcell *self, char *title, int recdep)
void vcell_print2 (vcell *self)
int strcmpx (const char *s1, const char *s2)
void * vcell_handlerfind (vcell *self, char *handlername)
vcell * vcell_handleradd (vcell *self, char *handlername, void *handler)
int vcell_handlerrun (vcell *self, char *handlername, void *args)
vcell * vcell_getbasewidget (vcell *self)
void vcell_test ()


Detailed Description

Vcell App level helper functions.

Author:
Gary Birkett
Copyright (C) 2008 Gary Birkett

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Function Documentation

vcell* vcell_child_append ( vcell *  self,
vcell *  c 
)

Create a chain in an already linked list of vcells. If a list doesn't exist for the parent (self) then start a new list. Set the child's parent to the parent of the list, and the child's previous to the previous child.

Parameters:
self The parent vcell
c The child vcell
Returns:
vcell* Child vcell

vcell* vcell_child_insert ( vcell *  self,
vcell *  child 
)

Link a child vcell to a parent vcell by setting the child's linked parent to the parent (self), the child's previous to NULL, and the child's next link to parents's linked child. Then set the parent's linked child to chiled provided. This starts a chain in a linked list of vcells.

Parameters:
self The parent vcell
child The child vcell
Returns:
vcell* Child vcell

vcell* vcell_getlinkchild ( vcell *  self  ) 

Return the linked child of the parent provided.

Parameters:
self The parent vcell
Returns:
vcell* The linked child

char* vcell_getname ( vcell *  self  ) 

Return the name of the provided vcell.

Parameters:
self The vcell
Returns:
string The name of the vcell

vcell* vcell_handleradd ( vcell *  self,
char *  handlername,
void *  handler 
)

Add a handler by creating a child vcell for the provided parent. The nameclass must be called "handler" to be identified as a handler vcell.

Parameters:
self The vcell to add a handler to
handlername The name of the handler
handler Function pointer to actual handler
Returns:
vcell Newly created child vcell

int vcell_handlerrun ( vcell *  self,
char *  handlername,
void *  args 
)

Run/Execute the handler of the provided vcell. This only executes the handler provided by "handlername".

Parameters:
self The vcell with the handler
handlername The name of the handler to run
Returns:
int 1 for Successful handler run, which means each handler must return 1 for success

vcell* vcell_quickcreatedata ( char *  name,
char *  classname,
void *  data 
)

Create a vcell and set the name, classname, and the data.

Parameters:
name The name of the vcell
classname The class that the vcell belongs to
data The data to be held by the vcell
Returns:
vcell* The created vcell

vcell* vcell_quickcreatefull ( char *  name,
char *  classname,
char *  context,
void *  data 
)

Fully create a vcell that sets the name, classname, data, and context.

Parameters:
name The name of the vcell
classname The class that the vcell belongs to
context Describes the context of the vcell
data The data to be held by the vcell
Returns:
vcell* The created vcell

vcell* vcell_quickcreatenameclass ( char *  name,
char *  classname 
)

Create a vcell and set the name and classname only.

Parameters:
name The name of the vcell
classname The class that the vcell belongs to.
Returns:
vcell* The created vcell

vcell* vcell_quickcreatevis ( char *  name,
char *  classname,
int  x,
int  y,
int  w,
int  h 
)

Create a vcell and set the name and classname. Also define the starting position (x,y) and set the width and height. Set it to visible right away

Parameters:
name The name of the vcell
classname The class that the vcell belongs to.
x Starting X-Coordinate
y Starting Y-Coordinate
w Width of the vcell
h Height of the vcell
Returns:
vcell* The created vcell

void vcell_setcontent ( vcell *  self,
vcell *  content 
)

Set the content of one vcell to the content of the other vcell.

Parameters:
self The destination vcell
Returns:
vcell* The source vcell

void vcell_setimage ( vcell *  self,
liqimage *  image 
)

Set the provided vcell's bakground image.

Parameters:
self The vcell
image The liqimage to set


Generated on Mon Apr 13 15:09:28 2009 for libliqbase by  doxygen 1.5.1