Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGuiFactory.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Fons Rademakers 15/11/95
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #ifndef ROOT_TGuiFactory
14 #define ROOT_TGuiFactory
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGuiFactory //
19 // //
20 // This ABC is a factory for GUI components. Depending on which //
21 // factory is active one gets either ROOT native (X11 based with Win95 //
22 // look and feel), Win32 or Mac components. //
23 // In case there is no platform dependent implementation on can run in //
24 // batch mode directly using an instance of this base class. //
25 // //
26 //////////////////////////////////////////////////////////////////////////
27 
28 #include "TNamed.h"
29 
30 class TApplicationImp;
31 class TCanvasImp;
32 class TCanvas;
33 class TBrowserImp;
34 class TBrowser;
35 class TContextMenuImp;
36 class TContextMenu;
37 class TControlBarImp;
38 class TControlBar;
39 class TInspectorImp;
40 
41 
42 class TGuiFactory : public TNamed {
43 
44 public:
45  TGuiFactory(const char *name = "Batch", const char *title = "Batch GUI Factory");
46  virtual ~TGuiFactory() { }
47 
48  virtual TApplicationImp *CreateApplicationImp(const char *classname, int *argc, char **argv);
49 
50  virtual TCanvasImp *CreateCanvasImp(TCanvas *c, const char *title, UInt_t width, UInt_t height);
51  virtual TCanvasImp *CreateCanvasImp(TCanvas *c, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height);
52 
53  virtual TBrowserImp *CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt="");
54  virtual TBrowserImp *CreateBrowserImp(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt="");
55 
56  virtual TContextMenuImp *CreateContextMenuImp(TContextMenu *c, const char *name, const char *title);
57 
58  virtual TControlBarImp *CreateControlBarImp(TControlBar *c, const char *title);
59  virtual TControlBarImp *CreateControlBarImp(TControlBar *c, const char *title, Int_t x, Int_t y);
60 
61  virtual TInspectorImp *CreateInspectorImp(const TObject *obj, UInt_t width, UInt_t height);
62 
63  ClassDef(TGuiFactory,0) //Abstract factory for GUI components
64 };
65 
66 R__EXTERN TGuiFactory *gGuiFactory;
67 R__EXTERN TGuiFactory *gBatchGuiFactory;
68 
69 #endif