1 /* AbiWord 2 * Copyright (C) 1998 AbiSource, Inc. 3 * Copyright (C) 2001 - 2003 Hubert Figuiere 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License 7 * as published by the Free Software Foundation; either version 2 8 * of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 18 * 02110-1301 USA. 19 */ 20 21 #ifndef AP_COCOASTATUSBAR_H 22 #define AP_COCOASTATUSBAR_H 23 24 // Class for dealing with the status bar at the bottom of 25 // the frame window. 26 27 #import <Cocoa/Cocoa.h> 28 29 #include "ut_types.h" 30 #include "ap_StatusBar.h" 31 32 class XAP_Frame; 33 class GR_CocoaGraphics; 34 class AP_CocoaStatusBar; 35 36 ////////////////////////////////////////////////////////////////// 37 38 @interface XAP_CocoaNSStatusBar : NSView 39 { 40 AP_CocoaStatusBar* _xap; 41 } 42 - (void)setXAPOwner:(AP_CocoaStatusBar*)owner; 43 - (void)statusBarDidResize:(NSNotification *)notification; 44 45 @end 46 47 ////////////////////////////////////////////////////////////////// 48 49 class AP_CocoaStatusBar : public AP_StatusBar 50 { 51 public: 52 AP_CocoaStatusBar(XAP_Frame * pFrame); 53 virtual ~AP_CocoaStatusBar(void); 54 55 virtual void setView(AV_View * pView); 56 XAP_CocoaNSStatusBar* createWidget(void); 57 58 virtual void show(void); 59 virtual void hide(void); 60 61 void _repositionFields(NSArray *fields); 62 63 private: 64 65 XAP_CocoaNSStatusBar * m_wStatusBar; 66 NSView * m_superView; 67 bool m_hidden; 68 float m_requestedWidth; 69 int m_numMaxWidth; 70 }; 71 72 #endif /* AP_COCOASTATUSBAR_H */ 73