How to use the @bentley/ui-framework.ConfigurableUiManager.registerControl function in @bentley/ui-framework

To help you get started, we’ve selected a few @bentley/ui-framework examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / contentviews / IModelViewport.tsx View on Github external
const boundingRect: DOMRect = (event.nativeEvent.target as any).getBoundingClientRect();
      ctx.clearRect(0, 0, boundingRect.width, boundingRect.height);
    }
  }

  private _onMouseDown = (event: React.MouseEvent) => {
    this.drawCanvas(event, true);
    event.preventDefault();
  }

  private _onMouseUp = (event: React.MouseEvent) => {
    this.drawCanvas(event, false);
  }
}

ConfigurableUiManager.registerControl(IModelViewportControl.id, IModelViewportControl);
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / widgets / BreadcrumbDemoWidget.tsx View on Github external
<label>Can accept rows: </label>
        <input type="checkbox" id="receives_row"> {
          this.setState({ checked: event.target.checked });
        }} /&gt;
        <div style="{{">
          
          
        </div>
      
    );
  }
}

ConfigurableUiManager.registerControl("BreadcrumbDemoWidget", BreadcrumbDemoWidgetControl);
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / widgets / PropertyGridDemoWidget.tsx View on Github external
this._dataProvider.replaceProperty(args.propertyRecord, catIdx, newRecord);
      updated = true;
    }

    return updated;
  }

  public render() {
    return (
      
    );
  }
}

ConfigurableUiManager.registerControl("VerticalPropertyGridDemoWidget", VerticalPropertyGridWidgetControl);

export class HorizontalPropertyGridWidgetControl extends WidgetControl {
  private _ref = React.createRef();

  constructor(info: ConfigurableCreateInfo, options: any) {
    super(info, options);

    this.reactElement = (
      
        }
        ref={this._ref}
      /&gt;
    );
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / statusbars / AppStatusBar.tsx View on Github external
export class AppStatusBarWidgetControl extends StatusBarWidgetControl {
  constructor(info: ConfigurableCreateInfo, options: any) {
    super(info, options);
  }

  public getReactNode(_args: StatusBarWidgetControlArgs): React.ReactNode {
    const itemsManager = UiFramework.statusBarManager.getItemsManager("main");
    if (itemsManager)
      return (
        
      );
    return null;
  }
}

ConfigurableUiManager.registerControl("AppStatusBar", AppStatusBarWidgetControl);
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / widgets / UnifiedSelectionTableWidget.tsx View on Github external
if (this.props.iModelConnection &amp;&amp; this.props.rulesetId) {
      return (
        <div style="{{">
          
          {this.renderContextMenu()}
        </div>
      );
    }
    return null;
  }
}

const createDataProviderFromProps = (props: UnifiedSelectionTableWidgetProps) =&gt;
  new PresentationTableDataProvider({ imodel: props.iModelConnection!, ruleset: props.rulesetId! });

ConfigurableUiManager.registerControl("UnifiedSelectionTableDemoWidget", UnifiedSelectionTableWidgetControl);
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / contentviews / CubeContent.tsx View on Github external
}

  public componentDidMount() {
    ViewportComponentEvents.onCubeRotationChangeEvent.addListener(this._handleCubeRotationChangeEvent);
  }

  public componentWillUnmount() {
    ViewportComponentEvents.onCubeRotationChangeEvent.removeListener(this._handleCubeRotationChangeEvent);
  }

  private _handleCubeRotationChangeEvent = (args: CubeRotationChangeEventArgs) => {
    this.setState({ rotMatrix: args.rotMatrix });
  }
}

ConfigurableUiManager.registerControl("CubeContent", CubeContentControl);
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / widgets / UnifiedSelectionPropertyGridWidget.tsx View on Github external
isPropertyHoverEnabled={true}
            onPropertyContextMenu={this._onPropertyContextMenu}
          /&gt;
          {this.renderContextMenu()}
        
      );

    return null;
  }
}

function createDataProvider(imodel: IModelConnection, rulesetId: string): PresentationPropertyDataProvider {
  return new PresentationPropertyDataProvider(imodel, rulesetId);
}

ConfigurableUiManager.registerControl("UnifiedSelectionPropertyGridDemoWidget", UnifiedSelectionPropertyGridWidgetControl);
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / tooluiproviders / Tool1UiProvider.tsx View on Github external
);
  }
}

/*
   

     
     <div style="{vertDivStyle}"></div> 
     <div style="{vertDivStyle}"></div> 
*/

ConfigurableUiManager.registerControl("Tool1", Tool1UiProvider);
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / tools / AnalysisAnimation.ts View on Github external
/** Process request to restart the tool. */
  public onRestartTool(): void {
    const tool = new AnalysisAnimationTool();
    if (!tool.run())
      this.exitTool();
  }

  /** Process selected viewport changes. */
  public onSelectedViewportChanged(_previous: Viewport | undefined, current: Viewport | undefined): void {
    if (undefined === current || undefined === current.view.analysisStyle)
      IModelApp.toolAdmin.startDefaultTool();
  }
}

ConfigurableUiManager.registerControl(AnalysisAnimationTool.toolId, AnalysisAnimationToolSettingsProvider);
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / widgets / PropertyGridDemoWidget.tsx View on Github external
this._dataProvider.replaceProperty(args.propertyRecord, catIdx, newRecord);
      updated = true;
    }

    return updated;
  }

  public render(): React.ReactNode {
    return (
      
    );
  }
}

ConfigurableUiManager.registerControl("HorizontalPropertyGridDemoContent", HorizontalPropertyGridContentControl);