kviewshell
anchor.h
Go to the documentation of this file.00001 // -*- C++ -*- 00002 // 00003 // anchor.h 00004 // 00005 // Part of KVIEWSHELL - A framework for multipage text/gfx viewers 00006 // 00007 // (C) 2004-2005 Stefan Kebekus 00008 // Distributed under the GPL 00009 00010 00011 #ifndef ANCHOR_H 00012 #define ANCHOR_H 00013 00014 #include "length.h" 00015 #include "pageNumber.h" 00016 00017 00030 class Anchor { 00031 public: 00033 Anchor() {page = 0;} 00034 00045 Anchor(const PageNumber& pg, const Length& _distance_from_top): page(pg), distance_from_top(_distance_from_top) {} 00046 00051 bool isValid() const {return page.isValid() && (0.0 <= distance_from_top.getLength_in_mm()) && (distance_from_top.getLength_in_mm() <= 2000.0);} 00052 00054 PageNumber page; 00055 00057 Length distance_from_top; 00058 }; 00059 00060 00061 #endif