• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ap_CocoaLeftRuler.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 1998 AbiSource, Inc.
00005  * Copyright (C) 2001 Hubert Figuiere
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00020  * 02110-1301 USA.
00021  */
00022 
00023 #ifndef AP_COCOALEFTRULER_H
00024 #define AP_COCOALEFTRULER_H
00025 
00026 // Class for dealing with the horizontal ruler at the left of
00027 // a document window.
00028 
00029 /*****************************************************************/
00030 
00031 #import <Cocoa/Cocoa.h>
00032 
00033 #include "ut_types.h"
00034 #include "ap_LeftRuler.h"
00035 
00036 class XAP_Frame;
00037 @class AP_CocoaLeftRulerDelegate;
00038 
00039 /*****************************************************************/
00040 
00041 class AP_CocoaLeftRuler : public AP_LeftRuler
00042 {
00043 public:
00044     AP_CocoaLeftRuler(XAP_Frame * pFrame);
00045     virtual ~AP_CocoaLeftRuler(void);
00046 
00047     XAP_CocoaNSView *       createWidget(void);
00048     virtual void    setView(AV_View * pView);
00049 
00050     // cheats for the callbacks
00051     void                getWidgetPosition(int * x, int * y);
00052     XAP_CocoaNSView *       getWidget(void) { return m_wLeftRuler; };
00053     NSWindow *  getRootWindow(void);
00054 
00055 //  void _ruler_style_changed (void);
00056 protected:
00057 #if 0
00058     virtual void        _drawMarginProperties(const UT_Rect * pClipRect,
00059                                               AP_LeftRulerInfo * pInfo,
00060                                               GR_Graphics::GR_Color3D clr);
00061     virtual void        _drawCellMark(UT_Rect *prDrag, bool bUp);
00062 #endif
00063 private:
00064     static bool _graphicsUpdateCB(NSRect * aRect, GR_CocoaCairoGraphics *pG, void* param);
00065 
00066     XAP_CocoaNSView *       m_wLeftRuler;
00067     NSWindow *  m_rootWindow;
00068     AP_CocoaLeftRulerDelegate* m_delegate;
00069 };
00070 
00071 #endif /* AP_COCOALEFTRULER_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1