|
From: CVS C. to T. <the...@li...> - 2012-02-22 23:40:40
|
Revision: 673
http://themis.svn.sourceforge.net/themis/?rev=673&view=rev
Author: mark_hellegers
Date: 2012-02-22 23:40:32 +0000 (Wed, 22 Feb 2012)
Log Message:
-----------
Changed CSS Renderer to use separate classes for display types.
Shouldn't change anything yet, but will allow for moving specific functionality to the right class.
Also makes it easier to create display specific layouts.
Modified Paths:
--------------
trunk/themis/makefile
trunk/themis/modules/CSSParser/html4.css
trunk/themis/modules/CSSRenderer/CSSRendererView.cpp
trunk/themis/modules/CSSRenderer/CSSView.cpp
trunk/themis/modules/CSSRenderer/CSSView.hpp
Added Paths:
-----------
trunk/themis/modules/CSSRenderer/BlockDisplayView.cpp
trunk/themis/modules/CSSRenderer/BlockDisplayView.hpp
trunk/themis/modules/CSSRenderer/InlineDisplayView.cpp
trunk/themis/modules/CSSRenderer/InlineDisplayView.hpp
trunk/themis/modules/CSSRenderer/NoneDisplayView.cpp
trunk/themis/modules/CSSRenderer/NoneDisplayView.hpp
trunk/themis/modules/CSSRenderer/TableCellDisplayView.cpp
trunk/themis/modules/CSSRenderer/TableCellDisplayView.hpp
trunk/themis/modules/CSSRenderer/TableDisplayView.cpp
trunk/themis/modules/CSSRenderer/TableDisplayView.hpp
trunk/themis/modules/CSSRenderer/TableRowDisplayView.cpp
trunk/themis/modules/CSSRenderer/TableRowDisplayView.hpp
Modified: trunk/themis/makefile
===================================================================
--- trunk/themis/makefile 2012-01-03 19:55:48 UTC (rev 672)
+++ trunk/themis/makefile 2012-02-22 23:40:32 UTC (rev 673)
@@ -233,7 +233,13 @@
CSSRenderer/CSSScrolledRendererView.cpp \
CSSRenderer/CSSView.cpp \
CSSRenderer/TextBox.cpp \
- CSSRenderer/CSSStyleContainer.cpp
+ CSSRenderer/CSSStyleContainer.cpp \
+ CSSRenderer/InlineDisplayView.cpp \
+ CSSRenderer/BlockDisplayView.cpp \
+ CSSRenderer/TableDisplayView.cpp \
+ CSSRenderer/TableRowDisplayView.cpp \
+ CSSRenderer/TableCellDisplayView.cpp \
+ CSSRenderer/NoneDisplayView.cpp
#make install directories as necessary
ifeq "$(shell if [ -d $(BASE_ADDON_INSTALL_DIR) ] ; then echo 1 ; else mkdir -p $(BASE_ADDON_INSTALL_DIR) ; echo 0 ; fi)" "0"
Modified: trunk/themis/modules/CSSParser/html4.css
===================================================================
--- trunk/themis/modules/CSSParser/html4.css 2012-01-03 19:55:48 UTC (rev 672)
+++ trunk/themis/modules/CSSParser/html4.css 2012-02-22 23:40:32 UTC (rev 673)
@@ -2,6 +2,9 @@
Simple CSS stylesheet used to display html.
*/
+HTML { display: block }
+BODY { display: block }
+DIV { display: block }
B { display: inline;
font-weight: bold }
A { display: inline;
Added: trunk/themis/modules/CSSRenderer/BlockDisplayView.cpp
===================================================================
--- trunk/themis/modules/CSSRenderer/BlockDisplayView.cpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/BlockDisplayView.cpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2011 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: April 15, 2011
+*/
+
+/* BlockDisplayView implementation
+ See BlockDisplayView.hpp for more information
+
+*/
+
+// Standard C headers
+#include <stdio.h>
+
+// CSS Renderer headers
+#include "BlockDisplayView.hpp"
+
+BlockDisplayView :: BlockDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont)
+ : CSSView(aBaseView,
+ aNode,
+ aStyleSheets,
+ aStyle,
+ aRect,
+ aSiteId,
+ aUrlId,
+ aColor,
+ aFont) {
+
+ mDisplay = true;
+ mBlock = true;
+ mTable = false;
+ mTableRow = false;
+ mTableCell = false;
+
+}
+
+BlockDisplayView :: ~BlockDisplayView() {
+
+}
+
+void BlockDisplayView :: Layout(BRect aRect,
+ BPoint aStartingPoint) {
+
+ CSSView::Layout(aRect, aStartingPoint);
+
+}
Added: trunk/themis/modules/CSSRenderer/BlockDisplayView.hpp
===================================================================
--- trunk/themis/modules/CSSRenderer/BlockDisplayView.hpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/BlockDisplayView.hpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,88 @@
+/*
+ Copyright (c) 2011 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: April 15, 2011
+*/
+
+/* BlockDisplayView
+ Renders css block display elements
+
+ Mark Hellegers (ma...@fi...)
+ 15-04-2011
+
+*/
+
+#ifndef BLOCKDISPLAYVIEW_HPP
+#define BLOCKDISPLAYVIEW_HPP
+
+// Standard C++ headers
+#include <vector>
+#include <string>
+
+// BeOS headers
+#include <Handler.h>
+#include <Rect.h>
+#include <Point.h>
+
+// DOM headers
+#include "DOMSupport.h"
+
+// DOM Style headers
+#include "CSSStyleSheet.hpp"
+#include "CSSStyleDeclaration.hpp"
+
+// CSSRenderer headers
+#include "CSSView.hpp"
+#include "TextBox.hpp"
+
+// Declarations used
+class BFont;
+class CSSRendererView;
+class CSSStyleContainer;
+
+// Namespaces used
+using std::vector;
+using std::string;
+
+class BlockDisplayView : public CSSView {
+
+ public:
+ BlockDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont = NULL);
+ ~BlockDisplayView();
+ virtual void Layout(BRect aRect,
+ BPoint aStartingPoint);
+};
+
+#endif
Modified: trunk/themis/modules/CSSRenderer/CSSRendererView.cpp
===================================================================
--- trunk/themis/modules/CSSRenderer/CSSRendererView.cpp 2012-01-03 19:55:48 UTC (rev 672)
+++ trunk/themis/modules/CSSRenderer/CSSRendererView.cpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -47,7 +47,12 @@
#include "CSSRendererView.hpp"
#include "CSSView.hpp"
#include "CSSStyleContainer.hpp"
+#include "InlineDisplayView.hpp"
+#include "BlockDisplayView.hpp"
+// DOM Style headers
+#include "CSSPrimitiveValue.hpp"
+
CSSRendererView :: CSSRendererView(BRect aFrame,
TDocumentPtr aDocument,
CSSStyleSheetPtr aStyleSheet,
@@ -63,6 +68,7 @@
mStyleSheets->addStyleSheet(aStyleSheet);
mDocument = aDocument;
BRect rect = Bounds();
+
if (mDocument->hasChildNodes()) {
rgb_color defaultColor;
defaultColor.red = 0;
@@ -71,14 +77,62 @@
TNodePtr root = mDocument->getFirstChild();
+ TElementPtr element = shared_static_cast<TElement>(root);
- mView = new CSSView(this,
- root,
- mStyleSheets,
- rect,
- aSiteId,
- aUrlId,
- defaultColor);
+ printf("Getting style of %s\n", element->getTagName().c_str());
+ CSSStyleDeclarationPtr style = mStyleSheets->getComputedStyle(element);
+ if (style.get() == NULL) {
+ // No style defined. Assume it is a block.
+ printf("Defaulting to block!!!\n");
+ mView = new BlockDisplayView(this,
+ root,
+ mStyleSheets,
+ style,
+ rect,
+ aSiteId,
+ aUrlId,
+ defaultColor);
+ }
+ else {
+ CSSValuePtr value = style->getPropertyCSSValue("display");
+ CSSPrimitiveValuePtr primitiveValue = shared_static_cast<CSSPrimitiveValue>(value);
+ TDOMString valueString = primitiveValue->getStringValue();
+ // printf("Display property value: %s\n", valueString.c_str());
+ if (valueString == "inline") {
+ printf("Inline!!!\n");
+ mView = new InlineDisplayView(this,
+ root,
+ mStyleSheets,
+ style,
+ rect,
+ aSiteId,
+ aUrlId,
+ defaultColor);
+ }
+ else if ((valueString == "table") || (valueString == "table-row-group")) {
+ // Nothing yet
+ }
+ else if (valueString == "table-row") {
+ // Nothing yet
+
+ }
+ else if (valueString == "table-cell") {
+ // Nothing yet
+ }
+ else {
+ // The default is a block element
+ printf("Defaulting to block!!!\n");
+ mView = new BlockDisplayView(this,
+ root,
+ mStyleSheets,
+ style,
+ rect,
+ aSiteId,
+ aUrlId,
+ defaultColor);
+ }
+ }
+
printf("Doing layout\n");
mView->Layout(rect, BPoint(rect.left, rect.top));
printf("Layout done\n");
@@ -129,7 +183,9 @@
}
Window()->SetTitle(title.c_str());
SetViewColor(B_TRANSPARENT_COLOR);
- mView->RetrieveResources();
+ if (mView) {
+ mView->RetrieveResources();
+ }
}
Modified: trunk/themis/modules/CSSRenderer/CSSView.cpp
===================================================================
--- trunk/themis/modules/CSSRenderer/CSSView.cpp 2012-01-03 19:55:48 UTC (rev 672)
+++ trunk/themis/modules/CSSRenderer/CSSView.cpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -62,6 +62,12 @@
#include "CSSView.hpp"
#include "CSSRendererView.hpp"
#include "CSSStyleContainer.hpp"
+#include "InlineDisplayView.hpp"
+#include "BlockDisplayView.hpp"
+#include "TableDisplayView.hpp"
+#include "TableRowDisplayView.hpp"
+#include "TableCellDisplayView.hpp"
+#include "NoneDisplayView.hpp"
// Constants used
const char cSpace = ' ';
@@ -69,6 +75,7 @@
CSSView :: CSSView(CSSRendererView * aBaseView,
TNodePtr aNode,
CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
BRect aRect,
int32 aSiteId,
int32 aUrlId,
@@ -82,11 +89,6 @@
mRect = aRect;
mSiteId = aSiteId;
mUrlId = aUrlId;
- mDisplay = true;
- mBlock = true;
- mTable = false;
- mTableRow = false;
- mTableCell = false;
mFont = aFont;
mInheritedFont = true;
mMarginBottom = 0;
@@ -102,8 +104,8 @@
TNodeListPtr children = mNode->getChildNodes();
unsigned int length = children->getLength();
if ((mNode->getNodeType() == ELEMENT_NODE) &&
- (mNode->getNodeName() == "TITLE") &&
- (length > 0)) {
+ (mNode->getNodeName() == "TITLE") &&
+ (length > 0)) {
printf("Found TITLE node\n");
TNodePtr textChild = children->item(0);
TDOMString titleText = textChild->getNodeValue();
@@ -128,20 +130,108 @@
mClickable = true;
}
}
- ApplyStyle(element);
+ ApplyStyle(element, aStyle);
}
for (unsigned int i = 0; i < length; i++) {
TNodePtr child = children->item(i);
- CSSView * childView = new CSSView(aBaseView,
- child,
- mStyleSheets,
- mRect,
- mSiteId,
- mUrlId,
- mColor,
- mFont);
- mChildren.push_back(childView);
+ if (child->getNodeType() == ELEMENT_NODE) {
+ TElementPtr element = shared_static_cast<TElement>(child);
+ CSSStyleDeclarationPtr style = mStyleSheets->getComputedStyle(element);
+ if (style.get()) {
+ CSSValuePtr value = style->getPropertyCSSValue("display");
+ // Default to block in case it doesn't exist.
+ TDOMString valueString = "block";
+ if (value.get()) {
+ CSSPrimitiveValuePtr primitiveValue = shared_static_cast<CSSPrimitiveValue>(value);
+ valueString = primitiveValue->getStringValue();
+ }
+ // printf("Display property value: %s\n", valueString.c_str());
+ CSSView * childView = NULL;
+ if (valueString == "inline") {
+ childView = new InlineDisplayView(aBaseView,
+ child,
+ mStyleSheets,
+ style,
+ mRect,
+ mSiteId,
+ mUrlId,
+ mColor,
+ mFont);
+ }
+ else if ((valueString == "table") || (valueString == "table-row-group")) {
+ childView = new TableDisplayView(aBaseView,
+ child,
+ mStyleSheets,
+ style,
+ mRect,
+ mSiteId,
+ mUrlId,
+ mColor,
+ mFont);
+ }
+ else if (valueString == "table-row") {
+ childView = new TableRowDisplayView(aBaseView,
+ child,
+ mStyleSheets,
+ style,
+ mRect,
+ mSiteId,
+ mUrlId,
+ mColor,
+ mFont);
+ }
+ else if (valueString == "table-cell") {
+ childView = new TableCellDisplayView(aBaseView,
+ child,
+ mStyleSheets,
+ style,
+ mRect,
+ mSiteId,
+ mUrlId,
+ mColor,
+ mFont);
+ }
+ else if (valueString == "none") {
+ childView = new NoneDisplayView(aBaseView,
+ child,
+ mStyleSheets,
+ style,
+ mRect,
+ mSiteId,
+ mUrlId,
+ mColor,
+ mFont);
+ }
+ else {
+ // The default is a block element
+ childView = new BlockDisplayView(aBaseView,
+ child,
+ mStyleSheets,
+ style,
+ mRect,
+ mSiteId,
+ mUrlId,
+ mColor,
+ mFont);
+ }
+ mChildren.push_back(childView);
+ }
+ }
+ else if (child->getNodeType() == TEXT_NODE) {
+ // Quick fix. Take a look at what would be elegant.
+ CSSStyleDeclarationPtr style;
+ CSSView * childView = new CSSView(aBaseView,
+ child,
+ mStyleSheets,
+ style,
+ mRect,
+ mSiteId,
+ mUrlId,
+ mColor,
+ mFont);
+ mChildren.push_back(childView);
+ }
}
}
else if (mNode->getNodeType() == TEXT_NODE) {
@@ -155,7 +245,7 @@
mBottomMargin = height.descent;
mSpaceWidth = mFont->StringWidth(&cSpace, 1);
mBlock = false;
-
+ mDisplay = true;
SplitText();
}
else if (mNode->getNodeType() == ELEMENT_NODE) {
@@ -226,38 +316,17 @@
}
-void CSSView :: ApplyStyle(const TElementPtr aElement) {
+void CSSView :: ApplyStyle(const TElementPtr aElement,
+ const CSSStyleDeclarationPtr aStyle) {
- CSSStyleDeclarationPtr style = mStyleSheets->getComputedStyle(aElement);
- if (style.get()) {
- unsigned long length = style->getLength();
+ if (aStyle.get()) {
+ unsigned long length = aStyle->getLength();
for (unsigned long i = 0; i < length; i++) {
- TDOMString propertyName = style->item(i);
- CSSValuePtr value = style->getPropertyCSSValue(propertyName);
+ TDOMString propertyName = aStyle->item(i);
+ CSSValuePtr value = aStyle->getPropertyCSSValue(propertyName);
if (value.get()) {
- if (propertyName == "display") {
+ if (propertyName == "font-size") {
CSSPrimitiveValuePtr primitiveValue = shared_static_cast<CSSPrimitiveValue>(value);
- TDOMString valueString = primitiveValue->getStringValue();
-// printf("Display property value: %s\n", valueString.c_str());
- if (valueString == "none") {
- mDisplay = false;
- mRect = BRect(0, 0, 0, 0);
- }
- else if (valueString == "inline") {
- mBlock = false;
- }
- else if ((valueString == "table") || (valueString == "table-row-group")) {
- mTable = true;
- }
- else if (valueString == "table-row") {
- mTableRow = true;
- }
- else if (valueString == "table-cell") {
- mTableCell = true;
- }
- }
- else if (propertyName == "font-size") {
- CSSPrimitiveValuePtr primitiveValue = shared_static_cast<CSSPrimitiveValue>(value);
if (primitiveValue.get()) {
if (primitiveValue->getPrimitiveType() == CSSPrimitiveValue::CSS_EMS) {
float floatValue = primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_EMS);
@@ -396,7 +465,7 @@
unsigned int end = 0;
box.getRange(start, end);
BRect rect = box.getRect();
- // printf("Drawing string: %s for %u at %f and %f\n", (text.c_str()) + start, end - start, rect.left, rect.top);
+ //printf("Drawing string: %s for %u at %f and %f\n", (text.c_str()) + start, end - start + 1, rect.left, rect.top + mLineHeight - mBottomMargin);
drawPoint.Set(rect.left, rect.top + mLineHeight - mBottomMargin);
mBaseView->SetFont(mFont);
mBaseView->DrawString((text.c_str()) + start, end - start + 1, drawPoint);
@@ -414,13 +483,11 @@
mBaseView->StrokeRect(mRect);
mBaseView->SetPenSize(savedPenSize);
}
-
unsigned int length = mChildren.size();
for (unsigned int i = 0; i < length; i++) {
mChildren[i]->Draw();
}
}
-
}
bool CSSView :: Contains(BPoint aPoint) {
Modified: trunk/themis/modules/CSSRenderer/CSSView.hpp
===================================================================
--- trunk/themis/modules/CSSRenderer/CSSView.hpp 2012-01-03 19:55:48 UTC (rev 672)
+++ trunk/themis/modules/CSSRenderer/CSSView.hpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -84,11 +84,6 @@
float mSpaceWidth;
BFont * mFont;
bool mInheritedFont;
- bool mDisplay;
- bool mBlock;
- bool mTable;
- bool mTableRow;
- bool mTableCell;
float mMarginBottom;
float mMarginRight;
bool mClickable;
@@ -105,12 +100,20 @@
void RetrieveLink(bool aVisible = true);
protected:
- void ApplyStyle(const TElementPtr aElement);
+ bool mDisplay;
+ bool mBlock;
+ bool mTable;
+ bool mTableRow;
+ bool mTableCell;
+
+ void ApplyStyle(const TElementPtr aElement,
+ const CSSStyleDeclarationPtr aStyle);
public:
CSSView(CSSRendererView * aBaseView,
TNodePtr aNode,
CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
BRect aRect,
int32 aSiteId,
int32 aUrlId,
Added: trunk/themis/modules/CSSRenderer/InlineDisplayView.cpp
===================================================================
--- trunk/themis/modules/CSSRenderer/InlineDisplayView.cpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/InlineDisplayView.cpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2011 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: November 28, 2011
+*/
+
+/* InlineDisplayView implementation
+ See InlineDisplayView.hpp for more information
+
+*/
+
+// Standard C headers
+#include <stdio.h>
+
+// CSS Renderer headers
+#include "InlineDisplayView.hpp"
+
+InlineDisplayView :: InlineDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont)
+ : CSSView(aBaseView,
+ aNode,
+ aStyleSheets,
+ aStyle,
+ aRect,
+ aSiteId,
+ aUrlId,
+ aColor,
+ aFont) {
+
+ mDisplay = true;
+ mBlock = false;
+ mTable = false;
+ mTableRow = false;
+ mTableCell = false;
+
+}
+
+InlineDisplayView :: ~InlineDisplayView() {
+
+}
+
+void InlineDisplayView :: Layout(BRect aRect,
+ BPoint aStartingPoint) {
+
+ CSSView::Layout(aRect, aStartingPoint);
+
+}
Added: trunk/themis/modules/CSSRenderer/InlineDisplayView.hpp
===================================================================
--- trunk/themis/modules/CSSRenderer/InlineDisplayView.hpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/InlineDisplayView.hpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,88 @@
+/*
+ Copyright (c) 2011 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: November 28, 2011
+*/
+
+/* InlineDisplayView
+ Renders css inline display elements
+
+ Mark Hellegers (ma...@fi...)
+ 28-11-2011
+
+*/
+
+#ifndef INLINEDISPLAYVIEW_HPP
+#define INLINEDISPLAYVIEW_HPP
+
+// Standard C++ headers
+#include <vector>
+#include <string>
+
+// BeOS headers
+#include <Handler.h>
+#include <Rect.h>
+#include <Point.h>
+
+// DOM headers
+#include "DOMSupport.h"
+
+// DOM Style headers
+#include "CSSStyleSheet.hpp"
+#include "CSSStyleDeclaration.hpp"
+
+// CSSRenderer headers
+#include "CSSView.hpp"
+#include "TextBox.hpp"
+
+// Declarations used
+class BFont;
+class CSSRendererView;
+class CSSStyleContainer;
+
+// Namespaces used
+using std::vector;
+using std::string;
+
+class InlineDisplayView : public CSSView {
+
+ public:
+ InlineDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont = NULL);
+ ~InlineDisplayView();
+ virtual void Layout(BRect aRect,
+ BPoint aStartingPoint);
+};
+
+#endif
Added: trunk/themis/modules/CSSRenderer/NoneDisplayView.cpp
===================================================================
--- trunk/themis/modules/CSSRenderer/NoneDisplayView.cpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/NoneDisplayView.cpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2012 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: Februari 12, 2012
+*/
+
+/* NoneDisplayView implementation
+ See NoneDisplayView.hpp for more information
+
+*/
+
+// Standard C headers
+#include <stdio.h>
+
+// CSS Renderer headers
+#include "NoneDisplayView.hpp"
+
+NoneDisplayView :: NoneDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont)
+ : CSSView(aBaseView,
+ aNode,
+ aStyleSheets,
+ aStyle,
+ aRect,
+ aSiteId,
+ aUrlId,
+ aColor,
+ aFont) {
+
+ mDisplay = false;
+ mBlock = false;
+ mTable = false;
+ mTableRow = false;
+ mTableCell = false;
+
+}
+
+NoneDisplayView :: ~NoneDisplayView() {
+
+}
+
+void NoneDisplayView :: Layout(BRect aRect,
+ BPoint aStartingPoint) {
+
+ CSSView::Layout(aRect, aStartingPoint);
+
+}
Added: trunk/themis/modules/CSSRenderer/NoneDisplayView.hpp
===================================================================
--- trunk/themis/modules/CSSRenderer/NoneDisplayView.hpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/NoneDisplayView.hpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,88 @@
+/*
+ Copyright (c) 2012 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: Februari 12, 2012
+*/
+
+/* NoneDisplayView
+ "Renders" css display elements that are set to none
+
+ Mark Hellegers (ma...@fi...)
+ 12-02-2012
+
+*/
+
+#ifndef NONEDISPLAYVIEW_HPP
+#define NONEDISPLAYVIEW_HPP
+
+// Standard C++ headers
+#include <vector>
+#include <string>
+
+// BeOS headers
+#include <Handler.h>
+#include <Rect.h>
+#include <Point.h>
+
+// DOM headers
+#include "DOMSupport.h"
+
+// DOM Style headers
+#include "CSSStyleSheet.hpp"
+#include "CSSStyleDeclaration.hpp"
+
+// CSSRenderer headers
+#include "CSSView.hpp"
+#include "TextBox.hpp"
+
+// Declarations used
+class BFont;
+class CSSRendererView;
+class CSSStyleContainer;
+
+// Namespaces used
+using std::vector;
+using std::string;
+
+class NoneDisplayView : public CSSView {
+
+ public:
+ NoneDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont = NULL);
+ ~NoneDisplayView();
+ virtual void Layout(BRect aRect,
+ BPoint aStartingPoint);
+};
+
+#endif
Added: trunk/themis/modules/CSSRenderer/TableCellDisplayView.cpp
===================================================================
--- trunk/themis/modules/CSSRenderer/TableCellDisplayView.cpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/TableCellDisplayView.cpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2012 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: Februari 23, 2012
+*/
+
+/* TableCellDisplayView implementation
+ See TableCellDisplayView.hpp for more information
+
+*/
+
+// Standard C headers
+#include <stdio.h>
+
+// CSS Renderer headers
+#include "TableCellDisplayView.hpp"
+
+TableCellDisplayView :: TableCellDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont)
+ : CSSView(aBaseView,
+ aNode,
+ aStyleSheets,
+ aStyle,
+ aRect,
+ aSiteId,
+ aUrlId,
+ aColor,
+ aFont) {
+
+ mDisplay = true;
+ mBlock = false;
+ mTable = false;
+ mTableRow = false;
+ mTableCell = true;
+
+}
+
+TableCellDisplayView :: ~TableCellDisplayView() {
+
+}
+
+void TableCellDisplayView :: Layout(BRect aRect,
+ BPoint aStartingPoint) {
+
+ CSSView::Layout(aRect, aStartingPoint);
+
+}
Added: trunk/themis/modules/CSSRenderer/TableCellDisplayView.hpp
===================================================================
--- trunk/themis/modules/CSSRenderer/TableCellDisplayView.hpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/TableCellDisplayView.hpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,88 @@
+/*
+ Copyright (c) 2012 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: Februari 23, 2012
+*/
+
+/* TableCellDisplayView
+ Renders css table-cell display elements
+
+ Mark Hellegers (ma...@fi...)
+ 23-02-2012
+
+*/
+
+#ifndef TABLECELLDISPLAYVIEW_HPP
+#define TABLECELLDISPLAYVIEW_HPP
+
+// Standard C++ headers
+#include <vector>
+#include <string>
+
+// BeOS headers
+#include <Handler.h>
+#include <Rect.h>
+#include <Point.h>
+
+// DOM headers
+#include "DOMSupport.h"
+
+// DOM Style headers
+#include "CSSStyleSheet.hpp"
+#include "CSSStyleDeclaration.hpp"
+
+// CSSRenderer headers
+#include "CSSView.hpp"
+#include "TextBox.hpp"
+
+// Declarations used
+class BFont;
+class CSSRendererView;
+class CSSStyleContainer;
+
+// Namespaces used
+using std::vector;
+using std::string;
+
+class TableCellDisplayView : public CSSView {
+
+ public:
+ TableCellDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont = NULL);
+ ~TableCellDisplayView();
+ virtual void Layout(BRect aRect,
+ BPoint aStartingPoint);
+};
+
+#endif
Added: trunk/themis/modules/CSSRenderer/TableDisplayView.cpp
===================================================================
--- trunk/themis/modules/CSSRenderer/TableDisplayView.cpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/TableDisplayView.cpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2012 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: Februari 23, 2012
+*/
+
+/* TableDisplayView implementation
+ See TableDisplayView.hpp for more information
+
+*/
+
+// Standard C headers
+#include <stdio.h>
+
+// CSS Renderer headers
+#include "TableDisplayView.hpp"
+
+TableDisplayView :: TableDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont)
+ : CSSView(aBaseView,
+ aNode,
+ aStyleSheets,
+ aStyle,
+ aRect,
+ aSiteId,
+ aUrlId,
+ aColor,
+ aFont) {
+
+ mDisplay = true;
+ mBlock = false;
+ mTable = true;
+ mTableRow = false;
+ mTableCell = false;
+
+}
+
+TableDisplayView :: ~TableDisplayView() {
+
+}
+
+void TableDisplayView :: Layout(BRect aRect,
+ BPoint aStartingPoint) {
+
+ CSSView::Layout(aRect, aStartingPoint);
+
+}
Added: trunk/themis/modules/CSSRenderer/TableDisplayView.hpp
===================================================================
--- trunk/themis/modules/CSSRenderer/TableDisplayView.hpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/TableDisplayView.hpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,88 @@
+/*
+ Copyright (c) 2012 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: Februari 23, 2012
+*/
+
+/* TableDisplayView
+ Renders css table display elements
+
+ Mark Hellegers (ma...@fi...)
+ 23-02-2012
+
+*/
+
+#ifndef TABLEDISPLAYVIEW_HPP
+#define TABLEDISPLAYVIEW_HPP
+
+// Standard C++ headers
+#include <vector>
+#include <string>
+
+// BeOS headers
+#include <Handler.h>
+#include <Rect.h>
+#include <Point.h>
+
+// DOM headers
+#include "DOMSupport.h"
+
+// DOM Style headers
+#include "CSSStyleSheet.hpp"
+#include "CSSStyleDeclaration.hpp"
+
+// CSSRenderer headers
+#include "CSSView.hpp"
+#include "TextBox.hpp"
+
+// Declarations used
+class BFont;
+class CSSRendererView;
+class CSSStyleContainer;
+
+// Namespaces used
+using std::vector;
+using std::string;
+
+class TableDisplayView : public CSSView {
+
+ public:
+ TableDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont = NULL);
+ ~TableDisplayView();
+ virtual void Layout(BRect aRect,
+ BPoint aStartingPoint);
+};
+
+#endif
Added: trunk/themis/modules/CSSRenderer/TableRowDisplayView.cpp
===================================================================
--- trunk/themis/modules/CSSRenderer/TableRowDisplayView.cpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/TableRowDisplayView.cpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2012 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: Februari 23, 2012
+*/
+
+/* TableRowDisplayView implementation
+ See TableRowDisplayView.hpp for more information
+
+*/
+
+// Standard C headers
+#include <stdio.h>
+
+// CSS Renderer headers
+#include "TableRowDisplayView.hpp"
+
+TableRowDisplayView :: TableRowDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont)
+ : CSSView(aBaseView,
+ aNode,
+ aStyleSheets,
+ aStyle,
+ aRect,
+ aSiteId,
+ aUrlId,
+ aColor,
+ aFont) {
+
+ mDisplay = true;
+ mBlock = false;
+ mTable = false;
+ mTableRow = true;
+ mTableCell = false;
+
+}
+
+TableRowDisplayView :: ~TableRowDisplayView() {
+
+}
+
+void TableRowDisplayView :: Layout(BRect aRect,
+ BPoint aStartingPoint) {
+
+ CSSView::Layout(aRect, aStartingPoint);
+
+}
Added: trunk/themis/modules/CSSRenderer/TableRowDisplayView.hpp
===================================================================
--- trunk/themis/modules/CSSRenderer/TableRowDisplayView.hpp (rev 0)
+++ trunk/themis/modules/CSSRenderer/TableRowDisplayView.hpp 2012-02-22 23:40:32 UTC (rev 673)
@@ -0,0 +1,88 @@
+/*
+ Copyright (c) 2012 Mark Hellegers. All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice
+ shall be included in all copies or substantial portions
+ of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Original Author: Mark Hellegers (ma...@fi...)
+ Project Start Date: October 18, 2000
+ Class Start Date: Februari 23, 2012
+*/
+
+/* TableRowDisplayView
+ Renders css table-row display elements
+
+ Mark Hellegers (ma...@fi...)
+ 23-02-2012
+
+*/
+
+#ifndef TABLEROWDISPLAYVIEW_HPP
+#define TABLEROWDISPLAYVIEW_HPP
+
+// Standard C++ headers
+#include <vector>
+#include <string>
+
+// BeOS headers
+#include <Handler.h>
+#include <Rect.h>
+#include <Point.h>
+
+// DOM headers
+#include "DOMSupport.h"
+
+// DOM Style headers
+#include "CSSStyleSheet.hpp"
+#include "CSSStyleDeclaration.hpp"
+
+// CSSRenderer headers
+#include "CSSView.hpp"
+#include "TextBox.hpp"
+
+// Declarations used
+class BFont;
+class CSSRendererView;
+class CSSStyleContainer;
+
+// Namespaces used
+using std::vector;
+using std::string;
+
+class TableRowDisplayView : public CSSView {
+
+ public:
+ TableRowDisplayView(CSSRendererView * aBaseView,
+ TNodePtr aNode,
+ CSSStyleContainer * aStyleSheets,
+ CSSStyleDeclarationPtr aStyle,
+ BRect aRect,
+ int32 aSiteId,
+ int32 aUrlId,
+ rgb_color aColor,
+ BFont * aFont = NULL);
+ ~TableRowDisplayView();
+ virtual void Layout(BRect aRect,
+ BPoint aStartingPoint);
+};
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|