summaryrefslogtreecommitdiff
path: root/include/ui.hpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-10-26 13:20:40 +0100
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-10-26 13:20:40 +0100
commit5e06ad208e32330b662af90ce41613f5421095cb (patch)
tree176e59c9a1e3c650c20d5be240a6c84291535a8c /include/ui.hpp
parent5abb2cbd8f201b8a8101a661f1dd9a68412d8674 (diff)
ui refactors
Diffstat (limited to 'include/ui.hpp')
-rw-r--r--include/ui.hpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/include/ui.hpp b/include/ui.hpp
index 68b1aa4..88a88ec 100644
--- a/include/ui.hpp
+++ b/include/ui.hpp
@@ -97,21 +97,24 @@ namespace ui {
}
-// Custom imgui widgets.
namespace ImGui
{
+ bool WarningIcon(float radius);
+
void InputTextWithError(const char* text, char* buffer, size_t buf_size, bool has_error);
- int TextInputWithAutocomplete(const char* hint, char* buffer, size_t buf_size, char** suggestions, int suggestion_count, bool has_error);
-
- bool FormInvoiceFileSelector(char* text, char* buffer);
- void FormContactAutocomplete(contact* buffer, bool has_error);
- void FormInputTextWithErrorHint(const char* hint, char* buffer, size_t buf_size, bool has_error);
- void FormCountryCombo(char* buffer, size_t buf_size, bool activated_only = false);
- void FormContactTypeCombo(contact_type* type);
- void FormCostCenterCombo(char* costcenter_id);
- void FormProjectCombo(char* project_id);
- void FormTaxRateCombo(char* tax_internal_code, bool outgoing, bool has_error);
- bool FormCurrencyCombo(char* currency);
- void FormToggleCombo(bool *buffer, char* option1, char* option2);
- bool DrawWarningIcon(float radius);
+ int InputTextWithAutocomplete(const char* hint, char* buffer, size_t buf_size, char** suggestions, int suggestion_count, bool has_error);
+ void InputTextWithErrorHint(const char* hint, char* buffer, size_t buf_size, bool has_error);
+
+ bool FileSelect(char* text, char* buffer);
+ void ContactForm(contact* buffer, bool viewing_only = false, bool with_autocomplete = false, bool active_countries_only = false);
+ void DeliveryInfoForm(delivery_info* buffer, bool viewing_only = false);
+ void AddressForm(address* buffer, a_err last_err, bool active_countries_only = false);
+
+ void CountryDropdown(char* buffer, size_t buf_size, bool activated_only = false);
+ void ContactTypeDropdown(contact_type* type);
+ void CostCenterDropdown(char* costcenter_id);
+ void ProjectDropdown(char* project_id);
+ void TaxRateDropdown(char* tax_internal_code, bool outgoing, bool has_error);
+ bool CurrencyDropdown(char* currency);
+ void ToggleDropdown(bool *buffer, char* option1, char* option2);
} \ No newline at end of file