Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Framebuffer "Screen" Abstraction #275

Open
Kfeavel opened this issue Jul 25, 2021 · 2 comments
Open

Create Framebuffer "Screen" Abstraction #275

Kfeavel opened this issue Jul 25, 2021 · 2 comments
Assignees
Labels
enhancement An improvement on a pre-existing code

Comments

@Kfeavel
Copy link
Member

Kfeavel commented Jul 25, 2021

The Screen class should be an abstraction around an area of the framebuffer. It should contain an x and y for the origin (origin is the top left pixel), a width, height, depth (for determining what screens should overlap it), and a pointer to the parent screen in order to determine the positioning of origin relative to the parent.

class Screen {
public:
    // Create all necessary constructors
    Screen(...);
    ~Screen();
private:
    uint32_t m_originX;
    uint32_t m_originY;
    uint32_t m_width;
    uint32_t m_height;
    uint32_t m_depth;
    Screen* m_parent;
};
@Kfeavel Kfeavel added the enhancement An improvement on a pre-existing code label Jul 25, 2021
@Jmallone
Copy link
Contributor

Jmallone commented Aug 4, 2021

I can take that issue :)?

@Jmallone
Copy link
Contributor

Jmallone commented Aug 7, 2021

e.g for use

//hello.cpp
// e.g: a litle window with one label

//Graphics::Screen(X-origin,Y-origin, width, heigh, z-index);
Graphics::Screen(0,0,100,100,1) myScreen;

Gui::Label("Hi, i'm a hello box.") label1;

//myScreen.append(Component_Instance, positionX, position Y );
// This positions is relative with screen position
myScreen.append(label1, 10, 10);

myScreen.draw();

and put in /dev/vga folder

Kfeavel added a commit that referenced this issue Sep 4, 2021
Will be added back once #275 is finished
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement on a pre-existing code
Projects
None yet
Development

No branches or pull requests

2 participants