looper/backends/ui/haiku/prefs.h
Zachary Hall 9899794b81
Some checks failed
Build / build-gentoo (push) Failing after 1m11s
Build / download-system-deps (push) Successful in 3m44s
Build / get-source-code (push) Successful in 13m23s
Build / build-deb (push) Successful in 11m40s
Build / build-appimage (push) Successful in 4m53s
Build / build-android (push) Failing after 3m19s
Build / build-windows (push) Failing after 8m9s
Add cat support
2024-12-21 14:23:00 -08:00

45 lines
1.2 KiB
C++

#pragma once
#include <Window.h>
#include <StringView.h>
#include <GroupLayout.h>
#include <Message.h>
#include <Control.h>
#include <SupportDefs.h>
#include <StringView.h>
#include <RadioButton.h>
#include <Button.h>
#include <OptionPopUp.h>
#include <CheckBox.h>
#include <vector>
#include <string>
#include <map>
#define CMD_SET_CAT 0x1010
class HaikuPrefsWindow : public BWindow {
std::vector<std::string> backend_ids;
std::string cat_id;
bool enable_cat;
std::map<std::string, BBitmap*> cats;
std::map<std::string, BRadioButton*> cat_btns;
BCheckBox *cat_enable;
void AddCat(std:string name, BBitmap* img);
BBitmap *LoadCat(const char *path);
BBitmap *LoadCat(const void *ptr, size_t len, const char *name);
int32 cur_option = 0;
BLooper *next_handler;
BStringView *restart_warning;
std::string new_label_setting;
std::string new_frontend;
BOptionPopUp *frontend_popup;
BCheckBox *menu_icons;
BRadioButton *labels_only;
BRadioButton *icons_only;
BRadioButton *both_labels_icons;
BButton *revert_btn;
BButton *apply_btn;
void update_label_setting();
void set_options_changed(bool changed);
public:
bool QuitRequested() override;
void MessageReceived(BMessage *msg) override;
HaikuPrefsWindow(BLooper *next_handler);
};