embedding/components/commandhandler/src/nsBaseCommandController.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:c411662f3510
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #ifndef nsBaseCommandController_h__
7 #define nsBaseCommandController_h__
8
9 #define NS_BASECOMMANDCONTROLLER_CID \
10 { 0xbf88b48c, 0xfd8e, 0x40b4, { 0xba, 0x36, 0xc7, 0xc3, 0xad, 0x6d, 0x8a, 0xc9 } }
11 #define NS_BASECOMMANDCONTROLLER_CONTRACTID \
12 "@mozilla.org/embedcomp/base-command-controller;1"
13
14
15 #include "nsIController.h"
16 #include "nsIControllerContext.h"
17 #include "nsIControllerCommandTable.h"
18 #include "nsIInterfaceRequestor.h"
19 #include "nsIWeakReferenceUtils.h"
20
21 // The base editor controller is used for both text widgets,
22 // and all other text and html editing
23 class nsBaseCommandController : public nsIController,
24 public nsIControllerContext,
25 public nsIInterfaceRequestor,
26 public nsICommandController
27 {
28 public:
29
30 nsBaseCommandController();
31 virtual ~nsBaseCommandController();
32
33 // nsISupports
34 NS_DECL_ISUPPORTS
35
36 // nsIController
37 NS_DECL_NSICONTROLLER
38
39 // nsICommandController
40 NS_DECL_NSICOMMANDCONTROLLER
41
42 //nsIControllerContext
43 NS_DECL_NSICONTROLLERCONTEXT
44
45 // nsIInterfaceRequestor
46 NS_DECL_NSIINTERFACEREQUESTOR
47
48 private:
49
50 nsWeakPtr mCommandContextWeakPtr;
51 nsISupports* mCommandContextRawPtr;
52
53 // Our reference to the command manager
54 nsCOMPtr<nsIControllerCommandTable> mCommandTable;
55 };
56
57 #endif /* nsBaseCommandController_h_ */
58

mercurial