Exemplo n.º 1
0
extern "C" void setup_c0x2eblackboard(void)
{
    t_eclass *c;
    
    c = eclass_new("c.blackboard", (method)blackboard_new, (method)blackboard_free, (short)sizeof(t_blackboard), 0L, A_GIMME, 0);
    eclass_guiinit(c, 0);

    
    eclass_addmethod(c, (method) blackboard_paint,           "paint",            A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_notify,          "notify",           A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_getdrawparams,   "getdrawparams",    A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_oksize,          "oksize",           A_NULL, 0);
    
    eclass_addmethod(c, (method) blackboard_width,           "width",            A_FLOAT,0);
    eclass_addmethod(c, (method) blackboard_color,           "color",            A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_fill,            "fill",             A_FLOAT,0);
    
    eclass_addmethod(c, (method) blackboard_line,            "line",             A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_path,            "path",             A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_rect,            "rect",             A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_oval,            "oval",             A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_arc,             "arc",              A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_image,           "image",            A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_text,            "text",             A_GIMME,0);
    
    eclass_addmethod(c, (method) blackboard_clear,           "clear",            A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_reset,           "reset",            A_NULL, 0);
    
    eclass_addmethod(c, (method) blackboard_mousemove,       "mousemove",        A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_mousedrag,       "mousedrag",        A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_mousedown,       "mousedown",        A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_mouseup,         "mouseup",          A_NULL, 0);
    
    CLASS_ATTR_DEFAULT              (c, "size", 0, "200 200");
    CLASS_ATTR_INVISIBLE            (c, "send", 1);
    
    CLASS_ATTR_LONG                 (c, "chalkmode", 0, t_blackboard, f_pen_mode);
    CLASS_ATTR_LABEL                (c, "chalkmode", 0, "Chalk Mode");
    CLASS_ATTR_FILTER_CLIP          (c, "chalkmode", 0, 1);
    CLASS_ATTR_ORDER                (c, "chalkmode", 0, "1");
    CLASS_ATTR_DEFAULT              (c, "chalkmode", 0, "1");
    CLASS_ATTR_SAVE                 (c, "chalkmode", 0);
    CLASS_ATTR_STYLE                (c, "chalkmode", 0, "onoff");
    
    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_blackboard, f_color_background);
    CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
    CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
    
    CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_blackboard, f_color_border);
    CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
    CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
    CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
    
    eclass_register(CLASS_BOX, c);
    blackboard_class = c;
}
Exemplo n.º 2
0
extern "C" void setup_c0x2escope_tilde(void)
{
    t_eclass *c;

    c = eclass_new("c.scope~", (method)scope_new, (method)scope_free, (short)sizeof(t_scope), 0L, A_GIMME, 0);

    eclass_guiinit(c, 0);
    eclass_dspinit(c);
    eclass_addmethod(c, (method) scope_dsp,             "dsp",              A_NULL, 0);
    eclass_addmethod(c, (method) scope_paint,           "paint",            A_NULL, 0);
    eclass_addmethod(c, (method) scope_getdrawparams,   "getdrawparams",    A_NULL, 0);
    eclass_addmethod(c, (method) scope_oksize,          "oksize",           A_NULL, 0);

    CLASS_ATTR_INVISIBLE            (c, "send", 1);
    CLASS_ATTR_DEFAULT              (c, "size", 0, "125 100");

    CLASS_ATTR_LONG                 (c, "bufdis", 0, t_scope, f_display_size);
    CLASS_ATTR_ORDER                (c, "bufdis", 0, "1");
    CLASS_ATTR_LABEL                (c, "bufdis", 0, "Display Buffer Size");
    CLASS_ATTR_FILTER_CLIP          (c, "bufdis", 2, 8092);
    CLASS_ATTR_DEFAULT              (c, "bufdis", 0, "256");
    CLASS_ATTR_SAVE                 (c, "bufdis", 1);
    CLASS_ATTR_STYLE                (c, "bufdis", 0, "number");

    CLASS_ATTR_LONG                 (c, "bufsig", 0, t_scope, f_signal_size);
    CLASS_ATTR_ORDER                (c, "bufsig", 0, "2");
    CLASS_ATTR_LABEL                (c, "bufsig", 0, "Signal Buffer Size");
    CLASS_ATTR_FILTER_CLIP          (c, "bufsig", 2, 8092);
    CLASS_ATTR_DEFAULT              (c, "bufsig", 0, "256");
    CLASS_ATTR_SAVE                 (c, "bufsig", 1);
    CLASS_ATTR_STYLE                (c, "bufsig", 0, "number");

    CLASS_ATTR_FLOAT_ARRAY          (c, "range", 0, t_scope, f_range, 2);
    CLASS_ATTR_ORDER                (c, "range", 0, "2");
    CLASS_ATTR_LABEL                (c, "range", 0, "Range");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "range", 0, "-1 1");

    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_scope, f_color_background);
    CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
    CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");

    CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_scope, f_color_border);
    CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
    CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
    CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");

    CLASS_ATTR_RGBA                 (c, "sicolor", 0, t_scope, f_color_signal);
    CLASS_ATTR_LABEL                (c, "sicolor", 0, "Signal Color");
    CLASS_ATTR_ORDER                (c, "sicolor", 0, "3");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "sicolor", 0, "0. 0.6 0. 0.8");
    CLASS_ATTR_STYLE                (c, "sicolor", 0, "color");

    eclass_register(CLASS_BOX, c);
    cscope_class = c;
}
Exemplo n.º 3
0
extern "C" void setup_c0x2ematrix(void)
{
	t_eclass *c;

	c = eclass_new("c.matrix", (method)matrixctrl_new, (method)matrixctrl_free, (short)sizeof(t_matrixctrl), 0L, A_GIMME, 0);
	eclass_guiinit(c, 0);
    eclass_addmethod(c, (method) matrixctrl_assist,          "assist",           A_NULL, 0);
	eclass_addmethod(c, (method) matrixctrl_paint,           "paint",            A_NULL, 0);
	eclass_addmethod(c, (method) matrixctrl_notify,          "notify",           A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_getdrawparams,   "getdrawparams",    A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_oksize,          "oksize",           A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_set,             "set",              A_GIMME,0);
    eclass_addmethod(c, (method) matrixctrl_list,            "list",             A_GIMME,0);
    eclass_addmethod(c, (method) matrixctrl_bang,            "bang",             A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_clear,           "clear",            A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_getrow,          "getrow",           A_FLOAT,0);
    eclass_addmethod(c, (method) matrixctrl_getcolumn,       "getcolumn",        A_FLOAT,0);

    eclass_addmethod(c, (method) matrixctrl_mousedown,       "mousedown",        A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_mousedrag,       "mousedrag",        A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_mouseleave,      "mouseleave",       A_NULL, 0);

    eclass_addmethod(c, (method) matrixctrl_preset,          "preset",           A_NULL, 0);

    CLASS_ATTR_INVISIBLE            (c, "fontname", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontweight", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontslant", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontsize", 1);
	CLASS_ATTR_DEFAULT              (c, "size", 0, "105 53");

    CLASS_ATTR_FLOAT_ARRAY          (c, "matrix", 0, t_matrixctrl, f_size, 2);
	CLASS_ATTR_LABEL                (c, "matrix", 0, "Matrix Size");
    CLASS_ATTR_ACCESSORS			(c, "matrix", NULL, matrixctrl_matrix_set);
	CLASS_ATTR_ORDER                (c, "matrix", 0, "1");
	CLASS_ATTR_DEFAULT              (c, "matrix", 0, "8 4");
    CLASS_ATTR_SAVE                 (c, "matrix", 0);

    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_matrixctrl, f_color_background);
	CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
	CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");

	CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_matrixctrl, f_color_border);
	CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
	CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
	CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");

    CLASS_ATTR_RGBA                 (c, "accolor", 0, t_matrixctrl, f_color_on);
	CLASS_ATTR_LABEL                (c, "accolor", 0, "Active Cell Color");
	CLASS_ATTR_ORDER                (c, "accolor", 0, "3");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "accolor", 0, "0.5 0.5 0.5 1.");
	CLASS_ATTR_STYLE                (c, "accolor", 0, "color");

    eclass_register(CLASS_BOX, c);
	matrixctrl_class = c;
}
Exemplo n.º 4
0
extern "C" void setup_c0x2eincdec(void)
{
    t_eclass *c;
    
    c = eclass_new("c.incdec", (method)incdec_new, (method)incdec_free, (short)sizeof(t_incdec), 0L, A_GIMME, 0);
    
    eclass_guiinit(c, 0);
    eclass_addmethod(c, (method) incdec_paint,           "paint",            A_NULL, 0);
    eclass_addmethod(c, (method) incdec_notify,          "notify",           A_NULL, 0);
    eclass_addmethod(c, (method) incdec_getdrawparams,   "getdrawparams",    A_NULL, 0);
    eclass_addmethod(c, (method) incdec_oksize,          "oksize",           A_NULL, 0);
    eclass_addmethod(c, (method) incdec_set,             "set",              A_FLOAT,0);
    eclass_addmethod(c, (method) incdec_float,           "float",            A_FLOAT,0);
    eclass_addmethod(c, (method) incdec_output,          "bang",             A_NULL, 0);
    eclass_addmethod(c, (method) incdec_inc,             "inc",              A_NULL, 0);
    eclass_addmethod(c, (method) incdec_dec,             "dec",              A_NULL, 0);
    eclass_addmethod(c, (method) incdec_mousedown,       "mousedown",        A_NULL, 0);
    eclass_addmethod(c, (method) incdec_mouseup,         "mouseup",          A_NULL, 0);
    
    CLASS_ATTR_DEFAULT              (c, "size", 0, "13 20");
    
    CLASS_ATTR_FLOAT                (c, "step", 0, t_incdec, f_increment);
    CLASS_ATTR_LABEL                (c, "step", 0, "Step increment");
    CLASS_ATTR_FILTER_MIN           (c, "step", 0.);
    CLASS_ATTR_ORDER                (c, "step", 0, "1");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "step", 0, "1.");
    CLASS_ATTR_STYLE                (c, "step", 0, "number");
    CLASS_ATTR_STEP                 (c, "step", 0.1);
    
    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_incdec, f_color_background);
    CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
    CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
    
    CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_incdec, f_color_border);
    CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
    CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
    CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
    
    CLASS_ATTR_RGBA                 (c, "arcolor", 0, t_incdec, f_color_arrow);
    CLASS_ATTR_LABEL                (c, "arcolor", 0, "Arrow Color");
    CLASS_ATTR_ORDER                (c, "arcolor", 0, "3");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "arcolor", 0, "0. 0. 0. 1.");
    CLASS_ATTR_STYLE                (c, "arcolor", 0, "color");
    
    eclass_register(CLASS_BOX, c);
    incdec_class = c;
}
Exemplo n.º 5
0
extern "C" void setup_c0x2eknob(void)
{
    t_eclass *c = eclass_new("c.knob", (method)knob_new, (method)ebox_free, (short)sizeof(t_knob), 0L, A_GIMME, 0);
    
    if(c)
    {
        eclass_guiinit(c, 0);
        
        eclass_addmethod(c, (method) knob_paint,            "paint",            A_NULL, 0);
        eclass_addmethod(c, (method) knob_notify,           "notify",           A_NULL, 0);
        eclass_addmethod(c, (method) knob_getdrawparams,    "getdrawparams",    A_NULL, 0);
        eclass_addmethod(c, (method) knob_oksize,           "oksize",           A_NULL, 0);
        eclass_addmethod(c, (method) knob_set,              "set",              A_FLOAT,0);
        eclass_addmethod(c, (method) knob_float,            "float",            A_FLOAT,0);
        eclass_addmethod(c, (method) knob_bang,             "bang",             A_NULL, 0);
        
        eclass_addmethod(c, (method) knob_mousedown,        "mousedown",        A_NULL, 0);
        eclass_addmethod(c, (method) knob_mousedrag,        "mousedrag",        A_NULL, 0);
        eclass_addmethod(c, (method) knob_mouseup,          "mouseup",          A_NULL, 0);
        
        CLASS_ATTR_DEFAULT              (c, "size", 0, "50. 50.");
        
        CLASS_ATTR_CHAR                 (c, "endless", 0, t_knob, f_endless);
        CLASS_ATTR_LABEL                (c, "endless", 0, "Endless Mode");
        CLASS_ATTR_ORDER                (c, "endless", 0, "1");
        CLASS_ATTR_FILTER_CLIP          (c, "endless", 0, 1);
        CLASS_ATTR_DEFAULT              (c, "endless", 0, "0");
        CLASS_ATTR_SAVE                 (c, "endless", 0);
        CLASS_ATTR_STYLE                (c, "endless", 0, "onoff");
        CLASS_ATTR_PAINT                (c, "endless", 0);
        
        CLASS_ATTR_FLOAT_ARRAY          (c, "minmax", 0, t_knob, f_dummy, 2);
        CLASS_ATTR_ORDER                (c, "minmax", 0, "3");
        CLASS_ATTR_LABEL                (c, "minmax", 0, "Min/Max Values");
        CLASS_ATTR_DEFAULT              (c, "minmax", 0, "0 1");
        CLASS_ATTR_ACCESSORS            (c, "minmax", knob_minmax_get, knob_minmax_set);
        CLASS_ATTR_SAVE                 (c, "minmax", 1);
        
        CLASS_ATTR_INT                  (c, "bdsize", 0, t_knob, f_bdsize);
        CLASS_ATTR_LABEL                (c, "bdsize", 0, "Border Size");
        CLASS_ATTR_ORDER                (c, "bdsize", 0, "1");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdsize", 0, "2");
        CLASS_ATTR_FILTER_CLIP          (c, "bdsize", 0, 4);
        CLASS_ATTR_STYLE                (c, "bdsize", 0, "number");
        
        CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_knob, f_color_background);
        CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
        CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
        CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_knob, f_color_border);
        CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
        CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
        CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "necolor", 0, t_knob, f_color_needle);
        CLASS_ATTR_LABEL                (c, "necolor", 0, "Needle Color");
        CLASS_ATTR_ORDER                (c, "necolor", 0, "3");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "necolor", 0, "0.5 0.5 0.5 1.");
        CLASS_ATTR_STYLE                (c, "necolor", 0, "color");
        
        eclass_register(CLASS_BOX, c);
        knob_class = c;
    }
}
Exemplo n.º 6
0
extern "C" void setup_c0x2etab(void)
{
    t_eclass *c = eclass_new("c.tab", (method)tab_new, (method)ebox_free, (short)sizeof(t_tab), 0L, A_GIMME, 0);

    if(c)
    {
        eclass_guiinit(c, 0);
        eclass_addmethod(c, (method) tab_paint,             "paint",            A_NULL, 0);
        eclass_addmethod(c, (method) tab_notify,            "notify",           A_NULL, 0);
        eclass_addmethod(c, (method) tab_getdrawparams,     "getdrawparams",    A_NULL, 0);
        eclass_addmethod(c, (method) tab_oksize,            "oksize",           A_NULL, 0);

        eclass_addmethod(c, (method) tab_append,            "append",           A_GIMME,0);
        eclass_addmethod(c, (method) tab_insert,            "insert",           A_GIMME,0);
        eclass_addmethod(c, (method) tab_setitem,           "setitem",          A_GIMME,0);
        eclass_addmethod(c, (method) tab_delete,            "delete",           A_FLOAT,0);
        eclass_addmethod(c, (method) tab_clear,             "clear",            A_NULL,0);

        eclass_addmethod(c, (method) tab_float,             "float",            A_FLOAT,0);
        eclass_addmethod(c, (method) tab_anything,          "anything",         A_GIMME,0);
        eclass_addmethod(c, (method) tab_set,               "set",              A_GIMME,0);
        eclass_addmethod(c, (method) tab_setsymbol,         "setsymbol",        A_GIMME,0);
        eclass_addmethod(c, (method) tab_bang,              "bang",             A_NULL, 0);
        eclass_addmethod(c, (method) tab_next,              "next",             A_NULL, 0);
        eclass_addmethod(c, (method) tab_prev,              "prev",             A_NULL, 0);

        eclass_addmethod(c, (method) tab_mousedown,         "mousedown",       A_NULL, 0);
        eclass_addmethod(c, (method) tab_mouseup,           "mouseup",         A_NULL, 0);
        eclass_addmethod(c, (method) tab_mousemove,         "mousemove",       A_NULL, 0);
        eclass_addmethod(c, (method) tab_mouseleave,        "mouseleave",      A_NULL, 0);

        CLASS_ATTR_DEFAULT              (c, "size", 0, "100 13");

        CLASS_ATTR_CHAR                 (c, "orientation", 0, t_tab, f_orientation);
        CLASS_ATTR_LABEL                (c, "orientation", 0, "Vertical Orientation");
        CLASS_ATTR_ORDER                (c, "orientation", 0, "1");
        CLASS_ATTR_FILTER_CLIP          (c, "orientation", 0, 1);
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "orientation", 0, "0");
        CLASS_ATTR_STYLE                (c, "orientation", 0, "onoff");

        CLASS_ATTR_CHAR                 (c, "toggle", 0, t_tab, f_toggle);
        CLASS_ATTR_LABEL                (c, "toggle", 0, "Toggle Mode");
        CLASS_ATTR_ORDER                (c, "toggle", 0, "1");
        CLASS_ATTR_FILTER_CLIP          (c, "toggle", 0, 1);
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "toggle", 0, "0");
        CLASS_ATTR_STYLE                (c, "toggle", 0, "onoff");

        CLASS_ATTR_SYMBOL_VARSIZE       (c, "items", 0, t_tab, f_items, f_nitems, CREAM_MAXITEMS);
        CLASS_ATTR_LABEL                (c, "items", 0, "Items");
        CLASS_ATTR_ORDER                (c, "items", 0, "1");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "items", 0, "");
        CLASS_ATTR_ACCESSORS            (c, "items", NULL, tab_items_set);

        CLASS_ATTR_FONT                 (c, "font", 0, t_tab, f_font);
        CLASS_ATTR_LABEL                (c, "font", 0, "Font");
        CLASS_ATTR_SAVE                 (c, "font", 0);
        CLASS_ATTR_PAINT                (c, "font", 0);

        CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_tab, f_color_background);
        CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
        CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
        CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");

        CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_tab, f_color_border);
        CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
        CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
        CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");

        CLASS_ATTR_RGBA                 (c, "textcolor", 0, t_tab, f_color_text);
        CLASS_ATTR_LABEL                (c, "textcolor", 0, "Text Color");
        CLASS_ATTR_ORDER                (c, "textcolor", 0, "3");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "textcolor", 0, "0. 0. 0. 1.");
        CLASS_ATTR_STYLE                (c, "textcolor", 0, "color");

        CLASS_ATTR_RGBA                 (c, "hocolor", 0, t_tab, f_color_hover);
        CLASS_ATTR_LABEL                (c, "hocolor", 0, "Hover Color");
        CLASS_ATTR_ORDER                (c, "hocolor", 0, "4");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "hocolor", 0, "0.5 0.5 0.5 1.");
        CLASS_ATTR_STYLE                (c, "hocolor", 0, "color");

        CLASS_ATTR_RGBA                 (c, "secolor", 0, t_tab, f_color_select);
        CLASS_ATTR_LABEL                (c, "secolor", 0, "Selection Color");
        CLASS_ATTR_ORDER                (c, "secolor", 0, "5");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "secolor", 0, "0.35 0.35 0.35 1.");
        CLASS_ATTR_STYLE                (c, "secolor", 0, "color");

        eclass_register(CLASS_BOX, c);
        tab_class = c;

    }
}
Exemplo n.º 7
0
extern "C" void setup_c0x2epreset(void)
{
    t_eclass* c = eclass_new("c.preset", (method)preset_new, (method)preset_free, (short)sizeof(t_presetobj), 0L, A_GIMME, 0);

    if(c)
    {
        eclass_guiinit(c, 0);
        
        eclass_addmethod(c, (method) preset_paint,           "paint",            A_NULL, 0);
        eclass_addmethod(c, (method) preset_notify,          "notify",           A_NULL, 0);
        eclass_addmethod(c, (method) preset_getdrawparams,   "getdrawparams",    A_NULL, 0);
        eclass_addmethod(c, (method) preset_oksize,          "oksize",           A_NULL, 0);
        eclass_addmethod(c, (method) preset_store,           "store",            A_FLOAT,0);
        eclass_addmethod(c, (method) preset_clear,           "clear",            A_FLOAT,0);
        eclass_addmethod(c, (method) preset_float,           "float",            A_FLOAT,0);
        eclass_addmethod(c, (method) preset_interpolate,     "inter",            A_FLOAT,0);
        eclass_addmethod(c, (method) preset_clearall,        "clearall",         A_NULL,0);
        
        eclass_addmethod(c, (method) preset_mousemove,       "mousemove",        A_NULL, 0);
        eclass_addmethod(c, (method) preset_mousedown,       "mousedown",        A_NULL, 0);
        eclass_addmethod(c, (method) preset_mouseleave,      "mouseleave",       A_NULL, 0);
        
        eclass_addmethod(c, (method) preset_save,            "save",             A_NULL, 0);
        eclass_addmethod(c, (method) preset_read,            "read",             A_GIMME,0);
        eclass_addmethod(c, (method) preset_write,           "write",            A_GIMME,0);
        
        CLASS_ATTR_INVISIBLE            (c, "send", 1);
        CLASS_ATTR_DEFAULT              (c, "size", 0, "102 34");
        CLASS_ATTR_DEFAULT              (c, "fontsize", 0, "10");
        
        CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_presetobj, f_color_background);
        CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
        CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
        CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_presetobj, f_color_border);
        CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
        CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
        CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "textcolor", 0, t_presetobj, f_color_text);
        CLASS_ATTR_LABEL                (c, "textcolor", 0, "Text Color");
        CLASS_ATTR_ORDER                (c, "textcolor", 0, "3");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "textcolor", 0, "0. 0. 0. 1.");
        CLASS_ATTR_STYLE                (c, "textcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "emcolor", 0, t_presetobj, f_color_button_empty);
        CLASS_ATTR_LABEL                (c, "emcolor", 0, "Empty Button Color");
        CLASS_ATTR_ORDER                (c, "emcolor", 0, "3");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "emcolor", 0, "0.85 0.85 0.85 1.");
        CLASS_ATTR_STYLE                (c, "emcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "stcolor", 0, t_presetobj, f_color_button_stored);
        CLASS_ATTR_LABEL                (c, "stcolor", 0, "Stored Button Color");
        CLASS_ATTR_ORDER                (c, "stcolor", 0, "3");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "stcolor", 0, "0.5 0.5 0.5 1.");
        CLASS_ATTR_STYLE                (c, "stcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "secolor", 0, t_presetobj, f_color_button_selected);
        CLASS_ATTR_LABEL                (c, "secolor", 0, "Selected Button Color");
        CLASS_ATTR_ORDER                (c, "secolor", 0, "3");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "secolor", 0, "0.15 0.15 0.15 1.");
        CLASS_ATTR_STYLE                (c, "secolor", 0, "color");
        
        eclass_register(CLASS_BOX, c);
        preset_class = c;
    }
}
Exemplo n.º 8
0
extern "C" void setup_c0x2eplane(void)
{
    t_eclass *c = eclass_new("c.plane", (method)plane_new, (method)ebox_free, (short)sizeof(t_plane), CLASS_NOINLET, A_GIMME, 0);
    
    if(c)
    {
        eclass_guiinit(c, 0);
        
        eclass_addmethod(c, (method) plane_paint,           "paint",            A_NULL, 0);
        eclass_addmethod(c, (method) plane_notify,          "notify",           A_NULL, 0);
        eclass_addmethod(c, (method) plane_getdrawparams,   "getdrawparams",    A_NULL, 0);
        eclass_addmethod(c, (method) plane_oksize,          "oksize",           A_NULL, 0);
        
        eclass_addmethod(c, (method) plane_bang,            "bang",             A_FLOAT,0);
        eclass_addmethod(c, (method) plane_float,           "float",            A_FLOAT,0);
        eclass_addmethod(c, (method) plane_set,             "set",              A_GIMME,0);
        eclass_addmethod(c, (method) plane_list,            "list",             A_GIMME,0);
        eclass_addmethod(c, (method) plane_output,          "bang",             A_NULL, 0);
        
        eclass_addmethod(c, (method) plane_mousedown,       "mousedown",        A_NULL, 0);
        eclass_addmethod(c, (method) plane_mousedrag,       "mousedrag",        A_NULL, 0);
        eclass_addmethod(c, (method) plane_mouseup,         "mouseup",          A_NULL, 0);
        
        CLASS_ATTR_DEFAULT              (c, "size", 0, "120 120");
        
        CLASS_ATTR_FLOAT_ARRAY          (c, "bounds", 0, t_plane, f_dummy, 4);
        CLASS_ATTR_LABEL                (c, "bounds", 0, "Boundaries");
        CLASS_ATTR_ACCESSORS			(c, "bounds", plane_bounds_get, plane_bounds_set);
        CLASS_ATTR_ORDER                (c, "bounds", 0, "2");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bounds", 0, "-1. -1. 1. 1.");
        
        CLASS_ATTR_FLOAT                (c, "ptsize", 0, t_plane, f_size);
        CLASS_ATTR_LABEL                (c, "ptsize", 0, "Point size");
        CLASS_ATTR_ORDER                (c, "ptsize", 0, "3");
        CLASS_ATTR_FILTER_CLIP          (c, "ptsize", 1., 50.f);
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "ptsize", 0, "5");
        CLASS_ATTR_STYLE                (c, "ptsize", 0, "number");
        CLASS_ATTR_STEP                 (c, "ptsize", 0.5);
        
        CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_plane, f_color_background);
        CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
        CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
        CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_plane, f_color_border);
        CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
        CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
        CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "ptcolor", 0, t_plane, f_color_point);
        CLASS_ATTR_LABEL                (c, "ptcolor", 0, "Point Color");
        CLASS_ATTR_ORDER                (c, "ptcolor", 0, "3");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "ptcolor", 0, "0.5 0.5 0.5 1.");
        CLASS_ATTR_STYLE                (c, "ptcolor", 0, "color");
        
        eclass_register(CLASS_BOX, c);
        plane_class = c;
    }
}