API — ICoreSDK/ICoreStudio/StudioObjects/Panels/SearchBar
The public contract of 3 header(s) under src/ICoreSDK/ICoreStudio/StudioObjects/Panels/SearchBar — 6 class/struct definition(s), 44 declaration(s). Each section shows the header's banner and its public (and protected-virtual) surface exactly as the file writes it.
| Header | Defines | Declarations | Bases |
|---|---|---|---|
ICoreGlobalSearchDialog.h | ICoreGlobalSearchDialog, ICoreGlobalSearchSection, ICoreGlobalSearchResultRow | 21 | public ICoreWidget; public ICoreWidget; public ICoreWidget |
ICorePanelSearchBar.h | ICorePanelSearchBar | 4 | public ICoreWidget |
ICoreSearchBar.h | ICoreSearchBar, ICoreSearchTextBox | 19 | public ICoreWidget; public ICoreLineEdit |
ICoreGlobalSearchDialog.h#
src/ICoreSDK/ICoreStudio/StudioObjects/Panels/SearchBar/ICoreGlobalSearchDialog.h
ICoreGlobalSearchDialog#
ICoreGlobalSearchDialog.h:41 · class · final · bases public ICoreWidget · pImpl · 7 declaration(s)
Search Everywhere.
class ICoreGlobalSearchDialog final : public ICoreWidget {
public:
explicit ICoreGlobalSearchDialog(ICoreStudioSurface* editorWindow, ICoreWidget* parent = nullptr);
// Binds the panel to the bar that drives it (its field is watched for the
// arrow keys / Enter / Esc) and shows the results for the given query.
// An empty query keeps the panel closed.
void showBelowAnchor(ICoreNativeWidget* anchorWidget, ICoreLineEdit* field, const ICoreString& query);
// Live retype from the anchor's field. An empty query closes the panel.
void updateQuery(const ICoreString& query);
void closePanel();
~ICoreGlobalSearchDialog() override;
protected:
void paintContent(ICorePainter& painter) override;
void pointerPressedOutside() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreGlobalSearchSection#
ICoreGlobalSearchDialog.h:75 · class · final · bases public ICoreWidget · pImpl · 6 declaration(s)
One module's results: a clickable header (arrow, name, count) over a plain column of rows.
class ICoreGlobalSearchSection final : public ICoreWidget {
public:
explicit ICoreGlobalSearchSection(ICoreWidget* parent, const ICoreString& title, const ICoreString& countText,
std::function<void()> onToggled);
void addRow(ICoreGlobalSearchResultRow* row) const;
void setCollapsed(bool collapsed);
bool isCollapsed() const;
ICoreWidget* getContentWidget() const;
~ICoreGlobalSearchSection() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreGlobalSearchResultRow#
ICoreGlobalSearchDialog.h:101 · class · final · bases public ICoreWidget · pImpl · 8 declaration(s)
A single result line: title on the left, path / value hint on the right.
class ICoreGlobalSearchResultRow final : public ICoreWidget {
public:
explicit ICoreGlobalSearchResultRow(ICoreWidget* parent, ICoreString title, ICoreString subtitle,
std::function<void()> onActivated);
void setSelected(bool selected);
void activate() const;
~ICoreGlobalSearchResultRow() override;
protected:
void paintContent(ICorePainter& painter) override;
void pointerEntered() override;
void pointerLeft() override;
bool mousePressed(const ICoreMouseEvent& event) override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICorePanelSearchBar.h#
src/ICoreSDK/ICoreStudio/StudioObjects/Panels/SearchBar/ICorePanelSearchBar.h
ICorePanelSearchBar#
ICorePanelSearchBar.h:19 · class · final · bases public ICoreWidget · pImpl · 4 declaration(s)
A small filter field for the top of a panel (library, variables, objects tracker, deploy targets, subsystem navigator).
class ICorePanelSearchBar final : public ICoreWidget {
public:
// Mirror of the queryChanged signal, for clients outside the wrapper zone.
ICoreSignal<ICoreString> onQueryChanged;
// ICoreAnyWidget pending the ICoreEssentials reparenting: the caller
// parents this to an ICoreDialog, which derives from the toolkit's
// QDialog rather than from ICoreWidget. Narrow this to ICoreWidget*
// once that base moves.
explicit ICorePanelSearchBar(ICoreNativeWidget* parent = nullptr, const ICoreString& placeholder = "Search...");
ICoreString query() const;
void clearQuery() const;
~ICorePanelSearchBar() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreSearchBar.h#
src/ICoreSDK/ICoreStudio/StudioObjects/Panels/SearchBar/ICoreSearchBar.h
The field says "Search Everywhere" because that is what the top bar does with it; a host that searches one thing (the block library, say) renames it.
ICoreSearchBar#
ICoreSearchBar.h:18 · class · bases public ICoreWidget · pImpl · 17 declaration(s)
class ICoreSearchBar : public ICoreWidget {
public:
explicit ICoreSearchBar(ICoreWidget* parent = nullptr);
double bgOpacity() const;
void setBgOpacity(double opacity);
void animateBackgroundOpacity(double targetOpacity);
void cancelSearch();
void showClearButton();
// The field says "Search Everywhere" because that is what the top bar does with
// it; a host that searches one thing (the block library, say) renames it.
void setPlaceholderText(const ICoreString& placeholder) const;
// The field itself, for a host that must hand it onward (the global search
// dialog follows it with a key interceptor). Post-P5.11 the dialog cannot
// findChild<ICoreLineEdit*>() its way back to it -- wrappers are not in the
// QObject tree -- so the bar hands the wrapper over, per the doctrine in
// ICoreNativeHandleAccess.h.
ICoreLineEdit* searchField() const;
// Puts the caret in the field, for a host that opens with the bar already live.
void focusField() const;
// Asks the host to open the global search panel (click on the bar).
void requestSearch(const ICoreString& text);
// Streams every edit of the field to the host, which keeps the already open
// panel in sync. The text stays in the bar: it is the panel's only query field.
void reportTextChanged(const ICoreString& text);
ICoreString currentText() const;
~ICoreSearchBar() override;
// Raised when the user asks for a search by clicking the bar. The host
// decides what to open.
ICoreSignal<ICoreString> onSearchInvoked;
// Raised on every edit of the field, so the host can refilter a panel that
// is already open (or open it on the first character).
ICoreSignal<ICoreString> onSearchTextChanged;
protected:
void paintContent(ICorePainter& painter) override;
void pointerEntered() override;
void pointerLeft() override;
bool mousePressed(const ICoreMouseEvent& event) override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreSearchTextBox#
ICoreSearchBar.h:79 · class · bases public ICoreLineEdit · pImpl · 2 declaration(s)
Chrome::None: the ICoreSearchBar around it draws the border and the ground, so the field itself must paint neither.
class ICoreSearchTextBox : public ICoreLineEdit {
public:
// The body moved to the .cpp with the state it sets up (the header surface
// rule).
explicit ICoreSearchTextBox(ICoreSearchBar* parent);
// Declared, defined in the .cpp: the residue below is a unique_ptr to an
// Impl this header cannot see.
~ICoreSearchTextBox() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};