aboutsummaryrefslogtreecommitdiff
path: root/lumina-wm-INCOMPLETE/LWindow.h
blob: af5a80546996cd3f011ba071d53ca1928fe3f53d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//===========================================
//  Lumina-DE source code
//  Copyright (c) 2015, Ken Moore
//  Available under the 3-clause BSD license
//  See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_DESKTOP_SCREEN_SAVER_H
#define _LUMINA_DESKTOP_SCREEN_SAVER_H

#include <QFrame>
#include <QLabel>
#include <QToolButton>
#include <QMenu>
#include <QMouseEvent>
#include <QAction>
#include <QPoint>

class LWindow : public QFrame{
	Q_OBJECT
public:
	LWindow(WId client); //MUST have a valid client window
	~LWindow();

	WId clientID();
	bool hasFrame();

private:
	void InitWindow(); //Initialize all  the internal widgets

	//Window status 
	enum ModStatus{Normal, Move, ResizeTop, ResizeTopRight, ResizeRight, ResizeBottomRight, ResizeBottom, ResizeBottomLeft, ResizeLeft, ResizeTopLeft};
	ModStatus activeState;
	//Functions for getting/setting state
	ModStatus getStateAtPoint(QPoint); //generally used for mouse location detection
	void setMouseCursor(ModStatus);  //Update the mouse cursor based on state
	
	//General Properties
	WId CID; //Client ID
	
	//Window Frame Widgets/Items
	QLabel *titleBar, *title, *icon;
	QToolButton *minB, *maxB, *closeB, *otherB;
	QMenu *otherM; //menu of "other" actions for the window

public slots:
	//These slots are generally used for the outside event watcher to 
	void updateAppearance(); //reload the theme and change styling as necessary
	void propertiesChanged();
	void 

private slots:
	void closeClicked();
	void minClicked();
	void maxClicked();
	void otherClicked(QAction*);

protected:
	void mousePressEvent(QMouseEvent*);
	void mouseMoveEvent(QMouseEvent*);
	void mouseReleaseEvent(QMouseEvent*);

signals:


};

#endif
bgstack15