Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

UscCtrl

 

Creating .usc script to get custom widget represented in layout editor

 

 

main.cpp

 

#include <Counter/Counter.h>

 

#define   LAYOUTFILE <UscCtrl/main.lay>

#include  <CtrlCore/lay.h>

 

GUI_APP_MAIN

{

    WithMainLayout<TopWindow> x;

    x.counter <<= 10;

    CtrlLayout(x);

    x.Run();

    PromptOK(AsString(~x.counter));

}

 

 

 

main.lay

 

LAYOUT(MainLayout, 404, 204)

    ITEM(CounterCtrl, counter, SetFont(RomanZ(34)).Ink(Color(153, 0, 51)).Paper(Color(102, 204, 204)).LeftPosZ(128, 120).TopPosZ(56, 52))

    ITEM(LabelBox, dv___1, SetLabel(t_("This is the CounterCtrl")).LeftPosZ(98, 184).TopPosZ(36, 80))

END_LAYOUT

 

 

 

 

 

Do you want to contribute?