Re: Iup Testsetup Win32

new topic     » goto parent     » topic index » view thread      » older message » newer message

I'm trying a new approach to documenting IUP.

I have a text file that looks like:


[[[ 
name = IupLabel 
class = element  
key = $IupLabel $iuplabel 
description = Creates a label interface element, which displays a separator, a text, or an image. 
include = iup.e 
namespace = iup 
signature = public function IupLabel(object title = NULL) 
creation = title: Text to be shown on the label. It can be NULL. It will set the TITLE attribute. 
returns = the identifier of the created element, or NULL if an error occurs. 
attribute = 
 
<<ACTIVE>> 
 
<<ALIGNMENT>> 
 
<<BGCOLOR>> 
 
<<DROPFILESTARGET>> 
 
<<ELLIPSIS>> 
 
<<FGCOLOR>> 
 
<<IMAGE>> 
 
<<IMINACTIVE>> 
 
<<MARKUP>> 
 
<<PADDING>> 
 
<<SEPARATOR>> 
 
<<TITLE>> 
 
<<WORDWRAP>> 
 
;FONT | EXPAND | SCREENPOSITION | POSITION | MINSIZE | MAXSIZE | WID | TIP | SIZE | RASTERIZE | ZORDER | VISIBLE: also accepted. 
 
Drag & Drop attributes and callbacks are supported. 
 
callback = 
<<BUTTON_CB>> 
 
<<DROPFILES_CB>> 
 
; MAP_CB | UNMAP_CB | DESTROY_CB | ENTERWINDOW_CB | LEAVEWINDOW_CB: common callbacks are supported. 
notes = Labels with images, texts or line separator can not change its behavior after mapped. But after map the image can be changed for another image, and the text for another text. 
note = 
The name ##label## is a keyword in Euphoria. 
example = 
<eucode> 
include iup/iup.e 
IupOpen(NULL) 
atom tag = IupLabel("hello") 
atom dlg = IupDialog(tag) 
IupShow(dlg) IupMainLoop() IupClose() 
</eucode> 
example = 
<eucode> 
include iup/iup.e 
IupOpen(NULL) 
 
atom lbl = IupLabel("Hello") 
atom dlg = IupDialog( lbl ) 
 
IupShow(dlg) IupMainLoop() IupClose() 
</eucode> 
example = 
<eucode> 
include iup/iup.e 
IupOpen(NULL) 
 
atom lbl1 = IupLabel("Hello") 
atom lbl2 = IupLabel("Open") 
atom lbl3 = IupLabel("Euphoria") 
 
atom vbox = IupVbox({ lbl1, lbl2, lbl3 }) 
atom dlg = IupDialog( vbox ) 
        IupSetAttribute(dlg, "SIZE", "100" ) 
 
IupShow(dlg) IupMainLoop() IupClose() 
</eucode> 
example = 
<eucode> 
include iup/iup.e 
IupOpen(NULL) 
 
atom lbl1 = IupLabel("Hello") 
            IupSetAttribute(lbl1, "FGCOLOR", "255 0 0" ) 
atom lbl2 = IupLabel() 
            IupSetAttribute(lbl2, "SEPARATOR", "HORIZONTAL" ) 
atom lbl3 = IupLabel("Euphoria") 
            IupSetAttribute(lbl3, "PADDING", "5x5") 
 
atom vbox = IupVbox({ lbl1, lbl2, lbl3, $ }) 
atom dlg = IupDialog( vbox ) 
        IupSetAttribute(dlg, "SIZE", "100" ) 
 
IupShow(dlg) IupMainLoop() IupClose() 
</eucode> 
note = 
? alignment not working ? 
see_also = IupImage | IupButton 
]]] 


This text file is:

https://drive.google.com/file/d/0B4wfRhusHmUbN0E3UEFicUtPNWs/view?usp=sharing

The html version of this file is:

https://drive.google.com/file/d/0B4wfRhusHmUbQ1Q5UC1hTXo4WW8/view?usp=sharing

The idea is that from a database I can sort, separate widgets from constants, and save on redundant typing, make searching easier, ...

The database could even be merged with the IUP souce-code in the traditional Eudoc-Creole fashion.

I'm cutting references to Lua, C, and LED. I'm adding examples.

This all needs lots of cleanup so I haven't uploaded this to the IUP repo yet.

I don't know if Doxygen is worthwhile. I'd like to stick to Euphoria tools right now.

I have also worked on the two IUP tutorials provided by IUP.

IUP needs some sensible defaults.

For example:

I discovered that IupOpen( argc, argv ) simplifies to IupOpen(NULL). Now, when IupOpen() works, I will edit all of the working examples. (Lots of typing ahead.)

_tom

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu