Sie befinden sich auf der NewGUI Sourcepage

Start
Über NewGui
Featureübersicht
Changesübersicht
Installation
Download
Demos
Anwendungen
Tutorials
Sourcecodes
-Button Beispiel
-Checkbox Beispiel
-TextEditor
-Flächen & Füllroutinen
-Eingabegadgets
-
Links
Kontakt

Unser Hostingpartner

; 
; 
; (c) 2000 Cyborg 

    {* Include sys:coder/preass/Options.p *}

    {* String: Version=": (C) CYBORG 2003"*}

    {* usefd:sys:coder/fd/newgui_lib.fd *}

    {* Structure DeepStruct,Name(APTR),Chunky(APTR),Weite(LONG),Hoehe(LONG),Next(APTR)*}

    {* Include sources:newgui/generic/defines.i *}
    {* Include module:sprintf.p *}

Start:
    Gui=Open_Window(150,100,600,200,"TESTWINDOW",#WFLG_DRAGBAR!WFLG_REPORTMOUSE!WFLG_Sizegadget!WFLG_DEPTHGADGET!WFLG_CLOSEGADGET!WFLG_RMBTRAP!WFLG_SMART_REFRESH,#IDCMP_MOUSEBUTTONS!IDCMP_ACTIVEWINDOW!IDCMP_MOUSEMOVE,0)
    if gui#0
     {
       
       result=CreateGadgetGeneric(Gui,100,010,400,015,"Eingabe Beispiel #1",0,0,0,"generic/bevelbox.library",0)
       result=CreateGadgetGeneric(Gui,265,140,070,015,"Quit",0,0,0,"generic/button.library",0)

       result=CreateGadgetGeneric(Gui,100,040,200,015,"Integergadget",0,0,0,
                                  "generic/integer.library",>IntegerGadget12:NG_TEXT_POS,NG_RIGHT|
                                                                             NG_VALUE,33|
                                                                             tag_done,null)

       result=CreateGadgetGeneric(Gui,100,060,200,015,"Stringgadget",0,0,0,
                                  "generic/string.library",>StringGadget13:NG_TEXT_POS,NG_RIGHT|
                                                                           NG_VALUE,TEST_TEXT=""|
                                                                           tag_done,null)

       result=CreateGadgetGeneric(Gui,100,100,400,015,"Infos",0,0,0,
                                  "generic/text.library",>textGadget13:NG_TEXT_POS,NG_LEFT|
                                                                           NG_VALUE,TEST_TEXT|
                                                                           NG_INVERSE,1|
                                                                           NG_PEN_BG_DOWN,0|
                                                                           tag_done,null)
       CreateGadgetGeneric(Gui,78,060,015,015,"hidden",0,0,0,
                                  "generic/checkbox.library",>checktabs:NG_TEXT_POS,NG_LEFT|
                                                                        TAG_DONE,NULL)
       


       textbuffer=malloc(2000)

       gadget==0
        class==0

       while class##IDCMP_Closewindow 
        { 
          (Gadget,Class)=WaitGuiEvent(Gui,0)

          if Class=#IDCMP_Vanillakey or =#IDCMP_MOUSEBUTTONS {


             Int=getGadgetValue(Gui,3)
             Str=getGadgetValue(Gui,4)

             Sprintf(Textbuffer,"Integer: %lu String: %s",>tags1:*int,*str,0)

             UpdateGadgetValue(Gui,5,TextBuffer)

             Int=getGadgetValue(Gui,6)
             UpdateGadget(Gui,4,>HiddenTags:NG_STRING_PASSWORD,*Int|
                                            TAG_DONE,Null)
             

           }

          if Class=#IDCMP_MOUSEBUTTONS
           {

             if gadget=2 and getGadgetStatus(Gui,Gadget)=0
              {
                class==#IDCMP_Closewindow
              }
           }

        }

       Close_Window(Gui)
     }
    error==0

    printf("Ende\n")
    {* Return *}