]> git.saurik.com Git - apple/mdnsresponder.git/blob - Clients/ExplorerPlugin/ExplorerBar.h
mDNSResponder-878.50.17.tar.gz
[apple/mdnsresponder.git] / Clients / ExplorerPlugin / ExplorerBar.h
1 /* -*- Mode: C; tab-width: 4 -*-
2 *
3 * Copyright (c) 2003-2004 Apple Computer, Inc. All rights reserved.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 #ifndef __EXPLORER_BAR__
19 #define __EXPLORER_BAR__
20
21 #include "StdAfx.h"
22
23 #include "ExplorerBarWindow.h"
24 #include "ExplorerPlugin.h"
25
26 //===========================================================================================================================
27 // ExplorerBar
28 //===========================================================================================================================
29
30 class ExplorerBar : public IDeskBand,
31 public IInputObject,
32 public IObjectWithSite,
33 public IPersistStream,
34 public IContextMenu
35 {
36 protected:
37
38 DWORD mRefCount;
39 IInputObjectSite * mSite;
40 IWebBrowser2 * mWebBrowser;
41 HWND mParentWindow;
42 BOOL mFocus;
43 DWORD mViewMode;
44 DWORD mBandID;
45 ExplorerBarWindow mWindow;
46
47 public:
48
49 ExplorerBar( void );
50 ~ExplorerBar( void );
51
52 // IUnknown methods
53
54 STDMETHODIMP QueryInterface( REFIID inID, LPVOID *outResult );
55 STDMETHODIMP_( DWORD ) AddRef( void );
56 STDMETHODIMP_( DWORD ) Release( void );
57
58 // IOleWindow methods
59
60 STDMETHOD( GetWindow ) ( HWND *outWindow );
61 STDMETHOD( ContextSensitiveHelp ) ( BOOL inEnterMode );
62
63 // IDockingWindow methods
64
65 STDMETHOD( ShowDW ) ( BOOL inShow );
66 STDMETHOD( CloseDW ) ( DWORD inReserved );
67 STDMETHOD( ResizeBorderDW ) ( LPCRECT inBorder, IUnknown *inPunkSite, BOOL inReserved );
68
69 // IDeskBand methods
70
71 STDMETHOD( GetBandInfo ) ( DWORD inBandID, DWORD inViewMode, DESKBANDINFO *outInfo );
72
73 // IInputObject methods
74
75 STDMETHOD( UIActivateIO ) ( BOOL inActivate, LPMSG inMsg );
76 STDMETHOD( HasFocusIO ) ( void );
77 STDMETHOD( TranslateAcceleratorIO ) ( LPMSG inMsg );
78
79 // IObjectWithSite methods
80
81 STDMETHOD( SetSite ) ( IUnknown *inPunkSite );
82 STDMETHOD( GetSite ) ( REFIID inID, LPVOID *outResult );
83
84 // IPersistStream methods
85
86 STDMETHOD( GetClassID ) ( LPCLSID outClassID );
87 STDMETHOD( IsDirty ) ( void );
88 STDMETHOD( Load ) ( LPSTREAM inStream );
89 STDMETHOD( Save ) ( LPSTREAM inStream, BOOL inClearDirty );
90 STDMETHOD( GetSizeMax ) ( ULARGE_INTEGER *outSizeMax );
91
92 // IContextMenu methods
93
94 STDMETHOD( QueryContextMenu ) ( HMENU hContextMenu, UINT iContextMenuFirstItem, UINT idCmdFirst, UINT idCmdLast, UINT uFlags );
95 STDMETHOD( GetCommandString ) ( UINT_PTR idCmd, UINT uType, UINT* pwReserved, LPSTR pszName, UINT cchMax );
96 STDMETHOD( InvokeCommand ) ( LPCMINVOKECOMMANDINFO lpici );
97
98 // Other
99
100 OSStatus SetupWindow( void );
101 OSStatus GoToURL( const CString &inURL );
102 };
103
104 #endif // __EXPLORER_BAR__