omni.flux.welcome_pad.widget#

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.welcome_pad.widget.delegate.Delegate(word_wrap_description: bool = True)#
build_branch(model, item, column_id, level, expanded)#

Create a branch widget that opens or closes subtree

build_header(column_id)#

Build the header

build_widget(model, item, column_id, level, expanded)#

Create a widget per item

subscribe_widget_built(callback)#

Return the object that will automatically unsubscribe when destroyed.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.welcome_pad.widget.model.Item(idt=None)#

Item of the model

abstract property description#

Description of the item that will be shown

description_override_delegate()#

If use_description_override_delegate is True, this function will be executed to draw the description

Returns:

The created widget

abstract get_image() str#

Image that will be showed on the left

on_description_scrolled_x(x)#

Action that will be called when the description is scrolled on x

on_description_scrolled_y(y)#

Action that will be called when the description is scrolled on y

on_hovered(hovered)#

Action that will be called when the item is hovered on

on_mouse_pressed()#

Action that will be called when the item is clicked on

on_mouse_released()#

Action that will be called when the item is released on

abstract property title#

Title of the item that will be shown

title_override_delegate() Widget#

If use_title_override_delegate is True, this function will be executed to draw the title

Returns:

The created widget

class omni.flux.welcome_pad.widget.model.Model(create_demo_items: bool = True)#

List model

add_items(
items: List[Item],
)#

Add items into the list

enable_items(
items: List[Item],
value,
)#

Enable/disable items

Parameters:
  • items – the list of items to set the value to

  • value – enable or disable

get_item_children(item)#

Returns all the children when the widget asks it.

get_item_value_model(item, column_id)#

Return value model. It’s the object that tracks the specific value. In our case we use ui.SimpleStringModel.

get_item_value_model_count(item)#

The number of columns

get_items()#

Get current items

get_size_data()#

Get the size of the list of items

remove_items(
items: List[Item],
)#

Remove items from the list

set_items(
items: List[Item],
)#

Set items into the list

set_list_limit(limit_list: int | None)#

Set a size limit into the list of items

subscribe_items_enabled(callback)#

Return the object that will automatically unsubscribe when destroyed.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.