kspread Library API Documentation

kspread_types.h

00001 /*
00002 KSpread's code is IMO often hard to read. The cause of this is that there
00003 is no clear distinction between coordinates on the screen and coordinates
00004 in a sheet. Therefore I want to propose to define our own types to refer to
00005 coordinates on the sheet. 
00006 This is a quick draft of how it could look like. It is definitely not complete.
00007 So feel free to change it and add comments. The types are very straightforward,
00008 so I think no further comments are needed yet.  -- Wilco --
00009 */
00010 
00011 
00012 typedef Column unsigned long int;
00013 typedef Row unsigned long int;
00014 
00015 
00016 class Coordinate
00017 {
00018 public:
00019     Coordinate( Row, Column );
00020 
00021     Row row() const { return m_iRow; }
00022     Column column() const { return m_iColumn; }
00023 
00024 private:
00025     Row m_iRow;
00026     Column m_iColumn;
00027 };
00028 
00029 
00030 class Selection
00031 {
00032 public:
00033     Selection( Coordinate, Coordinate );
00034 
00035     Coordinate begin() const { return m_crdBegin; }
00036     Coordinate end() const { return m_crdEnd; }
00037     
00038 private:
00039     Coordinate m_crdBegin;
00040     Coordinate m_crdEnd;
00041 };
00042 
KDE Logo
This file is part of the documentation for kspread Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:43:25 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003