CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

aws.h

Go to the documentation of this file.
00001 /**************************************************************************
00002     Copyright (C) 2001 by Christopher Nelson
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 *****************************************************************************/
00018 
00019 #ifndef __AWS_INTERFACE_10_H__
00020 #define __AWS_INTERFACE_10_H__
00021 
00022 #ifdef __AWS_INTERFACE_20_H__
00023 # error "aws2.h included before aws.h.  You cannot mix and match the two versions!"
00024 #endif
00025 
00026 
00027 
00032 #include "csutil/scf.h"
00033 #include "csutil/refarr.h"
00034 #include "csutil/stringarray.h"
00035 #include "csgeom/csrect.h"
00036 #include "csgeom/vector2.h"
00037 #include "iutil/event.h"
00038 #include "iutil/string.h"
00039 
00040 struct iAws;
00041 struct iAwsCanvas;
00042 struct iAwsComponent;
00043 struct iAwsComponentFactory;
00044 struct iAwsConnectionNodeFactory;
00045 struct iAwsKeyFactory;
00046 struct iAwsParmList;
00047 struct iAwsPrefManager;
00048 struct iAwsSink;
00049 struct iAwsSinkManager;
00050 struct iAwsSlot;
00051 struct iAwsSource;
00052 
00053 typedef iAwsComponent iAwsWindow;
00054 
00055 class awsWindow;
00056 class awsComponent;
00057 class awsComponentNode;
00058 class awsConnectionNode;
00059 class awsComponentFactory;
00060 class awsLayoutManager;
00061 
00062 struct iEngine;
00063 struct iEvent;
00064 struct iFont;
00065 struct iFontServer;
00066 struct iGraphics2D;
00067 struct iGraphics3D;
00068 struct iObjectRegistry;
00069 struct iStringSet;
00070 struct iTextureHandle;
00071 struct iTextureManager;
00072 struct iView;
00073 
00074 const bool aws_debug = false;  // set to true to turn on debugging printf()'s
00075 
00076 // Use of (void*) to store opaque data is now discouraged in order to properly
00077 // support 64-bit platforms. For backward compatibility with existing client
00078 // software, we can still provide (void*) API in addition to the new (intptr_t)
00079 // API. Ideally, clients should convert away from (void*) usage, but doing so
00080 // may be a large task, so we enable support for the deprecated API for now.
00081 // In order to aid clients in the conversion, we provide two controls. If
00082 // AWS_OBSOLETE_VOIDP is defined by the client, then all methods dealing with
00083 // (void*) will be removed completely from the API. If AWS_DEPRECATE_VOIDP is
00084 // defined, then invocations of methods dealing with (void*) will emit warnings
00085 // (from compilers which support deprecation warnings).
00086 #ifdef AWS_OBSOLETE_VOIDP
00087 #define AWS_VOIDP_IS_ERROR
00088 #endif
00089 #ifdef AWS_DEPRECATE_VOIDP
00090 #define AWS_VOIDP_IS_WARNING CS_DEPRECATED_METHOD
00091 #else
00092 #define AWS_VOIDP_IS_WARNING
00093 #endif
00094 
00105 const int AWSF_AlwaysEraseWindows = 1;
00106 
00114 const int AWSF_AlwaysRedrawWindows = 2;
00115 
00121 const int AWSF_RaiseOnMouseOver = 4;
00122 
00128 const int AWSF_KeyboardControl = 8;
00129 
00132 SCF_VERSION(iAwsKey, 0, 0, 1);
00133 
00135 struct iAwsKey : public iBase
00136 {
00138   virtual uint8 Type () const = 0;
00139 
00141   virtual unsigned long Name () const = 0;
00142 };
00143 
00144 SCF_VERSION(iAwsIntKey, 0, 0, 1);
00145 
00147 struct iAwsIntKey : public iAwsKey
00148 {
00150   virtual int Value () const = 0;
00151 };
00152 
00153 SCF_VERSION(iAwsFloatKey, 0, 0, 1);
00154 
00156 struct iAwsFloatKey : public iAwsKey
00157 {
00159   virtual float Value () const = 0;
00160 };
00161 
00162 SCF_VERSION(iAwsStringKey, 0, 0, 1);
00163 
00165 struct iAwsStringKey : public iAwsKey
00166 {
00168   virtual iString* Value () const = 0;
00169 };
00170 
00171 SCF_VERSION(iAwsRectKey, 0, 0, 1);
00172 
00174 struct iAwsRectKey : public iAwsKey
00175 {
00177   virtual csRect Value () const = 0;
00178 };
00179 
00180 SCF_VERSION(iAwsRGBKey, 0, 0, 1);
00181 
00183 struct iAwsRGBKey : public iAwsKey
00184 {
00185   struct RGB
00186   { 
00187     unsigned char red, green, blue;
00188   };
00189   
00191   virtual const iAwsRGBKey::RGB &Value() const = 0;
00192 };
00193 
00194 SCF_VERSION(iAwsPointKey, 0, 0, 1);
00195 
00197 struct iAwsPointKey : public iAwsKey
00198 {
00200   virtual csVector2 Value () const = 0;
00201 };
00202 
00203 SCF_VERSION(iAwsConnectionKey, 0, 0, 1);
00204 
00206 struct iAwsConnectionKey : public iAwsKey
00207 {
00209   virtual iAwsSink *Sink () const = 0;
00210 
00212   virtual unsigned long Trigger () const = 0;
00213 
00215   virtual unsigned long Signal () const = 0;
00216 };
00217 
00218 SCF_VERSION(iAwsKeyContainer, 0, 0, 1);
00219 
00221 struct iAwsKeyContainer : public iAwsKey
00222 {
00224   virtual iAwsKey* Find (iString* name) const = 0;
00225 
00227   virtual iAwsKey* Find (const char* name) const = 0;
00228 
00230   virtual iAwsKey *Find (unsigned long id) const = 0;
00231 
00232   virtual const csRefArray<iAwsKey> &Children () const = 0;
00233 
00235   virtual void Add (iAwsKey *key) = 0;
00236 
00238   virtual iAwsKey* GetAt (int i) const = 0;
00239 
00241   virtual int Length () const = 0;
00242     
00244   virtual void Remove (iString *name) = 0;
00246   virtual void Remove (const char* name) = 0;
00248   virtual void Remove (iAwsKey *key) = 0;
00250   virtual void RemoveAll () = 0;
00251 
00256   virtual void Consume (iAwsKeyContainer *c) = 0;
00257 };
00258 
00259 SCF_VERSION(iAwsComponentNode, 0, 0, 1);
00260 
00262 struct iAwsComponentNode : public iAwsKeyContainer
00263 {
00265   virtual iString *ComponentTypeName () const = 0;
00266 };
00267 
00268 
00273 SCF_VERSION (iAws, 0, 2, 4);
00274 
00276 struct iAws : public iBase
00277 {
00278 public:
00280   virtual iAwsPrefManager *GetPrefMgr()=0;
00281 
00283   virtual iAwsSinkManager *GetSinkMgr()=0;
00284 
00286   virtual void SetPrefMgr(iAwsPrefManager *pmgr)=0;
00287 
00289   virtual iStringSet* GetStringTable()=0;
00290 
00295   virtual void RegisterComponentFactory(iAwsComponentFactory *factory,
00296     const char* name)=0;
00297 
00299   virtual iAwsComponentFactory *FindComponentFactory (const char* name)=0;
00300 
00302   virtual iAwsComponent *GetTopComponent()=0;
00303 
00305   virtual void SetTopComponent(iAwsComponent *win)=0;
00306 
00308   virtual iAwsComponent *GetFocusedComponent()=0;
00309 
00311   virtual void SetFocusedComponent(iAwsComponent * _focused)=0;
00312 
00314   virtual iAwsComponent *GetKeyboardFocusedComponent()=0;
00315 
00317   virtual iAwsComponent* ComponentAt(int x, int y)=0;
00318 
00320   virtual bool MouseInComponent(int x, int y)=0;
00321 
00326   virtual void Print(iGraphics3D *g3d, uint8 Alpha=0)=0;
00327 
00329   virtual void Redraw()=0;
00330 
00332   virtual void Mark(const csRect &rect)=0;
00333 
00335   virtual void Unmark(const csRect &rect)=0;
00336 
00341   virtual void Erase(const csRect &rect)=0;
00342 
00347   virtual void MaskEraser(const csRect &rect)=0;
00348 
00350   virtual void InvalidateUpdateStore()=0;
00351 
00356   virtual void CaptureMouse(iAwsComponent *comp)=0;
00357 
00359   virtual void ReleaseMouse()=0;
00360 
00362   virtual void SetModal(iAwsComponent *comp)=0;
00363 
00365   virtual void UnSetModal()=0;
00366 
00368   virtual bool HandleEvent(iEvent&)=0;
00369 
00382   virtual bool SetupCanvas (iAwsCanvas *newCanvas, iGraphics2D *g2d=0,
00383         iGraphics3D *g3d=0)=0;
00384 
00386   virtual iAwsCanvas* GetCanvas()=0;
00387 
00389   //virtual iAwsCanvas *CreateCustomCanvas(iGraphics2D*, iGraphics3D*)=0;
00390 
00392   virtual iGraphics2D *G2D()=0;
00393 
00395   virtual iGraphics3D *G3D()=0;
00396 
00398   virtual iAwsComponent *CreateWindowFrom(const char* defname)=0;
00399 
00401   virtual iAwsComponent *CreateEmbeddableComponent(iAwsComponent *covercomp)=0;
00402 
00404   virtual iAwsParmList *CreateParmList()=0;
00405 
00411   virtual void CreateTransition(iAwsComponent *win, unsigned transition_type,
00412         csTicks duration=250)=0;
00413 
00420   virtual void CreateTransitionEx(iAwsComponent *win,
00421         unsigned transition_type, csTicks duration, csRect &user)=0;
00422 
00428   virtual void SetFlag(unsigned int flags)=0;
00429 
00435   virtual void ClearFlag(unsigned int flags)=0;
00436 
00442   virtual unsigned int GetFlags()=0;
00443   
00445   virtual iObjectRegistry *GetObjectRegistry ()=0;
00446 
00448   virtual bool AllWindowsHidden()=0;
00449         
00451   virtual bool ComponentIsInTransition(iAwsComponent *win)=0;
00452 
00454   virtual void ComponentDestroyed(iAwsComponent *comp)=0;
00455 
00457   virtual void DeleteMarkedComponents()=0;
00458 
00460   virtual void MarkToDeleteRecursively(iAwsComponent *comp)=0;
00461 };
00462 
00463 SCF_VERSION (iAwsPrefManager, 0, 0, 4);
00464 
00466 struct iAwsPrefManager : public iBase
00467 {
00468 public:
00470   virtual bool Setup(iObjectRegistry *object_reg)=0;
00471 
00473   virtual bool Load(const char *def_file)=0;
00474 
00476   virtual unsigned long NameToId (const char*name)=0;
00477 
00482   virtual bool SelectDefaultSkin (const char* skin_name)=0;
00483 
00485   virtual bool LookupIntKey (const char* name, int &val)=0;
00486 
00488   virtual bool LookupIntKey(unsigned long id, int &val)=0;
00489 
00491   virtual bool LookupStringKey(const char* name, iString *&val)=0;
00492 
00494   virtual bool LookupStringKey(unsigned long id, iString *&val)=0;
00495 
00497   virtual bool LookupRectKey(const char* name, csRect &rect)=0;
00498 
00500   virtual bool LookupRectKey(unsigned long id, csRect &rect)=0;
00501 
00503   virtual bool LookupRGBKey(const char* name, unsigned char &red,
00504         unsigned char &green, unsigned char &blue)=0;
00505 
00507   virtual bool LookupRGBKey(unsigned long id, unsigned char &red,
00508         unsigned char &green, unsigned char &blue)=0;
00509 
00511   virtual bool LookupPointKey(const char* name, csVector2 &point)=0;
00512 
00514   virtual bool LookupPointKey(unsigned long id, csVector2 &point)=0;
00515 
00517   virtual bool GetInt(iAwsComponentNode *node, const char* name, int &val)=0;
00518 
00520   virtual bool GetFloat(iAwsComponentNode *, const char* name, float &val)=0;
00521 
00523   virtual bool GetRect(iAwsComponentNode *node, const char* name,
00524         csRect &rect)=0;
00525 
00530   virtual bool GetString(iAwsComponentNode *node, const char *name,
00531         iString* val)=0;
00532 
00533 
00535   virtual bool GetRGB(iAwsComponentNode *node, const char* name,
00536         unsigned char& r, unsigned char& g, unsigned char& b)=0;
00537 
00542   virtual iAwsComponentNode *FindWindowDef(const char* name)=0;
00543 
00545   virtual iAwsKeyContainer *FindSkinDef(const char* name)=0;
00546 
00548   virtual bool RemoveWindowDef (const char *name)=0;
00549 
00551   virtual void RemoveAllWindowDefs ()=0;
00552 
00554   virtual bool RemoveSkinDef (const char *name)=0;
00555 
00557   virtual void RemoveAllSkinDefs ()=0;
00558 
00560   virtual void SetColor(int index, int color)=0;
00561 
00563   virtual int  GetColor(int index)=0;
00564 
00566   virtual int FindColor(unsigned char r, unsigned char g, unsigned char b)=0;
00567 
00569   virtual iFont *GetDefaultFont()=0;
00570 
00572   virtual iFont *GetFont(const char* filename)=0;
00573 
00575   virtual iTextureHandle *GetTexture(const char* name,
00576         const char* filename=0)=0;
00577 
00582   virtual iTextureHandle *GetTexture (const char* name, const char* filename, 
00583                                       unsigned char key_r,
00584                                       unsigned char key_g,
00585                                       unsigned char key_b)=0;
00586 
00588   virtual void SetTextureManager(iTextureManager *txtmgr)=0;
00589 
00591   virtual void SetFontServer(iFontServer *fntsvr)=0;
00592 
00594   virtual void SetDefaultFont(iFont* font)=0;
00595 
00597   virtual void SetWindowMgr(iAws *wmgr)=0;
00598 
00606   virtual void SetupPalette()=0;
00607 
00609   virtual void RegisterConstant(const char* name, int value)=0;
00610 
00612   virtual bool ConstantExists(const char* name)=0;
00613 
00618   virtual int  GetConstantValue(const char* name)=0;
00619 
00621   virtual iAwsKeyFactory *CreateKeyFactory()=0;
00622 
00624   virtual iAwsConnectionNodeFactory *CreateConnectionNodeFactory()=0;
00625 
00627   virtual void AddCustomStringProperty (const char *prop)=0;
00628 
00630   virtual const csStringArray &GetCustomStringProperties()=0;
00631 };
00632 
00633 
00634 SCF_VERSION (iAwsSinkManager, 0, 1, 0);
00635 
00637 struct iAwsSinkManager : public iBase
00638 {
00640   virtual bool Setup(iObjectRegistry *object_reg)=0;
00641 
00643   virtual void RegisterSink(const char *name, iAwsSink *sink)=0;
00644 
00646   virtual bool RemoveSink (iAwsSink* sink)=0;
00647 
00649   virtual iAwsSink* FindSink(const char *name)=0;
00650 
00655   virtual iAwsSink *CreateSink(intptr_t parm)=0;
00656 
00657 #ifndef AWS_VOIDP_IS_ERROR
00658 
00664   AWS_VOIDP_IS_WARNING
00665   virtual iAwsSink *CreateSink(void *parm)=0;
00666 #endif
00667 
00669   virtual iAwsSlot *CreateSlot ()=0;
00670 };
00671 
00672 
00673 SCF_VERSION (iAwsSink, 0, 1, 0);
00674 
00676 struct iAwsSink : public iBase
00677 {
00679   virtual unsigned long GetTriggerID(const char *name)=0;
00680 
00682   virtual void HandleTrigger(int trigger_id, iAwsSource *source)=0;
00683 
00685   virtual void RegisterTrigger(const char *name,
00686         void (*Trigger)(intptr_t, iAwsSource *))=0;
00687 
00688 #ifndef AWS_VOIDP_IS_ERROR
00689 
00694   AWS_VOIDP_IS_WARNING
00695   virtual void RegisterTrigger(const char *name,
00696         void (*Trigger)(void *, iAwsSource *))=0;
00697 #endif
00698 
00705   virtual unsigned int GetError()=0;
00706 };
00707 
00708 
00709 SCF_VERSION (iAwsSource, 0, 0, 1);
00710 
00712 struct iAwsSource : public iBase
00713 {
00715   virtual iAwsComponent *GetComponent()=0;
00716 
00721   virtual bool RegisterSlot(iAwsSlot *slot, unsigned long signal)=0;
00722 
00724   virtual bool UnregisterSlot(iAwsSlot *slot, unsigned long signal)=0;
00725 
00727   virtual void Broadcast(unsigned long signal)=0;
00728 };
00729 
00730 
00731 SCF_VERSION (iAwsSlot, 0, 0, 1);
00732 
00734 struct iAwsSlot : public iBase
00735 {
00741   virtual void Connect(iAwsSource *source, unsigned long signal,
00742         iAwsSink *sink, unsigned long trigger)=0;
00743 
00749   virtual void Disconnect(iAwsSource *source, unsigned long signal,
00750         iAwsSink *sink, unsigned long trigger)=0;
00751 
00755   virtual void Emit(iAwsSource &source, unsigned long signal)=0;
00756 };
00757 
00758 SCF_VERSION(iAwsLayoutManager, 0, 0, 1);
00759 
00761 struct iAwsLayoutManager : public iBase
00762 {
00770   virtual void SetOwner (iAwsComponent *_owner) = 0;
00771 
00775   virtual csRect AddComponent (iAwsComponent *cmp,
00776         iAwsComponentNode* settings) = 0;
00777 
00779   virtual void RemoveComponent(iAwsComponent* ) = 0;
00780 
00782   virtual void LayoutComponents () = 0;
00783 };
00784 
00785 SCF_VERSION (iAwsComponent, 0, 2, 0);
00786 
00788 struct iAwsComponent : public iAwsSource
00789 {
00790   
00803   virtual bool Create(iAws* mgr, iAwsComponent* parent,
00804         iAwsComponentNode* settings)=0;
00805 
00807   virtual bool Setup(iAws *wmgr, iAwsComponentNode *settings)=0;
00808 
00813   virtual bool HandleEvent(iEvent& Event)=0;
00814 
00819   virtual bool GetProperty(const char* name, intptr_t *parm)=0;
00820 
00821 #ifndef AWS_VOIDP_IS_ERROR
00822 
00828   AWS_VOIDP_IS_WARNING
00829   virtual bool GetProperty(const char* name, void **parm)=0;
00830 #endif
00831 
00836   virtual bool SetProperty(const char* name, intptr_t parm)=0;
00837 
00838 #ifndef AWS_VOIDP_IS_ERROR
00839 
00845   AWS_VOIDP_IS_WARNING
00846   virtual bool SetProperty(const char* name, void *parm)=0;
00847 #endif
00848 
00850   virtual bool Execute(const char* action, iAwsParmList* parmlist = 0) = 0;
00851 
00856   virtual void Invalidate()=0;
00857 
00859   virtual void Invalidate(csRect area)=0;
00860 
00862   virtual csRect Frame()=0;
00863 
00865   virtual csRect ClientFrame()=0;
00866 
00868   virtual const char *Type()=0;
00869 
00875   virtual void SetFlag(unsigned int flag)=0;
00876 
00882   virtual void ClearFlag(unsigned int flag)=0;
00883 
00889   virtual unsigned int Flags()=0;
00890 
00892   virtual iAws *WindowManager ()=0;
00893 
00895   virtual iAwsComponent *Parent()=0;
00896 
00898   virtual iAwsComponent *Window()=0;
00899 
00901   virtual iAwsLayoutManager *Layout()=0;
00902 
00904   virtual void SetParent(iAwsComponent *parent)=0;
00905 
00907   virtual void SetLayout(iAwsLayoutManager *layout)=0;
00908 
00910   virtual void AddToLayout(iAwsComponent *cmp, iAwsComponentNode *settings)=0;
00911   
00913   virtual csRect getPreferredSize()=0;
00914 
00916   virtual void setPreferredSize (const csRect& size) = 0;
00917 
00919   virtual void clearPreferredSize () = 0;
00920 
00922   virtual csRect getMinimumSize()=0;
00923 
00925   virtual csRect getInsets()=0;
00926 
00928   virtual bool Overlaps(csRect &r)=0;
00929 
00931   virtual bool isHidden()=0;
00932 
00934   virtual void SetFocusable(bool _focusable)=0;
00935 
00937   virtual bool Focusable()=0;
00938 
00940   virtual bool isFocused()=0;
00941 
00943   virtual bool IsMaximized()=0;
00944 
00946   virtual void Hide()=0;
00947 
00949   virtual void Show()=0;
00950 
00952   virtual void SetFocus()=0;
00953 
00955   virtual void UnsetFocus()=0;
00956 
00958   virtual void Move(int delta_x, int delta_y)=0;
00959 
00961   virtual void MoveTo(int x, int y)=0;
00962 
00964   virtual void Resize(int width, int height)=0;
00965 
00967   virtual void ResizeTo(csRect newFrame)=0;
00968 
00970   virtual void Maximize()=0;
00971 
00973   virtual void UnMaximize()=0;
00974 
00976   virtual void LayoutChildren()=0;
00977 
00979   virtual bool isDeaf()=0;
00980 
00982   virtual void SetDeaf (bool bDeaf)=0;
00983 
00985   virtual unsigned long GetID()=0;
00986 
00991   virtual void SetID(unsigned long _id)=0;
00992 
00994   virtual iAwsComponent *FindChild(const char *name)=0;
00995 
00997   virtual iAwsComponent *DoFindChild(unsigned id)=0;
00998 
01000   virtual iAwsComponent* ChildAt(int x, int y)=0;
01001 
01003   virtual void AddChild(iAwsComponent* child)=0;
01004 
01006   virtual void RemoveChild(iAwsComponent *child)=0;
01007 
01009   virtual int GetChildCount()=0;
01010 
01012   virtual iAwsComponent *GetTopChild()=0;
01013 
01015   virtual iAwsComponent *ComponentAbove()=0;
01016 
01018   virtual iAwsComponent *ComponentBelow()=0;
01019 
01021   virtual void SetComponentAbove(iAwsComponent *comp)=0;
01022 
01024   virtual void SetComponentBelow(iAwsComponent *comp)=0;
01025 
01031   virtual bool AddToTabOrder(iAwsComponent *child)=0;
01032 
01037   virtual iAwsComponent *TabNext(iAwsComponent *child)=0;
01038 
01043   virtual iAwsComponent *TabPrev(iAwsComponent *child)=0;
01044 
01046   virtual int GetTabLength()=0;
01047 
01049   virtual iAwsComponent *GetTabComponent(int index)=0;
01050 
01052   virtual iAwsComponent *GetFirstFocusableChild(iAwsComponent *comp)=0;
01053 
01055   virtual void Raise()=0;
01056 
01058   virtual void Lower()=0;
01059 
01061   virtual bool HasChildren()=0;
01062 
01064   virtual void SetRedrawTag(unsigned int tag)=0;
01065 
01067   virtual unsigned int RedrawTag()=0;
01068 
01070   virtual void OnDraw(csRect clip)=0;
01071 
01073   virtual bool OnMouseDown(int button, int x, int y)=0;
01074 
01076   virtual bool OnMouseUp(int button, int x, int y)=0;
01077 
01079   virtual bool OnMouseMove(int button, int x, int y)=0;
01080 
01082   virtual bool OnMouseClick(int button, int x, int y)=0;
01083 
01085   virtual bool OnMouseDoubleClick(int button, int x, int y)=0;
01086 
01088   virtual bool OnMouseExit()=0;
01089 
01091   virtual bool OnMouseEnter()=0;
01092 
01094   virtual bool OnKeyboard (const csKeyEventData& eventData) = 0;
01095 
01097   virtual bool OnLostFocus()=0;
01098 
01100   virtual bool OnGainFocus()=0;
01101 
01103   virtual bool OnFrame()=0;
01104 
01106   virtual void OnAdded()=0;
01107 
01109   virtual void OnResized()=0;
01110 
01112   virtual void OnChildMoved() = 0;
01113 
01115   virtual void OnRaise()=0;
01116 
01118   virtual void OnLower()=0;
01119 
01121   virtual void OnChildHide()=0;
01122 
01124   virtual void OnChildShow()=0;
01125 
01127   virtual void OnSetFocus()=0;
01128 
01130   virtual void OnUnsetFocus()=0;
01131 
01132   /* Only awsComponent should make use of the funcs below. Nothing else =) */
01133 
01135   virtual void Unlink()=0;
01136 
01138   virtual void LinkAbove(iAwsComponent* comp)=0;
01139 
01141   virtual void LinkBelow(iAwsComponent* comp)=0;
01142 
01144   virtual void SetTopChild(iAwsComponent* child)=0;
01145 
01147   virtual void MarkToDelete()=0;
01148 
01150   virtual bool GetMarkToDelete()=0;
01151 };
01152 
01153 
01154 SCF_VERSION (iAwsComponentFactory, 0, 0, 2);
01155 
01157 struct iAwsComponentFactory : public iBase
01158 {
01160   virtual iAwsComponent *Create()=0;
01161 
01163   virtual void Register(const char *type)=0;
01164 
01166   virtual void RegisterConstant(const char *name, int value)=0;
01167 };
01168 
01169 
01170 SCF_VERSION (iAwsKeyFactory, 0, 0, 4);
01171 
01173 struct iAwsKeyFactory : public iBase
01174 {
01179    virtual void Initialize(const char* name, const char* component_type)=0;
01181    virtual void AddToWindowList(iAwsPrefManager *pm)=0;
01183    virtual void AddFactory(iAwsKeyFactory *factory)=0;
01185    virtual void AddIntKey (const char* name, int v)=0;
01187    virtual void AddStringKey (const char* name, const char* v)=0;
01189    virtual void AddRectKey (const char* name, csRect v)=0;
01191    virtual void AddRGBKey (const char* name, unsigned char r,
01192         unsigned char g, unsigned char b)=0;
01194    virtual void AddPointKey (const char* name, csVector2 v)=0;
01196    virtual void AddConnectionKey (const char* name, iAwsSink *s,
01197         unsigned long t, unsigned long sig)=0;
01199    virtual void AddConnectionNode (iAwsConnectionNodeFactory *node)=0;
01200    
01201    virtual iAwsComponentNode* GetThisNode () = 0;
01202 };
01203 
01204 SCF_VERSION (iAwsConnectionNodeFactory, 0, 0, 1);
01205 
01207 struct iAwsConnectionNodeFactory : public iBase
01208 {
01210    virtual void Initialize ()=0;
01212    virtual void AddConnectionKey (
01213                  const char* name,
01214                  iAwsSink *s,
01215                  unsigned long t,
01216                  unsigned long sig)=0;
01217 
01219    virtual awsConnectionNode* GetThisNode () = 0;
01220 };
01221 
01222 /* @} */
01223 
01224 #endif // __CS_IAWS_AWS_H__

Generated for Crystal Space by doxygen 1.4.4