TABLE OF CONTENT newgui.library/Activate_Gadget newgui.library/Activate_ListenGadget newgui.library/BasicBoxProzent newgui.library/BasicDrawBorder3d newgui.library/BlueBoxProzent newgui.library/BlueBoxProzentT newgui.library/BrightDeep newgui.library/ClearGui newgui.library/Close_window newgui.library/CopyDeep newgui.library/CreateDeep newgui.library/CreateDeepTheme newgui.library/CreateGadgetGeneric newgui.library/CropDeep newgui.library/DeActivate_Gadget newgui.library/DeGhostGadget newgui.library/DrawBorder3d newgui.library/DrawBorder3dR newgui.library/DrawBorderAroundBasic newgui.library/DrawBorderAroundBorder newgui.library/DrawBorderAroundBox newgui.library/DrawBox3d newgui.library/DrawBox3dR newgui.library/DrawDeep newgui.library/DrawDeepArea newgui.library/DrawRoundBox3D newgui.library/DrawRoundBox3DR newgui.library/EraseBorderAroundBasic newgui.library/EraseBorderAroundBorder newgui.library/EraseBorderAroundBorderPen newgui.library/EraseBorderAroundBox newgui.library/EraseBorderAroundBoxPen newgui.library/FillBox newgui.library/FillBoxColor newgui.library/Filldeep newgui.library/FilledBoxProzent newgui.library/FreeAreaGFX newgui.library/FreeDeep newgui.library/FreeString newgui.library/Free_Gadget newgui.library/Free_Gadgets newgui.library/GenericRequester newgui.library/GetActiveGadget newgui.library/GetBorderSizes newgui.library/GetFromAreaGFX newgui.library/GetGadgetAddr newgui.library/GetGadgetName newgui.library/GetGadgetStatus newgui.library/GetGadgetValue newgui.library/GetGadgetValueByAddr newgui.library/GetIconifyState newgui.library/GetPen newgui.library/GetPixelFromDeep newgui.library/GetPopMenuBase newgui.library/GetPressedCode newgui.library/GetPressedKey newgui.library/GetPressedQualifier newgui.library/GetRGB newgui.library/GetThemeByName newgui.library/GetThemeNameByID newgui.library/GetThemeNameFromGui newgui.library/GhostGadget newgui.library/GuiToDeep newgui.library/HitBorder newgui.library/HowManyGuiClients newgui.library/Iconify newgui.library/IsOnline newgui.library/LoadGadgetConfig newgui.library/LoadSnapShot newgui.library/LockGui newgui.library/makeAreaGFX newgui.library/MakeEmptyDeep newgui.library/MakeThemeGFX newgui.library/MixDeep newgui.library/NewString newgui.library/ObtainGui newgui.library/Open_window newgui.library/PlaceColorText newgui.library/PlaceDeep newgui.library/PlaceMultiText newgui.library/PlaceText newgui.library/PositionFromSnapShot newgui.library/ReleaseGui newgui.library/RemoveGuiGadget newgui.library/RemoveGuiGadgetByAddr newgui.library/ResizeGadget newgui.library/SaveDeep newgui.library/SaveGadgetConfig newgui.library/ScreenJump newgui.library/ScreenToDeep newgui.library/SetAlphaLevel newgui.library/SetGadgetGFX newgui.library/SetGadgetName newgui.library/SizeOfGui newgui.library/SnapShot newgui.library/SpeedBox newgui.library/TransferGadget newgui.library/UnLockGui newgui.library/UnSnapShot newgui.library/UpdateGadget newgui.library/UpdateGadgetValue newgui.library/UpdateGadgetValueByAddr newgui.library/UpdateGui newgui.library/UsePen newgui.library/VisibleLines newgui.library/WaitGuiEvent newgui.library/WhoIsOnline newgui.library/WorkGui newgui.library/Activate_Gadget newgui.library/Activate_Gadget NAME Activate_Gadget - activates a gadget SYNOPSIS Activate_Gadget(Gui,Nr) a0 d0 REGISTER a0,d0 FUNCTION This routine does set the focus on a specific gadget and sends an "OFF Focus" to any other gadget in this gui object. INPUTS Gui - a valid gui object Nr - the gadget number RETURNS NOTES EXAMPLES BUGS SEE ALSO Deaktivate_Gadget() newgui.library/Activate_ListenGadget newgui.library/Activate_ListenGadget NAME Activate_ListenGadget - set gadgets to listenmode SYNOPSIS Activate_ListenGadget(Gui,GadgetNr) REGISTER a0,d0 FUNCTION Activates an gadget and sets it into listenmode. The gadget will now get any inputevent for this gui object, even if the event did not occure over it. This is used for the scrollingfunction of text gadgets. INPUTS Gui - NewGUI Object GadgetNr - number of gadget to set RETURNS NOTES You can cause some stupid reactions if you i.e. all string gadgets to listenmode, as all gadgets get any keyevent send to the gui. They will all do the same at the same time. You have to unset ANY gadget you have set manualy. Do not expect Activate_Gadget() to unset it for you! use DeActivate_Gadget() EXAMPLES BUGS SEE ALSO DeActivate_Gadget(),Activate_Gadget() newgui.library/BasicBoxProzent newgui.library/BasicBoxProzent NAME BasicBoxProzent - draws progressindicator into an area SYNOPSIS BasicBoxProzent(Gui,Area,percent,withtext,allowred,allowgreen,allowblue,red,green,blue) REGISTER a0,a1,d0,d1,d2,d3,d4,d5,d6,d7 FUNCTION The function draws a coloured progresscounter into an given area. The area will be filled with 100 steps of the maximum rgb value to the position which precent indicates. As the steps are calculated, you need to filter out each rgb canon you don`t want use. Setting the max value of the canon to 0 will have the same effect. If you set `withtext` to TRUE , the area fill be filled and afterwards the value of the counter will be printed out as "value %". INPUTS Gui - NewGUI Object Area - an area object to fill percent - value to set withtext - DOSTRUE/FALSE for allowred - 0...1 allowgreen - 0...1 allowblue - 0...1 red - 0...255 green - 0...255 blue - 0...255 RETURNS Procent NOTES EXAMPLES BUGS SEE ALSO BlueBoxProzentT(),BlueBoxProzent(),SpeedBox() newgui.library/BasicDrawBorder3d newgui.library/BasicDrawBorder3d NAME BasicDrawBorder3d - draws a 3d border SYNOPSIS BasicDrawBorder3d(Gui,Area,Light_R,Light_G,Light_B,Dark_R,Dark_G,Dark_B) REGISTER a0,a1,d0,d1,d2,d3,d4,d5 FUNCTION This functions draws a border around an area. You can define the values for the light lines and the dark lines. INPUTS Gui - a valid gui object Area - a valid area object for this gui object *_R - red value 0 .. 255 *_G - green value 0 .. 255 *_B - blue value 0 .. 255 RETURNS NOTES EXAMPLES BUGS SEE ALSO MakeAreaGFX(),DrawBorder3d(),DrawBorder3dR() newgui.library/BlueBoxProzent newgui.library/BlueBoxProzent NAME BlueBoxProzent - SYNOPSIS BlueBoxProzent(Gui,Area,percent) REGISTER a0,a1,d0 FUNCTION Fills an area with a blue progressindicator without text! INPUTS Gui - a valid NewGUI object Area - a valid area object percent - 0..100 RETURNS NOTES EXAMPLES BUGS SEE ALSO BlueBoxProzentT() newgui.library/BlueBoxProzentT newgui.library/BlueBoxProzentT NAME BlueBoxProzentT - SYNOPSIS BlueBoxProzentT(Gui,Area,percent) REGISTER a0,a1,d0 FUNCTION Fills an area with a blue progressindicator with text! It's save to call this function with values lesser/greater as 0...100. INPUTS Gui - a valid NewGUI object Area - a valid area object percent - 0...100 RETURNS NOTES EXAMPLES BUGS SEE ALSO newgui.library/BrightDeep newgui.library/BrightDeep NAME BrightDeep - change balance of an image SYNOPSIS BrightDeep(Gui,Deep,Red,Green,Blue) REGISTER a0,a1,d0,d1,d2 FUNCTION This function changes the rgb values accordings to the given settings. Valid ranges are -255...+255 for each rgb value, but it's save to use "greater" values. INPUTS Gui - a valid NewGui object Deep - a valid deepobject Red - -255 ... +255 Green - -255 ... +255 Blue - -255 ... +255 RETURNS Deep - a new deep object. NOTES EXAMPLES BUGS SEE ALSO newgui.library/ClearGui newgui.library/ClearGui NAME ClearGui - SYNOPSIS ClearGui(Gui) REGISTER a0 FUNCTION Does clear the window. No Gadgets will be removed, everything is still there. If you wanne refresh your window do : cleargui(gui);workgui(gui); INPUTS Gui - a valid NewGUI object RETURNS NOTES EXAMPLES BUGS SEE ALSO workgui() newgui.library/Close_window newgui.library/Close_window NAME Close_Window - closes a gui frame and frees all resources. SYNOPSIS NULL = Close_Window(Gui) d0 d0 REGISTER d0 FUNCTION it frees all resources of a gui object and closes the intuition window. After this point your gui is no more. INPUTS gui - valid gui object RETURNS NULL NOTES use always "gui=Close_Window(gui)" constructs in your source, this prevents you from crashes if you call something double! EXAMPLES BUGS SEE ALSO Open_Window(),Create_Gadget() newgui.library/CopyDeep newgui.library/CopyDeep NAME CopyDeep - copies a rect from one deep to another SYNOPSIS CopyDeep(SourceDeep,sx,sy,sw,sh,DestDeep,dx,dy) REGISTER a0,d0,d1,d2,d3,a1,d4,d5 FUNCTION Copies a rectangle from one Deep into another. INPUTS SourceDeep - a valid deep object sx - source from X sy - source from Y sw - source width (pixel) sh - source height (pixel) DestDeep - a valid deep object dx - destination X dy - destination Y RETURNS NOTES boundary checks have to be made. EXAMPLES BUGS SEE ALSO newgui.library/CreateDeep newgui.library/CreateDeep NAME CreateDeep - load a deep picture SYNOPSIS Deep = CreateDeep(Gui,Filename) d0 a0 a1 REGISTER a0,a1 FUNCTION loads and remaps a deep picture. INPUTS Gui - a valid gui object Filename - an Amigadosfilename in best case a valid one ;) RETURNS deep - a valid deep object or NULL NOTES EXAMPLES BUGS SEE ALSO PlaceDeep() newgui.library/CreateDeepTheme newgui.library/CreateDeepTheme NAME CreateDeepTheme - loads a themeimage SYNOPSIS CreateDeepTheme(Gui,classname) REGISTER a0,a1 FUNCTION loads an image from the theme. INPUTS Gui - a valid NewGUI object classname - name of the deep to be loaded for the theme RETURNS deep - a new deep object NOTES EXAMPLES BUGS SEE ALSO newgui.library/CreateGadgetGeneric newgui.library/CreateGadgetGeneric NAME CreateGadgetGeneric - generic function for creating and adding gadgets SYNOPSIS CreateGadgetGeneric(Gui,Left,Top,Width,Height,Text,upimage,moimage,downimage,Class,Tags) REGISTER a0,d0,d1,d2,d3,a1,d4,d5,d6,a2,a3 FUNCTION This function does create you a gadget. As its the main purpose of a gui system to create gadgets, you will find much more information in this describtion as in any other. Position: The gadget will take space from (Left,Top) to (Left+Width,Top+Height) . If you enter invalid values, it won't be generated. Width & Height = 0 are valid options as you could set this gadget in listenmodus and it would receive all inputevents. Because this is just a theoratically option, because no gadgets exists, which would make sense in this size. To answere a question most modern developers have, why not letting the newgui engine layout the gadgets and get rid of the old fashioned X,Y Style? For an answere see the Examples section or take a look at PositionFromSnapShot(). A simple answere is, you couldn't do all the effects I had in mind, as I designed it. GadgetTitle: Enter here the text a gadget should present to identify it to the user. In other words, a label like "Load" , "Filename" or "Abort" . You can position this text via the taglist to be displayed on the Left,Top,Bottom,Right or Center of a gadget. I.E. buttongadgets have a label inside its borders (Center) . Together with using up/down/mouseover images, you could place the label outside of the gadget. I.e. the label says " don't drink this Alice " and the upimage shows "DRINK ME". If the user moves this gadget, the text will move with it. Images: You can give an image for all three gadget states UP , DOWN and MOUSEOVER. If you wanne pass a gadget inside a given backgroundimage, crop the images on-the-fly out of the backgroundwindow and bright/dark them a bit to generate suiteable images for your gadgets. The gadgettext will be written after the image has been drawn if you positioned the text inside the gadget. If you enter NULL for an image, it won't be used and the gadgetarea will be filled with grey ( depends on what you have set to be the inverse color for this gadget). If you enter -1 , no fill and no image draw will take place. This results in a 100% transparent gadget , except borders if selected. If you wanne create partionly transparent gadgets, you have to 1. grab the backgroud out of the backgroundwindow 2. use mixdeep() with your alphamask,foregroundimage and the cropped background. 3. If done correctly the gadget will match 100% into your backgroundimage. 4. Don't forget to deactivate the gadget border, as it wouldn't look good. Class: I.e. "generic/button.library" will create a normal buttongadget. Why is there no define for it? because if so, you had to register codes for an gadget, and we all know where that did go. The theory is "nameofgadgetset/classname.library" . If someone really writes replacements for the original gadgets, i.e. to override a function, you do not need to place it into the generic classset. You can easily make your own set of classes and let the user choose which gadgets he wants to use by choosing the setname. Creating the classstrings dynamically by sprintf() or other functions, would make your program compatible for the future without changing it at all. Taglist: As any gadget has it own set of tags, we concentrate on this one: NG_DONT_ADD_TO_GUI If you supply this tag, the gadget will not be added to the gadgetlist. The gadget object is returned by this function, you can use creategadgetgeneric() inside your own custom gadgets for createing subgadgets. You can access any gadget by his objectaddress instead of the gadgetnumber. Errorcodes: 0 - no valid newgui object used 1 - gadgettitle could not be copied 2 - gadgetclass was NULL or did not contain a string 3 - left < 0 or left > gui width 4 - top < 0 or top > gui height 5 - could not allocate memory for gadget 6 - could not allocate gadget area object 7 - could not allocate mem for class 8 - could not load the gadget class INPUTS Gui - a valid NewGUI object Left - Left position Top - Top position Width - width of gadget area Height - height of gadget area Text - Gadgettitle upimage - ( 0 , -1 or valid image deep ) moimage - ( 0 , -1 or valid image deep ) downimage - ( 0 , -1 or valid image deep ) Class - gadgetclass Tags - Taglist for gadget object RETURNS returns (Gadget,Errorcode) Gadget - valid gadget object or NULL Errorcode - 0 ... 8 NOTES Creating gadgets is allways the same for any newgui gadget, but all gadets have different needs which result in different tags per gadgetclass. see newgui.h ( .i ) for more information. as long as there are no newgui.h/i available , consult the sourcecode demos for more information. It's really not so hard to guess what happens for each tag item . EXAMPLES How to position gadgets if/if not a user changed the positions? Way 1: the simple way if (gui) { Loop( CreateGadgetGeneric(.....); ) until ( all gadgets created ) LoadSnapShot(Gui,0); ClearGui(Gui); WorkGui(Gui,0); Loop( (GadNbr,Class) = WaitGuiEvent(Gui,0) .... ) SnapShot(Gui,0); .... As simply as it looks, the result is. The gadget will be repositioned with LoadSnapShot() and Redrawn by WorkGui(). You don't have any control about the repositioning process. You can't i.e. crop the correct images out of the backgroundimage which looks awful in most cases. Way 2 : The advanced way /* Lo,To,Ro,Bo where o stands for original sizeOf(UpDeep)=sizeOf(DownDeep)=SizeOf(MouseOverDeep) */ if (gui) { UpdateGui(Gui,NG_BACKGROUND_IMAGE,BGDeep,TAG_DONE,NULL) Loop( (L,T,R,B) = PositionFromSnapShot(Gui,GadNbr,Lo,To,Ro,Bo); MyBG = CropDeep(Gui,BGDeep,L,T,Wup,Hup); // you can crop three images for Up,MouseOver & Down, but in most cases // these images have all the same size, so it does not matter UpDeep = MixDeep(Gui,UpImage,MyBG,UpAlpha); DoDeep = MixDeep(Gui,DownImage,MyBG,DownAlpha); MoDeep = MixDeep(Gui,MosueOverImage,MyBG,MouseOverAlpha); Freedeep(MyBG); CreateGadgetGeneric(Gui,L,T,R,B,UpDeep,MoDeep,DoDeep,....TAGS.....); ) until ( all gadgets created ); WorkGui(Gui,0); Loop( WaitGuiEvent(Gui,0) .... ) SnapShot(Gui,0); FreeMyDeeps(...); // You must free ANY image you have created. .... BUGS SEE ALSO newgui.h,LoadSnapShot(),SnapShot(),WorkGui(),CropDeep(),PositionFromSnapShot() newgui.library/CropDeep newgui.library/CropDeep NAME CropDeep - crops a rectangle from a given image SYNOPSIS CropDeep(Deep,Left,Top,Width,Height,name) REGISTER a0,d0,d1,d2,d3,a1 FUNCTION This routine creates a new image and copies the image data from the given deep from X and Y to the new deep x=0 y=0. ( x,y)-(x+w,y+h) -> (0,0)-(w,h) INPUTS Deep - deep image Left - Source X Top - Source Y Width - copy width pixel Height - copy height pixel name - a name for the new image object RETURNS deep - a new deep image with the size of width x height NOTES Imagenames are not really necessary, but wisely used, you could make it easier to track down images inside a gui object. EXAMPLES BUGS SEE ALSO CopyDeep() newgui.library/DeActivate_Gadget newgui.library/DeActivate_Gadget NAME DeActivate_Gadget - moves focus away SYNOPSIS DeActivate_Gadget(Gui,GadgetNr) REGISTER a0,d0 FUNCTION This function deactivates the given gadget . This means, if the gadget was in listenmodus, it won't be any longer. Same as it was active, as i.e. string-gadgets are when clicked. INPUTS Gui - a valid NewGUI object GadgetNr - number of gadget 1....X RETURNS NOTES EXAMPLES BUGS SEE ALSO newgui.library/DeGhostGadget newgui.library/DeGhostGadget NAME DeGhostGadget - makes an inaccessible gadget accessable SYNOPSIS DeGhostGadget(Gui,GadgetNr) REGISTER a0,d0 FUNCTION If you ghosted a gadget, this function will make it accessable again. You recognize ghosted gadgets as they have a black net above them. INPUTS Gui - a valid NewGUI Object GadgetNr - number of gadget 1...X RETURNS NOTES Ghosted gadgets are NOT drawn on a WorkGui() call. EXAMPLES BUGS SEE ALSO newgui.library/DrawBorder3d newgui.library/DrawBorder3d NAME DrawBorder3d - draws a 3d border SYNOPSIS DrawBorder3d(Gui,Area) a0 a1 REGISTER a0,a1 FUNCTION This functions draws a border around an area. the Light color is 255,255,255 ( white ) the dark color is 000,000,000 ( black ) INPUTS Gui - a valid gui object Area - a valid area object for this gui object RETURNS NOTES EXAMPLES BUGS SEE ALSO MakeAreaGFX(),DrawBorder3d(),DrawBorder3dR() newgui.library/DrawBorder3dR newgui.library/DrawBorder3dR NAME DrawBorder3dR - draws a recessed 3d border SYNOPSIS DrawBorder3dR(Gui,Area) a0 a1 REGISTER a0,a1 FUNCTION This functions draws a border around an area. the Light color is 000,000,000 ( black ) the dark color is 255,255,255 ( white ) INPUTS Gui - a valid gui object Area - a valid area object for this gui object RETURNS NOTES EXAMPLES BUGS SEE ALSO MakeAreaGFX(),DrawBorder3d(),DrawBorder3d() newgui.library/DrawBorderAroundBasic newgui.library/DrawBorderAroundBasic NAME DrawBorderAroundBasic - draws a simple rectangle border around area SYNOPSIS DrawBorderAroundBasic(Gui,Area,DistantX,DistantY,size) REGISTER a0,a1,d0,d1,d2 FUNCTION Depending on the border size ( 0 = no border , 3 = max size) a rectangle border is drawn around the area. Depending on the border size you get a normal 2d border (size=1) or a 3d Border ( size>1 ). INPUTS Gui - a valid NewGUI object Area - a valid area object DistantX - offset pixel from Y axis DistantY - offset pixel from X axis size - border size 1...3 RETURNS boolean - TRUE / FALSE drawn or not. NOTES EXAMPLES BUGS SEE ALSO DrawBorderAroundBasic(),DrawBorderAroundBorder(),DrawBorderAroundBox(),DrawBox3d(),DrawBox3dR() newgui.library/DrawBorderAroundBorder newgui.library/DrawBorderAroundBorder NAME DrawBorderAroundBorder - draws a border around a gadgets border SYNOPSIS DrawBorderAroundBorder(Gui,Area) REGISTER a0,a1 FUNCTION Sounds stupid, right? :) This function draws a border around an area+max.bordersize . Use it if you wanne show a "seleced" border around an gadget with border. INPUTS Gui - a valid NewGUI object Area - an area object ( i.e. from a gadget ) RETURNS NOTES EXAMPLES BUGS SEE ALSO DrawBorderAroundBasic(),DrawBorderAroundBorder(),DrawBorderAroundBox(),DrawBox3d(),DrawBox3dR() newgui.library/DrawBorderAroundBox newgui.library/DrawBorderAroundBox NAME DrawBorderAroundBox - draw border around box area SYNOPSIS DrawBorderAroundBox(Gui,Area) REGISTER a0,a1 FUNCTION Draws a box around an area. INPUTS Gui - a valid NewGUI Object Area - an area object i.e. from a gadget RETURNS NOTES EXAMPLES BUGS SEE ALSO DrawBorderAroundBasic(),DrawBorderAroundBorder(),DrawBorderAroundBox(),DrawBox3d(),DrawBox3dR() newgui.library/DrawBox3d newgui.library/DrawBox3d NAME DrawBox3D - draw Box in 3D SYNOPSIS DrawBox3D(Gui,Area) a0 a1 REGISTER a0,a1 FUNCTION draw a boxborder around a given Area. These are the normal borders around GadToolsGadgets. INPUTS gui - a valid gui object Area - a valid area for this gui object RETURNS NOTES EXAMPLES BUGS SEE ALSO DrawBox3DR() newgui.library/DrawBox3dR newgui.library/DrawBox3dR NAME DrawBox3DR - draw recessed Box in 3D SYNOPSIS DrawBox3DR(Gui,Area) a0 a1 REGISTER a0,a1 FUNCTION draw a recessed boxborder around a given Area. These are the normal borders around pressed GadToolsGadgets. INPUTS gui - a valid gui object Area - a valid area for this gui object RETURNS NOTES EXAMPLES BUGS SEE ALSO DrawBox3D() newgui.library/DrawDeep newgui.library/DrawDeep NAME DrawDeep - loads a deep picture and draws it SYNOPSIS Deep = DrawDeep(Gui,Left,Top,Deep) d0 a0 d0 d1 a1 REGISTER a0,d0,d1,a1 FUNCTION draws a deep at the given left-top position in the gui object. INPUTS Gui - a valid gui object deep - a valid deep object left - offset from left border top - offset from top border RETURNS deep - a valid deep object or NULL NOTES EXAMPLES BUGS SEE ALSO CreateDeep(),PlaceDeep() newgui.library/DrawDeepArea newgui.library/DrawDeepArea NAME DrawDeepArea - loads a deep picture and draws it SYNOPSIS Deep = DrawDeepArea(Gui,Area,Deep) d0 a0 a1 a2 REGISTER a0,a1,a2 FUNCTION draws a deep at the given position in the gui object represented by the area INPUTS Gui - a valid gui object deep - a valid deep object Area - a valid area RETURNS deep - a valid deep object or NULL NOTES EXAMPLES BUGS SEE ALSO CreateDeep(),PlaceDeep(),DrawDeep(),FreeDeep() newgui.library/DrawRoundBox3D newgui.library/DrawRoundBox3D NAME DrawRoundBox3D - draws a rounded box SYNOPSIS DrawRoundBox3D(Gui,Area,radius) a0 a1 d0 REGISTER a0,a1,d0 FUNCTION This functions draws a box with rounded edges. radius is the distance from the real borders to the corner point INPUTS Gui - a valid gui object Area - a valid Area for this gui radius - distance from the corner point RETURNS NOTES make radius not to great , it does not look to good, small ones are much better and faster EXAMPLES BUGS SEE ALSO DrawBox3d(),DrawBox3dR(),DrawRoundBox3dR() newgui.library/DrawRoundBox3DR newgui.library/DrawRoundBox3DR NAME DrawRoundBox3DR - draws a recessed rounded box SYNOPSIS DrawRoundBox3DR(Gui,Area,radius) a0 a1 d0 REGISTER a0,a1,d0 FUNCTION This functions draws a recessed box with rounded edges. radius is the distance from the real borders to the corner point INPUTS Gui - a valid gui object Area - a valid Area for this gui radius - distance from the corner point RETURNS NOTES make radius not to great , it does not look to good, small ones are much better and faster EXAMPLES BUGS SEE ALSO DrawBox3d(),DrawBox3dR(),DrawRoundBox3d() newgui.library/EraseBorderAroundBasic newgui.library/EraseBorderAroundBasic NAME EraseBorderAroundBasic - erases border around area SYNOPSIS EraseBorderAroundBasic(Gui,Area,DistantX,DistantY,size) REGISTER a0,a1,d0,d1,d2 FUNCTION It erases borders drawn with DrawBorderAroundArea(). Juts give the same seetings to remove it. INPUTS see DrawBorderAroundArea() RETURNS NOTES in fact a gray border is draw wwhich matches the color of the normal background gray. If you use a backgroundimage you should rework the gui. EXAMPLES BUGS SEE ALSO DrawBorderAroundBasic(),DrawBorderAroundBorder(),DrawBorderAroundBox(),DrawBox3d(),DrawBox3dR() newgui.library/EraseBorderAroundBorder newgui.library/EraseBorderAroundBorder NAME EraseBorderAroundBorder - erases border around border SYNOPSIS EraseBorderAroundBorder(Gui,Area,Red,Green,Blue) REGISTER a0,a1,d0,d1,d2 FUNCTION This function uses the given RGB value to erase the border, which has been drawn with DrawBorderAroundBorder() . With this you can compensate a little bit of the backgroundimageproblem mentioned in EraseBorderAround() . INPUTS Gui - a valid NewGUi object Area - a valid area i.e. from a gadget Red - 0...255 Green - 0...255 Blue - 0...255 RETURNS NOTES EXAMPLES BUGS SEE ALSO DrawBorderAroundBasic(),DrawBorderAroundBorder(),DrawBorderAroundBox(),DrawBox3d(),DrawBox3dR() newgui.library/EraseBorderAroundBorderPen newgui.library/EraseBorderAroundBorderPen NAME EraseBorderAroundBorderPen - erases border around borders SYNOPSIS EraseBorderAroundBorderPen(Gui,Area,Pen) REGISTER a0,a1,d0 FUNCTION instead of an rgb value, the pen color is used to erase the border. see EraseBorderAroundBorder() for more. INPUTS Gui - a valid NewGui object Area - a valid area Pen - pen 0...255 RETURNS NOTES EXAMPLES BUGS SEE ALSO DrawBorderAroundBasic(),DrawBorderAroundBorder(),DrawBorderAroundBox(),DrawBox3d(),DrawBox3dR() newgui.library/EraseBorderAroundBox newgui.library/EraseBorderAroundBox NAME EraseBorderAroundBox - erases border around box SYNOPSIS EraseBorderAroundBox(Gui,Area,Red,Green,Blue) REGISTER a0,a1,d0,d1,d2 FUNCTION for box borders instead of "border" borders .. see EraseBorderAroundBorder() for more. INPUTS Gui - a valid NewGUI object Area - a valid area i.e. from a gadget Red - 0....255 Green - 0...255 Blue - 0...255 RETURNS NOTES EXAMPLES BUGS SEE ALSO DrawBorderAroundBasic(),DrawBorderAroundBorder(),DrawBorderAroundBox(),DrawBox3d(),DrawBox3dR() newgui.library/EraseBorderAroundBoxPen newgui.library/EraseBorderAroundBoxPen NAME EraseBorderAroundBoxPen - erases border around box SYNOPSIS EraseBorderAroundBoxPen(Gui,Area,Pen) REGISTER a0,a1,d0 FUNCTION This functions accepts a pen instead of a rgb value. see EraseBorderAroundBorderPen() for more. INPUTS Gui - a valid NewGUI object Area - a valid area Pen - pen 0...255 RETURNS NOTES EXAMPLES BUGS SEE ALSO DrawBorderAroundBasic(),DrawBorderAroundBorder(),DrawBorderAroundBox(),DrawBox3d(),DrawBox3dR() newgui.library/FillBox newgui.library/FillBox NAME FillBox - fills area with a pencolor SYNOPSIS FillBox(Gui,Area,Pen) REGISTER a0,a1,d0 FUNCTION This function fills the given area with the color represented by the given pen. You can get a valid pen by useing UsePen(). INPUTS Gui - a valid NewGUI object Area - a valid area object Pen - A-Pen 0...255 RETURNS NOTES EXAMPLES BUGS SEE ALSO newgui.library/FillBoxColor newgui.library/FillBoxColor NAME FillBoxColor - SYNOPSIS FillBoxColor(Gui,Area,red,green,blue) REGISTER a0,a1,d0,d1,d2 FUNCTION This functions fills an area with the given value of r,g,b by allocating a pen for the color. INPUTS Gui - a valid NewGUI object Area - a valid area object for this gui red - 0...255 green - 0...255 blue - 0...255 RETURNS NOTES This may not work 100% on >8 Bit screens. EXAMPLES BUGS SEE ALSO FillBox() newgui.library/Filldeep newgui.library/Filldeep NAME Filldeep - fills a given rgb value into each pixel SYNOPSIS Filldeep(Deep,R,G,B) REGISTER a0,d0,d1,d2 FUNCTION The complete image is overwritten by the given rgb value. If you want to create an alphamask see the example below. INPUTS Deep - valid deep object R - 0...255 G - 0...255 B - 0...255 RETURNS NOTES EXAMPLES Alpha = MakeEmptyDeep(Gui,100,100); if (Alpha!=null) { FillDeep(Alpha,128,128,128); NewDeep = MixDeep(Gui,FrontDeep,BackgroundDeep,AlphaDeep); ... do something ... FreeDeep(NewDeep); FreeDeep(Alpha); } BUGS SEE ALSO newgui.library/FilledBoxProzent newgui.library/FilledBoxProzent NAME FilledBoxProzent - fills an areas up to percent SYNOPSIS FilledBoxProzent(Gui,Area,Percent) REGISTER a0,a1,d0 FUNCTION This routine uses the actual A-Pen to fill an area to the level of percent. INPUTS Gui - a valid NewGUI object Area - a valid area Percent - 0...100 RETURNS NOTES EXAMPLES BUGS SEE ALSO BlueBoxProzent(),BlueBoxProzentT() newgui.library/FreeAreaGFX newgui.library/FreeAreaGFX NAME FreeAreaGFX - Frees memory used by an Area SYNOPSIS NULL = FreeAreaGFX(Area) d0 a0 REGISTER a0 FUNCTION Frees memory used by an Area which was allocated by MakeAreaGFX() INPUTS Area - an Area Object allocated by MakeAreaGFX() RETURNS NULL - always returns null NOTES This routine returns null to make this possible: Area=FreeAreaGFX(Area) ... Area=FreeAreaGFX(Area) without crashing the system. If you don`t need the null returnment, don`t use it. EXAMPLES BUGS SEE ALSO newgui.library/FreeDeep newgui.library/FreeDeep NAME FreeDeep - frees a deep object SYNOPSIS NULL = FreeDeep(Deep) d0 a0 REGISTER a0 FUNCTION frees the memory used by the deep object. It does not free the used pens! this is done with Close_Window() INPUTS Deep - a valid Deep object RETURNS NOTES EXAMPLES BUGS SEE ALSO CreateDeep(),PlaceDeep(),DrawDeep(),DrawDeepArea() newgui.library/FreeString newgui.library/FreeString NAME FreeString - frees the allocated memory of string allocted with NewString SYNOPSIS FreeString(String) a0 REGISTER A0 FUNCTION frees the allocated memory of string allocted with NewString INPUTS String - a string allocated with NewString RETURNS NOTES EXAMPLES BUGS SEE ALSO NewString() newgui.library/Free_Gadget newgui.library/Free_Gadget NAME FreeGadget - frees up a gadget SYNOPSIS Next = Free_Gadget(Gadget) REGISTER a0 FUNCTION Calls Gadget_Free() of the gadget and frees up all resources used by this gadget. INPUTS Gadget - an gadget object created with create_gadget() RETURNS Next - the following gadget in the gadget chain or null if it was the last one. NOTES If you know what you do, ok, but normally you don`t need to call this routine directly. * CAUTION * * CAUTION * * CAUTION * * CAUTION * If you free up a gadget which is chained in a used gui object, your system could crash * CAUTION * * CAUTION * * CAUTION * * CAUTION * EXAMPLES BUGS SEE ALSO creategadgetgeneric() newgui.library/Free_Gadgets newgui.library/Free_Gadgets NAME Free_Gadgets - frees all gadgets of an gui object SYNOPSIS Result = Free_gadgets(Gui) d0 a0 REGISTER a0 FUNCTION Frees all gadgets used in an gui object. INPUTS Gui - gui object created with open_window() RETURNS Result - return -1 for failure and 0 for success all other value would indicate an big error NOTES You don`t need to call this routine. It`s only usefull for you if your gadget wants to clear it`s subgadgets. * CAUTION * * CAUTION * * CAUTION * * CAUTION * If you free up gadgets which are chained in a used gui object, your system could crash * CAUTION * * CAUTION * * CAUTION * * CAUTION * EXAMPLES BUGS SEE ALSO create_gadget(),Free_Gadget() newgui.library/GenericRequester newgui.library/GenericRequester NAME GenericRequester - a very simple requester SYNOPSIS GenericRequester(Gui,text,gadgets,tags) REGISTER a0,a1,a2,a3 FUNCTION This functions displays a simple requester. i.e. ,------------------------------------------. | text to be displayed in this requester | | | | TEXT1 TEXT2 TEXT3 | `------------------------------------------´ =>result = GenericRequester(Gui,"text to be displayed in this requester", "TEXT1|TEXT2|TEXT3",null); You can use nearly any amount of gadgetstexts, but every created button gadget inside the requester will take space. Not every combination of texts and gadgetnumbers will work The Requester will have 320 pixel in X and a free size in Y. INPUTS Gui - a valid NewGUI Object text - the displayed text gadgets - a list of gadget separated by "|" tags - tagliste ( actual not used ) RETURNS gadnbr - the pressed button gadget or NULL if the requester has been canceled. NOTES EXAMPLES BUGS SEE ALSO newgui.library/GetActiveGadget newgui.library/GetActiveGadget NAME GetActiveGadget - return the active gadgetnumber SYNOPSIS GetActiveGadget(Gui) REGISTER a0 FUNCTION This function return the first active gadget in the gui object. It returns NULL if none is active. As most times only one gadget is active at a time, you should get the valid result, if you didn't activate gadgets by hand. INPUTS Gui - a valid NewGUI object RETURNS Number - number of active gadget or 0 NOTES Gadgets are number 1...X. 0 does not exist. It's used to indicate , that no gadget was involved in that event. See WaitGuiEvent() for more. EXAMPLES BUGS SEE ALSO WaitGuiEvent() newgui.library/GetBorderSizes newgui.library/GetBorderSizes NAME GetBorderSizes - returns the size of each border in a set. SYNOPSIS GetBorderSizes(Gui) REGISTER a0 FUNCTION This functions returns the size of each windowborder for this gui object. If it's a themed window, you get the correct bordersizes. Same for none themed windows. In the unthemed case, the border sizes are taken from the original windowstructure and are just passed throu. INPUTS Gui - a valid NewGUI Object RETURNS Set(Leftborder,TopBorder,Rightborder,Bottomborder) - Bordersizes in LONG. d0 d1 d2 d3 NOTES Attention there are two forms of this call used in the demo sources: a) (LB,TB,RB,BB) = getBorderSizes(Gui); b) (LB,TB) = getBorderSizes(Gui); both calls do the same, just the compiler does not transfer RB and BB's register to a variable. If your use a C macro for compensationing the lag of multiply returnvalues, keep this in mind. You can check the mathtrans.library for an example of how to deal with multiply returnvalues in C ! EXAMPLES BUGS SEE ALSO newgui.library/GetFromAreaGFX newgui.library/GetFromAreaGFX NAME GetFromAreaGFX - get x-y koordinates from the given area SYNOPSIS ( left,Top,Right,Bottom ) = GetFromAreaGFX(Area) d0 d1 d2 d3 REGISTER a0 FUNCTION An Area is a data container wich represents a set of coordinates in the frame. This function extracts thoose coordinates. INPUTS Area - an Area allocated with MakeAreaGFX() RETURNS Left - Offset from left border Top - Offset from top border Right - Offset from left border + width Bottom - Offset from top border + height NOTES EXAMPLES BUGS SEE ALSO MakeAreaGFX() newgui.library/GetGadgetAddr newgui.library/GetGadgetAddr NAME GetGadgetAddr - get the address of a gadget SYNOPSIS GetGadgetAddr(Gui,GadgetNr) REGISTER a0,d0 FUNCTION This functions return the address of the gadgetobject. You can use this for transfering gadgets from one gui to another. INPUTS Gui - a valid NewGUI object GadgetNr - the number of the gadget 1....X RETURNS address - LONG pointer to the gadget object NOTES EXAMPLES BUGS SEE ALSO UpdateGadgetValueByAddr() newgui.library/GetGadgetName newgui.library/GetGadgetName NAME GetGadgetName - returns name of the gadget SYNOPSIS GetGadgetName(Gui,GadgetNr) REGISTER a0,d0 FUNCTION This functions returns the name of the gadget. It means the Gadget-Title, you can so find a specific gadget by name if you query the gui's gadgetlist. INPUTS Gui - a valid NewGUI object GadgetNr - a gadget 1....X RETURNS name - LONG pointer to the gadgettitle NOTES EXAMPLES BUGS SEE ALSO newgui.library/GetGadgetStatus newgui.library/GetGadgetStatus NAME getGadgetStatus - returns the activity state of the gadget SYNOPSIS getGadgetStatus(Gui,GadgetNr) REGISTER a0,d0 FUNCTION This functions returns the state of a gadget. Three states are defined : 0 - inactive / GADGET_UP 1 - mouseover 2 - active / GADGET_DOWN 4 - listenmode active Normal gadgets have just two states, down or up. NewGUI gadgets have always 4 states. Mouseover is used while the mouse is over the rectangle of a gadgetarea. Active or GADGET_DOWN means, somethe has pressed the mousebutton over this gadget . See the example for how to check if a gadget is clicked. Listenmode enables gadgets to get ANY inputevent for the gui, even if it did not occure inside the gadgetarea. INPUTS Gui - a valid NewGUI object GadgetNr - a gadget 1....X RETURNS state - LONG state of the gadget ( see above for details) NOTES To understand the example you have to keep in mind that the InputEvent has already be processed by NewGUI and the corresponding gadget when the application gets the InputEvent . EXAMPLES (Gadget,Class) = WaitGuiEvent(Gui,NULL); if (Class == IDCMP_MOUSEBUTTON && GetGadgetStatus(Gui,ButtonGadget1) ==0 ) { The Gadget has been released => IDCMP_GADGETUP } if (Class == IDCMP_MOUSEBUTTON && GetGadgetStatus(Gui,ButtonGadget1) >1 ) { The Gadget has been clicked down => IDCMP_GADGETDOWN } if (Class == IDCMP_MOUSEMOVE && GetGadgetStatus(Gui,ButtonGadget1) ==1 ) { The mousepointer has moved over the ButtonGadget1 . Normaly the Gadget handles the mouseover stuff for you, as it changes the gadgets title color, inverts or displays the given mouseover image ! } BUGS SEE ALSO newgui.library/GetGadgetValue newgui.library/GetGadgetValue NAME GetGadgetValue - get the content of a gadget SYNOPSIS GetGadgetValue(Gui,GadgetNr) REGISTER a0,d0 FUNCTION This functions returns the value of a a given gadget. The gadget does choose which kind of result you get. If you have a number gadget, you get the displayed number, if it is a string gadget you get a Copy of the content ( free it with FreeString() ) . Other gadgetkinds return other representations of theire content. Pls refer to the gadget classes for more details. INPUTS Gui - a valid NewGUI object GadgetNr - 1...X RETURNS value - LONG value or pointer to LONG NOTES EXAMPLES BUGS SEE ALSO GetGadgetValueByAddr(),UpdateGadgetValue() newgui.library/GetGadgetValueByAddr newgui.library/GetGadgetValueByAddr NAME GetGadgetValueByAddr - get gadget content SYNOPSIS GetGadgetValueByAddr(Gui,Addr) REGISTER a0,d0 FUNCTION This functions returns the content of a gadget. see GetGadgetValue() for more. Instead of GetGadgetValue() pass the object to the pointer. INPUTS Gui - valid NewGUI object Addr - valid object RETURNS see GetGadgetValue() NOTES If you wanne get rid of gadgetnumbers Objectadresses are the way. EXAMPLES BUGS SEE ALSO GetGadgetValue(),UpdateGadgetValue() newgui.library/GetIconifyState newgui.library/GetIconifyState NAME GetIconifyState - return the iconifystate of the gui SYNOPSIS GetIconifyState(Gui) REGISTER a0 FUNCTION If you wanne know if a gui is iconified use this function. INPUTS Gui - a valid NewGUI object RETURNS LONG - TRUE/FALSE NOTES EXAMPLES BUGS SEE ALSO newgui.library/GetPen newgui.library/GetPen NAME GetPen - gets you a pen matching your RGB values SYNOPSIS ( Pen, RC ) = GetPen(Gui,Red,Green,Blue) d0 d1 a0 d0:8 d1:8 d2:8 REGISTER a0,d0,d1,d2 FUNCTION This function returns a Pen suitable for Intuitions SetAPen(). It decides if it must be allocated or not. Use always this routine instead of ObtainPen() from AOS. INPUTS gui - a valid gui object red - red value from 0 ... 255 green - green value from 0 ... 255 blue - blue value from 0 ... 255 RETURNS Pen - the pen 0 ... 255 RC - return 0 for was not allocated means success. -1 for failure ! R:G:B > 255 1 for successfull allocation of the pen NOTES if rc=-1 then Pen is 0 , which menas the bg pen is used. If you don`t check RC your programm will work without errors even if it can use any pen EXAMPLES BUGS SEE ALSO GetRGB() newgui.library/GetPixelFromDeep newgui.library/GetPixelFromDeep NAME GetPixelFromDeep - get pixel rgb value from deepimage SYNOPSIS GetPixelFromDeep(Deep,X,Y) REGISTER a0,d0,d1 FUNCTION Returns the RGB value of a pixel from an image. If the given (X,Y) coordinates are not within the image area, your get a (0,0,0) , same as for an invalid image object. INPUTS Deep - a valid deep image X - 0...max size Y - 0...max size RETURNS Set(R,G,B) - R 0...255 - G 0...255 - B 0...255 r = d0 , g = d1 and b = d2 NOTES EXAMPLES BUGS SEE ALSO newgui.library/GetPopMenuBase newgui.library/GetPopMenuBase NAME GetPopMenuBase - gives the popupmenubase SYNOPSIS GetPopMenuBase(Gui) REGISTER A0 FUNCTION If you wanne use menu's in your gui, use this function to get the already opened popupmenubase from newgui. NewGUI does not support menus yet. if menüs are presented popupmenu.library is used to build this menus. Because its quite easy and comfortable to build menus with it, we suggest to use it by default. INPUTS Gui - a valid NewGUI object. RETURNS popupmenubase - pointer to libbase or NULL if no popupmenu library is installed. NOTES EXAMPLES BUGS SEE ALSO newgui.library/GetPressedCode newgui.library/GetPressedCode NAME getPressedCode - returns pressed intuimsgcode SYNOPSIS getPressedCode(Gui) REGISTER a0 FUNCTION returns the last, in nearly all cases the actual, msgcode for the handles intuimsg. INPUTS Gui - a valid NewGUI object RETURNS LONG - msgcode or NULL NOTES EXAMPLES BUGS SEE ALSO GetPressedKey(),GetPressedQualifier() newgui.library/GetPressedKey newgui.library/GetPressedKey NAME getPressedKey - return pressed key from an keyevent SYNOPSIS getPressedKey(Gui) REGISTER a0 FUNCTION returns the keycode from an vanillakey intuitionevent. INPUTS Gui - a valid NewGUI object RETURNS LONG - keyvalue or NULL NOTES EXAMPLES BUGS SEE ALSO GetPressedCode(),GetPressedQualifier() newgui.library/GetPressedQualifier newgui.library/GetPressedQualifier NAME getPressedQualifier - returns the qualifier from an intuitionevent SYNOPSIS getPressedQualifier(Gui) REGISTER a0 FUNCTION This function returns the qualifier from the last intuitionevent. Qualifiers are the most interessting parameters of an intuitionevent, because it tells you if the (mouse)button was pressed down or was released , if it was a repeated event, if it was the right mousebutton a.s.o. See sourccodesexamples on the NewGU Homepage for more information how to use it. INPUTS Gui - a valid NewGUI object RETURNS LONG - qualifier NOTES EXAMPLES BUGS SEE ALSO GetPressedCode(),GetPressedKey() newgui.library/GetRGB newgui.library/GetRGB NAME GetRGB - return RGB Value for a Pen SYNOPSIS ( Red , Green, Blue ) = GetRGB(Gui,Pen) d0 d1 d2 a0 d0 REGISTER a0,d0 FUNCTION gets the RGB value of a pen. INPUTS gui - a valid gui object Pen - a valid pen number RETURNS Red - 0 ... 255 or -1L for failure Green - 0 ... 255 or -1L for failure Blue - 0 ... 255 or -1L for failure NOTES depending on the colormanagement of the os, a pen must not return the same RGB values as with which it was created! EXAMPLES BUGS SEE ALSO GetPen() newgui.library/GetThemeByName newgui.library/GetThemeByName NAME getThemeByName - return themeid for a given themename SYNOPSIS getThemeByName(themename) REGISTER a0 FUNCTION This function returns the themeid ( or null ) used by a specific theme. As themes could be installed with different themeids per computer, you should always use this function to get the themeid and not use your themeid from home for a theme. INPUTS themename - pointer to a (part of the) themename. RETURNS LONG - themeid or NULL ( if not found ) NOTES Example: the themename is "target wb" "target" - "target wb" will both match the themename. Themenames should always be significant different. Do your best in naming your theme ;) EXAMPLES BUGS SEE ALSO getThemeNameByID(),GetThemeNameFromGui() newgui.library/GetThemeNameByID newgui.library/GetThemeNameByID NAME getThemeNameByID - returns the full name of a theme by it's id SYNOPSIS getThemeNameByID(ID) REGISTER d0 FUNCTION returns the full themename by it's ID. If you don't get a value back, the theme is not installed OR does not have a name. The second case is a mistake of the one who supplied the theme ! The returned pointer MUST be passed to FreeString(). INPUTS ID - value from 1... X RETURNS LONG * - NULL or pointer to themename. NOTES EXAMPLES BUGS SEE ALSO GetThemeNameFromGui(),GetThemeByName() newgui.library/GetThemeNameFromGui newgui.library/GetThemeNameFromGui NAME getThemeNameFromGui - returns the actual used themename SYNOPSIS getThemeNameFromGui(Gui) REGISTER a0 FUNCTION returns a pointer to the themename if a theme is used in the gui. If you did not used a theme at all, but the Force Themes option is enabled in NewGui , this will indicate that your window is now themed. The result must be passed to FreeString() if do no longer need the name. INPUTS Gui - a valid NewGUI object RETURNS LONG * - pointer to name of the theme NOTES EXAMPLES BUGS SEE ALSO GetThemeNameByID(),GetThemeByName() newgui.library/GhostGadget newgui.library/GhostGadget NAME GhostGadget - ghosts a given gadget SYNOPSIS GhostGadget(Gui,GadgetNr) REGISTER a0,d0 FUNCTION Ghosts a given gadget. INPUTS Gui - a valid NewGUI object GadgetNr - number of gadget RETURNS NOTES If the GUI is reworked , ghosted gadgets are not drawn. EXAMPLES BUGS SEE ALSO DeGhostGadget() newgui.library/GuiToDeep newgui.library/GuiToDeep NAME GuiToDeep - creates deepimage from guiwindow SYNOPSIS GuiToDeep(Gui,left,Top,width,height) REGISTER a0,d0,d1,d2,d3 FUNCTION Creates a DEEPIMAGE from your actual gui window. If you wanne make a screenshot of the window, you do not need to use a third party tool or grab it with cgx functions. Use this routine and the resulting image can be directly be used inside your own application. I.E. if you wanne morph in or out of something, make a screenshot, build an empty deep of the same size, fill the alpha value in the "empty" image and pass this to mixdeep() . If you loop the alpha value from 0 to 255 you blend your gui in / out i.e. from a splash screen , or another gui window above below your window. INPUTS Gui - a valid NewGUI object left - from X Top - from Y Width - to x+width Height - to y+height RETURNS deep - deep or null NOTES EXAMPLES BUGS SEE ALSO newgui.library/HitBorder newgui.library/HitBorder NAME HitBorder - returns if (Mx,My) lays in the area border SYNOPSIS HitBorder(Area,Mx,My) REGISTER a0,d0,d1 FUNCTION This routine is mostly used inside a gadget itself. returns in which border the mouse click ( it is only usefull for mouseclick IMHO ) did go, if it hit a border at all! The result is a mix of flags : LEFT_BORDER = 1 TOP_BORDER = 2 RIGHT_BORDER = 4 BOTTOM_BORDER = 8 Just AND the border out you need to know about. If you get NULL , no border has been hit. it just mean this and not more or less! If you wanne know if the area was hit at all, check it. ( If you are inside a gadget, you got the hit, or your are in listenmodus! ) INPUTS Area - a valid area Mx - a x coordinate My - a y coordinate RETURNS FLAGS - NULL or value 1...12 ( if you ever get 15 let me know how you did that! ) NOTES *** NORMALY NOT USED IN CUSTOM APPLICATIONS *** EXAMPLES BUGS SEE ALSO newgui.library/HowManyGuiClients newgui.library/HowManyGuiClients NAME HowManyGuiClients - returns how many clients locked the gui SYNOPSIS HowManyGuiClients(Gui) REGISTER A0 FUNCTION returns the current value of how many clients block this gui from closing. As you can check if a PUBLIC_SCREEN is locked a NewGUI object can be locked from customs applications in the same way. If you fork tasks which i.e. print informations in a text gadget, each client app should use LockGui() and UnlockGui() to ensure that the window is not closed while the gui is in usage. Clients should also use GetIconifyState() to check if it save to draw images in the gui. Updating Gadgets IS SAVE while a gui is iconified! INPUTS Gui - a valid NewGUI object RETURNS locks - 0 .... X where 0 means it's not locked. NOTES A user can free a gui from all locks, if a client crashes! Press r.mousebutton +CTRL to go into the NewGui Applicationmenu. EXAMPLES BUGS SEE ALSO LockGui(),UnLockGui() newgui.library/Iconify newgui.library/Iconify NAME Iconify - shrink gui to a appicon on the wb screen. SYNOPSIS Iconify(Gui) REGISTER a0 FUNCTION Close the gui window temporary. It's save to close a gui via NewGUI Mainmenu, as the menu is part of the application. It is NOT ok, to iconify a gui which does not belong to you! As your task gets blocked until the gui is reopend, it is possible to produce a deadlock in your application. The application can close the window while you wait . Just don't do it. INPUTS Gui - a valid NewGUI object RETURNS NOTES EXAMPLES BUGS SEE ALSO newgui.library/IsOnline newgui.library/IsOnline NAME IsOnline - alternative way to check for a gui SYNOPSIS IsOnline(Gui) REGISTER d0 FUNCTION If your are a child application of a master app which passed it's gui object to you , you can check if this gui object is still valid. Pass it to this function and when you get it back unchanged, it's still valid. INPUTS Gui - a NewGUI object RETURNS guiobject - NULL or the passed in object NOTES EXAMPLES BUGS SEE ALSO newgui.library/LoadGadgetConfig newgui.library/LoadGadgetConfig NAME LoadGadgetConfig - load a config in for a gadget SYNOPSIS LoadGadgetConfig(Gui,Class) REGISTER A0,A1 FUNCTION returns a pointer to the config in form of a taglist a gadgetclass has saved. INPUTS Gui - a valid NewGUI object Class - pointer to a classname RETURNS NOTES Applications do not need this! EXAMPLES BUGS SEE ALSO SaveGadgetConfig() newgui.library/LoadSnapShot newgui.library/LoadSnapShot NAME LoadSnapShot - repositions gadgets from snapshot SYNOPSIS LoadSnapShot(Gui,Tags) REGISTER a0,a1 FUNCTION This routine loads the snapshot from disk, if there is one. Snapshots are automatically stored in "envarc:newgui/" as asciidumps of the gui gadgetlist. If your ever need to edit this file, be careful ! If there is a snapshot to load all gadgets in the snapshot are repositoned. You get a value !=0 returned if you need to rework the gui via WorkGui(). If your application changed, you should DELETE the snapshots in ENVARC: to ensure, that values do belong to the correct gadgets ! If you just add more gadgets to the gui, it's save to reuse the old snapshot. INPUTS Gui - a valid NewGUI object Tags - pass null RETURNS result - NOT NULL if you need to rework the gui. NOTES EXAMPLES BUGS SEE ALSO SnapShot() newgui.library/LockGui newgui.library/LockGui NAME LockGui - block a gui from closing SYNOPSIS LockGui(Gui) REGISTER a0 FUNCTION If you are a client application which got a gui object to work with, you should lock the gui while you use it. If a gui is locked, it can't be closed , which does not mean, that it can't be iconified ! INPUTS Gui - a gui to block RETURNS result - NULL if it could not be locked NOTES as it is a semaphore lock, your just Lock it when you need to, got it!? This lock ensures, that gadgets are processed by one application at a time. The mailapplication can do the locks to if it wants to, but does not need to. READ Access to Gadgets can be done without locking. EXAMPLES if (LockGui(gui)!=0) { UpdateGadgetValue(gui,TextGadgetNumber,"You are locked now"); UnlockGui(gui); } BUGS SEE ALSO UnLockGui() newgui.library/makeAreaGFX newgui.library/makeAreaGFX NAME MakeAreaGFX - creates an area for a set of coordinates SYNOPSIS Area = MakeAreaGFX(Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 REGISTER a0,d0,d1,d2,d3 FUNCTION Creates an area data object and maps the given coordinates to match the coordinates on the used frame. This means, it calculates the frames titlebar aso. and corrects the given coordinates! INPUTS Gui - Guiobject for which the area should be mapped Left - Offset from left border Top - Offset from top border Right - Offset from left border + width Bottom - Offset from top border + height RETURNS Area - datacontainerobject ( DCO ) NOTES EXAMPLES BUGS SEE ALSO GetFromAreaGFX(),FreeAreaGFX() newgui.library/MakeEmptyDeep newgui.library/MakeEmptyDeep NAME MakeEmptyDeep - make a black image SYNOPSIS MakeEmptyDeep(Gui,Name,Width,Heigth) REGISTER a0,a1,d0,d1 FUNCTION returns an empty ( black ) image of given size and name. INPUTS Gui - a valid NewGUI object Name - a name for the gadget Width - Size in X Heigth - Size in Y RETURNS deep - NULL or a valid deep image. NOTES You need a NewGUI object as it's used to handles 8 Bit operations if needed. EXAMPLES BUGS SEE ALSO CropDeep(),DisplayDeep(),PlaceDeep(),MixDeep(),BrightDeep()... newgui.library/MakeThemeGFX newgui.library/MakeThemeGFX NAME MakeThemeGFX - creates Imageset for gadgets if themed SYNOPSIS MakeThemeGFX(Gui,width,height,classname,backgrounddeep) REGISTER a0,d0,d1,a1,a2 FUNCTION This function loads the images of a gadgetclass from a theme and blends them into a given background image. If your gui is themed, and you wanne make use of the custom images for button,string, integer, number aso. gadgetclasses you pass the X,Y size of your gadget the images are for, the classname and an optional backgroundimage ( which you should crop out of the guis backgroundwindow ). The result is a set of three images for UP,DOWN and Mouseover images, which match perfectly in the gui. The size of the gadget created should match the size of one of the images returned! So read it out before you create the gadget. See example. INPUTS Gui - a valid NewGUI object width - x size in pixel height - y size in pixel classname - gadgetclass name ( i.e. "button" ) backgrounddeep - image or NULL RETURNS NOTES The mixed image is always cropped out of the backgroundimage if given, so it is save to give a greater image, as the themeimages are. The other case, where your gadget is smaller as your themeimages is not handled. You don't get an image then. The images are only mixed if there is an alpha image in the theme for the gadget class. It's always save to pass the result set to CreateGadgetGeneric() . EXAMPLES (u,mo,d) = MakeThemeGFX(gui,W,H,"button",0); if (u) H=u->Deep.height; CreateGadgetGeneric(gui,X,Y,W,H,"A Button",....) ... if (u) FreeDeep(u); // free all images ! .... BUGS SEE ALSO newgui.library/MixDeep newgui.library/MixDeep NAME MixDeep - mixes a foreground , a background and a alphadeep to a new one SYNOPSIS Deep = MixDeep(Gui,ForeGround,BackGround,AlphaChannel) d0 a0 a1 a2 REGISTER a0,a1,a2,a3 FUNCTION This function is used to mix two pictures of the same size. How they are mixed depends only on the alphachannel. the bg is represented by a black pixel ( 0,0,0 ) , the fg by a white one ( 255,255,255 ) . All other values work too. Which means you can build channels which use only blue, or red colors; blue glass i.e. . INPUTS Gui - valid gui object ForeGround - Deeppicture which should be before another one BackGround - Deeppicture which will be the background AlphaChannel - the 24Bit AlphaChannelDeeppicture RETURNS Deep - a NEW allocated deep picture object or NULL for failure NOTES Deeps MUST HAVE the SAME SIZE , all THREE! A hint : don`t try fancy things on slider buttons, it does not look the way you may think, because normally it`s to small ( optical sight ) work here with easier alphachannels i.e RBG(0000000->FFFFFF->000000):(3-5 pixel max) EXAMPLES BUGS SEE ALSO newgui.library/NewString newgui.library/NewString NAME NewString - copy an existing string to a new created null-terminated string SYNOPSIS String = NewString(String) d0 a0 REGISTER A0 FUNCTION allocated a null-terminated memoryblock an copies the input string to it. INPUTS String - a null-terminted string RETURNS String - a pointer to the null-terminted stringcopy. NOTES EXAMPLES BUGS SEE ALSO FreeString() newgui.library/ObtainGui newgui.library/ObtainGui NAME ObtainGui - add a client to the gui clientcounter SYNOPSIS ObtainGui(Gui) REGISTER A0 FUNCTION As LockGui() blocks any further calls, ObtainGui() does not. It just increases the client counter for this gui object. HowManyGuiClients() will return this client counter and Close_window() does wait for clients to be 0 before it closes a gui finally. INPUTS Gui - a valid NewGUI object RETURNS result - not 0 if if could be incremented. NOTES EXAMPLES BUGS SEE ALSO ReleaseGui(),HowmanyGuiClients() newgui.library/Open_window newgui.library/Open_window NAME Open_Window - Creates a new GUI object SYNOPSIS Gui = Open_Window(left,Top,Width,Height,Name,WindowFlags,IDCMP,Tags) d0 d REGISTER d0,d1,d2,d3,a0,d4,d5,a1 FUNCTION This function opens a new window and allocates a new gui object. A GIMME-ZEROZERO window will be opened. INPUTS Left - Left Top - Width - Height - Name - WindowFlags - IDCMP - Tags - RETURNS Gui - a new GUI Object or null for ANY failure : 1. if no memory for the gui object itselft could be allocated 2. if no memory for the indexed color hash could be allocated 3. if the window could not be opend NOTES The opened Intuitionwindow is a GIMME ZERO ZERO window, which means every position (x-y) must be corrected with the Left- and Top-Bordervalues. You need this only if you want to draw or position something without the newgui system! Expect coordinates always correct, you never need to recorrect them yourself if you use newgui routines. Every rule for Intuitionwindows you will find in the autodocs is valid here too except this: 1. some window- and IDCMP-flags are set by default : flags=flags!WFLG_DRAGBAR!WFLG_DEPTHGADGET!WFLG_CLOSEGADGET!WFLG_RMBTRAP!WFLG_SMART_REFRESH idcmp=idcmp!IDCMP_GADGETDOWN!IDCMP_GADGETUP!IDCMP_CLOSEWINDOW!IDCMP_VANILLAKEY!IDCMP_RAWKEY!IDCMP_REFRESHWINDOW 2. The given values for width and height are INNER width and height, not outer! Example: a windowsize of 800x600 would NOT FIT on a 800x600 screen! ------- EXAMPLES BUGS SEE ALSO Close_Window() newgui.library/PlaceColorText newgui.library/PlaceColorText NAME PlaceColorText - displays a colored text SYNOPSIS PlaceColorText(Gui,Area,Text,FG_Color,BG_Color) a0 a1 a2 d0 REGISTER a0,a1,a2,d0,d1 FUNCTION The given area is plain colored with the BG-Color, after this the given text is draw with the FG-Color into the Area INPUTS Gui - a valid gui object Area - a valid area Text - a Null terminated string FG - RGB values for foregroundcolor BG - RGB values for backgroundcolor RETURNS NOTES FG & BG are 24 bit representations of RGB i.e. 0x00a0a0a0 for R=160 G=160 B=160 EXAMPLES BUGS SEE ALSO PlaceText() newgui.library/PlaceDeep newgui.library/PlaceDeep NAME PlaceDeep - loads a deep picture and draws it SYNOPSIS Deep = PlaceDeep(Gui,Left,Top,Filename) d0 a0 d0 d1 a1 REGISTER a0,d0,d1,a1 FUNCTION loads and remaps a deep picture and draws it at the given left-top position in the gui object. INPUTS Gui - a valid gui object Filename - an Amigadosfilename in best case a valid one ;) left - offset from left border top - offset from top border RETURNS deep - a valid deep object or NULL NOTES EXAMPLES BUGS SEE ALSO CreateDeep() newgui.library/PlaceMultiText newgui.library/PlaceMultiText NAME PlaceMultiText - display a text in an area SYNOPSIS PlaceMultiText(Gui,Area,Text,dx,dy,fcolor,bcolor) REGISTER a0,a1,a2,d0,d1,d2,d3 FUNCTION The given text will be drawn in fcolor with a bcolor als backgroundcolor. f&bcolor are passed each in a LONG of R<<16||G<<8||B&&0xFFFFFF . Dx & Dy are used as an offset from the area borders. Use it as you would use "cellspacing" in an html tablecell. INPUTS Gui - a valid NewGUI object Area - a valid area Text - the text to be displayed dx - offset from left border of the area dy - offset from top border of the area fcolor - foreground color bcolor - background color RETURNS NOTES The text will be cropped if it does not fit in the area. The text will be placed in several lines if it does not fit, before it is cropped. EXAMPLES BUGS SEE ALSO PlaceText newgui.library/PlaceText newgui.library/PlaceText NAME PlacText - displays a text SYNOPSIS PlaceText(Gui,Area,Text) a0 a1 a2 REGISTER a0,a1,a2 FUNCTION The given area is plain colored with the BG-Color #$00e6e6e6 Light gray, after this the given text is draw with the FG-Color #$000000 ( black ) into the Area. INPUTS Gui - a valid gui object Area - a valid area Text - a Null terminated string RETURNS NOTES EXAMPLES BUGS SEE ALSO PlaceColorText() newgui.library/PositionFromSnapShot newgui.library/PositionFromSnapShot NAME PositionFromSnapShot - gets the position in a snapshot SYNOPSIS PositionFromSnapShot(Gui,Gadget,Left,Top,Right,Bottom) REGISTER a0,d0,d1,d2,d3,d4 FUNCTION This functions ensures, that you get a result. If there is no entry for the gadget in the snapshot or theres no snapshot at all, you get the original values you passed this function. There is no need to check the values by yourselft. INPUTS Gui - a valid NewGUI object Gadget - GadgetNumber Left - original left position Top - original top position Right - original width position Bottom - original height position RETURNS Set(L,T,R,B) - you get always a result passable to CreateGadgetGeneric() NOTES EXAMPLES BUGS SEE ALSO LoadSnapShot(),SnapShot() newgui.library/ReleaseGui newgui.library/ReleaseGui NAME ReleaseGui - decreases the client counter SYNOPSIS ReleaseGui(Gui) REGISTER A0 FUNCTION This function releases a gui form a made call to ObtainGui(). You must made a syncron call to ObtainGui() and ReleaseGui() or your gui will not close anymore. INPUTS Gui - a valid NewGUI object RETURNS result - not null if the could be decreased NOTES EXAMPLES BUGS SEE ALSO ObtainGui(), HowManyGuiClients() newgui.library/RemoveGuiGadget newgui.library/RemoveGuiGadget NAME RemoveGuiGadget - remove a gadget from a gui SYNOPSIS RemoveGuiGadget(Gui,GadgetNr) REGISTER a0,d0 FUNCTION removes the given gadget from the gui object. The gadget is destroyed afterwards. Every gadgetnumber you pass to the gui, should be corrected to match the new values, as the gadgets in the gadget list which come to after the removed gadget, get a new gadgetnumber. INPUTS Gui - a valid NewGUI object GadgetNr - 1... X RETURNS NOTES EXAMPLES BUGS SEE ALSO newgui.library/RemoveGuiGadgetByAddr newgui.library/RemoveGuiGadgetByAddr NAME RemoveGuiGadgetByAddr - remove a gadget SYNOPSIS RemoveGuiGadgetByAddr(Gui,Addr) REGISTER a0,d0 FUNCTION See RemoveGuigadget() for more details. only difference is, that you pass an object to the routine. INPUTS Gui - a valid NewGUI object Addr - object RETURNS NOTES EXAMPLES BUGS SEE ALSO RemoveGuiGadget() newgui.library/ResizeGadget newgui.library/ResizeGadget NAME ResizeGadget - resizes a gadget SYNOPSIS ResizeGadget(Gui,GadgetNr,left,top,right,bottom) REGISTER a0,d0,d1,d2,d3,d4 FUNCTION This functions changes the position and size of a gadget according to the given values. Use the absolute coordinates for all values! INPUTS Gui - a valid NewGUI object GadgetNr - 1.....X left - new left top - new top position of the gadget right - the right offset, not a width value!! bottom - the bottom offset , not a height value! RETURNS NOTES EXAMPLES BUGS SEE ALSO newgui.library/SaveDeep newgui.library/SaveDeep NAME SaveDeep - saves an image to disk SYNOPSIS SaveDeep(Deep,Filename) REGISTER d0,a0 FUNCTION This functions will save an image to disk. Just give a valid image and filename. Together with GuiToDeep() you can make Screenshots of your gui. INPUTS Deep - valid image object Filename - valid filename RETURNS result - NULL if something got wrong. NOTES EXAMPLES BUGS SEE ALSO GuiToDeep(),ScreenToDeep(),CreateDeep() newgui.library/SaveGadgetConfig newgui.library/SaveGadgetConfig NAME SaveGadgetConfig - saves a gadgetconfig as taglist SYNOPSIS SaveGadgetConfig(Gui,Class,tags) REGISTER A0,A1,A2 FUNCTION No application does need to call this function! This functions saves a gadgets config in form of taglist to disk. it can be loaded with LoadGadgetConfig() .. See sourceexamples for more information. INPUTS Gui - a valid NewGUI object Class - full classname of this gadget tags - the taglist to be saved. RETURNS NOTES EXAMPLES Global Configs for all guis are saved like this: SaveGadgetConfig(NewGui,"Global",>SaveTags:NG_GLOBAL_BGPICTURE,*BGPicture| NG_GLOBAL_BORDER,*Rahmen| NG_GLOBAL_TEXTURE,*Muster| NG_SCREEN,*Screen| NG_SCREEN_ID,*ScreenID| NG_SCREEN_WIDTH,*SWidth| NG_SCREEN_HEIGHT,*SHeight| Tag_Done,Null) BUGS SEE ALSO LoadGadgetConfig() newgui.library/ScreenJump newgui.library/ScreenJump NAME ScreenJump - moves complete gui to a new screen SYNOPSIS ScreenJump(Gui,Screen) REGISTER a0,a1 FUNCTION As the functionname suggests, the guiwindow will be transfered to a new screen. INPUTS Gui - a valid NewGUI object Screen - pointer to the new screen RETURNS NOTES If you did not lock the screen, newgui won't do that for you. EXAMPLES BUGS SEE ALSO newgui.library/ScreenToDeep newgui.library/ScreenToDeep NAME ScreenToDeep - grab a screen and make a deep of it. SYNOPSIS ScreenToDeep(Gui,BitMap,Wrp,Left,Top,width,height) REGISTER a2,a0,a1,d0,d1,d2,d3 FUNCTION Will only work with CGX screens. Give the screens Bitmap, his Rastport and the rectangle you want to have as a deep. This is used for transparnet effects. You should grab the screen BEFORE you position a window there. Newgui adapts the border sizes to the given (x,y) coordinates. it does not need to be a screen, it could also be a window! INPUTS Gui - a valid NewGUI object BitMap - the bitmap Wrp - and the Rastport to save Left - start of grab Top - start of grab width - ends on left+width height - ends on top+height RETURNS deep - NULL or an image. NOTES If there is something to see in the deep, depends on the bitmaps depth and if it is a cgx bitmap. EXAMPLES BUGS SEE ALSO newgui.library/SetAlphaLevel newgui.library/SetAlphaLevel NAME SetAlphaLevel - PRIVATE SYNOPSIS SetAlphaLevel(R,G,B) REGISTER d0,d1,d2 FUNCTION Sorry thats a private function which you do not call by yourself. INPUTS R - G - B - RETURNS NOTES EXAMPLES BUGS SEE ALSO more private functions newgui.library/SetGadgetGFX newgui.library/SetGadgetGFX NAME SetGadgetGFX - set new images to a gadget SYNOPSIS SetGadgetGFX(Gui,Gadget,normal,mouseover,select) REGISTER a0,d0,a1,a2,a3 FUNCTION This functions sets new Images to a gadget. You can remove an image from the gadget if you pass NULL instead. INPUTS Gui - a valid NewGui object Gadget - the gadgetnumber to change normal - UP image mouseover - MOUSEOVER image select - DOWN image RETURNS result - NULL if it does not worked. NOTES EXAMPLES BUGS SEE ALSO newgui.library/SetGadgetName newgui.library/SetGadgetName NAME SetGadgetName - give a gadget a new title SYNOPSIS SetGadgetName(Gui,GadgetNr,NewName) REGISTER a0,d0,a1 FUNCTION Set a new gadget title. INPUTS Gui - a valid NewGUI object GadgetNr - 1....X NewName - pass pointer to new gadgetname RETURNS NOTES EXAMPLES BUGS SEE ALSO newgui.library/SizeOfGui newgui.library/SizeOfGui NAME SizeofGui - return width & height of the gui frame SYNOPSIS ( width, height ) = SizeOfGui(Gui) d0 d1 a0 REGISTER A0 FUNCTION Gets the size of the used gui frame. INPUTS gui - a pointer to the gui object allocated with Open_Window() RETURNS width - width to the gui frame height- height of the sued gui frame NOTES EXAMPLES BUGS SEE ALSO Open_Window(),Close_Window() newgui.library/SnapShot newgui.library/SnapShot NAME SnapShot - saves all gadgetpositions to disk SYNOPSIS SnapShot(Gui,Tags) REGISTER a0,a1 FUNCTION It creates a new snapshot for the gui. INPUTS Gui - a valid NewGUI object Tags - pass null at the moment. RETURNS result - NULL if it did not worked. NOTES EXAMPLES BUGS SEE ALSO LoadSnapShot(), PositionFromSnapShot() newgui.library/SpeedBox newgui.library/SpeedBox NAME SpeedBox - draws the new entry to an area used as speedbox SYNOPSIS SpeedBox(Gui,Area,maxvalue,value) REGISTER a0,a1,d0,d1 FUNCTION This function calculates the color for the given value in respect of the maximum value. It draws the result in the area. This means it scrolls the area one pixel to the left, and adds a vertical line to it. See VCD-Save docs for more information about the colors used. INPUTS Gui - a valid NewGUI object Area - a valid area maxvalue - the maxvalue value - the actual avlue. RETURNS NOTES If the value is greater as maxvalue, you get a WHITE LINE. EXAMPLES BUGS SEE ALSO VCDSave docs newgui.library/TransferGadget newgui.library/TransferGadget NAME TransferGadget - transfer a gadget from one gui to another SYNOPSIS TransferGadget(OldGui,GadgetNr,NewGui) REGISTER a0,d0,a1 FUNCTION This function transfers gadget from one gui to another. The gadget itself does not change if you don't do that. i.e. Hooks given to Buttongadget are still used, even if the gadget is moved. so are images and presets of the gadget. if the gadget is not back when the original gui is closed, the transfered to gui will close it. You should use ObtainGui() to prevent closing of the original gui, as it has to free the images ! It's not wise to steal a gadget from a gui, which is not aware of it. it does not get a message about it. INPUTS OldGui - a valid NewGUI object GadgetNr - gadgetnumber NewGui - a valid NewGUI object RETURNS NOTES EXAMPLES BUGS SEE ALSO newgui.library/UnLockGui newgui.library/UnLockGui NAME UnLockGui - unblock a gui SYNOPSIS UnLockGui(Gui) REGISTER a0 FUNCTION Unlock the semaphore lock to a gui object. INPUTS Gui - a valid NewGUI object RETURNS NOTES EXAMPLES BUGS SEE ALSO LockGui() newgui.library/UnSnapShot newgui.library/UnSnapShot NAME UnSnapShot - removes a snapshot of this gui SYNOPSIS UnSnapShot(Gui,Tags) REGISTER a0,a1 FUNCTION This routine removes the snapshot from disk. INPUTS Gui - a valid NewGUI object Tags - pass null for the moment RETURNS NOTES EXAMPLES BUGS SEE ALSO LoadSnapShot(),SnapShot(),PrositionFromSnapShot() newgui.library/UpdateGadget newgui.library/UpdateGadget NAME UpdateGadget - update gui content and settings SYNOPSIS UpdateGadget(Gui,GadgetNr,Tags) REGISTER a0,d0,a1 FUNCTION Updates a gadgets content according to the values in the taglist. You can pass more than one change a time to the gadget. You can change the content and the settings of a gadget at the same time, with the same taglist. What you can change depends on the gadgetclass. See UpdateGadgetValue() for a "shortcut" . INPUTS Gui - a valid NewGUI object GadgetNr - the gadgetnumber Tags - Taglist of changes RETURNS result - NULL if it didn't work. NOTES EXAMPLES BUGS SEE ALSO UpdateGadgetValue(),UpdateGadgetbyAddr() newgui.library/UpdateGadgetValue newgui.library/UpdateGadgetValue NAME UpdateGadgetValue - set the gadget content SYNOPSIS UpdateGadgetValue(Gui,GadgetNr,Value) REGISTER a0,d0,a1 FUNCTION This function does only set the content of a gadget. But therefore you don't need a taglist for it. It depends on the gadgetclass if you have to pass a pointer to something or the value itself. See getGadgetValue() INPUTS Gui - a valid NewGUI object GadgetNr - the gadgetnumber Value - the value or a pointer to it. ( LONG ) RETURNS result - NULL if it did not work. NOTES EXAMPLES BUGS SEE ALSO UpdateGadget(),UpdateGadgetValueByAddr() newgui.library/UpdateGadgetValueByAddr newgui.library/UpdateGadgetValueByAddr NAME UpdateGadgetValueByAddr - updates gadget content SYNOPSIS UpdateGadgetValueByAddr(Gui,Addr,Value) REGISTER a0,d0,a1 FUNCTION See UpdateGadgetValue() for more information. This functions accepts the gadget object. INPUTS Gui - a valid NewGUI object Addr - the object Value - The value to be set RETURNS result - NULL if it did not work. NOTES EXAMPLES BUGS SEE ALSO UpdateGadgetValue(),UpdateGadget() newgui.library/UpdateGui newgui.library/UpdateGui NAME UpdateGui - change gui values after creation SYNOPSIS UpdateGui(Gui,tags) a0 a1 REGISTER a0,a1 FUNCTION Updates the gui object with a taglist. The following tag(s) is(are) defined: TAG_Item TAG_Value -------------------------------------------------------------------- NG_BACKGROUND_IMAGE | a deepobject with is used as a background | image. If the deep does not fit, NewGui | fits it in , in any way :) | | If you don`t want the bgimage anymore INPUTS Gui - a valid gui object allocated with Open_Window() Tags - a Taglist RETURNS NOTES A background image can only be used after a gui is created! EXAMPLES BUGS SEE ALSO Open_Window() newgui.library/UsePen newgui.library/UsePen NAME UsePen - use given RGB values for drawing SYNOPSIS UsePen(Gui,Red,Green,Blue) a0 d0 d1 d2 REGISTER a0,d0,d1,d2 FUNCTION allocates if necessary a pen and uses it for drawing. INPUTS Gui - a valid gui red - red value from 0 ... 255 green - green value from 0 ... 255 blue - blue value from 0 ... 255 RETURNS NOTES EXAMPLES BUGS SEE ALSO GetPen() newgui.library/VisibleLines newgui.library/VisibleLines NAME VisibleLines - font depended information SYNOPSIS VisibleLines(Gui,Area) REGISTER A0,A1 FUNCTION This functions returns the lines which can be displayed in this area in this gui. the actula font is used to calculate this. INPUTS Gui - a valid NewGUI object Area - a valid area for this gui. RETURNS lines - LONG how many lines can be displayed in this area. NOTES You won't need that except you build a gadget. EXAMPLES BUGS SEE ALSO newgui.library/WaitGuiEvent newgui.library/WaitGuiEvent NAME WaitGuiEvent - handles the incoming intuievents SYNOPSIS WaitGuiEvent(Gui,Tags) REGISTER a0,a1 FUNCTION Tags: If you pass NG_NOBLOCKING,1 inside the taglist, WaitGuiEvent() will not block if there are no events to handle. Function: WaitGuiEvent() will handle all incoming intuitionevents if possible. It returns the GadgetNumber for which an event occured and which Class the event was. A returnvalue of 0 for Gadgetnumber means , there was no gadget involved. INPUTS Gui - a valid NewGUI object Tags - Taglist or NULL RETURNS Set(gadgetnumber,msgClass) - ( d0,d1 ) NOTES EXAMPLES While (Class!=IDCMP_CLOSEWINDOW) { (GadNbr,Class) = WaitGuiEvent(gui,NULL); .... do something ... } This is the prefered way of the gui loop. You do not need to make it in the same way. I.e. you can fork a task and handle the gui there if you like. BUGS SEE ALSO newgui.library/WhoIsOnline newgui.library/WhoIsOnline NAME WhoIsOnline - get list of gui objects SYNOPSIS WhoIsOnline(Buffer,Len) REGISTER a0,d0 FUNCTION The list of actual gui objects will be copied to the given buffer of size Len. Each gui object is a 32Bit long. INPUTS Buffer - pointer to a buffer Len - len of buffer. RETURNS NOTES EXAMPLES BUGS SEE ALSO newgui.library/WorkGui newgui.library/WorkGui NAME WorkGui - reworks the gui SYNOPSIS WorkGui(Gui,Tags) REGISTER a0,a1 FUNCTION if you ever need to update the display, refresh the content or something, call WorkGui() . It will redraw each gadget and the backgroundimage. You don't need to call ClearGUI() before. if auto-transparent-modus is enabled, it will update this too. It checks the locks of the refreshed gui. INPUTS Gui - a valid NewGUI object Tags - NULL for now RETURNS NOTES If you don't call workgui() once after opening your window, forced themes will not work correctly. EXAMPLES BUGS SEE ALSO LockGui(),UnLockGui()