diff --git a/WebWidgets/ExtJS/samples/samples_vs90.sln b/WebWidgets/ExtJS/samples/samples_vs90.sln index e5f626ff3..e1c9f07a6 100644 --- a/WebWidgets/ExtJS/samples/samples_vs90.sln +++ b/WebWidgets/ExtJS/samples/samples_vs90.sln @@ -2,6 +2,8 @@ Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Server_VS90", "Server\Server_vs90.vcproj", "{B0FFA5DF-1420-460F-8E87-E4DEBE801A05}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Picross_VS90", "Picross\Picross_VS90.vcproj", "{0D0ED3CF-2841-412A-A9AC-F07F9E61341C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution debug_shared|Win32 = debug_shared|Win32 @@ -18,6 +20,14 @@ Global {B0FFA5DF-1420-460F-8E87-E4DEBE801A05}.release_shared|Win32.Build.0 = release_shared|Win32 {B0FFA5DF-1420-460F-8E87-E4DEBE801A05}.release_static|Win32.ActiveCfg = release_static|Win32 {B0FFA5DF-1420-460F-8E87-E4DEBE801A05}.release_static|Win32.Build.0 = release_static|Win32 + {0D0ED3CF-2841-412A-A9AC-F07F9E61341C}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 + {0D0ED3CF-2841-412A-A9AC-F07F9E61341C}.debug_shared|Win32.Build.0 = debug_shared|Win32 + {0D0ED3CF-2841-412A-A9AC-F07F9E61341C}.debug_static|Win32.ActiveCfg = debug_shared|Win32 + {0D0ED3CF-2841-412A-A9AC-F07F9E61341C}.debug_static|Win32.Build.0 = debug_shared|Win32 + {0D0ED3CF-2841-412A-A9AC-F07F9E61341C}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {0D0ED3CF-2841-412A-A9AC-F07F9E61341C}.release_shared|Win32.Build.0 = release_shared|Win32 + {0D0ED3CF-2841-412A-A9AC-F07F9E61341C}.release_static|Win32.ActiveCfg = release_shared|Win32 + {0D0ED3CF-2841-412A-A9AC-F07F9E61341C}.release_static|Win32.Build.0 = release_shared|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WebWidgets/ExtJS/src/TableRenderer.cpp b/WebWidgets/ExtJS/src/TableRenderer.cpp index 2040a4533..73951ee60 100644 --- a/WebWidgets/ExtJS/src/TableRenderer.cpp +++ b/WebWidgets/ExtJS/src/TableRenderer.cpp @@ -361,6 +361,10 @@ void TableRenderer::renderProperties(const Table* pTable, const RenderContext& c if ((*it) && (*it)->getCell()) editable |= (*it)->isEditable(); } + if (!pTable->showBorder()) + ostr << ",border:false, bodyBorder:false"; + if (pTable->hideHeaders()) + ostr << ",hideHeaders:true"; ostr << ",listeners:{"; bool written = false; if (editable) @@ -572,8 +576,11 @@ void TableRenderer::renderColumn(const Table* pTable, const TableColumn& tc, int // {header: "Last updated", width: 135, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'} ostr << "{"; std::string hdr(Utility::safe(tc.getHeader())); - - ostr << "header:'" << hdr << "',dataIndex:'" << idx << "'"; + ostr << "dataIndex:'" << idx << "'"; + if (!tc.resizable()) + ostr << ",resizable:false"; + if (!hdr.empty()) + ostr << ",header:'" << hdr << "'"; if (tc.getWidth() > 0) ostr << ",width:" << tc.getWidth(); diff --git a/WebWidgets/include/Poco/WebWidgets/Frame.h b/WebWidgets/include/Poco/WebWidgets/Frame.h index d7077597b..8304bcefc 100644 --- a/WebWidgets/include/Poco/WebWidgets/Frame.h +++ b/WebWidgets/include/Poco/WebWidgets/Frame.h @@ -103,10 +103,6 @@ public: bool collapsed() const; /// Returns how the Frame should be rendered initially - - void showBorder(bool show); - - bool showBorder() const; protected: Frame(const std::type_info& type); @@ -129,7 +125,6 @@ private: std::string _title; bool _collapsible; bool _collapsed; - bool _showBorder; }; @@ -191,18 +186,6 @@ inline bool Frame::collapsed() const } -inline void Frame::showBorder(bool show) -{ - _showBorder = show; -} - - -inline bool Frame::showBorder() const -{ - return _showBorder; -} - - } } // namespace Poco::WebWidgets diff --git a/WebWidgets/include/Poco/WebWidgets/Panel.h b/WebWidgets/include/Poco/WebWidgets/Panel.h index 039e121ee..6e9b11978 100644 --- a/WebWidgets/include/Poco/WebWidgets/Panel.h +++ b/WebWidgets/include/Poco/WebWidgets/Panel.h @@ -115,10 +115,6 @@ public: bool enabled() const; - void showBorder(bool show); - - bool showBorder() const; - protected: ~Panel(); /// Destroys the Panel. @@ -130,7 +126,6 @@ private: bool _showCloseIcon; bool _showHeader; bool _enabled; - bool _showBorder; }; @@ -216,18 +211,6 @@ inline bool Panel::enabled() const } -inline void Panel::showBorder(bool show) -{ - _showBorder = show; -} - - -inline bool Panel::showBorder() const -{ - return _showBorder; -} - - } } // namespace Poco::WebWidgets diff --git a/WebWidgets/include/Poco/WebWidgets/Table.h b/WebWidgets/include/Poco/WebWidgets/Table.h index dec8643d2..2c6e513fb 100644 --- a/WebWidgets/include/Poco/WebWidgets/Table.h +++ b/WebWidgets/include/Poco/WebWidgets/Table.h @@ -217,6 +217,11 @@ public: bool serializeJSON(std::ostream& out, const std::string& name); SortedTableModel::Ptr getSortedModel(std::size_t col, bool sortAscending) const; + + void hideHeaders(bool val); + // hides the top headers + + bool hideHeaders() const; protected: Table(const std::string& name, const std::type_info& type, const TableColumns& tc, TableModel::Ptr pModel); @@ -238,6 +243,7 @@ private: SelectionModel _sm; bool _dragAndDrop; bool _autoEdit; + bool _hideHeaders; int _maxRowsPerPage; }; @@ -338,6 +344,18 @@ inline bool Table::autoEdit() const } +inline void Table::hideHeaders(bool val) +{ + _hideHeaders = val; +} + + +inline bool Table::hideHeaders() const +{ + return _hideHeaders; +} + + } } // namespace Poco::WebWidgets diff --git a/WebWidgets/include/Poco/WebWidgets/TableColumn.h b/WebWidgets/include/Poco/WebWidgets/TableColumn.h index 4b1ca532e..67f13e91a 100644 --- a/WebWidgets/include/Poco/WebWidgets/TableColumn.h +++ b/WebWidgets/include/Poco/WebWidgets/TableColumn.h @@ -109,6 +109,12 @@ public: bool isHidden() const; /// Returns the hidden status of the TableColumn + void resizable(bool val); + /// Sets if th ecolumn is resizable + + bool resizable() const; + /// Returns if the column is resizable + protected: virtual ~TableColumn(); /// Destroys the TableColumn. @@ -117,6 +123,7 @@ private: Cell::Ptr _pCell; bool _sortable; bool _hidden; + bool _resizable; std::string _header; std::string _customRenderer; }; @@ -215,7 +222,19 @@ inline bool TableColumn::isHidden() const { return _hidden; } - + + +inline void TableColumn::resizable(bool val) +{ + _resizable = val; +} + + +inline bool TableColumn::resizable() const +{ + return _resizable; +} + } } // namespace Poco::WebWidgets diff --git a/WebWidgets/include/Poco/WebWidgets/View.h b/WebWidgets/include/Poco/WebWidgets/View.h index e5fe5f272..60c89fcb5 100644 --- a/WebWidgets/include/Poco/WebWidgets/View.h +++ b/WebWidgets/include/Poco/WebWidgets/View.h @@ -170,7 +170,13 @@ public: /// Returns css class bool hasClass() const; - /// Checks if a css value is set + /// Checks if a css value is set + + void showBorder(bool show); + /// Show the border around the view + + bool showBorder() const; + /// Returns if view border is shown protected: View(const std::string& name, const std::type_info& type); @@ -203,6 +209,7 @@ private: std::string _name; View* _pParent; bool _visible; + bool _showBorder; Poco::UInt32 _width; Poco::UInt32 _height; Pos _pos; @@ -325,6 +332,17 @@ inline bool View::hasClass() const } +inline void View::showBorder(bool show) +{ + _showBorder = show; +} + + +inline bool View::showBorder() const +{ + return _showBorder; +} + } } // namespace Poco::WebWidgets diff --git a/WebWidgets/src/Frame.cpp b/WebWidgets/src/Frame.cpp index 1d4495752..1fd34770b 100644 --- a/WebWidgets/src/Frame.cpp +++ b/WebWidgets/src/Frame.cpp @@ -46,8 +46,7 @@ Frame::Frame(): _pChild(), _title(), _collapsible(false), - _collapsed(false), - _showBorder(true) + _collapsed(false) { } @@ -57,8 +56,7 @@ Frame::Frame(const std::string& name): _pChild(), _title(), _collapsible(false), - _collapsed(false), - _showBorder(true) + _collapsed(false) { } @@ -68,8 +66,7 @@ Frame::Frame(const std::string& name, const std::string& title): _pChild(), _title(title), _collapsible(false), - _collapsed(false), - _showBorder(true) + _collapsed(false) { } @@ -79,8 +76,7 @@ Frame::Frame(View::Ptr pChild): _pChild(), _title(), _collapsible(false), - _collapsed(false), - _showBorder(true) + _collapsed(false) { setChild(pChild); } @@ -91,8 +87,7 @@ Frame::Frame(const std::string& name, View::Ptr pChild): _pChild(), _title(), _collapsible(false), - _collapsed(false), - _showBorder(true) + _collapsed(false) { setChild(pChild); } @@ -103,8 +98,7 @@ Frame::Frame(const std::string& name, const std::string& title, View::Ptr pChild _pChild(), _title(title), _collapsible(false), - _collapsed(false), - _showBorder(true) + _collapsed(false) { setChild(pChild); } @@ -115,8 +109,7 @@ Frame::Frame(const std::type_info& type): _pChild(), _title(), _collapsible(false), - _collapsed(false), - _showBorder(true) + _collapsed(false) { } @@ -126,8 +119,7 @@ Frame::Frame(const std::string& name, const std::type_info& type): _pChild(), _title(), _collapsible(false), - _collapsed(false), - _showBorder(true) + _collapsed(false) { } @@ -137,8 +129,7 @@ Frame::Frame(View::Ptr pChild, const std::type_info& type): _pChild(), _title(), _collapsible(false), - _collapsed(false), - _showBorder(true) + _collapsed(false) { setChild(pChild); } @@ -149,8 +140,7 @@ Frame::Frame(const std::string& name, View::Ptr pChild, const std::type_info& ty _pChild(), _title(), _collapsible(false), - _collapsed(false), - _showBorder(true) + _collapsed(false) { setChild(pChild); } diff --git a/WebWidgets/src/Panel.cpp b/WebWidgets/src/Panel.cpp index 1c24f65d4..105632876 100644 --- a/WebWidgets/src/Panel.cpp +++ b/WebWidgets/src/Panel.cpp @@ -48,8 +48,7 @@ Panel::Panel(): _modal(false), _showCloseIcon(true), _showHeader(true), - _enabled(true), - _showBorder(true) + _enabled(true) { } @@ -61,8 +60,7 @@ Panel::Panel(const std::string& name): _modal(false), _showCloseIcon(true), _showHeader(true), - _enabled(true), - _showBorder(true) + _enabled(true) { } @@ -74,8 +72,7 @@ Panel::Panel(const std::string& name, const std::string& title): _modal(false), _showCloseIcon(true), _showHeader(true), - _enabled(true), - _showBorder(true) + _enabled(true) { } @@ -87,8 +84,7 @@ Panel::Panel(View::Ptr pChild): _modal(false), _showCloseIcon(true), _showHeader(true), - _enabled(true), - _showBorder(true) + _enabled(true) { setChild(pChild); } @@ -101,8 +97,7 @@ Panel::Panel(const std::string& name, View::Ptr pChild): _modal(false), _showCloseIcon(true), _showHeader(true), - _enabled(true), - _showBorder(true) + _enabled(true) { setChild(pChild); } @@ -115,8 +110,7 @@ Panel::Panel(const std::string& name, const std::string& title, View::Ptr pChild _modal(false), _showCloseIcon(true), _showHeader(true), - _enabled(true), - _showBorder(true) + _enabled(true) { setChild(pChild); } diff --git a/WebWidgets/src/Table.cpp b/WebWidgets/src/Table.cpp index 7ac5a6215..b7509ea44 100644 --- a/WebWidgets/src/Table.cpp +++ b/WebWidgets/src/Table.cpp @@ -73,6 +73,7 @@ Table::Table(const TableColumns& tc, TableModel::Ptr pModel): _sm(SM_CELL), _dragAndDrop(false), _autoEdit(false), + _hideHeaders(false), _maxRowsPerPage(0) { checkValidConfig(); @@ -85,6 +86,8 @@ Table::Table(const std::string& name, const TableColumns& tc, TableModel::Ptr pM _columns(tc), _sm(SM_CELL), _dragAndDrop(false), + _autoEdit(false), + _hideHeaders(false), _maxRowsPerPage(0) { checkValidConfig(); @@ -97,6 +100,8 @@ Table::Table(const std::string& name, const std::type_info& type, const TableCol _columns(tc), _sm(SM_CELL), _dragAndDrop(false), + _autoEdit(false), + _hideHeaders(false), _maxRowsPerPage(0) { checkValidConfig(); @@ -109,6 +114,8 @@ Table::Table(const std::type_info& type, const TableColumns& tc, TableModel::Ptr _columns(tc), _sm(SM_CELL), _dragAndDrop(false), + _autoEdit(false), + _hideHeaders(false), _maxRowsPerPage(0) { checkValidConfig(); diff --git a/WebWidgets/src/TableColumn.cpp b/WebWidgets/src/TableColumn.cpp index ead23dcde..87cafb16e 100644 --- a/WebWidgets/src/TableColumn.cpp +++ b/WebWidgets/src/TableColumn.cpp @@ -46,6 +46,7 @@ TableColumn::TableColumn(Cell::Ptr pCellFormat): _pCell(pCellFormat), _sortable(false), _hidden(false), + _resizable(true), _header() { if (_pCell) @@ -58,6 +59,7 @@ TableColumn::TableColumn(Cell::Ptr pCellFormat, const std::string& name, int wid _pCell(pCellFormat), _sortable(sortable), _hidden(false), + _resizable(true), _header(name) { setWidth(width); diff --git a/WebWidgets/src/View.cpp b/WebWidgets/src/View.cpp index 6b3793c3f..0271932e5 100644 --- a/WebWidgets/src/View.cpp +++ b/WebWidgets/src/View.cpp @@ -46,6 +46,7 @@ View::View(const std::string& name, const std::type_info& type): _name(name), _pParent(0), _visible(true), + _showBorder(true), _width(0), _height(0) { @@ -57,6 +58,7 @@ View::View(const std::type_info& type): _name(), _pParent(0), _visible(true), + _showBorder(true), _width(0), _height(0) {