v 9.3.* Theme.GetIcon(string)  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

v 9.3.* Theme.GetIcon(string)

Post by zarkogajic »

Hi Support,

I guess the same issue as in here: https://forum.pdf-xchange.com/viewtopic.php?f=66&t=38791#p160339

In previous versions I was able to use IUIX_Inst.Theme.GetIcon("cmd.close") and get the icon you use for close command. IN 9.3.361 tis does not work any more.

What other approach to use?

I need the icon for IUIX_CmdMenu.InsertItemX(..., IUIX_Icon, ...).

p.s.
I'm custom creating the document tab's menu, kind of mimicking the default one, as in:

image.png
image.png (14.58 KiB) Viewed 1067 times


-žarko
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: v 9.3.* Theme.GetIcon(string)

Post by zarkogajic »

Hi Support,

I know how to get the Icon if I need to hijack it from a standard/existing IUIX_Cmd. For this I can use IUIX_Inst.CmdManager.Cmds.Find("cmd.close") and then use the Icon property.

What I'm having trouble with are the following : "ico.msg.info", "ico.loading", ...

Also, some commands, like "cmd.closeOtherTabs" seems to not exist until your default document's tab menu is first created. Since I'm showing my own - this command is never actually created. What I was using for it is "ico.closeOtherTabs" via Theme.GetIcon.

I've tied IUIX_Inst.Theme.GetImage("ico.closeOtherTabs"); but this also returns nothing.

So: how to get the IUIX_Icon if I only know its name like, e.g: "ico.msg.warning"

p.s.
Also: in version <360 the Themes.xml inside Resources.dat had many more entries than 36[0|1], especially those "ico.this.that"

-žarko
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: v 9.3.* Theme.GetIcon(string)

Post by zarkogajic »

HI Support,

third time lucky :)

Ok, so a new method in IUIX_Inst :: GetIcon - nicely gets those "ico.this.that"

However, since Themes.xml no longer has those <icon> entries -> how do I know the names of the icons I could use ?

p.s.
Why is the following not working any more: IUIX_Inst.Theme.GetIcon("cmd.close")


-žarko
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: v 9.3.* Theme.GetIcon(string)

Post by Vasyl-Tracker Dev Team »

The actual IconSet in Editor's runtime is the composition from two different sources - from Theme and from Resources.dat\VectorIcons\Icons.pdf. Also, other clients(external plugins, etc) may add there their own icons (via IUIX_Inst::RegisterIconsLoader). At the moment Theme doesn't contain icons anymore. Instead of this the Resources.dat\VectorIcons\Icons.pdf contains almost ALL vector icons used in Editor. There each page has icon. You should use IDs without such suffixes.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: v 9.3.* Theme.GetIcon(string)

Post by zarkogajic »

Hi Vasyl,

Ok, thanks.

What do you mean by " You should use IDs without such suffixes."?

I see each page in that icons.pdf is an
"icon" - but how do I know its id or string name?

-žarko
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: v 9.3.* Theme.GetIcon(string)

Post by Vasyl-Tracker Dev Team »

Just open the Bookmarks pane - you will see what I mean..
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: v 9.3.* Theme.GetIcon(string)  SOLVED

Post by zarkogajic »

Hi Vasyl,

All clear, thanks.

-žarko
User avatar
Radi - Tracker Supp
Site Admin
Posts: 597
Joined: Tue Mar 03, 2015 12:46 pm

v 9.3.* Theme.GetIcon(string)

Post by Radi - Tracker Supp »

:)
Post Reply