1 #ifndef __ADDRBAR_H
2 #define __ADDRBAR_H
3 
4 #include "yinputline.h"
5 
6 class IApp;
7 
8 class AddressBar: public YInputLine {
9 public:
10     AddressBar(IApp *app, YWindow *parent = nullptr);
11     virtual ~AddressBar();
12 
13     virtual bool handleKey(const XKeyEvent &key);
14     virtual void handleFocus(const XFocusChangeEvent &focus);
15 
16     void showNow();
17     void hideNow();
18 
19 private:
20     void changeLocation(int newLocation);
21     bool handleReturn(int mask);
22     bool appendCommand(const char* cmd, class YStringArray& args);
23 
24     IApp *app;
25     MStringArray history;
26     int location;
27 };
28 
29 #endif
30 
31 // vim: set sw=4 ts=4 et:
32