-
Notifications
You must be signed in to change notification settings - Fork 3
/
Ribbon.h
44 lines (36 loc) · 1.07 KB
/
Ribbon.h
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
#pragma once
class TreeView;
#include "FileSystem.h"
#include "FolderView.h"
#include "TextBox.h"
#include "RibbonButton.h"
using namespace std;
class Ribbon:public Control
{
public:
Ribbon(FolderView * fv, const Vector2f & si);
void positionButtons();
void draw(RenderTarget &target, RenderStates states) const override;
virtual Control * handleEvent(Event event, Vector2f mousePos);
void setPath(string path, bool truncateFollowing = false);
void refresh();
virtual ~Ribbon();
virtual FloatRect getGlobalBounds() const;
virtual Control * clone() const;
private:
void onMouseLeftClick(Event::MouseButtonEvent & mouseButton);
void onMouseOver(Event::MouseMoveEvent & mouse);
void onButtonPress(RibbonButton::ButtonType t);
void processInput();
private:
vector<RibbonButton> buttons;
vector<string> paths;
int currentPathIndex;
FolderView * folderView;
FileSystem fs;
TextBox directoryTextBox;
string operationFrom;//for copy and move
/*bool inputInProgress;
string inputString;*/
RibbonButton::ButtonType lastOperation;
};