summaryrefslogtreecommitdiff
path: root/winrt/mupdf_cpp/RectList.h
diff options
context:
space:
mode:
Diffstat (limited to 'winrt/mupdf_cpp/RectList.h')
-rw-r--r--winrt/mupdf_cpp/RectList.h63
1 files changed, 51 insertions, 12 deletions
diff --git a/winrt/mupdf_cpp/RectList.h b/winrt/mupdf_cpp/RectList.h
index eb4532aa..d138397a 100644
--- a/winrt/mupdf_cpp/RectList.h
+++ b/winrt/mupdf_cpp/RectList.h
@@ -1,12 +1,10 @@
#pragma once
-
-/* Used for binding to the xaml in the scroll view. */
+/* WinRT RectList class for binding a collection of rects to the xaml ui */
using namespace Windows::UI::Xaml::Media::Imaging;
using namespace Windows::UI::Xaml::Controls;
+using namespace Platform; /* For String */
-
-
namespace mupdf_cpp
{
[Windows::UI::Xaml::Data::Bindable] // in c++, adding this attribute to ref classes enables data binding for more info search for 'Bindable' on the page http://go.microsoft.com/fwlink/?LinkId=254639
@@ -14,36 +12,50 @@ namespace mupdf_cpp
public ref class RectList sealed
{
private:
- int heightr;
- int widthr;
+ int height;
+ int width;
int x;
int y;
+ String^ color;
+ /* These are used to store the link infomation */
+ int type;
+ int pagenum;
+ Windows::Foundation::Uri ^uri;
public:
RectList(void);
- property int HeightR
+ property int Height
{
- int get() { return ((int) heightr); }
+ int get() { return ((int) height); }
void set(int value)
{
if (value < 0)
{
throw ref new Platform::InvalidArgumentException();
}
- heightr = value;
+ height = value;
+ }
+ }
+
+ property String^ Color
+ {
+ String^ get() { return (color); }
+ void set(String^ value)
+ {
+ color = value;
}
}
- property int WidthR
+ property int Width
{
- int get() { return widthr; }
+ int get() { return width; }
void set(int value)
{
if (value < 0)
{
throw ref new Platform::InvalidArgumentException();
}
- widthr = value;
+ width = value;
}
}
@@ -64,5 +76,32 @@ namespace mupdf_cpp
y = value;
}
}
+
+ property int Type
+ {
+ int get() { return type; }
+ void set(int value)
+ {
+ type = value;
+ }
+ }
+
+ property int PageNum
+ {
+ int get() { return pagenum; }
+ void set(int value)
+ {
+ pagenum = value;
+ }
+ }
+
+ property Windows::Foundation::Uri^ Urilink
+ {
+ Windows::Foundation::Uri^ get() { return uri; }
+ void set(Windows::Foundation::Uri^ value)
+ {
+ uri = value;
+ }
+ }
};
}