diff options
Diffstat (limited to 'body')
-rw-r--r-- | body/c_fl.cpp | 28 | ||||
-rw-r--r-- | body/c_fl.h | 26 | ||||
-rw-r--r-- | body/fltk-widgets-buttons.adb | 8 | ||||
-rw-r--r-- | body/fltk.adb | 18 |
4 files changed, 80 insertions, 0 deletions
diff --git a/body/c_fl.cpp b/body/c_fl.cpp index 50eed9e..ec5f7e5 100644 --- a/body/c_fl.cpp +++ b/body/c_fl.cpp @@ -11,6 +11,34 @@ +const short fl_align_center = FL_ALIGN_CENTER; +const short fl_align_top = FL_ALIGN_TOP; +const short fl_align_bottom = FL_ALIGN_BOTTOM; +const short fl_align_left = FL_ALIGN_LEFT; +const short fl_align_right = FL_ALIGN_RIGHT; +const short fl_align_inside = FL_ALIGN_INSIDE; +const short fl_align_text_over_image = FL_ALIGN_TEXT_OVER_IMAGE; +const short fl_align_image_over_text = FL_ALIGN_IMAGE_OVER_TEXT; +const short fl_align_clip = FL_ALIGN_CLIP; +const short fl_align_wrap = FL_ALIGN_WRAP; +const short fl_align_image_next_to_text = FL_ALIGN_IMAGE_NEXT_TO_TEXT; +const short fl_align_text_next_to_image = FL_ALIGN_TEXT_NEXT_TO_IMAGE; +const short fl_align_image_backdrop = FL_ALIGN_IMAGE_BACKDROP; +const short fl_align_top_left = FL_ALIGN_TOP_LEFT; +const short fl_align_top_right = FL_ALIGN_TOP_RIGHT; +const short fl_align_bottom_left = FL_ALIGN_BOTTOM_LEFT; +const short fl_align_bottom_right = FL_ALIGN_BOTTOM_RIGHT; +const short fl_align_left_top = FL_ALIGN_LEFT_TOP; +const short fl_align_right_top = FL_ALIGN_RIGHT_TOP; +const short fl_align_left_bottom = FL_ALIGN_LEFT_BOTTOM; +const short fl_align_right_bottom = FL_ALIGN_RIGHT_BOTTOM; +const short fl_align_nowrap = FL_ALIGN_NOWRAP; +const short fl_align_all_position = FL_ALIGN_POSITION_MASK; +const short fl_align_all_image = FL_ALIGN_IMAGE_MASK; + + + + const short fl_mod_command = FL_COMMAND >> 16; diff --git a/body/c_fl.h b/body/c_fl.h index 8ef9df5..9f79979 100644 --- a/body/c_fl.h +++ b/body/c_fl.h @@ -8,6 +8,32 @@ #define FL_GUARD +extern "C" const short fl_align_center; +extern "C" const short fl_align_top; +extern "C" const short fl_align_bottom; +extern "C" const short fl_align_left; +extern "C" const short fl_align_right; +extern "C" const short fl_align_inside; +extern "C" const short fl_align_text_over_image; +extern "C" const short fl_align_image_over_text; +extern "C" const short fl_align_clip; +extern "C" const short fl_align_wrap; +extern "C" const short fl_align_image_next_to_text; +extern "C" const short fl_align_text_next_to_image; +extern "C" const short fl_align_image_backdrop; +extern "C" const short fl_align_top_left; +extern "C" const short fl_align_top_right; +extern "C" const short fl_align_bottom_left; +extern "C" const short fl_align_bottom_right; +extern "C" const short fl_align_left_top; +extern "C" const short fl_align_right_top; +extern "C" const short fl_align_left_bottom; +extern "C" const short fl_align_right_bottom; +extern "C" const short fl_align_nowrap; +extern "C" const short fl_align_all_position; +extern "C" const short fl_align_all_image; + + extern "C" const short fl_mod_command; diff --git a/body/fltk-widgets-buttons.adb b/body/fltk-widgets-buttons.adb index 11a57de..1e7ef60 100644 --- a/body/fltk-widgets-buttons.adb +++ b/body/fltk-widgets-buttons.adb @@ -226,6 +226,14 @@ package body FLTK.Widgets.Buttons is -- API Subprograms -- ----------------------- + function Is_On + (This : in Button) + return Boolean is + begin + return This.Get_State = On; + end Is_On; + + function Get_State (This : in Button) return State is diff --git a/body/fltk.adb b/body/fltk.adb index f302b47..d729364 100644 --- a/body/fltk.adb +++ b/body/fltk.adb @@ -122,6 +122,24 @@ package body FLTK is + function "+" + (Left, Right : in Alignment) + return Alignment is + begin + return Left or Right; + end "+"; + + + function "-" + (Left, Right : in Alignment) + return Alignment is + begin + return Left and (not Right); + end "-"; + + + + function Press (Key : in Pressable_Key) return Keypress is |