summaryrefslogtreecommitdiff
path: root/Userland/Services/Taskbar/QuickLaunchWidget.h
blob: 6f90c67c2f0521ce25ee8853a5375109652cd58a (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
/*
 * Copyright (c) 2021, Fabian Blatz <fabianblatz@gmail.com>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibConfig/Listener.h>
#include <LibDesktop/AppFile.h>
#include <LibGUI/Button.h>
#include <LibGUI/Frame.h>

namespace Taskbar {

class QuickLaunchWidget : public GUI::Frame
    , public Config::Listener {
    C_OBJECT(QuickLaunchWidget);

public:
    virtual ~QuickLaunchWidget() override;

    virtual void config_key_was_removed(String const&, String const&, String const&) override;
    virtual void config_string_did_change(String const&, String const&, String const&, String const&) override;

    virtual void drop_event(GUI::DropEvent&) override;

private:
    QuickLaunchWidget();
    void add_or_adjust_button(String const&, NonnullRefPtr<Desktop::AppFile>);
    RefPtr<GUI::Menu> m_context_menu;
    RefPtr<GUI::Action> m_context_menu_default_action;
    String m_context_menu_app_name;
};

}