Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Inspector View #4

@Gurkengewuerz

Description

@Gurkengewuerz

Hey, i was trying to create a PR for the inspector view but my problem is, as far as I understand the Ultralight API, that I cannot replace a view or create an overlay with a view using the C API.
Do you have any ideas? My idea would be to replace a pointer, but with ulOverlayGetView there is only one structure copy.

Current approach:

func (view *View) GetInspectorView() *View {
	return &View{
		v: C.ulViewCreateInspectorView(view.v),
	}
}

From the browser Example:

void Tab::ToggleInspector() {
  if (!inspector_overlay_) {
    inspector_overlay_ = Overlay::Create(ui_->window_, *view()->inspector(), 0, 0);
  } else {
    if (inspector_overlay_->is_hidden())
      inspector_overlay_->Show();
    else
      inspector_overlay_->Hide();
  }

  // Force resize to update layout
  Resize(container_width_, container_height_);
}

If there isn't any approach i already created an issue for the CAPI. ultralight-ux/Ultralight#252

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions