1 //
2 // C++ Interface: links navigation dialog
3 //
4 // Description:
5 //
6 //
7 // Author: Vadim Lopatin <vadim.lopatin@coolreader.org>, (C) 2008
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 // linksdlg.h
12 
13 #ifndef LINKSDLG_H_INCLUDED
14 #define LINKSDLG_H_INCLUDED
15 
16 #include "viewdlg.h"
17 
18 
19 class CRLinksDialog : public CRGUIWindowBase
20 {
21     enum {
22         BACK = 0,
23         FORWARD = 1,
24         LINK = 2
25     };
26     protected:
27         int _cursorPos;
28         CRViewDialog * _docwin;
29         LVDocView * _docview;
30         lvRect _invalidateRect;
31         int _additionalButtons[2];
32         int _addButtonCount;
33         int _linkCount;
34         int _backSize;
35         int _fwdSize;
36         int _currentButton;
37         int _nextButton[3];
38         int _prevButton[3];
39         LVImageSourceRef _activeIcons[2];
40         LVImageSourceRef _normalIcons[2];
41         lvRect _iconRects[2];
42     protected:
43         virtual void Update();
44         virtual void draw();
45     public:
46         static CRLinksDialog * create( CRGUIWindowManager * wm, CRViewDialog * docwin );
47         CRLinksDialog( CRGUIWindowManager * wm, CRViewDialog * docwin );
~CRLinksDialog()48         virtual ~CRLinksDialog() { }
49         /// returns true if command is processed
50         virtual bool onCommand( int command, int params );
51         void invalidateCurrentSelection();
52 };
53 
54 #endif
55