diff --git a/README.md b/README.md index bf12953..412e09e 100644 --- a/README.md +++ b/README.md @@ -18,21 +18,22 @@ This document outlines the coding standards and best practices for the CIGUI lib - Header files: `.hpp` for C++ headers, `.h` for C-compatible headers - Implementation files: `.cpp` - Template implementation files: `.inl` -- File names: lowercase with underscores (e.g., `grid_layout.hpp`) +- File names: PascalCase (e.g., `GridLayout.hpp`) #### Classes and Types - Class names: PascalCase (e.g., `Button`, `GridLayout`) -- Type aliases/typedefs: PascalCase (e.g., `using WidgetPtr = std::shared_ptr`) +- Type aliases/typedefs: lowercase (e.g., `using view_ptr = std::shared_ptr`) - Enum names: PascalCase -- Enum values: PascalCase (e.g., `enum class Alignment { TopLeft, Center, BottomRight }`) +- Enum values: PascalCase/UPPERCASE (e.g., `enum class Alignment { TopLeft, Center, BottomRight }` or `enum class Direction { LEFT, UP, RIGHT, DOWN }`) #### Functions and Variables -- Function names: camelCase (e.g., `getPosition()`, `setVisible()`) +- API function names: camelCase (e.g., `getPosition()`, `setVisible()`) +- Internal function names: lowercase (e.g. `render_view()`, `get_visibility()`) - Variable names: camelCase (e.g., `buttonText`, `isVisible`) -- Member variables: prefix with `m_` (e.g., `m_position`, `m_size`) -- Static variables: prefix with `s_` (e.g., `s_defaultFont`) +- Member variables: prefix with `m_` + UpperCamelCase (e.g., `m_Position`, `m_Size`) +- Static variables: prefix with `s_` + UpperCamelCase (e.g., `s_DefaultFont`) - Constants and macros: ALL_CAPS with underscores (e.g., `MAX_WIDGETS`, `CIGUI_API`) ### Code Structure