[SCM] Lisaac library iup-binding branch, master, updated. b78612c4778da832117a7a0f30a6307819ec5156
Jeremy Cowgar
jeremy at cowgar.com
Tue Aug 25 21:15:32 UTC 2009
The following commit has been merged in the master branch:
commit b78612c4778da832117a7a0f30a6307819ec5156
Author: Jeremy Cowgar <jeremy at cowgar.com>
Date: Tue Aug 25 17:15:19 2009 -0400
* A method to get around the external slot optimization bug has been
found and implemented for the BUTTON control.
* All attributes have been added to the BUTTON control.
diff --git a/button.li b/button.li
index edb43b1..484b4a5 100644
--- a/button.li
+++ b/button.li
@@ -19,7 +19,10 @@ Section External
- perform_action h:POINTER :INTEGER <-
( + b:BUTTON;
- b := CONVERT(POINTER,BUTTON).on (`IupGetCallback(@h, "LISAAC_OBJ")`:POINTER);
+ + obj:POINTER;
+
+ obj := `IupGetCallback(@h, "LISAAC_OBJ")`:POINTER;
+ b := CONVERT(POINTER, BUTTON).on obj;
b.action_block.value
);
@@ -43,17 +46,6 @@ Section Public
Section Public
// Callbacks
-
- - use <-
- (
- `
- #if 0
- `;
- perform_action NULL;
- `
- #endif
- `;
- );
- set_action b:{INTEGER} <-
( + h:POINTER;
@@ -69,3 +61,39 @@ Section Public
- set_alignment v:ABSTRACT_STRING <- store "ALIGNMENT" value v;
- alignment :ABSTRACT_STRING <- get "ALIGNMENT";
+
+ - set_canfocus v:BOOLEAN <- store "CANFOCUS" boolean v;
+ - canfocus :BOOLEAN <- (get "CANFOCUS") = "YES";
+
+ - set_flat v:BOOLEAN <- store "FLAT" boolean v;
+ - flat :BOOLEAN <- (get "FLAT") = "YES";
+
+ - set_focusonclick v:BOOLEAN <- store "FOCUSONCLICK" boolean v;
+ - focus_on_click <- (get "FOCUSONCLICK") = "YES";
+
+ - set_image v:ABSTRACT_STRING <- store "IMAGE" value v;
+ - image :ABSTRACT_STRING <- get "IMAGE";
+
+ - set_inactive_image v:ABSTRACT_STRING <- store "IMINACTIVE" value v;
+ - inactive_image :ABSTRACT_STRING <- get "IMINACTIVE";
+
+ - set_press_image v:ABSTRACT_STRING <- store "IMPRESS" value v;
+ - press_image :ABSTRACT_STRING <- get "IMPRESS";
+
+ - set_press_border_image v:ABSTRACT_STRING <- store "IMPRESSBORDER" value v;
+ - press_border_image :ABSTRACT_STRING <- get "IMPRESSBORDER";
+
+ - set_image_position v:ABSTRACT_STRING <- store "IMAGEPOSITION" value v;
+ - image_position :ABSTRACT_STRING <- get "IMAGEPOSITION";
+
+ - set_markup v:ABSTRACT_STRING <- store "MARKUP" value v;
+ - markup :ABSTRACT_STRING <- get "MARKUP";
+
+ - set_padding v:ABSTRACT_STRING <- store "PADDING" value v;
+ - padding :ABSTRACT_STRING <- get "PADDING";
+
+ - set_spacing v:ABSTRACT_STRING <- store "SPACING" value v;
+ - spacing :ABSTRACT_STRING <- get "SPACING";
+
+ - set_title v:ABSTRACT_STRING <- store "TITLE" value v;
+ - title :ABSTRACT_STRING <- get "TITLE";
diff --git a/example.li b/example.li
index 6e9a359..6221c63 100644
--- a/example.li
+++ b/example.li
@@ -1,11 +1,11 @@
Section Header
+ name := EXAMPLE;
-
+
Section Inherit
- parent:OBJECT := OBJECT;
-
+
Section Public
- main <-
@@ -14,20 +14,18 @@ Section Public
+ hello, goodbye:BUTTON;
IUP.open;
- //BUTTON.use;
hello := BUTTON.make "Say Hello";
hello.set_expand "HORIZONTAL";
- //hello.set_action { "Hello, World!".println; IUP.cb_default };
- hello.set_active FALSE;
-
+ hello.set_action { "Hello, World!".println; IUP.cb_default };
+
goodbye := BUTTON.make "Say Goodbye";
- //goodbye.set_action { "Goodbye, World!".println; IUP.cb_close };
+ goodbye.set_action { "Goodbye, World!".println; IUP.cb_close };
main_box := HORIZONTAL_BOX.make;
- main_box.set_expand "HORIZONTAL";
main_box.add hello;
main_box.add goodbye;
+
dlg := DIALOG.make "Simple" child main_box;
dlg.show;
diff --git a/iup.li b/iup.li
index 1b09794..6852f4e 100644
--- a/iup.li
+++ b/iup.li
@@ -55,6 +55,15 @@ Section Public
( + result:BOOLEAN;
(`IupOpen(NULL, NULL)`:(INTEGER) = error_none).if {
result := TRUE;
+ `
+ #if 0
+ `;
+
+ BUTTON.perform_action NULL;
+
+ `
+ #endif
+ `;
} else {
result := FALSE;
};
--
Lisaac library iup-binding
More information about the Lisaac-commits
mailing list