mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 07:42:43 +00:00 
			
		
		
		
	 65ad6c35f0
			
		
	
	
		65ad6c35f0
		
	
	
	
	
		
			
			Also add some special variants for the table classes, to make it a bit more pleasant to write table code. :^)
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			699 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			699 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <LibHTML/Layout/LayoutBox.h>
 | |
| 
 | |
| class LayoutTableCell;
 | |
| 
 | |
| class LayoutTableRow final : public LayoutBox {
 | |
| public:
 | |
|     LayoutTableRow(const Element&, NonnullRefPtr<StyleProperties>);
 | |
|     virtual ~LayoutTableRow() override;
 | |
| 
 | |
|     virtual void layout() override;
 | |
| 
 | |
|     LayoutTableCell* first_cell();
 | |
|     const LayoutTableCell* first_cell() const;
 | |
| 
 | |
|     LayoutTableRow* next_row();
 | |
|     const LayoutTableRow* next_row() const;
 | |
| 
 | |
| private:
 | |
|     virtual bool is_table_row() const override { return true; }
 | |
|     virtual const char* class_name() const override { return "LayoutTableRow"; }
 | |
| };
 | |
| 
 | |
| template<>
 | |
| inline bool is<LayoutTableRow>(const LayoutNode& node)
 | |
| {
 | |
|     return node.is_table_row();
 | |
| }
 |