xref: /haiku/src/apps/cortex/InfoView/InfoWindow.h (revision d3d8b26997fac34a84981e6d2b649521de2cc45a)
1 // InfoWindow.h (Cortex/InfoView)
2 //
3 // * PURPOSE
4 //
5 // * HISTORY
6 //   c.lenz		25may00		Begun
7 //
8 
9 #ifndef __InfoWindow_H__
10 #define __InfoWindow_H__
11 
12 // Interface Kit
13 #include <Window.h>
14 
15 #include "cortex_defs.h"
16 __BEGIN_CORTEX_NAMESPACE
17 
18 class InfoWindow :
19 	public		BWindow {
20 
21 public:						// *** ctor/dtor
22 
23 							InfoWindow(
24 								BRect frame);
25 
26 	virtual					~InfoWindow();
27 
28 public:						// *** BWindow impl
29 
30 	// remember that frame was changed manually
31 	virtual void			FrameResized(
32 								float width,
33 								float height);
34 
35 	// extends BWindow implementation to constrain to screen
36 	// and remember the initial size
37 	virtual void			Show();
38 
39 	// extend basic Zoom() functionality to 'minimize' the
40 	// window when currently at max size
41 	virtual void			Zoom(
42 								BPoint origin,
43 								float width,
44 								float height);
45 
46 private:					// *** internal operations
47 
48 	// resizes the window to fit in the current screen rect
49 	void					_constrainToScreen();
50 
51 private:					// *** data members
52 
53 	BRect					m_manualSize;
54 
55 	bool					m_zoomed;
56 
57 	bool					m_zooming;
58 };
59 
60 __END_CORTEX_NAMESPACE
61 #endif /* __InfoWindow_H__ */
62