Пример #1
0
/**
 * Create a txtmsgbox ui component, this is the development function
 * @param caption Body Caption
 * @param datadefault Caption of the data
 * @return liqcell* The new textbox
 */
liqcell *uitxtmsgbox_create(const char *caption, const char *datadefault)
{
	
	liqcell *self = liqcell_quickcreatewidget(caption,"txtmsgbox", 800,220);
	
	if(self)
	{

		liqcell_propsets(  self,  "backcolor", "rgb(0,0,0)" );
		
			liqcell *body = liqcell_quickcreatevis("body","frame", 10,10,   200,60);
			liqcell_setfont(   body,  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (24), 0) );
			liqcell_propsets(  body,  "backcolor", "rgb(40,40,40)" );
			liqcell_propsets(  body,  "textcolor", "rgb(255,255,255)" );
			liqcell_setcaption(body,  caption );
		liqcell_child_insert( self, body );
		
		
			liqcell *data = liqcell_quickcreatevis("data","textbox", 220,5,   560,210);
			liqcell_setfont(   data,  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (64), 0) );
			liqcell_propsets(  data,  "backcolor", "rgb(220,255,220)" );
			liqcell_propsets(  data,  "textcolor", "rgb(0,0,0)" );
			liqcell_propseti(  data,  "wordwrap", 1 );
			liqcell_propseti(  data,  "maxlength",  140 );
			liqcell_handleradd_withcontext(data, "captionchange", (void*)uitxtmsgbox_captionchange ,self);

			liqcell_setcaption(data,  datadefault );
		liqcell_child_insert( self, data );

	}
	return self;
}
Пример #2
0
/**
 * Create a numberbox ui component
 * @param caption The caption
 * @param datafefault Data caption
 * @return liqcell* The new numberbox
 */
liqcell *uinumberbox_create(const char *caption, const char *datadefault)
{
	
	liqcell *self = liqcell_quickcreatewidget(caption,"uinumberbox", 800,80);
	
	if(self)
	{

		liqcell_propsets(  self,  "backcolor", "rgb(0,0,0)" );
		
			liqcell *body = liqcell_quickcreatevis("body","frame", 10,10,   200,60);
			liqcell_setfont(   body,  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (24), 0) );
			liqcell_propsets(  body,  "backcolor", "rgb(40,40,40)" );
			liqcell_propsets(  body,  "textcolor", "rgb(255,255,255)" );
			liqcell_setcaption(body,  caption );
		liqcell_child_insert( self, body );
		
		
			liqcell *data = liqcell_quickcreatevis("data","frame", 220,5,   560,70);
			liqcell_setfont(   data,  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (42), 0) );
			liqcell_propsets(  data,  "backcolor", "rgb(220,220,255)" );
			liqcell_propsets(  data,  "textcolor", "rgb(0,0,0)" );
			liqcell_setcaption(data,  datadefault );
		
		
		liqcell_child_insert( self, data );
	}
	return self;
}
Пример #3
0
/**
 * Create a colorbox ui component
 * @param caption The caption
 * @param datafefault Data caption
 * @return liqcell* The new colorbox
 */
liqcell *uicolorbox_create(const char *caption, const char *datadefault)
{
	
	liqcell *self = liqcell_quickcreatewidget(caption,"uicolorbox", 800,150);
	
	if(self)
	{

		liqcell_propsets(  self,  "backcolor", "rgb(0,0,0)" );
		
			liqcell *body = liqcell_quickcreatevis("body","frame", 10,10,   200,130);
			liqcell_setfont(   body,  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (24), 0) );
			liqcell_propsets(  body,  "backcolor", "rgb(40,40,40)" );
			liqcell_propsets(  body,  "textcolor", "rgb(255,255,255)" );
			liqcell_setcaption(body,  caption );
		liqcell_child_insert( self, body );	
		
			liqcell *data = liqcell_quickcreatevis("data","frame", 270,5,   460,140);
			liqcell_propsets(  data,  "backcolor", datadefault );
			
			
		liqcell_handleradd_withcontext(data, "click", (void*)uicolorbox_click, self );


		liqcell_child_insert( self, data );
	}
	return self;
}
Пример #4
0
static liqcell *editoverlay_create(int w,int h)
{
	//

	liqcell *self = liqcell_quickcreatewidget("editoverlay","overlay", w,h);

	if(self)
	{
		liqcell *c;

					//liqcell_propseti(self,"levelofdetail",1);
					c = liqcell_quickcreatevis("sketching",   "picture",   w*0,0,w/4,h    );
					liqcell_propseti(c,"lockaspect",1);
					liqcell_propsets(c,"imagefilename","media/lcuk_sig_headshot.png");
					//liqcell_handleradd(c,    "mouse",   widget_mouse);
					//liqcell_handleradd(c,    "click",   widget_click);
					liqcell_child_append( self, c );


					//liqcell *c;
					c = liqcell_quickcreatevis("barcode",   "picture",   w*0.25,0,w/4,h    );
					liqcell_propseti(c,"lockaspect",1);
					liqcell_propsets(c,"imagefilename","media/barcode.png");
					//liqcell_handleradd(c,    "mouse",   widget_mouse);
					//liqcell_handleradd(c,    "click",   widget_click);
					liqcell_child_append( self, c );


					c = liqcell_quickcreatevis("tagging",   "picture",   w*0.5,0,w/4,h    );
					liqcell_propseti(c,"lockaspect",1);
					liqcell_propsets(c,"imagefilename","media/tagging.png");
					//liqcell_handleradd(c,    "mouse",   widget_mouse);
					//liqcell_handleradd(c,    "click",   widget_click);
					liqcell_child_append( self, c );


					c = liqcell_quickcreatevis("more",   "picture",   w*0.75,0,w/4,h    );
					liqcell_propseti(c,"lockaspect",1);
					liqcell_propsets(c,"imagefilename","media/more.png");
					//liqcell_handleradd(c,    "mouse",   widget_mouse);
					//liqcell_handleradd(c,    "click",   widget_click);
					liqcell_child_append( self, c );


			/*		c = liqcell_quickcreatevis("management",   "picture",   w*0.75,0,w/4,h    );
					liqcell_propseti(c,"lockaspect",1);
					liqcell_propsets(c,"imagefilename","media/manage.png");
					//liqcell_handleradd(c,    "mouse",   widget_mouse);
					//liqcell_handleradd(c,    "click",   widget_click);
					liqcell_child_append( self, c );*/


			//liqcell_child_arrange_autoflow(self);
			//liqcell_child_arrange_easytile(self);

	}
	return self;
}
Пример #5
0
/**	
 * create a new liqtasks_new widget
 */	
liqcell *liqtasks_new_create()
{
	liqcell *self = liqcell_quickcreatewidget("liqtasks_new", "form", 800, 480);
	if(!self) {liqapp_log("liqcell error not create 'liqtasks_new'"); return NULL;  } 
	
	// Optimization:  The aim is to REDUCE the number of drawn layers and operations called.
	// Optimization:  use only what you NEED to get an effect
	// Optimization:  Minimal layers and complexity
	// Optimization:  defaults: background, prefer nothing, will be shown through if there is a wallpaper
	// Optimization:  defaults: text, white, very fast rendering
	//############################# editor:label
	liqcell *editor = liqcell_quickcreatevis("editor", "label", 0, 0, 800, 480);
	liqcell_setfont(	editor, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (12), 0) );
	liqcell_setcaption(editor, "backplane" );
	liqcell_propsets(  editor, "textcolor", "rgb(255,0,0)" );
	liqcell_propsets(  editor, "backcolor", "rgb(64,64,64)" );
	liqcell_propseti(  editor, "textalign", 2 );
	liqcell_propseti(  editor, "textaligny", 2 );
	liqcell_child_append(  self, editor);
	//############################# title:label
	liqcell *title = liqcell_quickcreatevis("title", "label", 0, 0, 800, 52);
	liqcell_setfont(	title, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (29), 0) );
	liqcell_setcaption(title, "New Task" );
	liqcell_propsets(  title, "textcolor", "rgb(255,255,255)" );
	liqcell_propsets(  title, "backcolor", "xrgb(128,128,128)" );
	liqcell_propseti(  title, "textalign", 0 );
	liqcell_propseti(  title, "textaligny", 0 );
	liqcell_child_append(  self, title);
	//############################# cmdsave:label
	liqcell *cmdsave = liqcell_quickcreatevis("cmdsave", "label", 594, 432, 206, 48);
	liqcell_setfont(	cmdsave, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (29), 0) );
	liqcell_setcaption(cmdsave, "Save" );
	liqcell_propsets(  cmdsave, "textcolor", "rgb(255,255,255)" );
	liqcell_propsets(  cmdsave, "backcolor", "xrgb(0,64,0)" );
	liqcell_propsets(  cmdsave, "bordercolor", "rgb(255,255,255)" );
	liqcell_propseti(  cmdsave, "textalign", 2 );
	liqcell_propseti(  cmdsave, "textaligny", 2 );
	liqcell_handleradd_withcontext(cmdsave, "click", (void*)cmdsave_click, self );
	liqcell_child_append(  self, cmdsave);
	//liqcell_propsets(  self, "backcolor", "rgb(0,0,0)" );
	//liqcell_setimage(  self ,  liqimage_cache_getfile( "/usr/share/liqbase/liqtasks/media/liqtasks_new_back.png",0,0,0) );
	liqcell_handleradd_withcontext(self, "filter",		 (void*)liqtasks_new_filter ,self);
	liqcell_handleradd_withcontext(self, "refresh",		(void*)liqtasks_new_refresh ,self);
	liqcell_handleradd_withcontext(self, "shown",		  (void*)liqtasks_new_shown ,self);
	liqcell_handleradd_withcontext(self, "resize",	  (void*)liqtasks_new_resize ,self);
	liqcell_handleradd_withcontext(self, "layout",	  (void*)liqtasks_new_layout ,self);
	//liqcell_handleradd_withcontext(self, "keypress",	(void*)liqtasks_new_keypress,self );
	//liqcell_handleradd_withcontext(self, "keyrelease", (void*)liqtasks_new_keyrelease ,self);
	//liqcell_handleradd_withcontext(self, "mouse",		(void*)liqtasks_new_mouse,self );
	//liqcell_handleradd_withcontext(self, "click",		(void*)liqtasks_new_click ,self);
	//liqcell_handleradd_withcontext(self, "paint",		(void*)liqtasks_new_paint ,self); // use only if required, heavyweight
	liqcell_handleradd_withcontext(self, "dialog_open",  (void*)liqtasks_new_dialog_open ,self);
	liqcell_handleradd_withcontext(self, "dialog_close", (void*)liqtasks_new_dialog_close ,self);
	return self;
}
Пример #6
0
liqcell *liqflow_massive_create()
{
	liqcell *self = liqcell_quickcreatewidget("liqflow_massive","form", 800*5,480*5);

	if(!self) {liqapp_log("liqcell error not create 'liqflow_massive'"); return NULL;  } 
	

	// Optimization:  The aim is to REDUCE the number of drawn layers and operations called.
	// Optimization:  use only what you NEED to get an effect
	// Optimization:  Minimal layers and complexity
	// Optimization:  defaults: background, prefer nothing, will be shown through if there is a wallpaper
	// Optimization:  defaults: text, white, very fast rendering


    //############################# liqflow:label
    liqcell *liqflow_tiny = liqcell_quickcreatevis("liqflow_tiny", "liqflow_tiny", 0,0,800,480);

    liqcell *backer = liqcell_quickcreatevis("backer", NULL, 0,0,self->w,self->h);
    liqcell_setcontent(backer,liqflow_tiny);
    liqcell_child_append(  self, backer);
    
    liqcell_handleradd_withcontext(backer,    "paint", sketchedit_mouse,self);

    
    int x,y;
    
    for(y=0;y<5;y++)
    {
        for(x=0;x<5;x++)
        {
            //############################# piece4:label
            liqcell *piece4 = liqcell_quickcreatevis("liqflowx", "liqflowsmall", x*800,y*480,800,480);
            //liqcell_propsets(  piece4, "imagefilename", "/usr/share/liqbase/liqcontrolpanel/media/liqflowmassive_4.png" );
            //liqcell_propseti( piece4 ,  "lockaspect", 0 );
            liqcell_child_append(  self, piece4);
        }
    }
    
    
   /* 
    
    for(framecount=0;framecount<10;framecount++)
    {
        saveframe(self,framecount);

    }
    
   */
    liqcell_handleradd_withcontext(self,    "paint", widget_paint,self);
    
    
	return self;
}
Пример #7
0
/**
 * Create a infobar ui component
 * @param infotext Caption of the bar
 * @return liqcell* The new infobar
 */
liqcell *uiinfobar_create(const char *key, const char *infotext)
{
	
	liqcell *self = liqcell_quickcreatewidget(key,"uiinfobar", 800,80);
	
	if(self)
	{

		liqcell_propsets(  self,  "backcolor", "rgb(0,0,0)" );
	
			liqcell *body = liqcell_quickcreatevis("body","frame", 10,10,   780,60);
			liqcell_setfont(   body,  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (36), 0) );
			liqcell_propsets(  body,  "backcolor", "rgb(40,40,40)" );
			liqcell_propsets(  body,  "textcolor", "rgb(220,220,255)" );
			liqcell_setcaption(body,  infotext );
			
			
			//liqcell_propseti(  body,  "selstart",  5 );
			//liqcell_propseti(  body,  "sellength", 12 );
			//liqcell_propseti(  body,  "cursorpos", 17 );
			
			//liqcell_handleradd(body,    "mouse",      textbox_mouse);
			//liqcell_handleradd(body,    "keypress",   textbox_keypress);
			//liqcell_handleradd(body,    "keyrelease", textbox_keyrelease);
			
			
		
		
		liqcell_child_insert( self, body );
	}
	return self;
}
Пример #8
0
/**	
 * liqpostcard.cmdmessagedraw clicked
 */	
static int cmdmessagedraw_click(liqcell *self,liqcelleventargs *args, liqcell *liqpostcard)
{
    //
	liqcell *messageback = liqcell_child_lookup(liqpostcard, "messageback");


		liqcell * oneedit = liqcell_quickcreatevis("liqpostcard.draw","liqsketchedit",0,0,-1,-1);
		
		if(oneedit)
		{
            // copy the sketch and background image to the editor
            liqcell_setsketch( oneedit, liqcell_getsketch(messageback) );
            liqcell_setimage( oneedit, liqcell_getimage(messageback) );
            
            liqcell_propsets(  oneedit, "pencolor", "rgb(0,0,50)" );
            
			liqcell_easyrun(oneedit);
            // now, make sure the messageback sketch is updated
            if( (liqcell_getsketch(messageback)==NULL) && (liqcell_getsketch(oneedit)!=NULL) )
                liqcell_setsketch( messageback, liqcell_getsketch(oneedit) );
                
            if( liqcell_getsketch(messageback) )
            {
                    liqsketch_boundwholearea( liqcell_getsketch(messageback) );
            }
            
                
			liqcell_release(oneedit);
		}
    
	return 0;
}
Пример #9
0
/** Create the IP Address Input Bar */
liqcell *ipbar_create()
{
	liqcell *self = liqcell_quickcreatewidget("ipbar","ipbar", 800, 50);
	
	if(self)
	{	
		// decorate the bar
		liqcell *data = liqcell_quickcreatevis("data","frame", 210, 0, 580, 40);
		liqcell_setfont(self,  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (24), 0));
		liqcell_propsets(self, "backcolor", "rgb(100,255,150)");
		liqcell_propsets(self, "textcolor", "rgb(20,30,40)");
		liqcell_propsets(self, "bordercolor", "rgb(255,255,255)");


		// set props
		liqcell_propseti(self, "selstart",  0);
		liqcell_propseti(self, "sellength", 0);
		liqcell_propseti(self, "cursorpos", 0);

		// add handlers
		liqcell_handleradd(self, "mouse", textbox_mouse);
		liqcell_handleradd(self, "keypress", textbox_keypress);
		liqcell_handleradd(self, "keyrelease", textbox_keyrelease);	
	}
	return self;
}
Пример #10
0
/**	
 * create a new invar_run widget
 */	
liqcell *invar_run_create()
{
	liqcell *self = liqcell_quickcreatewidget("invar_run", "form", 800, 480);
	if(!self) {liqapp_log("liqcell error not create 'invar_run'"); return NULL;  } 
	
	// Optimization:  The aim is to REDUCE the number of drawn layers and operations called.
	// Optimization:  use only what you NEED to get an effect
	// Optimization:  Minimal layers and complexity
	// Optimization:  defaults: background, prefer nothing, will be shown through if there is a wallpaper
	// Optimization:  defaults: text, white, very fast rendering
	//############################# body:label
	liqcell *body = liqcell_quickcreatevis("body", "invar_rawview", 0, 0, 800, 480);
	//liqcell_setfont(	body, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (12), 0) );
	//liqcell_setcaption(body, "body" );
	//liqcell_propsets(  body, "textcolor", "rgb(255,255,255)" );
	//liqcell_propsets(  body, "backcolor", "rgb(64,64,64)" );
	//liqcell_propseti(  body, "textalign", 0 );
	//liqcell_propseti(  body, "textaligny", 0 );
	liqcell_child_append(  self, body);
	//liqcell_propsets(  self, "backcolor", "rgb(0,0,0)" );
	//liqcell_setimage(  self ,  liqimage_cache_getfile( "/usr/share/liqbase/invar/media/invar_run_back.png",0,0,0) );
	liqcell_handleradd_withcontext(self, "filter",		 (void*)invar_run_filter ,self);
	liqcell_handleradd_withcontext(self, "refresh",		(void*)invar_run_refresh ,self);
	liqcell_handleradd_withcontext(self, "shown",		  (void*)invar_run_shown ,self);
	//liqcell_handleradd_withcontext(self, "resize",	  (void*)invar_run_resize ,self);
	//liqcell_handleradd_withcontext(self, "keypress",	(void*)invar_run_keypress,self );
	//liqcell_handleradd_withcontext(self, "keyrelease", (void*)invar_run_keyrelease ,self);
	//liqcell_handleradd_withcontext(self, "mouse",		(void*)invar_run_mouse,self );
	//liqcell_handleradd_withcontext(self, "click",		(void*)invar_run_click ,self);
	//liqcell_handleradd_withcontext(self, "paint",		(void*)invar_run_paint ,self); // use only if required, heavyweight
	liqcell_handleradd_withcontext(self, "dialog_open",  (void*)invar_run_dialog_open ,self);
	liqcell_handleradd_withcontext(self, "dialog_close", (void*)invar_run_dialog_close ,self);
	return self;
}
Пример #11
0
/**
 * Create a titlebar ui component
 * @param key Name of the widget
 * @param title Title to display
 * @param description Describe what this titlebar is for
 * @return liqcell* The new titlebar
 */
liqcell *uititlebar_create(const char *key, const char *title, const char *description)
{
	
	liqcell *self = liqcell_quickcreatewidget(key,"section", 800,100);
	
	if(self)
	{
		liqcell_propsets(  self,  "backcolor", "rgb(0,0,0)" );
		
		//texturestrip_blu.jpg
		liqcell_setimage(  self,  liqimage_cache_getfile( "/usr/share/liqbase/libliqbase/media/texturestrip_dark.jpg",0,0,0) );
		liqcell_propseti(self,"lockaspect",0);
		//liqcell_propsets(  self,  "backcolor", "xrgb(0,0,64)" );
	
		
		liqcell_child_append( self, liqcell_quickcreatevis("app_icon",   "icon",    5   ,10  ,    90, 80 )    );
		liqcell_child_append( self, liqcell_quickcreatevis("app_title",  "label",   100 ,0  ,   700, 55 )    );
		liqcell_child_append( self, liqcell_quickcreatevis("app_desc",   "label",   100 ,55 ,   700, 40 )    );

		liqcell_setimage(  liqcell_child_lookup( self,"app_icon"),  liqimage_cache_getfile( "/usr/share/liqbase/libliqbase/media/sun.png",0,0,1) );
		liqcell_setfont(   liqcell_child_lookup( self,"app_title"), liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (40), 0) );
		liqcell_setfont(   liqcell_child_lookup( self,"app_desc"),  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (18), 0) );


		liqcell_propsets(  liqcell_child_lookup( self,"app_title"), "textcolor", "rgb(255,255,255)" );
		liqcell_propsets(  liqcell_child_lookup( self,"app_desc"),  "textcolor", "rgb(0,100,0)" );

		liqcell_setcaption(liqcell_child_lookup( self,"app_title"), title );
		liqcell_setcaption(liqcell_child_lookup( self,"app_desc"), description );

/*
			liqcell *clock = liqcell_quickcreatevis("clock",   "time",   500,0,   200,100 );
			//char buf[80];
			//liqapp_format_strftime(buf,80,"%H:%M:%S");
			//liqcell_setcaption(   clock, buf);
			liqcell_propsets(     clock,"timeformat","%H:%M:%S");
			liqcell_propseti(     clock,"textalign",2);
			liqcell_propseti(     clock,"textaligny",2);
			liqcell_propsets(     clock,"fontname", "/usr/share/fonts/nokia/nosnb.ttf" );
			liqcell_propseti(     clock,"fontsize", 32 );
			liqcell_propsets(     clock, "textcolor", "rgb(255,255,255)" );
		//	liqcell_handleradd(self,    "mouse",   widget_mouse);
			liqcell_child_append( self, clock    );
 */
	}
	return self;
}
Пример #12
0
/**	
 * myclock_cover.cmdclockfacecreate clicked
 */	
static int cmdclockfacecreate_click(liqcell *self,liqcellclickeventargs *args, liqcell *myclock_cover)
{
	//# run the associated dialog
	liqcell *cmdclockfacecreatedialog = liqcell_quickcreatevis("myclock_cover_cmdclockfacecreate_dialog", "myclock_design", 0,0, -1,-1);
	liqcell_easyrun( cmdclockfacecreatedialog );
	liqcell_release( cmdclockfacecreatedialog );
	return 0;
}
Пример #13
0
/**	Construct a simplebar */
liqcell *simplebar_create()
{
	liqcell *self = liqcell_quickcreatewidget("simplebar", "form", 600, 50);
	
	// exit if fail create
	if(!self)
	{
		liqapp_log("liqcell error not create 'simplebar'"); 
		return NULL;
	}
	
	// create label
	liqcell *simple_label = liqcell_quickcreatevis("simple_label", "label", 20, 7, 200, 36);
	liqcell_setfont(simple_label, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (22), 0));
	liqcell_setcaption(simple_label, "Body Caption:");
	liqcell_propsets(simple_label, "textcolor", GREEN);
	liqcell_propseti(simple_label, "textalign", 1);
	liqcell_child_append(self, simple_label);
	
	// create textbox
	liqcell *simple_textbox = liqcell_quickcreatevis("simple_textbox", "textbox", 220, 7, 200, 36);
	liqcell_setfont(simple_textbox, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (22), 0) );
	liqcell_setcaption(simple_textbox, "");
	liqcell_propsets(simple_textbox, "textcolor", WHITE);
	liqcell_propsets(simple_textbox, "backcolor", BLACK);
	liqcell_propsets(simple_textbox, "bordercolor", GREEN);
	liqcell_propseti(simple_textbox, "textalign", 0);
	liqcell_propseti(simple_textbox, "textaligny", 2);
	liqcell_child_append(self, simple_textbox);
	
	// create buttom: Submit
	liqcell *simple_submit = liqcell_quickcreatevis("simple_submit", "commandbutton", 460, 7, 76, 32);
	liqcell_setfont(simple_submit, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (22), 0) );
	liqcell_setcaption(simple_submit, "Submit");
	liqcell_propsets(simple_submit, "textcolor", GREEN);
	liqcell_propsets(simple_submit, "backcolor", BLACK);
	liqcell_handleradd_withcontext(simple_submit, "click", simplebar_submit_click, self);
	liqcell_propseti(simple_submit, "textalign", 1);
	liqcell_child_append(self, simple_submit);
	
	return self;
}
Пример #14
0
/**
 * Create a textbox ui component
 * @return liqcell* The new textbox
 */
liqcell *textbox_create()
{
	
	liqcell *self = liqcell_quickcreatewidget("textbox","form", 600,50);
	
	if(self)
	{
			
		liqcell_setfont(   self,  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (24), 0) );
		//liqcell_propsets(  self,  "backcolor", "rgb(100,255,150)" );
		//liqcell_propsets(  self,  "textcolor", "rgb(20,30,40)" );
		//liqcell_propsets(  self,  "bordercolor", "rgb(255,255,255)" );

        liqcell_propsets(  self,  "textcolor", "rgb(0,0,0)" );
		//liqcell_setimage(  self,  liqimage_cache_getfile("/usr/share/liqbase/onedotzero/media/2_text_back.png", 0,0,1) );
        liqcell_setimage(  self,  liqimage_cache_getfile("/usr/share/liqbase/onedotzero/media/2.message/message_input_field.png", 0,0,1) );
		liqcell_propseti(  self,  "lockaspect",  0 );
		//liqcell_propremoves(  self,  "bordercolor" );
		//liqcell_propremoves(  self,  "backcolor" );
				
		liqcell_propseti(  self,  "maxlength",  140 );

		liqcell_propseti(  self,  "selstart",  0 );
		liqcell_propseti(  self,  "sellength", 0 );
		liqcell_propseti(  self,  "cursorpos", 0 );
			
		liqcell_handleradd(self,    "mouse",      textbox_mouse);
		liqcell_handleradd(self,    "keypress",   textbox_keypress);
		liqcell_handleradd(self,    "keyrelease", textbox_keyrelease);
		
		liqcell_handleradd(self,    "resize",   textbox_resize);
	
			
		// add vkbd
		liqcell *vkbd_command = liqcell_quickcreatevis("vkbd_command" , "commandbutton", 0, 0, 0, 0);
		liqcell_handleradd_withcontext(vkbd_command, "click", keyboard_show_button_click, self);
		liqcell_setfont(vkbd_command, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (12), 0));
		liqcell_setcaption(vkbd_command, "ABC");
		liqcell_propsets(vkbd_command, "backcolor", CYAN);
		liqcell_propsets(vkbd_command, "textcolor", BLACK);
		liqcell_propseti(vkbd_command, "textalign", 2);
		liqcell_propseti(vkbd_command, "textaligny", 2);
		liqcell_propseti(vkbd_command, "lockaspect", 1);
		
		liqcell_setvisible(vkbd_command,0);		// Wed Aug 19 19:08:20 2009 lcuk : proper way would be checking for no keyboard..
		
		liqcell_child_insert(self, vkbd_command);
	}
	return self;
}
Пример #15
0
int main (int argc, char* argv[])
{
	 if(liqapp_init(	argc,argv ,"myclock" ,"0.0.1") != 0)
	 {
		  { return liqapp_errorandfail(-1,"myclock liqapp_init failed"); }
	 }
	 liqcell *self = liqcell_quickcreatevis("myclock_cover1", "myclock_cover", 0,0, -1,-1);
	 // remove tools button :)
	 liqcell_propseti(self,"easyrun_hidetools",1);
	 liqcell_easyrun_internal(self);
	 liqcell_release(self);
	 liqapp_close();
	 return 0;
}
Пример #16
0
liqcell *liqcam_create()
{

//int  liqcamera_start(int argCAMW,int argCAMH,int argCAMFPS,liqimage * argCAMdestimage,void (*argCAMUpdateCallback)() );
//void liqcamera_stop();


	liqcell *self = liqcell_quickcreatewidget("liqcam","form", 800,480);
	
	if(self)
	{
		
		// need a top bar
		
		liqcell_child_insert( self, uititlebar_create("top","Smile please","I'm about to take your picture") );
		
		
		liqcell *c = liqsketchedit_create("content",  40,120,  320,240);// 800,380 );
		
		
		liqimage *cam = liqimage_new();
		liqimage_pagedefine(cam,320,240,225,225,0);
		
		liqcell_setimage(c,cam);
		
		liqcamera_start(320,240,25,cam,cam_picturetaken,c);
		
		
		
		liqcell_child_insert( self, c );
		
		//liqcell_child_arrange_autoflow(self);
		
		//liqcell_propsets(  self, "backcolor", "rgb(0,0,100)" );

		//liqcell_setimage(  self, liqimage_newfromfile( "../liqbrain/mer_9.jpg",0,0,0) );
		
		
		liqcell *r = liqcell_quickcreatevis("recent", "liqrecentpics", 400,120,  400,240);// 800,380 );
		
		liqcell_child_insert( self, r );

		liqcell_handleradd_withcontext(self, "destroy", liqcam_destroy ,self);
			

		
	}
	return self;
}
Пример #17
0
liqcell *textbox_create()
{
	
	liqcell *self = liqcell_quickcreatewidget("textbox","textbox", 800,50);
	
	if(self)
	{

		
			liqcell *data = liqcell_quickcreatevis("data","frame", 210,0,   580,40);
			liqcell_setfont(   self,  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (24), 0) );
			liqcell_propsets(  self,  "backcolor", "rgb(100,255,150)" );
			liqcell_propsets(  self,  "textcolor", "rgb(20,30,40)" );
			liqcell_propsets(  self,  "bordercolor", "rgb(255,255,255)" );
			//liqcell_setcaption(data,  datadefault );
		//liqcell_child_insert( self, data );

			liqcell_propseti(  self,  "selstart",  0 );
			liqcell_propseti(  self,  "sellength", 0 );
			liqcell_propseti(  self,  "cursorpos", 0 );


			//liqcell_propseti(  data,  "selstart",  5 );
			//liqcell_propseti(  data,  "sellength", 12 );
			//liqcell_propseti(  data,  "cursorpos", 17 );
			
			liqcell_handleradd(self,    "mouse",      textbox_mouse);
			liqcell_handleradd(self,    "keypress",   textbox_keypress);
			liqcell_handleradd(self,    "keyrelease", textbox_keyrelease);



//liqcell *liqkeyboard_create();

	//		liqcell *kb = liqcell_quickcreatevis("data","liqkeyboard", 500,0,   60,20);
			//liqcell_setfont(   kb,  liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (36), 0) );
			//liqcell_propsets(  kb,  "backcolor", "rgb(220,255,220)" );
			//liqcell_propsets(  kb,  "textcolor", "rgb(0,0,0)" );
			//liqcell_setcaption(kb,  datadefault );

	//	liqcell_child_insert( self, kb );



		
		
	}
	return self;
}
	static liqcell *quickdialog_create()
	{
		liqcell *self = liqcell_quickcreatewidget("editoverlay","edit", 800,480);
		if(self)
		{
			liqcell *c;
						c = liqcell_quickcreatevis("sketching",   "picture",   0,0,   800,480    );
						liqcell_propseti(c,"lockaspect",1);					
						liqcell_propsets(c,"imagefilename","media/lcuk_sig_headshot.png");
						//liqcell_handleradd(c,    "mouse",   widget_mouse);
						//liqcell_handleradd(c,    "click",   edit_click);
						liqcell_child_append( self, c );
		}
		return self;
	}
Пример #19
0
/**	
 * uipicturebox clicked
 */	
static int uipicturebox_click(liqcell *self,liqcellclickeventargs *args, liqcell *uipicturebox)
{
	liqcell *dialog = liqcell_quickcreatevis("dialog1", "dialog_selectimage", 0,0, -1,-1);
	liqcell_easyrun(dialog);
	char *sel=liqcell_propgets(  dialog, "imagefilenameselected",NULL );
	if( sel && *sel )
	{	
		// do whatever is needed
		liqcell_setimage(  self,  NULL );
		liqcell_propsets(  self,  "imagefilename", sel );
		liqcell_handlerrun(uipicturebox,"refresh",NULL);
	}
	liqcell_release(dialog);
	return 0;
}
Пример #20
0
/**   
 * listitemicon was clicked
 */   
static int listitemicon_click(liqcell *self,liqcellclickeventargs *args, void *context)
{
	liqcell *c = liqcell_quickcreatevis(liqcell_getcaption(self),liqcell_getcaption(self),0,0,-1,-1);
	if(c)
	{
		if(liqcell_getvisible(c))
		{
			liqcell_easyrun(c);
		}
		liqcell_release(c);
		
		liqcell_setimage(self,NULL);
	}
	return 1;
}
Пример #21
0
/**	
 * uicolorbox clicked
 */	
static int uicolorbox_click(liqcell *self,liqcellclickeventargs *args, liqcell *uicolorbox)
{
	liqcell *dialog = liqcell_quickcreatevis("dialog1", "dialog_selectcolor", 0,0, -1,-1);
	
	liqcell_propsets(  dialog,  "colorselected", liqcell_propgets(  self, "backcolor", NULL )  );
	
	liqcell_easyrun(dialog);
	char *sel=liqcell_propgets(  dialog, "colorselected",NULL );
	if( sel && *sel )
	{	
		// do whatever is needed
		liqcell_propsets(  self,  "backcolor", sel );
	}
	liqcell_release(dialog);
	return 0;
}
Пример #22
0
/**	
 * liqpostcard.cmdconfigure clicked
 */	
static int cmdconfigure_click(liqcell *self,liqcelleventargs *args, liqcell *liqpostcard)
{

     //if(args->keycode==111 && args->keymodifierstate==4)
     {
		liqcell * conf = liqcell_quickcreatevis("liqpostcard_config","liqpostcard.liqpostcard_config",0,0,-1,-1);

	    liqcell_easyrun(conf);
        liqcell_release(conf);
        
        liqcell_handlerrun(liqpostcard,"refresh",NULL);
     }
	 return 0;
    
	return 0;
}
Пример #23
0
static int keyboard_show_button_click(liqcell *self,liqcellclickeventargs *args, liqcell *textbox)
{
	liqcell *vkbd = liqcell_quickcreatevis("vkbd", "liqkeyboard", 0, 0, -1, -1);
	liqcell *vkbd_textbox = liqcell_child_lookup(vkbd, "liqkeyboard_textbox");
	
	if(vkbd)
	{
		// 20090814_203451 lcuk : make sure the * follow into the vkb :)
		liqcell_propseti(vkbd_textbox,"textispassword",  liqcell_propgeti(textbox,"textispassword",0)  );
		
		char *caption = liqcell_getcaption(textbox);
		liqcell_setcaption(vkbd_textbox, caption);
		liqcell_setdata(vkbd, textbox);
		liqcell_easyrun(vkbd);
		liqcell_release(vkbd);
	}
	return 1;
}
Пример #24
0
/**   
 * listitemname was clicked
 */   
static int listitemname_click(liqcell *self,liqcellclickeventargs *args, void *context)
{
	// code required
	//args->newdialogtoopen = desktopmanageitem_create();
	
	liqcell *c = liqcell_quickcreatevis("c",liqcell_getcaption(self),0,0,-1,-1);
	if(c)
	{
		if(liqcell_getvisible(c))
		{
			liqcell_easyrun(c);
		}
		liqcell_release(c);
	}
	
	
	return 1;
	
}
Пример #25
0
/**
 * liqmap.cmdchange clicked
 */
static int cmdchange_click(liqcell *self,liqcellclickeventargs *args, liqcell *liqmap)
{

    liqcell *liqmapzoom1 = liqcell_child_lookup(liqmap, "liqmapzoom1");



    liqcell *title = liqcell_child_lookup(liqmap, "title");









    liqcell * dialog = liqcell_quickcreatevis("dialog","dialog_selectimage",0,0,-1,-1);
    if(dialog)
    {
        // set dialog config options ..
        // ...
        // run dialog
        liqcell_easyrun(dialog);
        // process dialog results
        char *selfn=liqcell_propgets(  dialog, "imagefilenameselected",NULL );
        if( selfn && *selfn )
        {
            //
            int liqmapzoom_changeimagefilename(liqcell *liqmapzoom,char *imagefilename);

            liqmapzoom_changeimagefilename(liqmapzoom1,selfn);

            liqcell_setcaption(title, liqapp_filename_walkoverpath( selfn ) );
        }

        // release dialog

        liqcell_release(dialog);
    }

    return 0;
}
Пример #26
0
liqcell *liqsketchedit_create(char *name,int l,int t,int w,int h)
{
		
		liqcell *c = liqcell_quickcreatevis(name,  NULL,   l,t,w,h );
		
		liqcell_propseti(c,"sketchediting",1);		// mark it as editing :)
		
			// give us something to draw onto
			liqsketch *s = liqsketch_new();
					s->pixelwidth =liqcell_getw(c);
					s->pixelheight=liqcell_geth(c);
					s->dpix=225;	// damn, dont like using this here
					s->dpiy=225;
			liqcell_setsketch( c, s );
			
			
		liqcell_handleradd(c,    "mouse",   sketchedit_mouse);
	return c;	
}
Пример #27
0
/**	
 * liqpostcard.cmdpicchoose clicked
 */	
static int cmdpicchoose_click(liqcell *self,liqcelleventargs *args, liqcell *liqpostcard)
{
    //
	liqcell *picfront = liqcell_child_lookup(liqpostcard, "picfront");


		liqcell * oneedit = liqcell_quickcreatevis("liqpostcard.choose","dialog_selectimage",0,0,-1,-1);
		
		if(oneedit)
		{
            // copy the sketch and background image to the editor
            //liqcell_setsketch( oneedit, liqcell_getsketch(messageback) );
            //liqcell_setimage( oneedit, liqcell_getimage(messageback) );
            
            //liqcell_propsets(  oneedit, "imagefilenameselected",  );

            //int liqrecentphotos_setselectedphoto_filename(liqcell *self,char *buffer,int bufferlen);

            
			
		
			liqcell_easyrun(oneedit);
			//liqapp_log("eep?");
            
            char *selfn=liqcell_propgets(  oneedit, "imagefilenameselected",NULL );
            
			
			//liqapp_log("hmm %s",selfn);
            if( selfn && *selfn )
            {
	            liqcell_setimage( picfront,NULL );
				//liqapp_log("hmm2 %s",selfn);
                liqcell_propsets(  picfront, "imagefilename", selfn  );               
            }           
                
			liqcell_release(oneedit);
			
			liqcell_setdirty(self,1);
		}
        
        
	return 0;
}
	static int liqrecentsketches_edit_click(liqcell *self, liqcellclickeventargs *args, liqcell *liqrecentsketches)
	{


		if(current_selection)
		{
			char *fn = liqcell_propgets(current_selection,"sketchfilename",NULL);
			if(fn && *fn)
			{
				// do edit action, ala liqcalendar
				liqcell *editor = liqcell_quickcreatevis("editor", "liqsketchedit", 0,0 , 800, 480);
				liqcell_propsets(editor,"sketchfilename",fn);
				//liqcell_propsets(editor,"sketcheditfilename",fn);
				liqcell_easyrun(editor);
				liqcell_release(editor);
			}
		}
		//args->newdialogtoopen = liqcell_hold( self );//liqcell_child_lookup( self, "body" );
		return 1;
	}
	int liqrecentsketches_sketchitem_click(liqcell *self, liqcellclickeventargs *args, void *context)
	{
		liqapp_log("hello click edit!");
		//liqcell *mydialog = quickdialog_create();
		//liqcell_easyrun(mydialog);
		//liqcell_release(mydialog);

		liqcell_setselected(self,1);

		if(current_selection && current_selection!=self)
			liqcell_setselected(current_selection,0);
		current_selection = self;

		return 0;


		char *sketchfilename  = liqcell_propgets(self,"sketchfilename",NULL);		
		if(!sketchfilename) return -1;
		
		liqsketch *mysketch=liqsketch_newfromfile(sketchfilename);//   liqcell_getsketch(self);
		if(!mysketch)return -1;



		
		liqcell * top = liqcell_quickcreatevis("liqtop1", "liqtop", 0,0, 800,480);
		
		liqcell_setsketch(top, mysketch );
		
		//liqcell_propseti(top,"autorotate",1);
		
		
	//	args->newdialogtoopen = top;

		liqcell_release(top);
		

		return 1;
	}	
Пример #30
0
/**	
 * create a new liqpostcard widget
 */	
liqcell *liqpostcard_create()
{
	liqcell *self = liqcell_quickcreatewidget("liqpostcard", "form", 800, 480);
	if(!self) {liqapp_log("liqcell error not create 'liqpostcard'"); return NULL;  } 
	
	// Optimization:  The aim is to REDUCE the number of drawn layers and operations called.
	// Optimization:  use only what you NEED to get an effect
	// Optimization:  Minimal layers and complexity
	// Optimization:  defaults: background, prefer nothing, will be shown through if there is a wallpaper
	// Optimization:  defaults: text, white, very fast rendering
	//############################# tweetmessage:textbox
	liqcell *tweetmessage = liqcell_quickcreatevis("tweetmessage", "textbox", 56, 424, 502, 50);
	liqcell_setfont(	tweetmessage, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (32), 0) );
	liqcell_setcaption(tweetmessage, "" );
	liqcell_propsets(  tweetmessage, "textcolor", "rgb(0,0,0)" );
	liqcell_propsets(  tweetmessage, "backcolor", "rgb(255,255,255)" );
	liqcell_propsets(  tweetmessage, "bordercolor", "rgb(200,100,100)" );
	liqcell_propseti(  tweetmessage, "textalign", 0 );
	liqcell_child_append(  self, tweetmessage);
	//############################# picfront:picturebox
	liqcell *picfront = liqcell_quickcreatevis("picfront", "picturebox", 20, 112, 368, 186);
	//liqcell_setfont(	picfront, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (12), 0) );
	//liqcell_propsets(  picfront, "textcolor", "rgb(0,0,0)" );
	//liqcell_propsets(  picfront, "backcolor", "rgb(64,0,0)" );
	liqcell_propsets(  picfront, "bordercolor", "rgb(200,100,100)" );
    liqcell_handleradd_withcontext(picfront, "click", cmdpicchoose_click, self );
	liqcell_child_append(  self, picfront);
	//############################# messageback:picturebox
	liqcell *messageback = liqcell_quickcreatevis("messageback", "picturebox", 418, 112, 368, 186);
	//liqcell_setfont(	messageback, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (12), 0) );
    liqcell_propsets(  messageback, "imagefilename",  "/usr/share/liqbase/liqpostcard/media/liqpostcard_template.png" );
	//liqcell_propsets(  messageback, "textcolor", "rgb(0,0,0)" );
	//liqcell_propsets(  messageback, "backcolor", "rgb(64,0,0)" );
	liqcell_propsets(  messageback, "bordercolor", "rgb(200,100,100)" );
    liqcell_handleradd_withcontext(messageback, "click", cmdmessagedraw_click, self );
	liqcell_child_append(  self, messageback);
 /*   
	//############################# cmdmessagewrite:label
	liqcell *cmdmessagewrite = liqcell_quickcreatevis("cmdmessagewrite", "label", 418, 300, 176, 52);
	liqcell_setfont(	cmdmessagewrite, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (29), 0) );
	liqcell_setcaption(cmdmessagewrite, "Write" );
	liqcell_propsets(  cmdmessagewrite, "textcolor", "rgb(255,255,255)" );
	liqcell_propsets(  cmdmessagewrite, "backcolor", "xrgb(0,0,64)" );
	liqcell_propsets(  cmdmessagewrite, "bordercolor", "rgb(255,255,255)" );
	liqcell_propseti(  cmdmessagewrite, "textalign", 2 );
	liqcell_handleradd_withcontext(cmdmessagewrite, "click", cmdmessagewrite_click, self );
	liqcell_child_append(  self, cmdmessagewrite);
 */  
	//############################# label5:label
	liqcell *label5 = liqcell_quickcreatevis("label5", "label", 56, 390, 368, 32);
	liqcell_setfont(	label5, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (22), 0) );
	liqcell_setcaption(label5, "Message" );
	liqcell_propsets(  label5, "textcolor", "rgb(255,255,255)" );
	//liqcell_propsets(  label5, "backcolor", "xrgb(0,64,64)" );
	liqcell_propseti(  label5, "textalign", 0 );
	liqcell_child_append(  self, label5);
    
	//############################# cmdmessagedraw:label
	liqcell *cmdmessagedraw = liqcell_quickcreatevis("cmdmessagedraw", "label", 514, 300, 176, 52);
	liqcell_setfont(	cmdmessagedraw, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (29), 0) );
	liqcell_setcaption(cmdmessagedraw, "Draw" );
	liqcell_propsets(  cmdmessagedraw, "textcolor", "rgb(255,255,255)" );
	liqcell_propsets(  cmdmessagedraw, "backcolor", "xrgb(0,0,64)" );
	liqcell_propsets(  cmdmessagedraw, "bordercolor", "rgb(255,255,255)" );
	liqcell_propseti(  cmdmessagedraw, "textalign", 2 );
	liqcell_propseti(  cmdmessagedraw, "textaligny", 2 );
	liqcell_handleradd_withcontext(cmdmessagedraw, "click", cmdmessagedraw_click, self );
	liqcell_child_append(  self, cmdmessagedraw);
    
	//############################# cmdpicchoose:label
	liqcell *cmdpicchoose = liqcell_quickcreatevis("cmdpicchoose", "label", 112, 300, 176, 52);
	liqcell_setfont(	cmdpicchoose, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (29), 0) );
	liqcell_setcaption(cmdpicchoose, "Choose" );
	liqcell_propsets(  cmdpicchoose, "textcolor", "rgb(255,255,255)" );
	liqcell_propsets(  cmdpicchoose, "backcolor", "xrgb(0,0,64)" );
	liqcell_propsets(  cmdpicchoose, "bordercolor", "rgb(255,255,255)" );
	liqcell_propseti(  cmdpicchoose, "textalign", 2 );
	liqcell_propseti(  cmdpicchoose, "textaligny", 2 );
	liqcell_handleradd_withcontext(cmdpicchoose, "click", cmdpicchoose_click, self );
	liqcell_child_append(  self, cmdpicchoose);
    
	//############################# cmdsend:label
	liqcell *cmdsend = liqcell_quickcreatevis("cmdsend", "label", 574, 418, 226, 62);
	liqcell_setfont(	cmdsend, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (29), 0) );
	liqcell_setcaption(cmdsend, "Send" );
	liqcell_propsets(  cmdsend, "textcolor", "rgb(255,255,255)" );
	liqcell_propsets(  cmdsend, "backcolor", "xrgb(0,64,0)" );
	liqcell_propsets(  cmdsend, "bordercolor", "rgb(255,255,255)" );
	liqcell_propseti(  cmdsend, "textalign", 2 );
	liqcell_propseti(  cmdsend, "textaligny", 2 );
    liqcell_setenabled(  cmdsend, 0 );
	liqcell_handleradd_withcontext(cmdsend, "click", cmdsend_click, self );
	liqcell_child_append(  self, cmdsend);
    
	//############################# pichead:label
	liqcell *pichead = liqcell_quickcreatevis("pichead", "label", 20, 74, 368, 36);
	liqcell_setfont(	pichead, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (22), 0) );
	liqcell_setcaption(pichead, "Picture" );
	liqcell_propsets(  pichead, "textcolor", "rgb(255,255,255)" );
	//liqcell_propsets(  pichead, "backcolor", "xrgb(0,64,64)" );
	liqcell_propseti(  pichead, "textalign", 0 );
	liqcell_child_append(  self, pichead);
    
	//############################# messagehead:label
	liqcell *messagehead = liqcell_quickcreatevis("messagehead", "label", 418, 74, 368, 36);
	liqcell_setfont(	messagehead, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (22), 0) );
	liqcell_setcaption(messagehead, "Sketch" );
	liqcell_propsets(  messagehead, "textcolor", "rgb(255,255,255)" );
	//liqcell_propsets(  messagehead, "backcolor", "xrgb(0,64,64)" );
	liqcell_propseti(  messagehead, "textalign", 0 );
	liqcell_child_append(  self, messagehead);
    
	//############################# title:label
	liqcell *title = liqcell_quickcreatevis("title", "label", 0, 0, 800, 56);
	liqcell_setfont(	title, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (29), 0) );
	liqcell_setcaption(title, "postcard :: say hello." );
	liqcell_propsets(  title, "textcolor", "rgb(255,255,255)" );
	liqcell_propsets(  title, "backcolor", "xrgb(0,0,0)" );
	liqcell_propseti(  title, "textalign", 0 );
	liqcell_child_append(  self, title);
    
	//liqcell_propsets(  self, "backcolor", "rgb(0,0,0)" );
	liqcell_handleradd_withcontext(self, "refresh", liqpostcard_refresh ,self);
	liqcell_handleradd_withcontext(self, "shown", liqpostcard_shown ,self);
	liqcell_handleradd_withcontext(self, "resize", liqpostcard_resize ,self);
	liqcell_handleradd_withcontext(self, "keypress", liqpostcard_keypress,self );
	liqcell_handleradd_withcontext(self, "keyrelease", liqpostcard_keyrelease ,self);
	liqcell_handleradd_withcontext(self, "mouse", liqpostcard_mouse,self );
	liqcell_handleradd_withcontext(self, "click", liqpostcard_click ,self);
	//liqcell_handleradd_withcontext(self, "paint", liqpostcard_paint ,self); // use only if required, heavyweight
	liqcell_handleradd_withcontext(self, "dialog_open", liqpostcard_dialog_open ,self);
	liqcell_handleradd_withcontext(self, "dialog_close", liqpostcard_dialog_close ,self);


	//############################# cmdconfigure:label
	liqcell *cmdconfigure = liqcell_quickcreatevis("cmdconfigure", "label", 508, 0, 226, 56);
	liqcell_setfont(	cmdconfigure, liqfont_cache_getttf("/usr/share/fonts/nokia/nosnb.ttf", (29), 0) );
	liqcell_setcaption(cmdconfigure, "configure" );
	liqcell_propsets(  cmdconfigure, "textcolor", "rgb(255,255,255)" );
	liqcell_propsets(  cmdconfigure, "backcolor", "xrgb(0,64,0)" );
	liqcell_propsets(  cmdconfigure, "bordercolor", "rgb(255,255,255)" );
	liqcell_propseti(  cmdconfigure, "textalign", 2 );
	liqcell_propseti(  cmdconfigure, "textaligny", 2 );
	liqcell_handleradd_withcontext(cmdconfigure, "click", cmdconfigure_click, self );
	liqcell_child_append(  self, cmdconfigure);

    
    
    //########## major sideways hack.  classes need declarations and header files.
    int dialog_selectimage_getfirstphoto_filename(liqcell *self,char *buffer,int bufferlen);
    char selfn[FILENAME_MAX]={0};
    liqcell *dialog_selectimage = liqcell_quickcreatevis("liqpostcard.choose","dialog_selectimage",0,0,-1,-1);
    dialog_selectimage_getfirstphoto_filename(dialog_selectimage,selfn,sizeof(selfn) );
    if(selfn && *selfn)
    {
        liqcell_propsets(  picfront, "imagefilename", selfn  );
    }
    liqcell_release(dialog_selectimage);
    
    
    
    liqcell_handlerrun(self,"refresh",NULL);
    
	return self;
}