mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 00:58:12 +00:00
LibGUI: Put all classes in the GUI namespace and remove the leading G
This took me a moment. Welcome to the new world of GUI::Widget! :^)
This commit is contained in:
parent
2d39da5405
commit
c5bd9d4ed1
337 changed files with 5400 additions and 4816 deletions
|
@ -29,18 +29,20 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <LibGUI/GAbstractView.h>
|
||||
|
||||
class GColumnsView : public GAbstractView {
|
||||
C_OBJECT(GColumnsView)
|
||||
namespace GUI {
|
||||
|
||||
class ColumnsView : public AbstractView {
|
||||
C_OBJECT(ColumnsView)
|
||||
public:
|
||||
int model_column() const { return m_model_column; }
|
||||
void set_model_column(int column) { m_model_column = column; }
|
||||
|
||||
virtual GModelIndex index_at_event_position(const Point&) const override;
|
||||
virtual ModelIndex index_at_event_position(const Point&) const override;
|
||||
|
||||
private:
|
||||
GColumnsView(GWidget* parent = nullptr);
|
||||
virtual ~GColumnsView();
|
||||
void push_column(GModelIndex& parent_index);
|
||||
ColumnsView(Widget* parent = nullptr);
|
||||
virtual ~ColumnsView();
|
||||
void push_column(ModelIndex& parent_index);
|
||||
void update_column_sizes();
|
||||
|
||||
int item_height() const { return 16; }
|
||||
|
@ -49,12 +51,12 @@ private:
|
|||
int text_padding() const { return 2; }
|
||||
|
||||
virtual void did_update_model() override;
|
||||
virtual void paint_event(GPaintEvent&) override;
|
||||
virtual void mousedown_event(GMouseEvent& event) override;
|
||||
virtual void keydown_event(GKeyEvent& event) override;
|
||||
virtual void paint_event(PaintEvent&) override;
|
||||
virtual void mousedown_event(MouseEvent& event) override;
|
||||
virtual void keydown_event(KeyEvent& event) override;
|
||||
|
||||
struct Column {
|
||||
GModelIndex parent_index;
|
||||
ModelIndex parent_index;
|
||||
int width;
|
||||
// TODO: per-column vertical scroll?
|
||||
};
|
||||
|
@ -62,3 +64,5 @@ private:
|
|||
Vector<Column> m_columns;
|
||||
int m_model_column { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue