Skip to content
Repos

DevPlaceApp

C++ 553 B20 lines Opens in site

Directory Raw Download

#pragma once
// Spec: SPEC.md UX-ICON-01. SF Symbols replaced by Lucide icons (ISC, assets/icons), see MAPPING.md.
#include <string>
#include <unordered_map>

#include "ui/Bitmap.hpp"

namespace dp::ui {

class Icons {
 public:
  // SF Symbol name or Lucide name; resolved through the mapping table. Alpha-only bitmap at `px` pixels.
  static BitmapPtr get(const std::string& name, int px);
  static std::string resolve(const std::string& symbol);

 private:
  static inline std::unordered_map<std::string, BitmapPtr> cache_;
};

}  // namespace dp::ui
34.8ms