Skip to content

Commit

Permalink
cla-73: updated windows code to support ranges (#41)
Browse files Browse the repository at this point in the history
Co-authored-by: Ernesto Bascon <ernesto.bascon@jalasoft.com>
  • Loading branch information
ebasconp and Ernesto Bascon authored Oct 2, 2024
1 parent 67b101d commit 68c1005
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 30 deletions.
58 changes: 31 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,38 @@ Please note that it is currently in an early stage of development.

* **clsn::ui** - library providing componentable UI controls
* `control`
* `clickable_control`
* `button`
* `toggle_control`
* `check_box`
* `radio_button`
* `toggle_button`
* `label`
* `container`
* `mono_container`
* `padding_control`
* `layout_container<Layout>`
* `dual_layout_container` - Container that stores only two elements, one occupying only its preferred size and the other one occupying
the remaining space
* `flow_layout_container` - Container where controls are positioned one next to the other according to a left-right-top-bottom ordering
* `hbox_layout_container` - Container where the controls are rendered horizontally
* `vbox_layout_container` - Container where the controls are rendered vertically
* `xy_layout_container` - Container where the controls are placed in specific coordinates in the given region.
* `dynamic_pane` - Pane able to load and unload dynamically any control
* `empty_control` - Control that only paints its background. Useful to have a custom renderer.
* `ui_manager`
* `ui_skin` - Loadable set of renderers, themes and defaults for the UI controls.
* `ui_theme` - Set of colors and defaults given a theme. A Skin can have registered several themes but only one current.
* `amatista_ui_theme` - Set of specific set of colors
* `light_amatista_ui_theme` - Light theme
* `dark_amatista_ui_theme` - Dark theme
* `window`
* `main_window`
* `empty_control` - Control that does nothing. Useful to have a custom renderer.
* `paintable_control` - Control with background, foreground and font
* `captionable_control`
* `clickable_control`
* `button`
* `toggle_control`
* `check_box`
* `radio_button`
* `toggle_button`
* `label`
* `window`
* `main_window`
* `container`
* `constrained_container<Constraint>` - Container that stores controls with its constraints
* `layout_container<Layout>`
* `dual_layout_container` - Container that stores only two elements, one occupying only its preferred size and the other one occupying
the remaining space
* `flow_layout_container` - Container where controls are positioned one next to the other according to a left-right-top-bottom ordering
* `hbox_layout_container` - Container where the controls are rendered horizontally
* `vbox_layout_container` - Container where the controls are rendered vertically
* `xy_layout_container` - Container where the controls are placed in specific coordinates in the given region.
* `content_pane` - Abstract class that handles layout and events for specific control containers
* `dynamic_content_pane` - Content pane able to load and unload dynamically any control
* `static_content_pane` - Content pane with its child content already bound in compile time
* `padding_control` - Control with a border with variable size
* `graphics` - abstraction to rendering backend
* `ui_manager`
* `ui_skin` - Loadable set of renderers, themes and defaults for the UI controls.
* `ui_theme` - Set of colors and defaults given a theme. A Skin can have registered several themes but only one current.
* `amatista_ui_theme` - Set of specific set of colors
* `light_amatista_ui_theme` - Light theme
* `dark_amatista_ui_theme` - Dark theme

## Supported Platforms
* Linux
Expand Down
6 changes: 3 additions & 3 deletions code/classeine-lib/clsn/ui/container.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <clsn/ui/window.h>

#include <bits/ranges_algo.h>
#include <algorithm>
#include <ranges>

namespace clsn::ui
Expand Down Expand Up @@ -216,12 +216,12 @@ namespace clsn::ui
/// @return The count of visible controls.
auto get_visible_count() const -> int
{
return std::count_if(m_elements.cbegin(), m_elements.cend(),
return static_cast<int>(std::count_if(m_elements.cbegin(), m_elements.cend(),
[this](const ElementType& e) -> bool
{
return to_control(e).is_visible();
}
);
));
}

/// @brief Loads default settings for the container and its controls.
Expand Down

0 comments on commit 68c1005

Please sign in to comment.