Compare commits
No commits in common. "656bb9ebad5ff0c3b738b0f47df2e2da027e40d4" and "ab8644b9ecd319480952da5d89d95fffa87ed798" have entirely different histories.
656bb9ebad
...
ab8644b9ec
@ -107,8 +107,7 @@ static char bitmaps_module_documentation[] =
|
|||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"bitmaps",
|
"bitmaps",
|
||||||
bitmaps_module_documentation,
|
bitmaps_module_documentation,
|
||||||
|
@ -50,8 +50,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef box_methods[] =
|
static struct PyMethodDef box_methods[] = {
|
||||||
{
|
|
||||||
{"create", box_create, 1, box_create__doc__},
|
{"create", box_create, 1, box_create__doc__},
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
@ -64,8 +63,7 @@ static char box_module_documentation[] =
|
|||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"box", /* m_name */
|
"box", /* m_name */
|
||||||
box_module_documentation, /* m_doc */
|
box_module_documentation, /* m_doc */
|
||||||
|
@ -427,8 +427,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef browser_methods[] =
|
static struct PyMethodDef browser_methods[] = {
|
||||||
{
|
|
||||||
{"create", browser_create, 1, browser_create__doc__},
|
{"create", browser_create, 1, browser_create__doc__},
|
||||||
{"add_line", browser_add_line, 1, browser_add_line__doc__},
|
{"add_line", browser_add_line, 1, browser_add_line__doc__},
|
||||||
{"addto", browser_addto, 1, browser_addto__doc__},
|
{"addto", browser_addto, 1, browser_addto__doc__},
|
||||||
@ -461,8 +460,7 @@ static char browser_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"browser", /* m_name */
|
"browser", /* m_name */
|
||||||
browser_module_documentation, /* m_doc */
|
browser_module_documentation, /* m_doc */
|
||||||
|
@ -316,8 +316,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef button_methods[] =
|
static struct PyMethodDef button_methods[] = {
|
||||||
{
|
|
||||||
{"create", button_create, 1, button_create__doc__},
|
{"create", button_create, 1, button_create__doc__},
|
||||||
{"create_round", button_create_round, 1, button_create_round__doc__},
|
{"create_round", button_create_round, 1, button_create_round__doc__},
|
||||||
{"create_light", button_create_light, 1, button_create_light__doc__},
|
{"create_light", button_create_light, 1, button_create_light__doc__},
|
||||||
@ -345,8 +344,7 @@ static char button_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"button", /* m_name */
|
"button", /* m_name */
|
||||||
button_module_documentation, /* m_doc */
|
button_module_documentation, /* m_doc */
|
||||||
|
@ -293,8 +293,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef choice_methods[] =
|
static struct PyMethodDef choice_methods[] = {
|
||||||
{
|
|
||||||
{"create", choice_create, 1, choice_create__doc__},
|
{"create", choice_create, 1, choice_create__doc__},
|
||||||
{"clear", choice_clear, 1, choice_clear__doc__},
|
{"clear", choice_clear, 1, choice_clear__doc__},
|
||||||
{"addto", choice_addto, 1, choice_addto__doc__},
|
{"addto", choice_addto, 1, choice_addto__doc__},
|
||||||
@ -321,8 +320,7 @@ static char choice_module_documentation[] =
|
|||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"choice", /* m_name */
|
"choice", /* m_name */
|
||||||
choice_module_documentation, /* m_doc */
|
choice_module_documentation, /* m_doc */
|
||||||
|
@ -66,8 +66,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef clock_methods[] =
|
static struct PyMethodDef clock_methods[] = {
|
||||||
{
|
|
||||||
{"create", clock_create, 1, clock_create__doc__},
|
{"create", clock_create, 1, clock_create__doc__},
|
||||||
{"get", clock_get, 1, clock_get__doc__},
|
{"get", clock_get, 1, clock_get__doc__},
|
||||||
|
|
||||||
@ -81,8 +80,7 @@ static char clock_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"clock", /* m_name */
|
"clock", /* m_name */
|
||||||
clock_module_documentation, /* m_doc */
|
clock_module_documentation, /* m_doc */
|
||||||
|
@ -161,8 +161,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef counter_methods[] =
|
static struct PyMethodDef counter_methods[] = {
|
||||||
{
|
|
||||||
{"create", counter_create, 1, counter_create__doc__},
|
{"create", counter_create, 1, counter_create__doc__},
|
||||||
{"set_value", counter_set_value, 1, counter_set_value__doc__},
|
{"set_value", counter_set_value, 1, counter_set_value__doc__},
|
||||||
{"set_bounds", counter_set_bounds, 1, counter_set_bounds__doc__},
|
{"set_bounds", counter_set_bounds, 1, counter_set_bounds__doc__},
|
||||||
@ -180,8 +179,7 @@ static struct PyMethodDef counter_methods[] =
|
|||||||
static char counter_module_documentation[] =
|
static char counter_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"counter", /* m_name */
|
"counter", /* m_name */
|
||||||
counter_module_documentation, /* m_doc */
|
counter_module_documentation, /* m_doc */
|
||||||
|
@ -160,8 +160,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef dial_methods[] =
|
static struct PyMethodDef dial_methods[] = {
|
||||||
{
|
|
||||||
{"create", dial_create, 1, dial_create__doc__},
|
{"create", dial_create, 1, dial_create__doc__},
|
||||||
{"set_value", dial_set_value, 1, dial_set_value__doc__},
|
{"set_value", dial_set_value, 1, dial_set_value__doc__},
|
||||||
{"get_value", dial_get_value, 1, dial_get_value__doc__},
|
{"get_value", dial_get_value, 1, dial_get_value__doc__},
|
||||||
@ -180,8 +179,7 @@ static char dial_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"dial", /* m_name */
|
"dial", /* m_name */
|
||||||
dial_module_documentation, /* m_doc */
|
dial_module_documentation, /* m_doc */
|
||||||
|
@ -620,8 +620,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef forms_methods[] =
|
static struct PyMethodDef forms_methods[] = {
|
||||||
{
|
|
||||||
{ "create", forms_create, 1, forms_create__doc__ },
|
{ "create", forms_create, 1, forms_create__doc__ },
|
||||||
{ "freeze", forms_freeze, 1, forms_freeze__doc__ },
|
{ "freeze", forms_freeze, 1, forms_freeze__doc__ },
|
||||||
{ "unfreeze", forms_unfreeze, 1, forms_unfreeze__doc__ },
|
{ "unfreeze", forms_unfreeze, 1, forms_unfreeze__doc__ },
|
||||||
@ -667,8 +666,7 @@ static char forms_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"forms", /* m_name */
|
"forms", /* m_name */
|
||||||
forms_module_documentation, /* m_doc */
|
forms_module_documentation, /* m_doc */
|
||||||
|
@ -48,8 +48,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef frame_methods[] =
|
static struct PyMethodDef frame_methods[] = {
|
||||||
{
|
|
||||||
{"create", frame_create, 1, frame_create__doc__},
|
{"create", frame_create, 1, frame_create__doc__},
|
||||||
|
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
@ -62,8 +61,7 @@ static char frame_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"frame", /* m_name */
|
"frame", /* m_name */
|
||||||
frame_module_documentation, /* m_doc */
|
frame_module_documentation, /* m_doc */
|
||||||
|
@ -437,8 +437,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef goodies_methods[] =
|
static struct PyMethodDef goodies_methods[] = {
|
||||||
{
|
|
||||||
{"set_font", goodies_set_font, 1, goodies_set_font__doc__},
|
{"set_font", goodies_set_font, 1, goodies_set_font__doc__},
|
||||||
{"show_message", goodies_show_message, 1, goodies_show_message__doc__},
|
{"show_message", goodies_show_message, 1, goodies_show_message__doc__},
|
||||||
{"show_alert", goodies_show_alert, 1, goodies_show_alert__doc__},
|
{"show_alert", goodies_show_alert, 1, goodies_show_alert__doc__},
|
||||||
@ -474,8 +473,7 @@ static struct PyMethodDef goodies_methods[] =
|
|||||||
static char goodies_module_documentation[] =
|
static char goodies_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"goodies", /* m_name */
|
"goodies", /* m_name */
|
||||||
goodies_module_documentation, /* m_doc */
|
goodies_module_documentation, /* m_doc */
|
||||||
|
@ -199,8 +199,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef input_methods[] =
|
static struct PyMethodDef input_methods[] = {
|
||||||
{
|
|
||||||
{"create", input_create, 1, input_create__doc__},
|
{"create", input_create, 1, input_create__doc__},
|
||||||
{"set", input_set, 1, input_set__doc__},
|
{"set", input_set, 1, input_set__doc__},
|
||||||
{"set_color", input_set_color, 1, input_set_color__doc__},
|
{"set_color", input_set_color, 1, input_set_color__doc__},
|
||||||
@ -221,8 +220,7 @@ static char input_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"input", /* m_name */
|
"input", /* m_name */
|
||||||
input_module_documentation, /* m_doc */
|
input_module_documentation, /* m_doc */
|
||||||
|
@ -256,8 +256,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef menu_methods[] =
|
static struct PyMethodDef menu_methods[] = {
|
||||||
{
|
|
||||||
{"create", menu_create, 1, menu_create__doc__},
|
{"create", menu_create, 1, menu_create__doc__},
|
||||||
{"clear", menu_clear, 1, menu_clear__doc__},
|
{"clear", menu_clear, 1, menu_clear__doc__},
|
||||||
{"set", menu_set, 1, menu_set__doc__},
|
{"set", menu_set, 1, menu_set__doc__},
|
||||||
@ -281,8 +280,7 @@ static char menu_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"menu", /* m_name */
|
"menu", /* m_name */
|
||||||
menu_module_documentation, /* m_doc */
|
menu_module_documentation, /* m_doc */
|
||||||
|
@ -452,8 +452,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef obj_methods[] =
|
static struct PyMethodDef obj_methods[] = {
|
||||||
{
|
|
||||||
{"set_boxtype", obj_set_boxtype, 1, obj_set_boxtype__doc__},
|
{"set_boxtype", obj_set_boxtype, 1, obj_set_boxtype__doc__},
|
||||||
{"set_bw", obj_set_bw, 1, obj_set_bw__doc__},
|
{"set_bw", obj_set_bw, 1, obj_set_bw__doc__},
|
||||||
{"set_resize", obj_set_resize, 1, obj_set_resize__doc__},
|
{"set_resize", obj_set_resize, 1, obj_set_resize__doc__},
|
||||||
@ -488,8 +487,7 @@ static struct PyMethodDef obj_methods[] =
|
|||||||
static char objects_module_documentation[] =
|
static char objects_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"objects", /* m_name */
|
"objects", /* m_name */
|
||||||
objects_module_documentation, /* m_doc */
|
objects_module_documentation, /* m_doc */
|
||||||
|
@ -89,8 +89,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef pmp_methods[] =
|
static struct PyMethodDef pmp_methods[] = {
|
||||||
{
|
|
||||||
{"create", pmp_create, 1, pmp_create__doc__},
|
{"create", pmp_create, 1, pmp_create__doc__},
|
||||||
{"set_data", pmp_set_data, 1, pmp_set_data__doc__},
|
{"set_data", pmp_set_data, 1, pmp_set_data__doc__},
|
||||||
{"set_file", pmp_set_file, 1, pmp_set_file__doc__},
|
{"set_file", pmp_set_file, 1, pmp_set_file__doc__},
|
||||||
@ -105,8 +104,7 @@ static char pixmaps_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"pixmaps", /* m_name */
|
"pixmaps", /* m_name */
|
||||||
pixmaps_module_documentation, /* m_doc */
|
pixmaps_module_documentation, /* m_doc */
|
||||||
|
@ -318,8 +318,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef pup_methods[] =
|
static struct PyMethodDef pup_methods[] = {
|
||||||
{
|
|
||||||
{"new", pup_new, 1, pup_new__doc__},
|
{"new", pup_new, 1, pup_new__doc__},
|
||||||
{"def", pup_def, 1, pup_def__doc__},
|
{"def", pup_def, 1, pup_def__doc__},
|
||||||
{"addto", pup_addto, 1, pup_addto__doc__},
|
{"addto", pup_addto, 1, pup_addto__doc__},
|
||||||
@ -348,8 +347,7 @@ static struct PyMethodDef pup_methods[] =
|
|||||||
static char popups_module_documentation[] =
|
static char popups_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"popups", /* m_name */
|
"popups", /* m_name */
|
||||||
popups_module_documentation, /* m_doc */
|
popups_module_documentation, /* m_doc */
|
||||||
|
@ -256,8 +256,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef posit_methods[] =
|
static struct PyMethodDef posit_methods[] = {
|
||||||
{
|
|
||||||
{"create", posit_create, 1, posit_create__doc__},
|
{"create", posit_create, 1, posit_create__doc__},
|
||||||
{"set_xvalue", posit_set_xvalue, 1, posit_set_xvalue__doc__},
|
{"set_xvalue", posit_set_xvalue, 1, posit_set_xvalue__doc__},
|
||||||
{"get_xvalue", posit_get_xvalue, 1, posit_get_xvalue__doc__},
|
{"get_xvalue", posit_get_xvalue, 1, posit_get_xvalue__doc__},
|
||||||
@ -280,8 +279,7 @@ static struct PyMethodDef posit_methods[] =
|
|||||||
static char positioner_module_documentation[] =
|
static char positioner_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"positioner", /* m_name */
|
"positioner", /* m_name */
|
||||||
positioner_module_documentation, /* m_doc */
|
positioner_module_documentation, /* m_doc */
|
||||||
|
@ -219,8 +219,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef slider_methods[] =
|
static struct PyMethodDef slider_methods[] = {
|
||||||
{
|
|
||||||
{"create", slider_create, 1, slider_create__doc__},
|
{"create", slider_create, 1, slider_create__doc__},
|
||||||
{"create_val", slider_create_val, 1, slider_create_val__doc__},
|
{"create_val", slider_create_val, 1, slider_create_val__doc__},
|
||||||
{"set_value", slider_set_value, 1, slider_set_value__doc__},
|
{"set_value", slider_set_value, 1, slider_set_value__doc__},
|
||||||
@ -241,8 +240,7 @@ static struct PyMethodDef slider_methods[] =
|
|||||||
static char slider_module_documentation[] =
|
static char slider_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"slider", /* m_name */
|
"slider", /* m_name */
|
||||||
slider_module_documentation, /* m_doc */
|
slider_module_documentation, /* m_doc */
|
||||||
|
@ -46,8 +46,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef text_methods[] =
|
static struct PyMethodDef text_methods[] = {
|
||||||
{
|
|
||||||
{"create", text_create, 1, text_create__doc__},
|
{"create", text_create, 1, text_create__doc__},
|
||||||
|
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
@ -60,8 +59,7 @@ static char text_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"text", /* m_name */
|
"text", /* m_name */
|
||||||
text_module_documentation, /* m_doc */
|
text_module_documentation, /* m_doc */
|
||||||
|
@ -85,8 +85,7 @@ PyObject *args;
|
|||||||
|
|
||||||
/* List of methods defined in the module */
|
/* List of methods defined in the module */
|
||||||
|
|
||||||
static struct PyMethodDef timer_methods[] =
|
static struct PyMethodDef timer_methods[] = {
|
||||||
{
|
|
||||||
{"create", fl_timer_create, 1, timer_create__doc__},
|
{"create", fl_timer_create, 1, timer_create__doc__},
|
||||||
{"set", timer_set, 1, timer_set__doc__},
|
{"set", timer_set, 1, timer_set__doc__},
|
||||||
{"get", timer_get, 1, timer_get__doc__},
|
{"get", timer_get, 1, timer_get__doc__},
|
||||||
@ -101,8 +100,7 @@ static char timer_module_documentation[] =
|
|||||||
""
|
""
|
||||||
;
|
;
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"timer", /* m_name */
|
"timer", /* m_name */
|
||||||
timer_module_documentation, /* m_doc */
|
timer_module_documentation, /* m_doc */
|
||||||
|
@ -58,8 +58,7 @@ PyObject *args;
|
|||||||
return Py_BuildValue("l",(long)obj);
|
return Py_BuildValue("l",(long)obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyMethodDef xformsMethods [] =
|
static PyMethodDef xformsMethods [] ={
|
||||||
{
|
|
||||||
|
|
||||||
/* XForms specifics */
|
/* XForms specifics */
|
||||||
{"init",pyxforms_init,1},
|
{"init",pyxforms_init,1},
|
||||||
@ -69,8 +68,7 @@ static PyMethodDef xformsMethods [] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"xforms", /* m_name */
|
"xforms", /* m_name */
|
||||||
"", /* m_doc */
|
"", /* m_doc */
|
||||||
|
@ -417,8 +417,7 @@ static struct PyMethodDef xyplot_methods[] =
|
|||||||
static char xyplot_module_documentation[] =
|
static char xyplot_module_documentation[] =
|
||||||
""
|
""
|
||||||
;
|
;
|
||||||
static struct PyModuleDef moduledef =
|
static struct PyModuleDef moduledef = {
|
||||||
{
|
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
"xyplot", /* m_name */
|
"xyplot", /* m_name */
|
||||||
xyplot_module_documentation, /* m_doc */
|
xyplot_module_documentation, /* m_doc */
|
||||||
|
@ -4,56 +4,48 @@
|
|||||||
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from . import (
|
import xforms
|
||||||
xforms,
|
import forms
|
||||||
forms,
|
import objects
|
||||||
objects,
|
import bitmaps
|
||||||
bitmaps,
|
import pixmaps
|
||||||
pixmaps,
|
import box
|
||||||
box,
|
import browser
|
||||||
browser,
|
import button
|
||||||
button,
|
import choice
|
||||||
choice,
|
import clock
|
||||||
clock,
|
import counter
|
||||||
counter,
|
import dial
|
||||||
dial,
|
import frame
|
||||||
frame,
|
import input
|
||||||
input,
|
import menu
|
||||||
menu,
|
import positioner
|
||||||
positioner,
|
import slider
|
||||||
slider,
|
import timer
|
||||||
timer,
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# These are function needed to run the XForms library
|
# These are function needed to run the XForms library
|
||||||
# Needs a LOT of work
|
# Needs a LOT of work
|
||||||
|
|
||||||
|
|
||||||
def xfinit (appname,appclass,argv0):
|
def xfinit (appname,appclass,argv0):
|
||||||
xforms.init (appname,appclass,argv0)
|
xforms.init (appname,appclass,argv0)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the synthetic event-loop to use under python:
|
# This is the synthetic event-loop to use under python:
|
||||||
|
|
||||||
_objects={}
|
_objects={}
|
||||||
|
|
||||||
|
|
||||||
def runforms():
|
def runforms():
|
||||||
while 1:
|
while 1:
|
||||||
ob=_objects[str(xforms.do_forms())]
|
ob=_objects[str(xforms.do_forms())]
|
||||||
ob.cb (ob.args)
|
ob.cb (ob.args)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the default callback function:
|
# This is the default callback function:
|
||||||
|
|
||||||
|
|
||||||
def _nocb(args):
|
def _nocb(args):
|
||||||
print("This object has no Callback!")
|
print("This object has no Callback!")
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#This is the Form class
|
#This is the Form class
|
||||||
|
|
||||||
@ -75,55 +67,40 @@ class Form:
|
|||||||
self.objs=() # A place to store the obj list. Useful?
|
self.objs=() # A place to store the obj list. Useful?
|
||||||
|
|
||||||
def Show (self):
|
def Show (self):
|
||||||
self.winid = forms.show(
|
self.winid=forms.show (self.id,self.__placement,self.__decoration,self.title)
|
||||||
self.id, self.__placement, self.__decoration, self.title
|
|
||||||
)
|
|
||||||
|
|
||||||
def Hide (self):
|
def Hide (self):
|
||||||
forms.hide (self.id)
|
forms.hide (self.id)
|
||||||
|
|
||||||
def Freeze (self):
|
def Freeze (self):
|
||||||
forms.freeze (self.id)
|
forms.freeze (self.id)
|
||||||
|
|
||||||
def Unfreeze (self):
|
def Unfreeze (self):
|
||||||
forms.unfreeze (self.id)
|
forms.unfreeze (self.id)
|
||||||
|
|
||||||
def Activate (self):
|
def Activate (self):
|
||||||
forms.activate (self.id)
|
forms.activate (self.id)
|
||||||
|
|
||||||
def Deactivate (self):
|
def Deactivate (self):
|
||||||
forms.deactivate (self.id)
|
forms.deactivate (self.id)
|
||||||
|
|
||||||
def Scale (self,x,y):
|
def Scale (self,x,y):
|
||||||
forms.scale (self.id,x,y)
|
forms.scale (self.id,x,y)
|
||||||
|
|
||||||
def Redraw (self):
|
def Redraw (self):
|
||||||
forms.redraw (self.id)
|
forms.redraw (self.id)
|
||||||
|
|
||||||
def Add (self,object):
|
def Add (self,object):
|
||||||
forms.add_object (self.id,object.id)
|
forms.add_object (self.id,object.id)
|
||||||
object.parent=self
|
object.parent=self
|
||||||
|
|
||||||
def Setminsize (self,x,y):
|
def Setminsize (self,x,y):
|
||||||
forms.set_minsize (self.id,x,y)
|
forms.set_minsize (self.id,x,y)
|
||||||
self.__minx=x # The __ is needed to avoid endless looping
|
self.__minx=x # The __ is needed to avoid endless looping
|
||||||
self.__miny=y # on min[xy], which are non-gettable from XForms
|
self.__miny=y # on min[xy], which are non-gettable from XForms
|
||||||
|
|
||||||
def Setmaxsize (self,x,y):
|
def Setmaxsize (self,x,y):
|
||||||
forms.set_maxsize (self.id,x,y)
|
forms.set_maxsize (self.id,x,y)
|
||||||
self.__maxx=x
|
self.__maxx=x
|
||||||
self.__maxy=y
|
self.__maxy=y
|
||||||
|
|
||||||
def Settitle (self,title):
|
def Settitle (self,title):
|
||||||
forms.set_title (self.id,title)
|
forms.set_title (self.id,title)
|
||||||
self.__title=title
|
self.__title=title
|
||||||
|
|
||||||
def Gettitle (self):
|
def Gettitle (self):
|
||||||
if self.visible:
|
if self.visible:
|
||||||
return forms.get_title(self.id)
|
return forms.get_title(self.id)
|
||||||
else:
|
else:
|
||||||
return self.__title
|
return self.__title
|
||||||
|
|
||||||
def Setcolor (c1,c2):
|
def Setcolor (c1,c2):
|
||||||
self.__box.Setcolor (c1,c2)
|
self.__box.Setcolor (c1,c2)
|
||||||
|
|
||||||
@ -174,6 +151,7 @@ class Form:
|
|||||||
else:
|
else:
|
||||||
self.__dict__ [name]=value
|
self.__dict__ [name]=value
|
||||||
|
|
||||||
|
|
||||||
def __getattr__(self,name):
|
def __getattr__(self,name):
|
||||||
if name=="x":
|
if name=="x":
|
||||||
(tx,ty,tw,th)=forms.get_geometry (self.id)
|
(tx,ty,tw,th)=forms.get_geometry (self.id)
|
||||||
@ -196,39 +174,25 @@ class Form:
|
|||||||
elif name=="maxy":
|
elif name=="maxy":
|
||||||
return self.__maxy
|
return self.__maxy
|
||||||
elif name=="vmode":
|
elif name=="vmode":
|
||||||
(vmode, active, dblbuffer, frozen, visible, border, other) = forms.get_attr(
|
(vmode,active,dblbuffer,frozen,visible,border,other)=forms.get_attr(self.id)
|
||||||
self.id
|
|
||||||
)
|
|
||||||
return vmode
|
return vmode
|
||||||
elif name=="active":
|
elif name=="active":
|
||||||
(vmode, active, dblbuffer, frozen, visible, border, other) = forms.get_attr(
|
(vmode,active,dblbuffer,frozen,visible,border,other)=forms.get_attr(self.id)
|
||||||
self.id
|
|
||||||
)
|
|
||||||
return active
|
return active
|
||||||
elif name=="dblbuffer":
|
elif name=="dblbuffer":
|
||||||
(vmode, active, dblbuffer, frozen, visible, border, other) = forms.get_attr(
|
(vmode,active,dblbuffer,frozen,visible,border,other)=forms.get_attr(self.id)
|
||||||
self.id
|
|
||||||
)
|
|
||||||
return dblbuffer
|
return dblbuffer
|
||||||
elif name=="frozen":
|
elif name=="frozen":
|
||||||
(vmode, active, dblbuffer, frozen, visible, border, other) = forms.get_attr(
|
(vmode,active,dblbuffer,frozen,visible,border,other)=forms.get_attr(self.id)
|
||||||
self.id
|
|
||||||
)
|
|
||||||
return frozen
|
return frozen
|
||||||
elif name=="visible":
|
elif name=="visible":
|
||||||
(vmode, active, dblbuffer, frozen, visible, border, other) = forms.get_attr(
|
(vmode,active,dblbuffer,frozen,visible,border,other)=forms.get_attr(self.id)
|
||||||
self.id
|
|
||||||
)
|
|
||||||
return visible
|
return visible
|
||||||
elif name=="border":
|
elif name=="border":
|
||||||
(vmode, active, dblbuffer, frozen, visible, border, other) = forms.get_attr(
|
(vmode,active,dblbuffer,frozen,visible,border,other)=forms.get_attr(self.id)
|
||||||
self.id
|
|
||||||
)
|
|
||||||
return border
|
return border
|
||||||
elif name=="other":
|
elif name=="other":
|
||||||
(vmode, active, dblbuffer, frozen, visible, border, other) = forms.get_attr(
|
(vmode,active,dblbuffer,frozen,visible,border,other)=forms.get_attr(self.id)
|
||||||
self.id
|
|
||||||
)
|
|
||||||
return other
|
return other
|
||||||
elif name=="title":
|
elif name=="title":
|
||||||
return self.Gettitle ()
|
return self.Gettitle ()
|
||||||
@ -236,11 +200,8 @@ class Form:
|
|||||||
return self.__box.c1
|
return self.__box.c1
|
||||||
elif name=="c2":
|
elif name=="c2":
|
||||||
return self.__box.c2
|
return self.__box.c2
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
#I'm not sure if this is a nice thing to do
|
#I'm not sure if this is a nice thing to do
|
||||||
# forms.free (self.id)
|
# forms.free (self.id)
|
||||||
|
|
||||||
@ -248,43 +209,32 @@ class Form:
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
#This is the XFObject class, for generic XForms objects
|
#This is the XFObject class, for generic XForms objects
|
||||||
|
|
||||||
|
|
||||||
class XFObject:
|
class XFObject:
|
||||||
def __init__ (self):
|
def __init__ (self):
|
||||||
self.id=0
|
self.id=0
|
||||||
self.__c1=11
|
self.__c1=11
|
||||||
self.__c2=15
|
self.__c2=15
|
||||||
|
|
||||||
def Setgravity (self,a,b):
|
def Setgravity (self,a,b):
|
||||||
objects.set_gravity (self.id,a,b)
|
objects.set_gravity (self.id,a,b)
|
||||||
|
|
||||||
def Redraw (self):
|
def Redraw (self):
|
||||||
objects.redraw (self.id)
|
objects.redraw (self.id)
|
||||||
|
|
||||||
def Scale (self,x,y):
|
def Scale (self,x,y):
|
||||||
objects.scale (self.id,x,y)
|
objects.scale (self.id,x,y)
|
||||||
|
|
||||||
def Show (self):
|
def Show (self):
|
||||||
objects.show (self.id)
|
objects.show (self.id)
|
||||||
self.Setcolor (self.__c1,self.__c2)
|
self.Setcolor (self.__c1,self.__c2)
|
||||||
|
|
||||||
def Hide (self):
|
def Hide (self):
|
||||||
objects.hide (self.id)
|
objects.hide (self.id)
|
||||||
|
|
||||||
def Delete(self):
|
def Delete(self):
|
||||||
objects.delete (self.id)
|
objects.delete (self.id)
|
||||||
|
|
||||||
def Setcolor (self,c1,c2):
|
def Setcolor (self,c1,c2):
|
||||||
self.__c1=c1
|
self.__c1=c1
|
||||||
self.__c2=c2
|
self.__c2=c2
|
||||||
objects.set_color (self.id,c1,c2)
|
objects.set_color (self.id,c1,c2)
|
||||||
|
|
||||||
def Activate (self):
|
def Activate (self):
|
||||||
objects.activate (self.id)
|
objects.activate (self.id)
|
||||||
|
|
||||||
def Deactivate (self):
|
def Deactivate (self):
|
||||||
objects.deactivate (self.id)
|
objects.deactivate (self.id)
|
||||||
|
|
||||||
def __setattr__ (self,name,value):
|
def __setattr__ (self,name,value):
|
||||||
if name=="boxtype":
|
if name=="boxtype":
|
||||||
objects.set_boxtype (self.id,value)
|
objects.set_boxtype (self.id,value)
|
||||||
@ -324,7 +274,6 @@ class XFObject:
|
|||||||
self.Setcolor (self.__c1,value)
|
self.Setcolor (self.__c1,value)
|
||||||
else:
|
else:
|
||||||
self.__dict__ [name]=value
|
self.__dict__ [name]=value
|
||||||
|
|
||||||
def __getattr__(self,name):
|
def __getattr__(self,name):
|
||||||
if name=="c1":
|
if name=="c1":
|
||||||
return self.__c1
|
return self.__c1
|
||||||
@ -339,15 +288,12 @@ class XFObject:
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# The Bitmap Class
|
# The Bitmap Class
|
||||||
|
|
||||||
|
|
||||||
class Bitmap(XFObject):
|
class Bitmap(XFObject):
|
||||||
def __init__(self,t=0,x=10,y=10,w=100,h=100,l="Bitmap"):
|
def __init__(self,t=0,x=10,y=10,w=100,h=100,l="Bitmap"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
self.id=bitmaps.create(t,x,y,w,h,l)
|
self.id=bitmaps.create(t,x,y,w,h,l)
|
||||||
|
|
||||||
def Load (self,file):
|
def Load (self,file):
|
||||||
bitmaps.set_file (self.id,file)
|
bitmaps.set_file (self.id,file)
|
||||||
|
|
||||||
def __setattr__ (self,name,value):
|
def __setattr__ (self,name,value):
|
||||||
if name=="background":
|
if name=="background":
|
||||||
objects.set_color(self.id,value,0)
|
objects.set_color(self.id,value,0)
|
||||||
@ -360,15 +306,12 @@ class Bitmap(XFObject):
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# The Pixmap Class
|
# The Pixmap Class
|
||||||
|
|
||||||
|
|
||||||
class Pixmap(XFObject):
|
class Pixmap(XFObject):
|
||||||
def __init__(self,t=0,x=10,y=10,w=100,h=100,l="Pixmap"):
|
def __init__(self,t=0,x=10,y=10,w=100,h=100,l="Pixmap"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
self.id=pixmaps.create(t,x,y,w,h,l)
|
self.id=pixmaps.create(t,x,y,w,h,l)
|
||||||
|
|
||||||
def Load (self,file):
|
def Load (self,file):
|
||||||
pixmaps.set_file (self.id,file)
|
pixmaps.set_file (self.id,file)
|
||||||
|
|
||||||
def __setattr__ (self,name,value):
|
def __setattr__ (self,name,value):
|
||||||
if name=="background":
|
if name=="background":
|
||||||
objects.set_color(self.id,value,0)
|
objects.set_color(self.id,value,0)
|
||||||
@ -381,20 +324,16 @@ class Pixmap(XFObject):
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# The Box Class
|
# The Box Class
|
||||||
|
|
||||||
|
|
||||||
class Box(XFObject):
|
class Box(XFObject):
|
||||||
def __init__(self,t=6,x=10,y=10,w=90,h=90,l="Box"):
|
def __init__(self,t=6,x=10,y=10,w=90,h=90,l="Box"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
self.id=box.create(t,x,y,w,h,l)
|
self.id=box.create(t,x,y,w,h,l)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# The Browser class
|
# The Browser class
|
||||||
#
|
#
|
||||||
# I want the Browser class to act just like what it is: a list
|
# I want the Browser class to act just like what it is: a list
|
||||||
# only with a "few" more methods and stuff
|
# only with a "few" more methods and stuff
|
||||||
|
|
||||||
|
|
||||||
class Browser (XFObject):
|
class Browser (XFObject):
|
||||||
def __init__(self,t=1,x=10,y=10,w=90,h=120,l="Browser"):
|
def __init__(self,t=1,x=10,y=10,w=90,h=120,l="Browser"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -402,67 +341,46 @@ class Browser(XFObject):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def Add(self,line):
|
def Add(self,line):
|
||||||
browser.add_line (self.id,line)
|
browser.add_line (self.id,line)
|
||||||
|
|
||||||
def Addto(self,line):
|
def Addto(self,line):
|
||||||
browser.addto (self.id,line)
|
browser.addto (self.id,line)
|
||||||
|
|
||||||
def Insert(self,n,line):
|
def Insert(self,n,line):
|
||||||
browser.insert_line(self.id,n,line)
|
browser.insert_line(self.id,n,line)
|
||||||
|
|
||||||
def Delete(self,n):
|
def Delete(self,n):
|
||||||
browser.delete_line(self.id,n)
|
browser.delete_line(self.id,n)
|
||||||
|
|
||||||
def Replace(self,n,line):
|
def Replace(self,n,line):
|
||||||
browser.replace_line(self.id,n,line)
|
browser.replace_line(self.id,n,line)
|
||||||
|
|
||||||
def Getline(self,n):
|
def Getline(self,n):
|
||||||
return browser.get_line (self.id,n)
|
return browser.get_line (self.id,n)
|
||||||
|
|
||||||
def Load(self,path):
|
def Load(self,path):
|
||||||
return browser.load (self.id,path)
|
return browser.load (self.id,path)
|
||||||
|
|
||||||
def Select(self,n):
|
def Select(self,n):
|
||||||
browser.select_line (self.id,n)
|
browser.select_line (self.id,n)
|
||||||
|
|
||||||
def Deselect(self,n):
|
def Deselect(self,n):
|
||||||
browser.deselect_line (self.id,n)
|
browser.deselect_line (self.id,n)
|
||||||
|
|
||||||
def Deselectall(self):
|
def Deselectall(self):
|
||||||
browser.deselect(self.id)
|
browser.deselect(self.id)
|
||||||
|
|
||||||
def Isselected(self,n):
|
def Isselected(self,n):
|
||||||
return browser.isselected_line(self.id,n)
|
return browser.isselected_line(self.id,n)
|
||||||
|
|
||||||
def Gettopline(self):
|
def Gettopline(self):
|
||||||
return browser.get_topline(self.id)
|
return browser.get_topline(self.id)
|
||||||
|
|
||||||
def Get(self):
|
def Get(self):
|
||||||
return browser.get(self.id)
|
return browser.get(self.id)
|
||||||
|
|
||||||
def Getmaxline(self):
|
def Getmaxline(self):
|
||||||
return browser.get_maxline(self.id)
|
return browser.get_maxline(self.id)
|
||||||
|
|
||||||
def Screenlines(self):
|
def Screenlines(self):
|
||||||
return browser.get_screenlines(self.id)
|
return browser.get_screenlines(self.id)
|
||||||
|
|
||||||
def Settopline(self,n):
|
def Settopline(self,n):
|
||||||
browser.set_topline(self.id,n)
|
browser.set_topline(self.id,n)
|
||||||
|
|
||||||
def Setfontsize(self,n):
|
def Setfontsize(self,n):
|
||||||
browser.set_fontsize(self.id,n)
|
browser.set_fontsize(self.id,n)
|
||||||
|
|
||||||
def Setfontstyle(self,n):
|
def Setfontstyle(self,n):
|
||||||
browser.set_fontstyle(self.id,n)
|
browser.set_fontstyle(self.id,n)
|
||||||
|
|
||||||
def Setspecialkey(self,c):
|
def Setspecialkey(self,c):
|
||||||
browser.set_specialkey(self.id,c)
|
browser.set_specialkey(self.id,c)
|
||||||
|
|
||||||
def Setleftslider(self,l):
|
def Setleftslider(self,l):
|
||||||
browser.set_leftslider(self.id,l)
|
browser.set_leftslider(self.id,l)
|
||||||
|
|
||||||
def __setattr__ (self,name,value):
|
def __setattr__ (self,name,value):
|
||||||
if name=="leftslider":
|
if name=="leftslider":
|
||||||
self.Setleftslider(value)
|
self.Setleftslider(value)
|
||||||
@ -478,10 +396,10 @@ class Browser(XFObject):
|
|||||||
XFObject.__setattr__(self,name,value)
|
XFObject.__setattr__(self,name,value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#This is the Button class.
|
#This is the Button class.
|
||||||
|
|
||||||
|
|
||||||
class Button(XFObject):
|
class Button(XFObject):
|
||||||
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Button"):
|
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Button"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -489,7 +407,6 @@ class Button(XFObject):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def __call__(self,v=-1):
|
def __call__(self,v=-1):
|
||||||
# I think this is nice: if you have a button called b,
|
# I think this is nice: if you have a button called b,
|
||||||
# b() returns the button's value
|
# b() returns the button's value
|
||||||
@ -515,11 +432,9 @@ class Button(XFObject):
|
|||||||
else:
|
else:
|
||||||
return XFObject.__getattr__(self,name)
|
return XFObject.__getattr__(self,name)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Roundbutton class
|
# This is the Roundbutton class
|
||||||
|
|
||||||
|
|
||||||
class Roundbutton (Button):
|
class Roundbutton (Button):
|
||||||
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Roundbutton"):
|
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Roundbutton"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -527,12 +442,9 @@ class Roundbutton(Button):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Lightbutton class
|
# This is the Lightbutton class
|
||||||
|
|
||||||
|
|
||||||
class Lightbutton (Button):
|
class Lightbutton (Button):
|
||||||
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Lightbutton"):
|
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Lightbutton"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -540,12 +452,9 @@ class Lightbutton(Button):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Checkbutton class
|
# This is the Checkbutton class
|
||||||
|
|
||||||
|
|
||||||
class Checkbutton (Button):
|
class Checkbutton (Button):
|
||||||
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Checkbutton"):
|
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Checkbutton"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -553,12 +462,9 @@ class Checkbutton(Button):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Bitmapbutton class
|
# This is the Bitmapbutton class
|
||||||
|
|
||||||
|
|
||||||
class Bitmapbutton (Button):
|
class Bitmapbutton (Button):
|
||||||
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Bitmapbutton"):
|
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Bitmapbutton"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -566,12 +472,9 @@ class Bitmapbutton(Button):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Pixmapbutton class
|
# This is the Pixmapbutton class
|
||||||
|
|
||||||
|
|
||||||
class Pixmapbutton (Button):
|
class Pixmapbutton (Button):
|
||||||
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Pixmapbutton"):
|
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Pixmapbutton"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -579,13 +482,10 @@ class Pixmapbutton(Button):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Choice Class
|
# This is the Choice Class
|
||||||
#This one needs a getattr, setattr pair
|
#This one needs a getattr, setattr pair
|
||||||
|
|
||||||
|
|
||||||
class Choice (XFObject):
|
class Choice (XFObject):
|
||||||
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Choice"):
|
def __init__(self,t=0,x=10,y=10,w=90,h=30,l="Choice"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -593,57 +493,40 @@ class Choice(XFObject):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def Clear (self):
|
def Clear (self):
|
||||||
choice.clear(self.id)
|
choice.clear(self.id)
|
||||||
|
|
||||||
def Addto (self,s):
|
def Addto (self,s):
|
||||||
choice.addto(self.id,s)
|
choice.addto(self.id,s)
|
||||||
|
|
||||||
def Replace (self,n,s):
|
def Replace (self,n,s):
|
||||||
choice.replace(self.id,n,s)
|
choice.replace(self.id,n,s)
|
||||||
|
|
||||||
def Delete (self,n):
|
def Delete (self,n):
|
||||||
choice.delete(self.id,n)
|
choice.delete(self.id,n)
|
||||||
|
|
||||||
def Set (self,n):
|
def Set (self,n):
|
||||||
choice.set(self.id,n)
|
choice.set(self.id,n)
|
||||||
|
|
||||||
def Settext (self,s):
|
def Settext (self,s):
|
||||||
choice.set_text (self.id,s)
|
choice.set_text (self.id,s)
|
||||||
|
|
||||||
def Get (self):
|
def Get (self):
|
||||||
return choice.get (self.id)
|
return choice.get (self.id)
|
||||||
|
|
||||||
def Getmaxitems (self):
|
def Getmaxitems (self):
|
||||||
return choice.get_maxitems (self.id)
|
return choice.get_maxitems (self.id)
|
||||||
|
|
||||||
def Gettext (self):
|
def Gettext (self):
|
||||||
return choice.get_text (self.id)
|
return choice.get_text (self.id)
|
||||||
|
|
||||||
def Setfontsize (self,n):
|
def Setfontsize (self,n):
|
||||||
choice.set_fontsize(self.id,n)
|
choice.set_fontsize(self.id,n)
|
||||||
|
|
||||||
def Setalign (self,n):
|
def Setalign (self,n):
|
||||||
choice.set_align (self.id,n)
|
choice.set_align (self.id,n)
|
||||||
|
|
||||||
def Setmode (self,n,m):
|
def Setmode (self,n,m):
|
||||||
choice.set_item_mode (self.id,n,m)
|
choice.set_item_mode (self.id,n,m)
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# This is the clock class
|
# This is the clock class
|
||||||
|
|
||||||
|
|
||||||
class Clock (XFObject):
|
class Clock (XFObject):
|
||||||
def __init__(self,t=0,x=10,y=10,w=90,h=90,l="Clock"):
|
def __init__(self,t=0,x=10,y=10,w=90,h=90,l="Clock"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
self.id=clock.create(t,x,y,w,h,l)
|
self.id=clock.create(t,x,y,w,h,l)
|
||||||
|
|
||||||
def Get (self):
|
def Get (self):
|
||||||
return clock.get (self.id)
|
return clock.get (self.id)
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# This is the counter class
|
# This is the counter class
|
||||||
|
|
||||||
@ -655,30 +538,22 @@ class Counter(XFObject):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def Set (self,v):
|
def Set (self,v):
|
||||||
counter.set_value (self.id,v)
|
counter.set_value (self.id,v)
|
||||||
|
|
||||||
def Setbounds (self,min,max):
|
def Setbounds (self,min,max):
|
||||||
counter.set_bounds (self.id,min,max)
|
counter.set_bounds (self.id,min,max)
|
||||||
|
|
||||||
def Setstep (self,s1,s2):
|
def Setstep (self,s1,s2):
|
||||||
counter.set_step (self.id,s1,s2)
|
counter.set_step (self.id,s1,s2)
|
||||||
|
|
||||||
def Setprecision (self,p):
|
def Setprecision (self,p):
|
||||||
counter.set_precision (self.id,p)
|
counter.set_precision (self.id,p)
|
||||||
|
|
||||||
def Get (self):
|
def Get (self):
|
||||||
return counter.get_value (self.id)
|
return counter.get_value (self.id)
|
||||||
|
|
||||||
def Setreturn (self,v):
|
def Setreturn (self,v):
|
||||||
counter.set_return (self.id,v)
|
counter.set_return (self.id,v)
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# This is the Dial class
|
# This is the Dial class
|
||||||
|
|
||||||
|
|
||||||
class Dial (XFObject):
|
class Dial (XFObject):
|
||||||
def __init__(self,t=0,x=10,y=10,w=60,h=60,l="Dial"):
|
def __init__(self,t=0,x=10,y=10,w=60,h=60,l="Dial"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -686,34 +561,25 @@ class Dial(XFObject):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def Set (self,v):
|
def Set (self,v):
|
||||||
dial.set_value(self.id,v)
|
dial.set_value(self.id,v)
|
||||||
|
|
||||||
def Get (self):
|
def Get (self):
|
||||||
return dial.get_value (self.id)
|
return dial.get_value (self.id)
|
||||||
|
|
||||||
def Setbounds (self,min,max):
|
def Setbounds (self,min,max):
|
||||||
dial.set_bounds (self.id,min,max)
|
dial.set_bounds (self.id,min,max)
|
||||||
|
|
||||||
def Getbounds (self):
|
def Getbounds (self):
|
||||||
return dial.get_bounds (self.id)
|
return dial.get_bounds (self.id)
|
||||||
|
|
||||||
def Setstep (self,v):
|
def Setstep (self,v):
|
||||||
dial.set_step (self.id,v)
|
dial.set_step (self.id,v)
|
||||||
|
|
||||||
def Setreturn (self,v):
|
def Setreturn (self,v):
|
||||||
dial.set_return (self.id,v)
|
dial.set_return (self.id,v)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Frame class
|
# This is the Frame class
|
||||||
class Frame (XFObject):
|
class Frame (XFObject):
|
||||||
def __init__(self,t=0,x=10,y=10,w=60,h=60,l="Frame"):
|
def __init__(self,t=0,x=10,y=10,w=60,h=60,l="Frame"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
self.id=frame.create(t,x,y,w,h,l)
|
self.id=frame.create(t,x,y,w,h,l)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Input class
|
# This is the Input class
|
||||||
|
|
||||||
@ -725,31 +591,22 @@ class Input(XFObject):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def Set (self,s):
|
def Set (self,s):
|
||||||
input.set (self.id,s)
|
input.set (self.id,s)
|
||||||
|
|
||||||
def Setcolor (self,c1,c2):
|
def Setcolor (self,c1,c2):
|
||||||
input.set_color (self.id,c1,c2)
|
input.set_color (self.id,c1,c2)
|
||||||
|
|
||||||
def Get (self):
|
def Get (self):
|
||||||
return input.get(self.id)
|
return input.get(self.id)
|
||||||
|
|
||||||
def Setreturn (self,v):
|
def Setreturn (self,v):
|
||||||
input.set_return (self.id,v)
|
input.set_return (self.id,v)
|
||||||
|
|
||||||
def Setscroll (self,v):
|
def Setscroll (self,v):
|
||||||
input.set_scroll (self.id,v)
|
input.set_scroll (self.id,v)
|
||||||
|
|
||||||
def Setcursorpos (self,x,y=1):
|
def Setcursorpos (self,x,y=1):
|
||||||
input.set_cursorpos (self.id,x,y)
|
input.set_cursorpos (self.id,x,y)
|
||||||
|
|
||||||
def Setselected (self,v):
|
def Setselected (self,v):
|
||||||
input.set_selected (self.id,v)
|
input.set_selected (self.id,v)
|
||||||
|
|
||||||
def Setselectedrange (self,x1,x2):
|
def Setselectedrange (self,x1,x2):
|
||||||
input.set_selected_range (self.id,x1,x2)
|
input.set_selected_range (self.id,x1,x2)
|
||||||
|
|
||||||
def __setattr__ (self,name,value):
|
def __setattr__ (self,name,value):
|
||||||
if name=="value":
|
if name=="value":
|
||||||
self.Set(value)
|
self.Set(value)
|
||||||
@ -766,7 +623,6 @@ class Input(XFObject):
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Menu class
|
# This is the Menu class
|
||||||
|
|
||||||
|
|
||||||
class Menu (XFObject):
|
class Menu (XFObject):
|
||||||
def __init__(self,t=0,x=10,y=10,w=60,h=30,l="Menu"):
|
def __init__(self,t=0,x=10,y=10,w=60,h=30,l="Menu"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -774,45 +630,32 @@ class Menu(XFObject):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def Clear (self):
|
def Clear (self):
|
||||||
menu.clear (self.id)
|
menu.clear (self.id)
|
||||||
|
|
||||||
def Set (self,s):
|
def Set (self,s):
|
||||||
menu.set (self.id,s)
|
menu.set (self.id,s)
|
||||||
|
|
||||||
def Addto (self,s):
|
def Addto (self,s):
|
||||||
menu.addto(self.id,s)
|
menu.addto(self.id,s)
|
||||||
|
|
||||||
def Replace (self,n,s):
|
def Replace (self,n,s):
|
||||||
menu.replace_item (self.id,n,s)
|
menu.replace_item (self.id,n,s)
|
||||||
|
|
||||||
def Delete (self,n):
|
def Delete (self,n):
|
||||||
menu.delete_item (self.id,n)
|
menu.delete_item (self.id,n)
|
||||||
|
|
||||||
def Setshortcut (self,n,s):
|
def Setshortcut (self,n,s):
|
||||||
menu.set_item_shortcut (self.id,n,s)
|
menu.set_item_shortcut (self.id,n,s)
|
||||||
|
|
||||||
def Setmode (self,n,m):
|
def Setmode (self,n,m):
|
||||||
menu.set_item_mode (self.id,n,m)
|
menu.set_item_mode (self.id,n,m)
|
||||||
|
|
||||||
def Showsymbol (self,n):
|
def Showsymbol (self,n):
|
||||||
menu.show_symbol (self.id,n)
|
menu.show_symbol (self.id,n)
|
||||||
|
|
||||||
def Get (self):
|
def Get (self):
|
||||||
return menu.get (self.id)
|
return menu.get (self.id)
|
||||||
|
|
||||||
def Getmaxitems (self):
|
def Getmaxitems (self):
|
||||||
return menu.get_maxitems (self.id)
|
return menu.get_maxitems (self.id)
|
||||||
|
|
||||||
def Gettext (self):
|
def Gettext (self):
|
||||||
return menu.get_text (self.id)
|
return menu.get_text (self.id)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Positioner class
|
# This is the Positioner class
|
||||||
|
|
||||||
|
|
||||||
class Positioner (XFObject):
|
class Positioner (XFObject):
|
||||||
def __init__(self,t=0,x=10,y=10,w=60,h=60,l="Positioner"):
|
def __init__(self,t=0,x=10,y=10,w=60,h=60,l="Positioner"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -820,45 +663,31 @@ class Positioner(XFObject):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def Setx (self,v):
|
def Setx (self,v):
|
||||||
positioner.set_xvalue (self.id,v)
|
positioner.set_xvalue (self.id,v)
|
||||||
|
|
||||||
def Sety (self,v):
|
def Sety (self,v):
|
||||||
positioner.set_yvalue (self.id,v)
|
positioner.set_yvalue (self.id,v)
|
||||||
|
|
||||||
def Setxbounds (self,x1,x2):
|
def Setxbounds (self,x1,x2):
|
||||||
positioner.set_xbounds (self.id,x1,x2)
|
positioner.set_xbounds (self.id,x1,x2)
|
||||||
|
|
||||||
def Setybounds (self,y1,y2):
|
def Setybounds (self,y1,y2):
|
||||||
positioner.set_ybounds (self.id,y1,y2)
|
positioner.set_ybounds (self.id,y1,y2)
|
||||||
|
|
||||||
def Setxstep (self,v):
|
def Setxstep (self,v):
|
||||||
positioner.set_xstep (self.id,v)
|
positioner.set_xstep (self.id,v)
|
||||||
|
|
||||||
def Setystep (self,v):
|
def Setystep (self,v):
|
||||||
positioner.set_ystep (self.id,v)
|
positioner.set_ystep (self.id,v)
|
||||||
|
|
||||||
def Getx (self):
|
def Getx (self):
|
||||||
return positioner.get_xvalue (self.id)
|
return positioner.get_xvalue (self.id)
|
||||||
|
|
||||||
def Gety (self):
|
def Gety (self):
|
||||||
return positioner.get_yvalue (self.id)
|
return positioner.get_yvalue (self.id)
|
||||||
|
|
||||||
def Getxbounds (self):
|
def Getxbounds (self):
|
||||||
positioner.get_xbounds (self.id)
|
positioner.get_xbounds (self.id)
|
||||||
|
|
||||||
def Getybounds (self):
|
def Getybounds (self):
|
||||||
positioner.get_ybounds (self.id)
|
positioner.get_ybounds (self.id)
|
||||||
|
|
||||||
def Setreturn (self,v):
|
def Setreturn (self,v):
|
||||||
positioner.set_return (self.id,v)
|
positioner.set_return (self.id,v)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Slider class
|
# This is the Slider class
|
||||||
|
|
||||||
|
|
||||||
class Slider (XFObject):
|
class Slider (XFObject):
|
||||||
def __init__(self,t=0,x=10,y=10,w=60,h=30,l="Slider"):
|
def __init__(self,t=0,x=10,y=10,w=60,h=30,l="Slider"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -866,33 +695,24 @@ class Slider(XFObject):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def Get (self):
|
def Get (self):
|
||||||
return slider.get_value (self.id)
|
return slider.get_value (self.id)
|
||||||
|
|
||||||
def Set (self,v):
|
def Set (self,v):
|
||||||
slider.set_value(self.id,v)
|
slider.set_value(self.id,v)
|
||||||
|
|
||||||
def Getbounds (self):
|
def Getbounds (self):
|
||||||
return slider.get_bounds (self.id)
|
return slider.get_bounds (self.id)
|
||||||
|
|
||||||
def Setbounds (self,v1,v2):
|
def Setbounds (self,v1,v2):
|
||||||
slider.set_bounds(self.id,v1,v2)
|
slider.set_bounds(self.id,v1,v2)
|
||||||
|
|
||||||
def Setreturn (self,v):
|
def Setreturn (self,v):
|
||||||
slider.set_return (self.id,v)
|
slider.set_return (self.id,v)
|
||||||
|
|
||||||
def Setstep (self,v):
|
def Setstep (self,v):
|
||||||
slider.set_step (self.id,v)
|
slider.set_step (self.id,v)
|
||||||
|
|
||||||
def Setsize (self,v):
|
def Setsize (self,v):
|
||||||
slider.set_size (self.id,v)
|
slider.set_size (self.id,v)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This is the Valslider class
|
# This is the Valslider class
|
||||||
|
|
||||||
|
|
||||||
class Valslider (Slider):
|
class Valslider (Slider):
|
||||||
def __init__(self,t=0,x=10,y=10,w=60,h=30,l="Valslider"):
|
def __init__(self,t=0,x=10,y=10,w=60,h=30,l="Valslider"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -900,15 +720,12 @@ class Valslider(Slider):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def Setprecision (self,v):
|
def Setprecision (self,v):
|
||||||
slider.set_precision (self.id,v)
|
slider.set_precision (self.id,v)
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# This is the Timer class
|
# This is the Timer class
|
||||||
|
|
||||||
|
|
||||||
class Timer (XFObject):
|
class Timer (XFObject):
|
||||||
def __init__(self,t=1,x=10,y=10,w=60,h=30,l="Timer"):
|
def __init__(self,t=1,x=10,y=10,w=60,h=30,l="Timer"):
|
||||||
XFObject.__init__ (self)
|
XFObject.__init__ (self)
|
||||||
@ -916,9 +733,7 @@ class Timer(XFObject):
|
|||||||
_objects[str(self.id)]=self
|
_objects[str(self.id)]=self
|
||||||
self.cb=_nocb
|
self.cb=_nocb
|
||||||
self.args=self
|
self.args=self
|
||||||
|
|
||||||
def Set (self,v):
|
def Set (self,v):
|
||||||
timer.set(self.id,v)
|
timer.set(self.id,v)
|
||||||
|
|
||||||
def Get (self):
|
def Get (self):
|
||||||
return timer.get (self.id)
|
return timer.get (self.id)
|
||||||
|
@ -5,7 +5,7 @@ from Pyxform import *
|
|||||||
# Init the library (sucks but works)
|
# Init the library (sucks but works)
|
||||||
#
|
#
|
||||||
|
|
||||||
xfinit("Something", "1", sys.argv[0])
|
xfinit ('Something','1',sys.argv[0])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a "Window" - A form in XForms parlance
|
# Create a "Window" - A form in XForms parlance
|
||||||
|
@ -7,7 +7,7 @@ from goodies import *
|
|||||||
# Init the library (sucks but works)
|
# Init the library (sucks but works)
|
||||||
#
|
#
|
||||||
|
|
||||||
xfinit("Something", "1", sys.argv[0])
|
xfinit ('Something','1',sys.argv[0])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a "Window" - A form in XForms parlance
|
# Create a "Window" - A form in XForms parlance
|
||||||
@ -32,14 +32,12 @@ win.Add(a_button)
|
|||||||
#
|
#
|
||||||
# Define a function, that will be executed when the button is pressed
|
# Define a function, that will be executed when the button is pressed
|
||||||
|
|
||||||
|
|
||||||
def funct (self):
|
def funct (self):
|
||||||
# It shows a message and exits (or not)
|
# It shows a message and exits (or not)
|
||||||
answer=show_question ("Do you want","to exit?","")
|
answer=show_question ("Do you want","to exit?","")
|
||||||
if answer==1:
|
if answer==1:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# And bind the function to the button
|
# And bind the function to the button
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ from goodies import *
|
|||||||
# Init the library (sucks but works)
|
# Init the library (sucks but works)
|
||||||
#
|
#
|
||||||
|
|
||||||
xfinit("Something", "1", sys.argv[0])
|
xfinit ('Something','1',sys.argv[0])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a "Window" - A form in XForms parlance
|
# Create a "Window" - A form in XForms parlance
|
||||||
@ -45,24 +45,22 @@ win.Add(v_slider)
|
|||||||
#
|
#
|
||||||
# Define a function, that will be executed when the button is pressed
|
# Define a function, that will be executed when the button is pressed
|
||||||
|
|
||||||
|
|
||||||
def funct (self):
|
def funct (self):
|
||||||
# It shows a message and exits (or not)
|
# It shows a message and exits (or not)
|
||||||
answer=show_question ("Do you want","to exit?","")
|
answer=show_question ("Do you want","to exit?","")
|
||||||
if answer==1:
|
if answer==1:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# And another one, for when the sliders move
|
# And another one, for when the sliders move
|
||||||
|
|
||||||
|
|
||||||
def slide (self):
|
def slide (self):
|
||||||
# It moves the button to the position of the sliders
|
# It moves the button to the position of the sliders
|
||||||
a_button.x=h_slider.Get()
|
a_button.x=h_slider.Get()
|
||||||
a_button.y=v_slider.Get()
|
a_button.y=v_slider.Get()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# And bind the functions to the controls
|
# And bind the functions to the controls
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ from goodies import *
|
|||||||
# Init the library (sucks but works)
|
# Init the library (sucks but works)
|
||||||
#
|
#
|
||||||
|
|
||||||
xfinit("Something", "1", sys.argv[0])
|
xfinit ('Something','1',sys.argv[0])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a "Window" - A form in XForms parlance
|
# Create a "Window" - A form in XForms parlance
|
||||||
@ -47,24 +47,22 @@ win.Add(v_slider)
|
|||||||
#
|
#
|
||||||
# Define a function, that will be executed when the button is pressed
|
# Define a function, that will be executed when the button is pressed
|
||||||
|
|
||||||
|
|
||||||
def funct (self):
|
def funct (self):
|
||||||
# It shows a message and exits (or not)
|
# It shows a message and exits (or not)
|
||||||
answer=show_question ("Do you want","to exit?","")
|
answer=show_question ("Do you want","to exit?","")
|
||||||
if answer==1:
|
if answer==1:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# And another one, for when the sliders move
|
# And another one, for when the sliders move
|
||||||
|
|
||||||
|
|
||||||
def slide (self):
|
def slide (self):
|
||||||
# It moves the button to the position of the sliders
|
# It moves the button to the position of the sliders
|
||||||
a_button.x=h_slider.Get()
|
a_button.x=h_slider.Get()
|
||||||
a_button.y=v_slider.Get()
|
a_button.y=v_slider.Get()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# And bind the functions to the controls
|
# And bind the functions to the controls
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ from goodies import *
|
|||||||
# Init the library (sucks but works)
|
# Init the library (sucks but works)
|
||||||
#
|
#
|
||||||
|
|
||||||
xfinit("Something", "1", sys.argv[0])
|
xfinit ('Something','1',sys.argv[0])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a "Window" - A form in XForms parlance
|
# Create a "Window" - A form in XForms parlance
|
||||||
@ -35,26 +35,21 @@ win.Add(but2)
|
|||||||
#
|
#
|
||||||
# The exit function
|
# The exit function
|
||||||
|
|
||||||
|
|
||||||
def funct (self):
|
def funct (self):
|
||||||
# It shows a message and exits (or not)
|
# It shows a message and exits (or not)
|
||||||
answer=show_question ("Do you want","to exit?","")
|
answer=show_question ("Do you want","to exit?","")
|
||||||
if answer==1:
|
if answer==1:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
but2.cb=funct
|
but2.cb=funct
|
||||||
|
|
||||||
#
|
#
|
||||||
# And the interesting function
|
# And the interesting function
|
||||||
|
|
||||||
|
|
||||||
def browse_file(self):
|
def browse_file(self):
|
||||||
# Asks for a file, and puts it in the browser
|
# Asks for a file, and puts it in the browser
|
||||||
filename=show_fselector("","","","")
|
filename=show_fselector("","","","")
|
||||||
brow.Load (filename)
|
brow.Load (filename)
|
||||||
|
|
||||||
|
|
||||||
but1.cb=browse_file
|
but1.cb=browse_file
|
||||||
|
|
||||||
|
|
||||||
|
258
setup.py
258
setup.py
@ -1,167 +1,99 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from setuptools import setup, Extension
|
from setuptools import setup, Extension
|
||||||
|
|
||||||
bitmaps = Extension(
|
bitmaps = Extension('Pyxform.bitmaps',
|
||||||
"Pyxform.bitmaps",
|
sources = [ 'Pyxform/Modules/bitmaps.c'],
|
||||||
sources=["Pyxform/Modules/bitmaps.c"],
|
libraries = ['forms'],
|
||||||
libraries=["forms"],
|
library_dirs = ['/usr/local/lib'])
|
||||||
library_dirs=["/usr/local/lib"],
|
box = Extension('Pyxform.box',
|
||||||
)
|
sources = [ 'Pyxform/Modules/box.c'],
|
||||||
box = Extension(
|
libraries = ['forms'],
|
||||||
"Pyxform.box",
|
library_dirs = ['/usr/local/lib'])
|
||||||
sources=["Pyxform/Modules/box.c"],
|
browser = Extension('Pyxform.browser',
|
||||||
libraries=["forms"],
|
sources = [ 'Pyxform/Modules/browser.c'],
|
||||||
library_dirs=["/usr/local/lib"],
|
libraries = ['forms'],
|
||||||
)
|
library_dirs = ['/usr/local/lib'])
|
||||||
browser = Extension(
|
button = Extension('Pyxform.button',
|
||||||
"Pyxform.browser",
|
sources = [ 'Pyxform/Modules/button.c'],
|
||||||
sources=["Pyxform/Modules/browser.c"],
|
libraries = ['forms'],
|
||||||
libraries=["forms"],
|
library_dirs = ['/usr/local/lib'])
|
||||||
library_dirs=["/usr/local/lib"],
|
choice = Extension('Pyxform.choice',
|
||||||
)
|
sources = [ 'Pyxform/Modules/choice.c'],
|
||||||
button = Extension(
|
libraries = ['forms'],
|
||||||
"Pyxform.button",
|
library_dirs = ['/usr/local/lib'])
|
||||||
sources=["Pyxform/Modules/button.c"],
|
clock = Extension('Pyxform.clock',
|
||||||
libraries=["forms"],
|
sources = [ 'Pyxform/Modules/clock.c'],
|
||||||
library_dirs=["/usr/local/lib"],
|
libraries = ['forms'],
|
||||||
)
|
library_dirs = ['/usr/local/lib'])
|
||||||
choice = Extension(
|
counter = Extension('Pyxform.counter',
|
||||||
"Pyxform.choice",
|
sources = [ 'Pyxform/Modules/counter.c'],
|
||||||
sources=["Pyxform/Modules/choice.c"],
|
libraries = ['forms'],
|
||||||
libraries=["forms"],
|
library_dirs = ['/usr/local/lib'])
|
||||||
library_dirs=["/usr/local/lib"],
|
dial = Extension('Pyxform.dial',
|
||||||
)
|
sources = [ 'Pyxform/Modules/dial.c'],
|
||||||
clock = Extension(
|
libraries = ['forms'],
|
||||||
"Pyxform.clock",
|
library_dirs = ['/usr/local/lib'])
|
||||||
sources=["Pyxform/Modules/clock.c"],
|
forms = Extension('Pyxform.forms',
|
||||||
libraries=["forms"],
|
sources = [ 'Pyxform/Modules/forms.c'],
|
||||||
library_dirs=["/usr/local/lib"],
|
libraries = ['forms'],
|
||||||
)
|
library_dirs = ['/usr/local/lib'])
|
||||||
counter = Extension(
|
frame = Extension('Pyxform.frame',
|
||||||
"Pyxform.counter",
|
sources = [ 'Pyxform/Modules/frame.c'],
|
||||||
sources=["Pyxform/Modules/counter.c"],
|
libraries = ['forms'],
|
||||||
libraries=["forms"],
|
library_dirs = ['/usr/local/lib'])
|
||||||
library_dirs=["/usr/local/lib"],
|
goodies = Extension('Pyxform.goodies',
|
||||||
)
|
sources = [ 'Pyxform/Modules/goodies.c'],
|
||||||
dial = Extension(
|
libraries = ['forms'],
|
||||||
"Pyxform.dial",
|
library_dirs = ['/usr/local/lib'])
|
||||||
sources=["Pyxform/Modules/dial.c"],
|
input = Extension('Pyxform.input',
|
||||||
libraries=["forms"],
|
sources = [ 'Pyxform/Modules/input.c'],
|
||||||
library_dirs=["/usr/local/lib"],
|
libraries = ['forms'],
|
||||||
)
|
library_dirs = ['/usr/local/lib'])
|
||||||
forms = Extension(
|
menu = Extension('Pyxform.menu',
|
||||||
"Pyxform.forms",
|
sources = [ 'Pyxform/Modules/menu.c'],
|
||||||
sources=["Pyxform/Modules/forms.c"],
|
libraries = ['forms'],
|
||||||
libraries=["forms"],
|
library_dirs = ['/usr/local/lib'])
|
||||||
library_dirs=["/usr/local/lib"],
|
objects = Extension('Pyxform.objects',
|
||||||
)
|
sources = [ 'Pyxform/Modules/objects.c'],
|
||||||
frame = Extension(
|
libraries = ['forms'],
|
||||||
"Pyxform.frame",
|
library_dirs = ['/usr/local/lib'])
|
||||||
sources=["Pyxform/Modules/frame.c"],
|
pixmaps = Extension('Pyxform.pixmaps',
|
||||||
libraries=["forms"],
|
sources = [ 'Pyxform/Modules/pixmaps.c'],
|
||||||
library_dirs=["/usr/local/lib"],
|
libraries = ['forms'],
|
||||||
)
|
library_dirs = ['/usr/local/lib'])
|
||||||
goodies = Extension(
|
popups = Extension('Pyxform.popups',
|
||||||
"Pyxform.goodies",
|
sources = [ 'Pyxform/Modules/popups.c'],
|
||||||
sources=["Pyxform/Modules/goodies.c"],
|
libraries = ['forms'],
|
||||||
libraries=["forms"],
|
library_dirs = ['/usr/local/lib'])
|
||||||
library_dirs=["/usr/local/lib"],
|
positioner = Extension('Pyxform.positioner',
|
||||||
)
|
sources = [ 'Pyxform/Modules/positioner.c'],
|
||||||
input = Extension(
|
libraries = ['forms'],
|
||||||
"Pyxform.input",
|
library_dirs = ['/usr/local/lib'])
|
||||||
sources=["Pyxform/Modules/input.c"],
|
slider = Extension('Pyxform.slider',
|
||||||
libraries=["forms"],
|
sources = [ 'Pyxform/Modules/slider.c'],
|
||||||
library_dirs=["/usr/local/lib"],
|
libraries = ['forms'],
|
||||||
)
|
library_dirs = ['/usr/local/lib'])
|
||||||
menu = Extension(
|
text = Extension('Pyxform.text',
|
||||||
"Pyxform.menu",
|
sources = [ 'Pyxform/Modules/text.c'],
|
||||||
sources=["Pyxform/Modules/menu.c"],
|
libraries = ['forms'],
|
||||||
libraries=["forms"],
|
library_dirs = ['/usr/local/lib'])
|
||||||
library_dirs=["/usr/local/lib"],
|
timer = Extension('Pyxform.timer',
|
||||||
)
|
sources = [ 'Pyxform/Modules/timer.c'],
|
||||||
objects = Extension(
|
libraries = ['forms'],
|
||||||
"Pyxform.objects",
|
library_dirs = ['/usr/local/lib'])
|
||||||
sources=["Pyxform/Modules/objects.c"],
|
xforms = Extension('Pyxform.xforms',
|
||||||
libraries=["forms"],
|
sources = [ 'Pyxform/Modules/xforms.c'],
|
||||||
library_dirs=["/usr/local/lib"],
|
libraries = ['forms'],
|
||||||
)
|
library_dirs = ['/usr/local/lib'])
|
||||||
pixmaps = Extension(
|
xyplot = Extension('Pyxform.xyplot',
|
||||||
"Pyxform.pixmaps",
|
sources = [ 'Pyxform/Modules/xyplot.c'],
|
||||||
sources=["Pyxform/Modules/pixmaps.c"],
|
libraries = ['forms'],
|
||||||
libraries=["forms"],
|
library_dirs = ['/usr/local/lib'])
|
||||||
library_dirs=["/usr/local/lib"],
|
setup (name = 'PyXForms',
|
||||||
)
|
version = '0.2',
|
||||||
popups = Extension(
|
description = 'This is OLD code',
|
||||||
"Pyxform.popups",
|
author = 'Roberto Alsina',
|
||||||
sources=["Pyxform/Modules/popups.c"],
|
author_email = 'ralsina@netmanagers.com.ar',
|
||||||
libraries=["forms"],
|
ext_modules = [bitmaps, box, browser, button, choice, clock, counter, dial, forms, frame, goodies, input, menu, objects, pixmaps, popups, positioner, slider, text, timer, xforms, xyplot],
|
||||||
library_dirs=["/usr/local/lib"],
|
packages = ['Pyxform']
|
||||||
)
|
|
||||||
positioner = Extension(
|
|
||||||
"Pyxform.positioner",
|
|
||||||
sources=["Pyxform/Modules/positioner.c"],
|
|
||||||
libraries=["forms"],
|
|
||||||
library_dirs=["/usr/local/lib"],
|
|
||||||
)
|
|
||||||
slider = Extension(
|
|
||||||
"Pyxform.slider",
|
|
||||||
sources=["Pyxform/Modules/slider.c"],
|
|
||||||
libraries=["forms"],
|
|
||||||
library_dirs=["/usr/local/lib"],
|
|
||||||
)
|
|
||||||
text = Extension(
|
|
||||||
"Pyxform.text",
|
|
||||||
sources=["Pyxform/Modules/text.c"],
|
|
||||||
libraries=["forms"],
|
|
||||||
library_dirs=["/usr/local/lib"],
|
|
||||||
)
|
|
||||||
timer = Extension(
|
|
||||||
"Pyxform.timer",
|
|
||||||
sources=["Pyxform/Modules/timer.c"],
|
|
||||||
libraries=["forms"],
|
|
||||||
library_dirs=["/usr/local/lib"],
|
|
||||||
)
|
|
||||||
xforms = Extension(
|
|
||||||
"Pyxform.xforms",
|
|
||||||
sources=["Pyxform/Modules/xforms.c"],
|
|
||||||
libraries=["forms"],
|
|
||||||
library_dirs=["/usr/local/lib"],
|
|
||||||
)
|
|
||||||
xyplot = Extension(
|
|
||||||
"Pyxform.xyplot",
|
|
||||||
sources=["Pyxform/Modules/xyplot.c"],
|
|
||||||
libraries=["forms"],
|
|
||||||
library_dirs=["/usr/local/lib"],
|
|
||||||
)
|
|
||||||
setup(
|
|
||||||
name="PyXForms",
|
|
||||||
version="0.2",
|
|
||||||
description="This is OLD code",
|
|
||||||
author="Roberto Alsina",
|
|
||||||
author_email="ralsina@netmanagers.com.ar",
|
|
||||||
ext_modules=[
|
|
||||||
bitmaps,
|
|
||||||
box,
|
|
||||||
browser,
|
|
||||||
button,
|
|
||||||
choice,
|
|
||||||
clock,
|
|
||||||
counter,
|
|
||||||
dial,
|
|
||||||
forms,
|
|
||||||
frame,
|
|
||||||
goodies,
|
|
||||||
input,
|
|
||||||
menu,
|
|
||||||
objects,
|
|
||||||
pixmaps,
|
|
||||||
popups,
|
|
||||||
positioner,
|
|
||||||
slider,
|
|
||||||
text,
|
|
||||||
timer,
|
|
||||||
xforms,
|
|
||||||
xyplot,
|
|
||||||
],
|
|
||||||
packages=["Pyxform"],
|
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user