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 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 BUGS SEE ALSO FreeString() NewGui.library/FreeString NewGui.library/FreeString NAME FreeString - frees the allocated memory of string allocted with NewString SYNOPSIS FreeString(String) a0 FUNCTION frees the allocated memory of string allocted with NewString INPUTS String - a string allocated with NewString NOTES BUGS SEE ALSO NewString() NewGui.library/SizeOfGui NewGui.library/SizeOfGui NAME SizeofGui - return width & height of the gui frame SYNOPSIS ( width, height ) = SizeOfGui(Gui) d0 d1 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 BUGS SEE ALSO Open_Window(),Close_Window() 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 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 BUGS SEE ALSO MakeAreaGFX() 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 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 BUGS SEE ALSO GetFromAreaGFX(),FreeAreaGFX() NewGui.library/FreeAreaGFX NewGui.library/FreeAreaGFX NAME FreeAreaGFX - Frees memory used by an Area SYNOPSIS NULL = FreeAreaGFX(Area) d0 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. BUGS SEE ALSO 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 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! ------- BUGS SEE ALSO Close_Window() NewGui.library/UpdateGui NewGui.library/UpdateGui NAME UpdateGui - change gui values after creation SYNOPSIS UpdateGui(Gui,tags) 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! BUGS SEE ALSO Open_Window() NewGui.library/FreePen NewGui.library/FreePen NAME * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * FreePen - Frees a Pen from the colormap * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * SYNOPSIS FreePen(PenArray,PenHash,Colormap) FUNCTION Frees all pens in the PenArray. INPUTS PenArray - PRIVATE PenHash - PRIVATE ColorMap - a window colormap RETURNS NOTES Don`t even think about using this routine! BUGS SEE ALSO FreePens() NewGui.library/FreePens NewGui.library/FreePens NAME * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * FreePens - frees all pens used by a gui * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * * PRIVATE * SYNOPSIS FreePens(Hash,Colormap) FUNCTION Frees all pens an gui object used. INPUTS hash - PRIVATE Colormap - an intuition colormap RETURNS NOTES Don`t even think about using this routine! BUGS SEE ALSO FreePen() NewGui.library/Free_Gadget NewGui.library/Free_Gadget NAME Free_Gadget - frees up a gadget SYNOPSIS Next = Free_Gadget(Gadget) d0 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 * BUGS SEE ALSO create_gadget() 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 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 * BUGS SEE ALSO create_gadget(),Free_Gadget() 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 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! BUGS SEE ALSO Open_Window(),Create_Gadget() 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 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 BUGS SEE ALSO GetRGB() 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 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! BUGS SEE ALSO GetPen() 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 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) BUGS SEE ALSO NewGui.library/DrawBox3DR NewGui.library/DrawBox3DR NAME DrawBox3DR - draw recessed Box in 3D SYNOPSIS DrawBox3DR(Gui,Area) 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 BUGS SEE ALSO DrawBox3D() NewGui.library/DrawBox3D NewGui.library/DrawBox3D NAME DrawBox3D - draw Box in 3D SYNOPSIS DrawBox3D(Gui,Area) 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 BUGS SEE ALSO DrawBox3DR() NewGui.library/BasicDrawBorder3d NewGui.library/BasicDrawBorder3d NAME BasicDrawBorder3d - draws a 3d border SYNOPSIS BasicDrawBorder3d(Gui,Area,Lite_R,Lite_G,Lite_B,Dark_R,Dark_G,Dark_B) a0 a1 d0 d1 d2 d3 d4 d5 FUNCTION This functions draws a border around an area. You can define the values for the lite 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 BUGS SEE ALSO MakeAreaGFX(),DrawBorder3d(),DrawBorder3dR() NewGui.library/DrawBorder3d NewGui.library/DrawBorder3d NAME DrawBorder3d - draws a 3d border SYNOPSIS DrawBorder3d(Gui,Area) a0 a1 FUNCTION This functions draws a border around an area. the lite 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 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 FUNCTION This functions draws a border around an area. the lite 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 BUGS SEE ALSO MakeAreaGFX(),DrawBorder3d(),DrawBorder3d() NewGui.library/DrawRoundBox3D NewGui.library/DrawRoundBox3D NAME DrawRoundBox3D - draws a rounded box SYNOPSIS DrawRoundBox3D(Gui,Area,radius) 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 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 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 BUGS SEE ALSO DrawBox3d(),DrawBox3dR(),DrawRoundBox3d() NewGui.library/LoadDeepFile NewGui.library/LoadDeepFile NAME LoadDeepFile - loads a picture SYNOPSIS ( Deep, Width, Height, Size) = LoadDeepFile(Name) d0 d1 d2 d3 a0 FUNCTION This routine loads a deep file from disk. INPUTS Name - a valid filename RETURNS mem - a pointer to a pixelarray Width - width of the picture Heigth - height of the picture Size - size of the pixelarray NOTES You don`t need to use this routine except you want to do remap it yourself or something else... which is nor recommend USE CreateDeep() !!! BUGS SEE ALSO CreateDeep() NewGui.library/CreateDeep NewGui.library/CreateDeep NAME CreateDeep - load a deep picture SYNOPSIS Deep = CreateDeep(Gui,Filename) d0 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 BUGS SEE ALSO PlaceDeep() 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 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 BUGS SEE ALSO CreateDeep() 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 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 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 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 BUGS SEE ALSO CreateDeep(),PlaceDeep(),DrawDeep(),FreeDeep() NewGui.library/FreeDeep NewGui.library/FreeDeep NAME FreeDeep - frees a deep object SYNOPSIS NULL = FreeDeep(Deep) d0 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 BUGS SEE ALSO CreateDeep(),PlaceDeep(),DrawDeep(),DrawDeepArea() NewGui.library/UsePen NewGui.library/UsePen NAME UsePen - use given RGB values for drawing SYNOPSIS UsePen(Gui,Red,Green,Blue) 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 BUGS SEE ALSO GetPen() 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 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 BUGS SEE ALSO PlaceText() NewGui.library/PlaceText NewGui.library/PlaceText NAME PlacText - displays a text SYNOPSIS PlaceText(Gui,Area,Text) a0 a1 a2 FUNCTION The given area is plain colored with the BG-Color #$00e6e6e6 lite 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 BUGS SEE ALSO PlaceColorText() NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO NewGui.library/ NewGui.library/ NAME SYNOPSIS Area = (Gui,left,Top,Right,Bottom) d0 a0 d0 d1 d2 d3 FUNCTION INPUTS RETURNS NOTES BUGS SEE ALSO