1// Aseprite
2// Copyright (C) 2022 Igara Studio S.A.
3//
4// This program is distributed under the terms of
5// the End-User License Agreement for Aseprite.
6
7#ifndef APP_UI_FILE_SELECTOR_H_INCLUDED
8#define APP_UI_FILE_SELECTOR_H_INCLUDED
9#pragma once
10
11#include "app/pref/preferences.h"
12#include "obs/connection.h"
13#include "ui/box.h"
14#include "ui/combobox.h"
15#include "ui/label.h"
16
17namespace app {
18
19class SamplingSelector : public ui::HBox {
20public:
21 enum class Behavior {
22 ChangeOnRealTime,
23 ChangeOnSave
24 };
25
26 SamplingSelector(Behavior behavior = Behavior::ChangeOnRealTime);
27
28 void save();
29
30private:
31 void onPreferenceChange();
32
33 Behavior m_behavior;
34 ui::Label m_downsamplingLabel;
35 ui::ComboBox m_downsampling;
36 obs::scoped_connection m_samplingChangeConn;
37};
38
39} // namespace app
40
41#endif
42