diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-05-16 16:13:48 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-05-16 19:26:00 +0100 |
commit | 510eb5217cac45c4009e287ede6aa92fbfb8b93d (patch) | |
tree | 7c9e3b9fab10820054a68f6a70f4d1b4807e19cf /winrt/mupdf_cpp/RectList.h | |
parent | 973a751daebd4ead092d6d05a1688a0077c5e2e9 (diff) | |
download | mupdf-510eb5217cac45c4009e287ede6aa92fbfb8b93d.tar.xz |
Miscellaneous tidying.
Remove stray win32 changes. Update indentation style.
Diffstat (limited to 'winrt/mupdf_cpp/RectList.h')
-rw-r--r-- | winrt/mupdf_cpp/RectList.h | 250 |
1 files changed, 143 insertions, 107 deletions
diff --git a/winrt/mupdf_cpp/RectList.h b/winrt/mupdf_cpp/RectList.h index d3f0527f..5d802327 100644 --- a/winrt/mupdf_cpp/RectList.h +++ b/winrt/mupdf_cpp/RectList.h @@ -7,111 +7,147 @@ 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 - - public ref class RectList sealed - { - private: - 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; - String^ index; // For identify which rectangle was tapped - public: - RectList(void); - - property String^ Index - { - String^ get() { return ((String^) index); } - void set(String^ value) - { - index = value; - } - } - - property String^ Color - { - String^ get() { return (color); } - void set(String^ value) - { - color = value; - } - } - - 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; } - void set(int value) - { - if (value < 0) - { - throw ref new Platform::InvalidArgumentException(); - } - width = value; - } - } - - property int X - { - int get() { return x; } - void set(int value) - { - x = value; - } - } - - property int Y - { - int get() { return y; } - void set(int value) - { - 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; - } - } - }; + [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 + + public ref class RectList sealed + { + private: + 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; + String^ index; // For identify which rectangle was tapped + public: + RectList(void); + + property String^ Index + { + String^ get() + { + return ((String^) index); + } + + void set(String^ value) + { + index = value; + } + } + + property String^ Color + { + String^ get() + { + return (color); + } + + void set(String^ value) + { + color = value; + } + } + + 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; + } + + void set(int value) + { + if (value < 0) + { + throw ref new Platform::InvalidArgumentException(); + } + width = value; + } + } + + property int X + { + int get() + { + return x; + } + + void set(int value) + { + x = value; + } + } + + property int Y + { + int get() + { + return y; + } + + void set(int value) + { + 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; + } + } + }; } |