xref: /haiku/src/kits/tracker/DesktopPoseView.h (revision 01dffd8edd94699ac1e6f2cc4322555f2171da14)
102be5353SAxel Dörfler /*
202be5353SAxel Dörfler Open Tracker License
302be5353SAxel Dörfler 
402be5353SAxel Dörfler Terms and Conditions
502be5353SAxel Dörfler 
602be5353SAxel Dörfler Copyright (c) 1991-2000, Be Incorporated. All rights reserved.
702be5353SAxel Dörfler 
802be5353SAxel Dörfler Permission is hereby granted, free of charge, to any person obtaining a copy of
902be5353SAxel Dörfler this software and associated documentation files (the "Software"), to deal in
1002be5353SAxel Dörfler the Software without restriction, including without limitation the rights to
1102be5353SAxel Dörfler use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
1202be5353SAxel Dörfler of the Software, and to permit persons to whom the Software is furnished to do
1302be5353SAxel Dörfler so, subject to the following conditions:
1402be5353SAxel Dörfler 
1502be5353SAxel Dörfler The above copyright notice and this permission notice applies to all licensees
1602be5353SAxel Dörfler and shall be included in all copies or substantial portions of the Software.
1702be5353SAxel Dörfler 
1802be5353SAxel Dörfler THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1902be5353SAxel Dörfler IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
2002be5353SAxel Dörfler FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
2102be5353SAxel Dörfler BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
2202be5353SAxel Dörfler AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
2302be5353SAxel Dörfler WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2402be5353SAxel Dörfler 
2502be5353SAxel Dörfler Except as contained in this notice, the name of Be Incorporated shall not be
2602be5353SAxel Dörfler used in advertising or otherwise to promote the sale, use or other dealings in
2702be5353SAxel Dörfler this Software without prior written authorization from Be Incorporated.
2802be5353SAxel Dörfler 
2902be5353SAxel Dörfler Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
3002be5353SAxel Dörfler of Be Incorporated in the United States and other countries. Other brand product
3102be5353SAxel Dörfler names are registered trademarks or trademarks of their respective holders.
3202be5353SAxel Dörfler All rights reserved.
3302be5353SAxel Dörfler */
3402be5353SAxel Dörfler 
3502be5353SAxel Dörfler //	DesktopPoseView adds support for displaying integrated desktops
3602be5353SAxel Dörfler //	from multiple volumes to BPoseView
3702be5353SAxel Dörfler 
3802be5353SAxel Dörfler #ifndef	_DESKTOP_POSE_VIEW_H
3902be5353SAxel Dörfler #define _DESKTOP_POSE_VIEW_H
4002be5353SAxel Dörfler 
4102be5353SAxel Dörfler #include "EntryIterator.h"
4202be5353SAxel Dörfler #include "PoseView.h"
4302be5353SAxel Dörfler 
4402be5353SAxel Dörfler namespace BPrivate {
4502be5353SAxel Dörfler 
46eb9b1980SIngo Weinhold bool ShouldShowDesktopPose(dev_t device, const Model *model, const PoseInfo *);
47eb9b1980SIngo Weinhold 
4802be5353SAxel Dörfler class DesktopPoseView : public BPoseView {
4902be5353SAxel Dörfler 	// overrides BPoseView to add desktop-view specific code
5002be5353SAxel Dörfler public:
5102be5353SAxel Dörfler 	DesktopPoseView(Model *, BRect, uint32 viewMode, uint32 resizeMask = B_FOLLOW_ALL);
5202be5353SAxel Dörfler 
5302be5353SAxel Dörfler 	static EntryListBase *InitDesktopDirentIterator(BPoseView *, const entry_ref *);
5402be5353SAxel Dörfler 
5502be5353SAxel Dörfler 	void ShowVolumes(bool visible, bool showShared);
5602be5353SAxel Dörfler 
5702be5353SAxel Dörfler 	void StartSettingsWatch();
5802be5353SAxel Dörfler 	void StopSettingsWatch();
5902be5353SAxel Dörfler 
6002be5353SAxel Dörfler 	virtual bool AddPosesThreadValid(const entry_ref *) const;
61*01dffd8eSRene Gollent 	virtual void AddPosesCompleted();
6202be5353SAxel Dörfler 
6302be5353SAxel Dörfler protected:
6402be5353SAxel Dörfler 	virtual EntryListBase *InitDirentIterator(const entry_ref *);
6502be5353SAxel Dörfler 	virtual bool FSNotification(const BMessage *);
6602be5353SAxel Dörfler 
6702be5353SAxel Dörfler 	virtual bool IsDesktopView() const;
6802be5353SAxel Dörfler 	virtual bool ShouldShowPose(const Model *, const PoseInfo *);
6902be5353SAxel Dörfler 
7002be5353SAxel Dörfler 	virtual bool Represents(const node_ref *) const;
7102be5353SAxel Dörfler 	virtual bool Represents(const entry_ref *) const;
7202be5353SAxel Dörfler 
7302be5353SAxel Dörfler 	void AdaptToVolumeChange(BMessage *);
7402be5353SAxel Dörfler 	void AdaptToDesktopIntegrationChange(BMessage *);
7502be5353SAxel Dörfler 
7602be5353SAxel Dörfler private:
7702be5353SAxel Dörfler 	typedef BPoseView _inherited;
7802be5353SAxel Dörfler 
7902be5353SAxel Dörfler 	friend bool ShouldShowDesktopPose(dev_t device, const Model *,
8002be5353SAxel Dörfler 		const PoseInfo *);
8102be5353SAxel Dörfler 
82*01dffd8eSRene Gollent 	void AddTrashPose();
8302be5353SAxel Dörfler };
8402be5353SAxel Dörfler 
8502be5353SAxel Dörfler 
8602be5353SAxel Dörfler inline bool
8702be5353SAxel Dörfler DesktopPoseView::IsDesktopView() const
8802be5353SAxel Dörfler {
8902be5353SAxel Dörfler 	return true;
9002be5353SAxel Dörfler }
9102be5353SAxel Dörfler 
9202be5353SAxel Dörfler } // namespace BPrivate
9302be5353SAxel Dörfler 
9402be5353SAxel Dörfler using namespace BPrivate;
9502be5353SAxel Dörfler 
9602be5353SAxel Dörfler #endif
97