summaryrefslogtreecommitdiffstats
path: root/ScreenTabsPanel.h
blob: fe1a313c6cfb8501a4e48aea92b44c10f79c87f8 (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
#ifndef HEADER_ScreenTabsPanel
#define HEADER_ScreenTabsPanel
/*
htop - ScreenTabsPanel.h
(C) 2023 htop dev team
Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/

#include "DynamicScreen.h"
#include "ListItem.h"
#include "Object.h"
#include "Panel.h"
#include "ScreensPanel.h"
#include "ScreenManager.h"
#include "Settings.h"


typedef struct ScreenNamesPanel_ {
   Panel super;

   ScreenManager* scr;
   Settings* settings;
   char buffer[SCREEN_NAME_LEN + 1];
   DynamicScreen* ds;
   char* saved;
   int cursor;
   ListItem* renamingItem;
} ScreenNamesPanel;

typedef struct ScreenNameListItem_ {
   ListItem super;
   ScreenSettings* ss;
} ScreenNameListItem;

typedef struct ScreenTabsPanel_ {
   Panel super;

   ScreenManager* scr;
   Settings* settings;
   ScreenNamesPanel* names;
   int cursor;
} ScreenTabsPanel;

typedef struct ScreenTabListItem_ {
   ListItem super;
   DynamicScreen* ds;
} ScreenTabListItem;


ScreenTabsPanel* ScreenTabsPanel_new(Settings* settings);

extern ObjectClass ScreenNameListItem_class;

ScreenNameListItem* ScreenNameListItem_new(const char* value, ScreenSettings* ss);

extern PanelClass ScreenNamesPanel_class;

ScreenNamesPanel* ScreenNamesPanel_new(Settings* settings);

#endif