mirror of
https://github.com/transmission/transmission
synced 2024-12-23 08:13:27 +00:00
192a76b621
* Move GTK compatibility macros into a separate header * Fix Cairo compatibility checks * Move Glib-namespaced definitions to GtkCompat header * Remove unused stringify definitions since we're using fmtlib
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
// This file Copyright © 2012-2022 Mnemosyne LLC.
|
|
// It may be used under GPLv2 (SPDX: GPL-2.0-only), GPLv3 (SPDX: GPL-3.0-only),
|
|
// or any future license endorsed by Mnemosyne LLC.
|
|
// License text can be found in the licenses/ folder.
|
|
|
|
#pragma once
|
|
|
|
#include "GtkCompat.h"
|
|
|
|
#include <libtransmission/tr-macros.h>
|
|
|
|
#include <giomm/listmodel.h>
|
|
#include <glibmm/extraclassinit.h>
|
|
#include <glibmm/refptr.h>
|
|
#include <gtkmm/box.h>
|
|
#include <gtkmm/builder.h>
|
|
#include <gtkmm/treemodel.h>
|
|
|
|
#include <memory>
|
|
|
|
class Session;
|
|
|
|
class FilterBarExtraInit : public Glib::ExtraClassInit
|
|
{
|
|
public:
|
|
FilterBarExtraInit();
|
|
|
|
private:
|
|
static void class_init(void* klass, void* user_data);
|
|
static void instance_init(GTypeInstance* instance, void* klass);
|
|
};
|
|
|
|
class FilterBar
|
|
: public FilterBarExtraInit
|
|
, public Gtk::Box
|
|
{
|
|
public:
|
|
using Model = IF_GTKMM4(Gio::ListModel, Gtk::TreeModel);
|
|
|
|
public:
|
|
FilterBar();
|
|
FilterBar(BaseObjectType* cast_item, Glib::RefPtr<Gtk::Builder> const& builder, Glib::RefPtr<Session> const& core);
|
|
~FilterBar() override;
|
|
|
|
TR_DISABLE_COPY_MOVE(FilterBar)
|
|
|
|
Glib::RefPtr<Model> get_filter_model() const;
|
|
|
|
private:
|
|
class Impl;
|
|
std::unique_ptr<Impl> const impl_;
|
|
};
|