File: launcher.h

package info (click to toggle)
literki 0.0.0+20100113.git1da40724-1.2
  • links: PTS, VCS
  • area: main
  • in suites: sid, stretch
  • size: 3,444 kB
  • ctags: 1,153
  • sloc: cpp: 5,263; makefile: 72
file content (37 lines) | stat: -rw-r--r-- 805 bytes parent folder | download | duplicates (2)
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
#ifndef _LAUNCHER_H
#define _LAUNCHER_H

#include <string>

#include "applet.h"

class Launcher : public Applet {
  public:
    Launcher(AppletWindowParams params);
    virtual ~Launcher(){}
    void LoadApps(const std::string& apps_path, const std::string& icons_path);
    void DrawApps();
    void SetAppWidth(int w);
    void SetAppHeight(int h);
    void SetMarginTop(int x);
    void SetMarginBottom(int x);
    void SetMarginSide(int x);
    virtual AppAction OnMousePress(int x, int y);
 
    virtual void OnRotate(Rotation rot);

  private:
    struct App {
	std::string name;
	std::string icon;
	std::string exec;
    };

    int app_width, app_height, margin_top, margin_bottom, margin_side;

    bool LoadDesktopFile(const std::string& path, App& app);

    std::vector<App> apps;
};

#endif