module;
#include <print>
#include <string>
#include <string_view>

export module Window;

// Klassendefinition
export class Window
{
    short xPos, yPos;       // Position
    std::string title;      // Titel
public:
    // ctor
    Window(short x, short y, std::string_view _title);
    // copy-ctor
    Window(const Window& source);
    void Draw() const;
};
// Definition der Memberfunktionen
// ctor
Window::Window(short x, short y, std::string_view _title):
    title(_title)
{
    xPos = x; yPos = y; title = _title;
}
// copy-ctor
Window::Window(const Window& source)
{
    xPos = source.xPos; yPos = source.yPos;
    title = source.title;
}
// Ausgabe der Rechteck Daten
void Window::Draw() const
{
    std::println("\tPosition: ({},{}), Titel: {}",
        xPos, yPos, title);
}
