Change several methods from pub(crate) to pub (#2051)

* Change several methods from pub(crate) to pub

* document next_auto_id

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
setzer22 2022-09-21 20:08:26 +02:00 committed by GitHub
parent 12dc61ed0f
commit 4aae638e15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -586,11 +586,12 @@ impl Ui {
self.id.with(&id_source)
}
pub(crate) fn next_auto_id(&self) -> Id {
/// This is the `Id` that will be assigned to the next widget added to this `Ui`.
pub fn next_auto_id(&self) -> Id {
Id::new(self.next_auto_id_source)
}
pub(crate) fn auto_id_with<IdSource>(&self, id_source: IdSource) -> Id
pub fn auto_id_with<IdSource>(&self, id_source: IdSource) -> Id
where
IdSource: Hash + std::fmt::Debug,
{

View file

@ -116,7 +116,7 @@ impl Button {
self
}
pub(crate) fn min_size(mut self, min_size: Vec2) -> Self {
pub fn min_size(mut self, min_size: Vec2) -> Self {
self.min_size = min_size;
self
}