Add support for embedding bitmap fonts in C++

This commit is contained in:
Simon Hausmann 2023-07-20 14:17:23 +02:00 committed by Simon Hausmann
parent 49b3e15bc8
commit 917cecff85
4 changed files with 141 additions and 8 deletions

View file

@ -261,6 +261,12 @@ public:
}
}
/// Registers a bitmap font for use with the software renderer.
inline void register_bitmap_font(const cbindgen_private::BitmapFont &font)
{
cbindgen_private::slint_register_bitmap_font(&inner, &font);
}
/// \private
const cbindgen_private::WindowAdapterRcOpaque &handle() const { return inner; }
@ -715,12 +721,18 @@ public:
/// \private
/// Internal function called by the view to register itself
void attach_peer(private_api::ModelPeer p) { peers.push_back(std::move(p)); }
void attach_peer(private_api::ModelPeer p)
{
peers.push_back(std::move(p));
}
/// \private
/// Internal function called from within bindings to register with the currently
/// evaluating dependency and get notified when this model's row count changes.
void track_row_count_changes() const { model_row_count_dirty_property.get(); }
void track_row_count_changes() const
{
model_row_count_dirty_property.get();
}
/// \private
/// Internal function called from within bindings to register with the currently