Changeset 25752 in project


Ignore:
Timestamp:
01/02/12 18:47:15 (9 years ago)
Author:
juergen
Message:

iup-tutor now includes layout-dialog and element-properties-dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/iup-tutor

    r25748 r25752  
    10921092you can, of course, study the original documentation, and as a method of
    10931093last resort you have to do that. But for a quick overview you can start
    1094 the program "inspector" below. You must compile it, because it ports the
    1095 C-function IupElementPropertiesDialog to Chicken.  This function is
    1096 originally intended as an object inspector. We use it on the most
    1097 primitive instantiation of each class.
    1098 
    1099 I know, that in the real world, C-functions and Scheme functions
    1100 shouldn't reside in the same module. Besides that, the inspector is
    1101 rather ugly. But that's not important here.
     1094the program "inspector" below. It's rather ugly. But that's not important
     1095 here.
    11021096
    11031097<enscript highlight="scheme">
    11041098
    1105 (require-library iup-base iup-controls iup-dialogs iup-web iup-pplot
    1106                  iup-glcanvas)
    1107 
    1108 (import foreign iup-base iup-controls iup-dialogs iup-web iup-pplot
    1109   iup-glcanvas)
    1110 
    1111 (foreign-declare
    1112   "#include <iup.h>\n")
    1113  
    1114 (define-foreign-type nonnull-ihandle (nonnull-c-pointer "Ihandle")
    1115         (ihandle->pointer #t)
    1116         (pointer->ihandle #t))
    1117 
    1118 (define element-properties-dialog
    1119   (make-constructor-procedure
    1120     (foreign-lambda nonnull-ihandle "IupElementPropertiesDialog"
    1121                     nonnull-ihandle)))
     1099(use iup iup-web iup-pplot iup-glcanvas)
    11221100
    11231101(define (popup dlg . args)
     
    11521130        (button "message-dialog"
    11531131                action: (lambda (self) (properties (message-dialog))))
     1132        (fill)
     1133        margin: '0x0)
     1134      (hbox
     1135        (button "layout-dialog"
     1136                action: (lambda (self) (properties (layout-dialog))))
     1137        (button "element-properties-dialog"
     1138                action: (lambda (self)
     1139                          (properties
     1140                            (element-properties-dialog (create 'user)))))
    11541141        (fill)
    11551142        margin: '0x0)
     
    12251212        (button "matrix"
    12261213                action: (lambda (self) (properties (matrix))))
     1214        (fill)
     1215        margin: '0x0)
     1216      (hbox
    12271217        (button "pplot"
    12281218                action: (lambda (self) (properties (pplot))))
Note: See TracChangeset for help on using the changeset viewer.