src/liqcell.c File Reference

liqcell 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 "liqcell.h"
#include "liqcell_prop.h"

Functions

char * liqcell_local_lookup_getname (liqcell *self, char *name)
char * liqcell_local_lookup_getcaption (liqcell *self, char *name)
liqcell * liqcell_new ()
liqcell * liqcell_hold (liqcell *self)
void liqcell_release (liqcell *self)
void liqcell_free (liqcell *self)
void liqcell_setpos (liqcell *self, int x, int y)
void liqcell_setsize (liqcell *self, int w, int h)
void liqcell_setsize_from_inner (liqcell *self)
void liqcell_setinnersize (liqcell *self, int w, int h)
void liqcell_setinnersize_from_outer (liqcell *self)
void liqcell_setrect (liqcell *self, int x, int y, int w, int h)
int liqcell_movetowardsrect (liqcell *self, int x, int y, int w, int h, float fraction)
void liqcell_setrect_autoscale (liqcell *self, int x, int y, int w, int h, float sx, float sy)
void liqcell_adjustpos (liqcell *self, int dx, int dy)
void liqcell_adjustsize (liqcell *self, int dw, int dh)
void liqcell_adjustinnersize (liqcell *self, int dw, int dh)
void liqcell_setdirtyhold (liqcell *self, int dirtyhold)
int liqcell_getdirtyhold (liqcell *self)
void liqcell_setdirty (liqcell *self, int dirty)
int liqcell_getdirty (liqcell *self)
void liqcell_setname (liqcell *self, char *name)
void liqcell_setcaption (liqcell *self, char *caption)
void liqcell_setclassname (liqcell *self, char *classname)
void liqcell_setcontext (liqcell *self, char *context)
void liqcell_setdata (liqcell *self, void *data)
void liqcell_setsketch (liqcell *self, liqsketch *sketch)
void liqcell_sketch_autoload (liqcell *self)
void liqcell_setimage (liqcell *self, liqimage *image)
void liqcell_setfont (liqcell *self, liqfont *font)
void liqcell_setcontent (liqcell *self, liqcell *content)
void liqcell_setselected (liqcell *self, int arg)
int liqcell_getselected (liqcell *self)
void liqcell_settag (liqcell *self, void *tag)
void * liqcell_gettag (liqcell *self)
void liqcell_setenabled (liqcell *self, int arg)
int liqcell_getenabled (liqcell *self)
void liqcell_setkinetic (liqcell *self, int kx, int ky)
void liqcell_setshown (liqcell *self, int arg)
int liqcell_getshown (liqcell *self)
liqcell * liqcell_getlinkparent (liqcell *self)
liqcell * liqcell_getlinkprev (liqcell *self)
liqcell * liqcell_getlinknext (liqcell *self)
liqcell * liqcell_getlinkchild (liqcell *self)
void * liqcell_getdata (liqcell *self)
int liqcell_getflagwidget (liqcell *self)
int liqcell_getflagvisual (liqcell *self)
int liqcell_getvisible (liqcell *self)
void liqcell_setvisible (liqcell *self, int arg)
char * liqcell_getname (liqcell *self)
int liqcell_getqualifiedname (liqcell *self, char *buff, int buffmax)
char * liqcell_getclassname (liqcell *self)
char * liqcell_getcaption (liqcell *self)
liqsketch * liqcell_getsketch (liqcell *self)
liqimage * liqcell_getimage (liqcell *self)
liqfont * liqcell_getfont (liqcell *self)
liqcell * liqcell_getcontent (liqcell *self)
int liqcell_getx (liqcell *self)
int liqcell_gety (liqcell *self)
int liqcell_getw (liqcell *self)
int liqcell_geth (liqcell *self)
int liqcell_getinnerw (liqcell *self)
int liqcell_getinnerh (liqcell *self)
liqcell * liqcell_lastchild (liqcell *self)
void liqcell_zorder_totop (liqcell *self)
liqcell * liqcell_child_insert (liqcell *self, liqcell *child)
int liqcell_child_countvisible (liqcell *self)
liqcell * liqcell_child_append (liqcell *self, liqcell *c)
int liqcell_child_remove (liqcell *self, liqcell *child)
liqcell * liqcell_child_insertsorted (liqcell *self, liqcell *ch)
liqcell * liqcell_child_insertsortedbyname (liqcell *self, liqcell *ch, int sortpositive)
liqcell * liqcell_child_lookup (liqcell *self, char *name)
liqcell * liqcell_child_lookup_nameclass (liqcell *self, char *name, char *classname)
liqcell * liqcell_local_lookup (liqcell *self, char *name)
liqcell * liqcell_local_lookup_nameclass (liqcell *self, char *name, char *classname)
liqcell * liqcell_global_lookup (liqcell *self, char *name)
liqcell * liqcell_global_lookup_nameclass (liqcell *self, char *name, char *classname)
liqcell * liqcell_quickcreatewidget (char *name, char *classname, int innerw, int innerh)
liqcell * liqcell_quickcreatevis (char *name, char *classname, int x, int y, int w, int h)
liqcell * liqcell_quickcreatenameclass (char *name, char *classname)
liqcell * liqcell_quickcreatedata (char *name, char *classname, void *data)
liqcell * liqcell_quickcreatefull (char *name, char *classname, char *context, void *data)
int liqcell_iskind (liqcell *self, int cellkind)
void liqcell_print (liqcell *self, char *title, int recdep)
void liqcell_print2 (liqcell *self)
int strcmpx (const char *s1, const char *s2)
void * liqcell_handlerfind (liqcell *self, char *handlername)
liqcell * liqcell_handleradd (liqcell *self, char *handlername, void *handler)
liqcell * liqcell_handleradd_withcontext (liqcell *self, char *handlername, void *handler, void *context)
int liqcell_handlerrun (liqcell *self, char *handlername, void *args)
liqcell * liqcell_getbasewidget (liqcell *self)
int liqcell_isclass (liqcell *self, char *classname)
void liqcell_test ()


Detailed Description

liqcell 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

liqcell* liqcell_child_append ( liqcell *  self,
liqcell *  c 
)

Create a chain in an already linked list of liqcells. 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 liqcell
c The child liqcell
Returns:
liqcell* Child liqcell

liqcell* liqcell_child_insert ( liqcell *  self,
liqcell *  child 
)

Link a child liqcell to a parent liqcell 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 liqcells.

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

liqcell* liqcell_getlinkchild ( liqcell *  self  ) 

Return the linked child of the parent provided.

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

char* liqcell_getname ( liqcell *  self  ) 

Return the name of the provided liqcell.

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

liqcell* liqcell_handleradd ( liqcell *  self,
char *  handlername,
void *  handler 
)

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

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

liqcell* liqcell_handleradd_withcontext ( liqcell *  self,
char *  handlername,
void *  handler,
void *  context 
)

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

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

int liqcell_handlerrun ( liqcell *  self,
char *  handlername,
void *  args 
)

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

Parameters:
self The liqcell 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

liqcell* liqcell_quickcreatedata ( char *  name,
char *  classname,
void *  data 
)

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

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

liqcell* liqcell_quickcreatefull ( char *  name,
char *  classname,
char *  context,
void *  data 
)

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

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

liqcell* liqcell_quickcreatenameclass ( char *  name,
char *  classname 
)

Create a liqcell and set the name and classname only.

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

liqcell* liqcell_quickcreatevis ( char *  name,
char *  classname,
int  x,
int  y,
int  w,
int  h 
)

Create a liqcell 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 liqcell
classname The class that the liqcell belongs to.
x Starting X-Coordinate
y Starting Y-Coordinate
w Width of the liqcell
h Height of the liqcell
Returns:
liqcell* The created liqcell

void liqcell_setcontent ( liqcell *  self,
liqcell *  content 
)

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

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

void liqcell_setimage ( liqcell *  self,
liqimage *  image 
)

Set the provided liqcell's bakground image.

Parameters:
self The liqcell
image The liqimage to set

void liqcell_setrect_autoscale ( liqcell *  self,
int  x,
int  y,
int  w,
int  h,
float  sx,
float  sy 
)

set the rect, but use default original scaling to do it


Generated on Sat May 23 23:03:15 2009 for libliqbase by  doxygen 1.5.1