mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Several HTML widgets fixes.
This commit is contained in:
@@ -230,10 +230,10 @@ enum class PropertyId : Uint32 {
|
||||
DisplayOptions = String::hash( "display-options" ),
|
||||
MenuWidthMode = String::hash( "menu-width-mode" ),
|
||||
ExpandText = String::hash( "expand-text" ),
|
||||
Colspan = String::hash( "colspan" ),
|
||||
ColSpan = String::hash( "colspan" ),
|
||||
TableLayout = String::hash( "table-layout" ),
|
||||
Cellpadding = String::hash( "cellpadding" ),
|
||||
Cellspacing = String::hash( "cellspacing" ),
|
||||
CellPadding = String::hash( "cellpadding" ),
|
||||
CellSpacing = String::hash( "cellspacing" ),
|
||||
Size = String::hash( "size" ),
|
||||
Type = String::hash( "type" ),
|
||||
Rows = String::hash( "rows" ),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef EE_UI_TABLELAYOUTER_HPP
|
||||
#define EE_UI_TABLELAYOUTER_HPP
|
||||
|
||||
#include <eepp/ui/uilayouter.hpp>
|
||||
#include <eepp/core/small_vector.hpp>
|
||||
#include <eepp/ui/uilayouter.hpp>
|
||||
|
||||
namespace EE { namespace UI {
|
||||
|
||||
@@ -17,17 +17,25 @@ enum class TableLayout { Auto, Fixed };
|
||||
class EE_API TableLayouter : public UILayouter {
|
||||
public:
|
||||
TableLayouter( UIWidget* container ) : UILayouter( container ) {}
|
||||
|
||||
void updateLayout() override;
|
||||
|
||||
void computeIntrinsicWidths() override;
|
||||
|
||||
void setTableLayout( TableLayout layout );
|
||||
|
||||
TableLayout getTableLayout() const;
|
||||
void setCellpadding( Float padding );
|
||||
Float getCellpadding() const;
|
||||
void setCellspacing( Float spacing );
|
||||
Float getCellspacing() const;
|
||||
|
||||
void setCellPadding( Float padding );
|
||||
|
||||
Float getCellPadding() const;
|
||||
|
||||
void setCellSpacing( Float spacing );
|
||||
|
||||
Float getCellSpacing() const;
|
||||
|
||||
Float getMinIntrinsicWidth() override;
|
||||
|
||||
Float getMaxIntrinsicWidth() override;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -22,6 +22,11 @@ class EE_API UIHTMLTable : public UIHTMLWidget {
|
||||
|
||||
virtual Float getMaxIntrinsicWidth() const;
|
||||
|
||||
virtual std::vector<PropertyId> getPropertiesImplemented() const;
|
||||
|
||||
virtual std::string getPropertyString( const PropertyDefinition* propertyDef,
|
||||
const Uint32& state = 0 ) const;
|
||||
|
||||
virtual bool applyProperty( const StyleSheetProperty& attribute );
|
||||
|
||||
protected:
|
||||
@@ -43,14 +48,19 @@ class EE_API UIHTMLTableCell : public UIRichText {
|
||||
|
||||
virtual bool isType( const Uint32& type ) const;
|
||||
|
||||
virtual std::vector<PropertyId> getPropertiesImplemented() const;
|
||||
|
||||
virtual std::string getPropertyString( const PropertyDefinition* propertyDef,
|
||||
const Uint32& state = 0 ) const;
|
||||
|
||||
virtual bool applyProperty( const StyleSheetProperty& attribute );
|
||||
|
||||
Uint32 getColspan() const;
|
||||
Uint32 getColSpan() const;
|
||||
|
||||
virtual void onSizeChange();
|
||||
|
||||
protected:
|
||||
Uint32 mColspan{ 1 };
|
||||
Uint32 mColSpan{ 1 };
|
||||
};
|
||||
|
||||
class EE_API UIHTMLTableRow : public UIHTMLWidget {
|
||||
|
||||
@@ -42,8 +42,11 @@ class EE_API UIHTMLWidget : public UILayout {
|
||||
int getZIndex() const { return mZIndex; }
|
||||
void setZIndex( int zIndex );
|
||||
|
||||
virtual std::vector<PropertyId> getPropertiesImplemented() const;
|
||||
|
||||
virtual std::string getPropertyString( const PropertyDefinition* propertyDef,
|
||||
const Uint32& state = 0 ) const;
|
||||
|
||||
virtual bool applyProperty( const StyleSheetProperty& attribute );
|
||||
|
||||
virtual void updateLayout();
|
||||
|
||||
Reference in New Issue
Block a user