mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
Rename all the LibGUI classes to GClassName.
This commit is contained in:
parent
a026da47e7
commit
b91479d9b9
33 changed files with 623 additions and 581 deletions
49
LibGUI/GWindow.h
Normal file
49
LibGUI/GWindow.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
#pragma once
|
||||
|
||||
#include "GObject.h"
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <AK/AKString.h>
|
||||
|
||||
class GWindow final : public GObject {
|
||||
public:
|
||||
explicit GWindow(int window_id);
|
||||
virtual ~GWindow() override;
|
||||
|
||||
int window_id() const { return m_window_id; }
|
||||
|
||||
String title() const { return m_title; }
|
||||
void set_title(String&&);
|
||||
|
||||
int x() const { return m_rect.x(); }
|
||||
int y() const { return m_rect.y(); }
|
||||
int width() const { return m_rect.width(); }
|
||||
int height() const { return m_rect.height(); }
|
||||
|
||||
const Rect& rect() const { return m_rect; }
|
||||
void set_rect(const Rect&);
|
||||
void set_rect_without_repaint(const Rect& rect) { m_rect = rect; }
|
||||
|
||||
Point position() const { return m_rect.location(); }
|
||||
void set_position_without_repaint(const Point& position) { set_rect_without_repaint({ position.x(), position.y(), width(), height() }); }
|
||||
|
||||
virtual void event(GEvent&) override;
|
||||
|
||||
bool is_being_dragged() const { return m_is_being_dragged; }
|
||||
void set_is_being_dragged(bool b) { m_is_being_dragged = b; }
|
||||
|
||||
bool is_visible() const;
|
||||
|
||||
void close();
|
||||
|
||||
GraphicsBitmap* backing() { return m_backing.ptr(); }
|
||||
|
||||
private:
|
||||
String m_title;
|
||||
Rect m_rect;
|
||||
bool m_is_being_dragged { false };
|
||||
|
||||
RetainPtr<GraphicsBitmap> m_backing;
|
||||
int m_window_id { -1 };
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue