From 165a3528f5a48ba9c4f30d18330875b6070ddf96 Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Wed, 8 May 2013 16:59:01 -0700 Subject: Support for going to the links. Used tag attribute in rectangle object to store the index value into the collection of rectangles to get back the page number or uri. --- winrt/mupdf_cpp/RectList.h | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'winrt/mupdf_cpp/RectList.h') diff --git a/winrt/mupdf_cpp/RectList.h b/winrt/mupdf_cpp/RectList.h index d138397a..d3f0527f 100644 --- a/winrt/mupdf_cpp/RectList.h +++ b/winrt/mupdf_cpp/RectList.h @@ -21,19 +21,16 @@ namespace mupdf_cpp int type; int pagenum; Windows::Foundation::Uri ^uri; + String^ index; // For identify which rectangle was tapped public: RectList(void); - property int Height + property String^ Index { - int get() { return ((int) height); } - void set(int value) + String^ get() { return ((String^) index); } + void set(String^ value) { - if (value < 0) - { - throw ref new Platform::InvalidArgumentException(); - } - height = value; + index = value; } } @@ -46,6 +43,19 @@ namespace mupdf_cpp } } + property int Height + { + int get() { return ((int) height); } + void set(int value) + { + if (value < 0) + { + throw ref new Platform::InvalidArgumentException(); + } + height = value; + } + } + property int Width { int get() { return width; } -- cgit v1.2.3