Debian Codegraph @

src/af/xap/xp/xap_Preview.h

raw
1 /* AbiSource Application Framework
2 * Copyright (C) 1998 AbiSource, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301 USA.
18 */
19
20
21 #ifndef XAP_PREVIEW_H
22 #define XAP_PREVIEW_H
23
24 /* pre-emptive dismissal; ut_types.h is needed by just about everything,
25 * so even if it's commented out in-file that's still a lot of work for
26 * the preprocessor to do...
27 */
28 #ifndef UT_TYPES_H
29 #include "ut_types.h"
30 #endif
31 #include "ut_misc.h"
32 #include "xap_CustomWidget.h"
33
34 /* #include "ev_EditBits.h" */
35
36 class GR_Graphics;
37
38 class ABI_EXPORT XAP_Preview: public XAP_CustomWidget
39 {
40 public:
41 XAP_Preview(GR_Graphics * gc);
42 virtual ~XAP_Preview(void);
43
44 void setWindowSize(UT_sint32, UT_sint32);
45 inline UT_sint32 getWindowWidth(void) const { return m_iWindowWidth; };
46 inline UT_sint32 getWindowHeight(void) const { return m_iWindowHeight; };
47
48 // we probably don't need this one
49 /*
50 inline GR_Graphics * getGraphicsContext(void) const { return m_graphics; };
51 */
52
53 // function to handle mouse down event.
54 virtual void onLeftButtonDown(UT_sint32 /*x*/, UT_sint32 /*y*/) { };
55
56 protected:
57 XAP_Preview();
58 GR_Graphics * m_gc;
59
60 private:
61 // TODO :
62 // later we might add some useful high-level macro-like drawing functions
63 // for previews, like drawing page boundaries, etc.
64
65 UT_sint32 m_iWindowHeight;
66 UT_sint32 m_iWindowWidth;
67 };
68
69 #endif /* XAP_PREVIEW_H */