CrystalSpace

Public API Reference

iaws/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 
00463   csEventID PreProcess;
00464   csEventID MouseDown;
00465   csEventID MouseUp;
00466   csEventID MouseClick;
00467   csEventID MouseMove;
00468   csEventID KeyboardDown;
00469   csEventID KeyboardUp;
00470 
00471   csEventID MouseEnter;
00472   csEventID MouseExit;
00473   csEventID LoseFocus;
00474   csEventID GainFocus;
00475   csEventID GroupOff;
00476   csEventID FrameStart;
00477 };
00478 
00479 SCF_VERSION (iAwsPrefManager, 0, 0, 4);
00480 
00482 struct iAwsPrefManager : public iBase
00483 {
00484 public:
00486   virtual bool Setup(iObjectRegistry *object_reg) = 0;
00487 
00489   virtual bool Load(const char *def_file) = 0;
00490 
00492   virtual unsigned long NameToId (const char*name) = 0;
00493 
00498   virtual bool SelectDefaultSkin (const char* skin_name) = 0;
00499 
00501   virtual bool LookupIntKey (const char* name, int &val) = 0;
00502 
00504   virtual bool LookupIntKey(unsigned long id, int &val) = 0;
00505 
00507   virtual bool LookupStringKey(const char* name, iString *&val) = 0;
00508 
00510   virtual bool LookupStringKey(unsigned long id, iString *&val) = 0;
00511 
00513   virtual bool LookupRectKey(const char* name, csRect &rect) = 0;
00514 
00516   virtual bool LookupRectKey(unsigned long id, csRect &rect) = 0;
00517 
00519   virtual bool LookupRGBKey(const char* name, unsigned char &red,
00520         unsigned char &green, unsigned char &blue) = 0;
00521 
00523   virtual bool LookupRGBKey(unsigned long id, unsigned char &red,
00524         unsigned char &green, unsigned char &blue) = 0;
00525 
00527   virtual bool LookupPointKey(const char* name, csVector2 &point) = 0;
00528 
00530   virtual bool LookupPointKey(unsigned long id, csVector2 &point) = 0;
00531 
00533   virtual bool GetInt(iAwsComponentNode *node, const char* name, int &val) = 0;
00534 
00536   virtual bool GetFloat(iAwsComponentNode *, const char* name, float &val) = 0;
00537 
00539   virtual bool GetRect(iAwsComponentNode *node, const char* name,
00540         csRect &rect) = 0;
00541 
00546   virtual bool GetString(iAwsComponentNode *node, const char *name,
00547         iString* val) = 0;
00548 
00549 
00551   virtual bool GetRGB(iAwsComponentNode *node, const char* name,
00552         unsigned char& r, unsigned char& g, unsigned char& b) = 0;
00553 
00558   virtual iAwsComponentNode *FindWindowDef(const char* name) = 0;
00559 
00561   virtual iAwsKeyContainer *FindSkinDef(const char* name) = 0;
00562 
00564   virtual bool RemoveWindowDef (const char *name) = 0;
00565 
00567   virtual void RemoveAllWindowDefs () = 0;
00568 
00570   virtual bool RemoveSkinDef (const char *name) = 0;
00571 
00573   virtual void RemoveAllSkinDefs () = 0;
00574 
00576   virtual void SetColor(int index, int color) = 0;
00577 
00579   virtual int  GetColor(int index) = 0;
00580 
00582   virtual int FindColor(unsigned char r, unsigned char g, unsigned char b) = 0;
00583 
00585   virtual iFont *GetDefaultFont() = 0;
00586 
00588   virtual iFont *GetFont(const char* filename) = 0;
00589 
00591   virtual iTextureHandle *GetTexture(const char* name,
00592         const char* filename=0) = 0;
00593 
00598   virtual iTextureHandle *GetTexture (const char* name, const char* filename, 
00599                                       unsigned char key_r,
00600                                       unsigned char key_g,
00601                                       unsigned char key_b) = 0;
00602 
00604   virtual void SetTextureManager(iTextureManager *txtmgr) = 0;
00605 
00607   virtual void SetFontServer(iFontServer *fntsvr) = 0;
00608 
00610   virtual void SetDefaultFont(iFont* font) = 0;
00611 
00613   virtual void SetWindowMgr(iAws *wmgr) = 0;
00614 
00622   virtual void SetupPalette() = 0;
00623 
00625   virtual void RegisterConstant(const char* name, int value) = 0;
00626 
00628   virtual bool ConstantExists(const char* name) = 0;
00629 
00634   virtual int  GetConstantValue(const char* name) = 0;
00635 
00637   virtual iAwsKeyFactory *CreateKeyFactory() = 0;
00638 
00640   virtual iAwsConnectionNodeFactory *CreateConnectionNodeFactory() = 0;
00641 
00643   virtual void AddCustomStringProperty (const char *prop) = 0;
00644 
00646   virtual const csStringArray &GetCustomStringProperties() = 0;
00647 };
00648 
00649 
00650 SCF_VERSION (iAwsSinkManager, 0, 1, 0);
00651 
00653 struct iAwsSinkManager : public iBase
00654 {
00656   virtual bool Setup(iObjectRegistry *object_reg) = 0;
00657 
00659   virtual void RegisterSink(const char *name, iAwsSink *sink) = 0;
00660 
00662   virtual bool RemoveSink (iAwsSink* sink) = 0;
00663 
00665   virtual iAwsSink* FindSink(const char *name) = 0;
00666 
00671   virtual iAwsSink *CreateSink(intptr_t parm) = 0;
00672 
00673 #ifndef AWS_VOIDP_IS_ERROR
00674 
00680   AWS_VOIDP_IS_WARNING
00681   virtual iAwsSink *CreateSink(void *parm) = 0;
00682 #endif
00683 
00685   virtual iAwsSlot *CreateSlot () = 0;
00686 };
00687 
00688 
00689 SCF_VERSION (iAwsSink, 0, 1, 0);
00690 
00692 struct iAwsSink : public iBase
00693 {
00695   virtual unsigned long GetTriggerID(const char *name) = 0;
00696 
00698   virtual void HandleTrigger(int trigger_id, iAwsSource *source) = 0;
00699 
00708   virtual void RegisterTrigger(const char *name,
00709         void (*Trigger)(unsigned long, intptr_t, iAwsSource *)) = 0;
00710 
00711 #ifndef AWS_VOIDP_IS_ERROR
00712 
00717   AWS_VOIDP_IS_WARNING
00718   virtual void RegisterTrigger(const char *name,
00719         void (*Trigger)(unsigned long, void *, iAwsSource *)) = 0;
00720 #endif
00721 
00728   virtual unsigned int GetError() = 0;
00729 };
00730 
00731 
00732 SCF_VERSION (iAwsSource, 0, 0, 1);
00733 
00735 struct iAwsSource : public iBase
00736 {
00737   virtual iAws *WindowManager() = 0;
00738 
00740   virtual iAwsComponent *GetComponent() = 0;
00741 
00746   virtual bool RegisterSlot(iAwsSlot *slot, unsigned long signal) = 0;
00747 
00749   virtual bool UnregisterSlot(iAwsSlot *slot, unsigned long signal) = 0;
00750 
00752   virtual void Broadcast(uint32 signal) = 0;
00753 };
00754 
00755 
00756 SCF_VERSION (iAwsSlot, 0, 0, 1);
00757 
00759 struct iAwsSlot : public iBase
00760 {
00766   virtual void Connect(iAwsSource *source, unsigned long signal,
00767         iAwsSink *sink, unsigned long trigger) = 0;
00768 
00774   virtual void Disconnect(iAwsSource *source, unsigned long signal,
00775         iAwsSink *sink, unsigned long trigger) = 0;
00776 
00780   virtual void Emit(iAwsSource &source, unsigned long signal) = 0;
00781 };
00782 
00783 SCF_VERSION(iAwsLayoutManager, 0, 0, 1);
00784 
00786 struct iAwsLayoutManager : public iBase
00787 {
00795   virtual void SetOwner (iAwsComponent *_owner) = 0;
00796 
00800   virtual csRect AddComponent (iAwsComponent *cmp,
00801         iAwsComponentNode* settings) = 0;
00802 
00804   virtual void RemoveComponent(iAwsComponent* ) = 0;
00805 
00807   virtual void LayoutComponents () = 0;
00808 };
00809 
00810 SCF_VERSION (iAwsComponent, 0, 2, 0);
00811 
00813 struct iAwsComponent : public iAwsSource
00814 {
00827   virtual bool Create(iAws* mgr, iAwsComponent* parent,
00828         iAwsComponentNode* settings) = 0;
00829 
00831   virtual bool Setup(iAws *wmgr, iAwsComponentNode *settings) = 0;
00832 
00837   virtual bool HandleEvent(iEvent& Event) = 0;
00838 
00843   virtual bool GetProperty(const char* name, intptr_t *parm) = 0;
00844 
00845 #ifndef AWS_VOIDP_IS_ERROR
00846 
00852   AWS_VOIDP_IS_WARNING
00853   virtual bool GetProperty(const char* name, void **parm) = 0;
00854 #endif
00855 
00860   virtual bool SetProperty(const char* name, intptr_t parm) = 0;
00861 
00862 #ifndef AWS_VOIDP_IS_ERROR
00863 
00869   AWS_VOIDP_IS_WARNING
00870   virtual bool SetProperty(const char* name, void *parm) = 0;
00871 #endif
00872 
00874   virtual bool Execute(const char* action, iAwsParmList* parmlist = 0) = 0;
00875 
00880   virtual void Invalidate() = 0;
00881 
00883   virtual void Invalidate(csRect area) = 0;
00884 
00886   virtual csRect Frame() = 0;
00887 
00889   virtual csRect ClientFrame() = 0;
00890 
00892   virtual const char *Type() = 0;
00893 
00899   virtual void SetFlag(unsigned int flag) = 0;
00900 
00906   virtual void ClearFlag(unsigned int flag) = 0;
00907 
00913   virtual unsigned int Flags() = 0;
00914 
00916   virtual iAws *WindowManager () = 0;
00917 
00919   virtual iAwsComponent *Parent() = 0;
00920 
00922   virtual iAwsComponent *Window() = 0;
00923 
00925   virtual iAwsLayoutManager *Layout() = 0;
00926 
00928   virtual void SetParent(iAwsComponent *parent) = 0;
00929 
00931   virtual void SetLayout(iAwsLayoutManager *layout) = 0;
00932 
00934   virtual void AddToLayout(iAwsComponent *cmp, iAwsComponentNode *settings) = 0;
00935   
00937   virtual csRect getPreferredSize() = 0;
00938 
00940   virtual void setPreferredSize (const csRect& size) = 0;
00941 
00943   virtual void clearPreferredSize () = 0;
00944 
00946   virtual csRect getMinimumSize() = 0;
00947 
00949   virtual csRect getInsets() = 0;
00950 
00952   virtual bool Overlaps(csRect &r) = 0;
00953 
00955   virtual bool isHidden() = 0;
00956 
00958   virtual void SetFocusable(bool _focusable) = 0;
00959 
00961   virtual bool Focusable() = 0;
00962 
00964   virtual bool isFocused() = 0;
00965 
00967   virtual bool IsMaximized() = 0;
00968 
00970   virtual void Hide() = 0;
00971 
00973   virtual void Show() = 0;
00974 
00976   virtual void SetFocus() = 0;
00977 
00979   virtual void UnsetFocus() = 0;
00980 
00982   virtual void Move(int delta_x, int delta_y) = 0;
00983 
00985   virtual void MoveTo(int x, int y) = 0;
00986 
00988   virtual void Resize(int width, int height) = 0;
00989 
00991   virtual void ResizeTo(csRect newFrame) = 0;
00992 
00994   virtual void Maximize() = 0;
00995 
00997   virtual void UnMaximize() = 0;
00998 
01000   virtual void LayoutChildren() = 0;
01001 
01003   virtual bool isDeaf() = 0;
01004 
01006   virtual void SetDeaf (bool bDeaf) = 0;
01007 
01009   virtual unsigned long GetID() = 0;
01010 
01015   virtual void SetID(unsigned long _id) = 0;
01016 
01018   virtual iAwsComponent *FindChild(const char *name) = 0;
01019 
01021   virtual iAwsComponent *DoFindChild(unsigned id) = 0;
01022 
01024   virtual iAwsComponent* ChildAt(int x, int y) = 0;
01025 
01027   virtual void AddChild(iAwsComponent* child) = 0;
01028 
01030   virtual void RemoveChild(iAwsComponent *child) = 0;
01031 
01033   virtual int GetChildCount() = 0;
01034 
01036   virtual iAwsComponent *GetTopChild() = 0;
01037 
01039   virtual iAwsComponent *ComponentAbove() = 0;
01040 
01042   virtual iAwsComponent *ComponentBelow() = 0;
01043 
01045   virtual void SetComponentAbove(iAwsComponent *comp) = 0;
01046 
01048   virtual void SetComponentBelow(iAwsComponent *comp) = 0;
01049 
01055   virtual bool AddToTabOrder(iAwsComponent *child) = 0;
01056 
01061   virtual iAwsComponent *TabNext(iAwsComponent *child) = 0;
01062 
01067   virtual iAwsComponent *TabPrev(iAwsComponent *child) = 0;
01068 
01070   virtual int GetTabLength() = 0;
01071 
01073   virtual iAwsComponent *GetTabComponent(int index) = 0;
01074 
01076   virtual iAwsComponent *GetFirstFocusableChild(iAwsComponent *comp) = 0;
01077 
01079   virtual void Raise() = 0;
01080 
01082   virtual void Lower() = 0;
01083 
01085   virtual bool HasChildren() = 0;
01086 
01088   virtual void SetRedrawTag(unsigned int tag) = 0;
01089 
01091   virtual unsigned int RedrawTag() = 0;
01092 
01094   virtual void OnDraw(csRect clip) = 0;
01095 
01097   virtual bool OnMouseDown(int button, int x, int y) = 0;
01098 
01100   virtual bool OnMouseUp(int button, int x, int y) = 0;
01101 
01103   virtual bool OnMouseMove(int button, int x, int y) = 0;
01104 
01106   virtual bool OnMouseClick(int button, int x, int y) = 0;
01107 
01109   virtual bool OnMouseDoubleClick(int button, int x, int y) = 0;
01110 
01112   virtual bool OnMouseExit() = 0;
01113 
01115   virtual bool OnMouseEnter() = 0;
01116 
01118   virtual bool OnKeyboard (const csKeyEventData& eventData) = 0;
01119 
01121   virtual bool OnLostFocus() = 0;
01122 
01124   virtual bool OnGainFocus() = 0;
01125 
01127   virtual bool OnFrame() = 0;
01128 
01130   virtual void OnAdded() = 0;
01131 
01133   virtual void OnResized() = 0;
01134 
01136   virtual void OnChildMoved() = 0;
01137 
01139   virtual void OnRaise() = 0;
01140 
01142   virtual void OnLower() = 0;
01143 
01145   virtual void OnChildHide() = 0;
01146 
01148   virtual void OnChildShow() = 0;
01149 
01151   virtual void OnSetFocus() = 0;
01152 
01154   virtual void OnUnsetFocus() = 0;
01155 
01156   /* Only awsComponent should make use of the funcs below. Nothing else =) */
01157 
01159   virtual void Unlink() = 0;
01160 
01162   virtual void LinkAbove(iAwsComponent* comp) = 0;
01163 
01165   virtual void LinkBelow(iAwsComponent* comp) = 0;
01166 
01168   virtual void SetTopChild(iAwsComponent* child) = 0;
01169 
01171   virtual void MarkToDelete() = 0;
01172 
01174   virtual bool GetMarkToDelete() = 0;
01175 };
01176 
01177 
01178 SCF_VERSION (iAwsComponentFactory, 0, 0, 2);
01179 
01181 struct iAwsComponentFactory : public iBase
01182 {
01184   virtual iAwsComponent *Create() = 0;
01185 
01187   virtual void Register(const char *type) = 0;
01188 
01190   virtual void RegisterConstant(const char *name, int value) = 0;
01191 };
01192 
01193 
01194 SCF_VERSION (iAwsKeyFactory, 0, 0, 4);
01195 
01197 struct iAwsKeyFactory : public iBase
01198 {
01203    virtual void Initialize(const char* name, const char* component_type) = 0;
01205    virtual void AddToWindowList(iAwsPrefManager *pm) = 0;
01207    virtual void AddFactory(iAwsKeyFactory *factory) = 0;
01209    virtual void AddIntKey (const char* name, int v) = 0;
01211    virtual void AddStringKey (const char* name, const char* v) = 0;
01213    virtual void AddRectKey (const char* name, csRect v) = 0;
01215    virtual void AddRGBKey (const char* name, unsigned char r,
01216         unsigned char g, unsigned char b) = 0;
01218    virtual void AddPointKey (const char* name, csVector2 v) = 0;
01220    virtual void AddConnectionKey (const char* name, iAwsSink *s,
01221         unsigned long t, unsigned long sig) = 0;
01223    virtual void AddConnectionNode (iAwsConnectionNodeFactory *node) = 0;
01224    
01225    virtual iAwsComponentNode* GetThisNode () = 0;
01226 };
01227 
01228 SCF_VERSION (iAwsConnectionNodeFactory, 0, 0, 1);
01229 
01231 struct iAwsConnectionNodeFactory : public iBase
01232 {
01234   virtual void Initialize () = 0;
01236   virtual void AddConnectionKey (
01237                  const char* name,
01238                  iAwsSink *s,
01239                  unsigned long t,
01240                  unsigned long sig) = 0;
01241 
01243   virtual awsConnectionNode* GetThisNode () = 0;
01244 };
01245 
01246 /* @} */
01247 
01248 #endif // __CS_IAWS_AWS_H__

Generated for Crystal Space by doxygen 1.4.6