34 lines
712 B
C++
34 lines
712 B
C++
//
|
|
// Created by selim on 10.05.2022.
|
|
//
|
|
|
|
#ifndef AUTOCAT_GNOME_ENTRY_H
|
|
#define AUTOCAT_GNOME_ENTRY_H
|
|
|
|
#include "Widget.h"
|
|
#include <string>
|
|
#include <sigc++/sigc++.h>
|
|
|
|
namespace gtkpp {
|
|
|
|
class Entry: public Widget {
|
|
private:
|
|
sigc::signal<void()> _signalChanged;
|
|
|
|
private:
|
|
friend void changedCallback(GtkEntry*, Entry* entry);
|
|
|
|
public:
|
|
Entry();
|
|
void setPlaceholder(const std::string& placeholder);
|
|
void setPurpose(GtkInputPurpose purpose);
|
|
void setVisibility(bool visibility);
|
|
void onChanged(const std::function<void()>& callback);
|
|
int textLength() const;
|
|
std::string text() const;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //AUTOCAT_GNOME_ENTRY_H
|