v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks SOLVED
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.
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.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Hi Support,
I'm implementing V9 (into my V8 code) ... and some changes I see ...
IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
In v9 IPXV_InfoBarCallbacks is now used instead of IPXV_DocInfoBarCallbacks.
SDK Help does not list it (yet ).
Method signatures are similar, the difference is "IPXV_DocumentView* pView" (v8) and "IUIX_Obj* pContext" (v9).
So, InfoBarCallbacks are now (v9) not only for IPXV_DocumentView?
Can you provide some more info...
-žarko
I'm implementing V9 (into my V8 code) ... and some changes I see ...
IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
In v9 IPXV_InfoBarCallbacks is now used instead of IPXV_DocInfoBarCallbacks.
SDK Help does not list it (yet ).
Method signatures are similar, the difference is "IPXV_DocumentView* pView" (v8) and "IUIX_Obj* pContext" (v9).
So, InfoBarCallbacks are now (v9) not only for IPXV_DocumentView?
Can you provide some more info...
-žarko
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Hi Zarko.
Yes, in V9 we made a little breaking change for that stuff. Currently, you may add some information/warning/error messages not for document tab only, but for mainframe-level too. Now you have a PXV_Inst::get_InfoBar proprerty to get and fill the mainframe's info-bar (note: all mainframes will show the same content in their info-bars).
Example:
Cheers.
Yes, in V9 we made a little breaking change for that stuff. Currently, you may add some information/warning/error messages not for document tab only, but for mainframe-level too. Now you have a PXV_Inst::get_InfoBar proprerty to get and fill the mainframe's info-bar (note: all mainframes will show the same content in their info-bars).
Example:
Cheers.
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.
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.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Hi Vasyl,
Thanks. Interesting new feature
So, is there an even to catch, once a span is added to mainframe's info bar, so that one can control, from code, to what MainFrame it is being applied (and say cancel the action). Or, if applied to all MainFrames - how to get it removed for a particular MainFrame? And so, on ...
-žarko
Thanks. Interesting new feature
So, the next natural question is how to get this to work per mainframe? As you might imagine, those working with multiple instances of PXVControl (therefore multiple mainframes) have different needs for different instances / main frames.note: all mainframes will show the same content in their info-bars
So, is there an even to catch, once a span is added to mainframe's info bar, so that one can control, from code, to what MainFrame it is being applied (and say cancel the action). Or, if applied to all MainFrames - how to get it removed for a particular MainFrame? And so, on ...
-žarko
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Hi Zarko.
You may try to hide the unnecessary span by:
Cheers.
You may try to hide the unnecessary span by:
Code: Select all
IUIX_ScrollContainer scrollCon;
IPXV_Inst.MaiFrm[k].View.Obj.Parent.QueryImpl(out scrollCon);
IUIX_CmdLine cmdLine = scrollCon.CmdPaneTop[0];
for (bar : cmdLine)
{
if (bar.ID == spanToHideID)
{
bar.Hide();
break;
}
}
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.
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.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Hi Vasyl,
Great, thanks.
-žarko
Great, thanks.
-žarko
- Tracker Supp-Stefan
- Site Admin
- Posts: 17910
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Hi SUpport,
I've tried the proposed code - and unfortunately that's not it.
I can add the InfoBar, but I cannot hide it from other MainFrame's.
I'm iterating over all IUIX_CmdLine and IUIX_CmdBar in scrollContainer's CmdPaneTop - but none of the Bars have the ID of my added InfoSpan.
The ID's I "see" are "cmdbar.menubar", ..., "cmdbar.properties" and the rest of standard ones.
So, the created info line/bar is somewhere else .. ?
-žarko
I've tried the proposed code - and unfortunately that's not it.
I can add the InfoBar, but I cannot hide it from other MainFrame's.
I'm iterating over all IUIX_CmdLine and IUIX_CmdBar in scrollContainer's CmdPaneTop - but none of the Bars have the ID of my added InfoSpan.
The ID's I "see" are "cmdbar.menubar", ..., "cmdbar.properties" and the rest of standard ones.
So, the created info line/bar is somewhere else .. ?
-žarko
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
There is working C#-example:
My mistake was: instead of pdfCtl.Inst.MainFrm[0].View.Obj.Parent you need to use pdfCtl.Inst.MainFrm[0].View.Obj.Children[0]...
Code: Select all
Type tt = typeof(PDFXEdit.IUIX_ScrollContainer);
IntPtr p = IntPtr.Zero;
pdfCtl.Inst.MainFrm[0].View.Obj.Children[0].QueryImpl(tt.GUID, null, out p);
if (p != IntPtr.Zero)
{
PDFXEdit.IUIX_ScrollContainer scrollCon = (PDFXEdit.IUIX_ScrollContainer)System.Runtime.InteropServices.Marshal.GetTypedObjectForIUnknown(p, tt);
if (scrollCon != null)
{
if (scrollCon.CmdPaneTop.Count != 0)
{
PDFXEdit.IUIX_CmdLine cmdLine = scrollCon.CmdPaneTop[0];
for (uint i = 0; i < cmdLine.Count; i++)
{
PDFXEdit.IUIX_CmdBar bar = cmdLine[i];
string sID = pdfCtl.Inst.ID2Str(bar.ID);
....
}
}
}
}
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.
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.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Hi Vasyl,
At first I wanted to say "sorry, not working": once I get the IUIX_ScrollContainer scrollContainer from Inst.MainFrm[0].View.Obj.Children[0], the scrollContainer.Obj.ID is "mainViewLayout". It's CmdPaneTop has one line and one bar inside but the bar.ID is 0.
The problem was in the value of my spanID: it was "too big" (> 10K). When I used "myInfoSpanID = Inst.Str2ID('infobar.MyBar', true)" the resulting integer was smaller - and from that moment all started working.
Btw, why not simply use "Inst.MainFrm[0].View.CmdBar2[myInfoSpanID]" - as it seems to get the correct bar without the need to iterate over lines/bars of the scrollContainer.
-žarko
At first I wanted to say "sorry, not working": once I get the IUIX_ScrollContainer scrollContainer from Inst.MainFrm[0].View.Obj.Children[0], the scrollContainer.Obj.ID is "mainViewLayout". It's CmdPaneTop has one line and one bar inside but the bar.ID is 0.
The problem was in the value of my spanID: it was "too big" (> 10K). When I used "myInfoSpanID = Inst.Str2ID('infobar.MyBar', true)" the resulting integer was smaller - and from that moment all started working.
Btw, why not simply use "Inst.MainFrm[0].View.CmdBar2[myInfoSpanID]" - as it seems to get the correct bar without the need to iterate over lines/bars of the scrollContainer.
-žarko
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Hi Vasyl,
Ah .. again too happy too early.
As soon as I Hide the Bar from inside one of MainFrames - it gets hidden/removed from all mainframes
However, it seems that cmdLine.DeleteBar() - does the trick and seems to work.
Can you confirm this approach as ok to be used?
-žarko
Ah .. again too happy too early.
As soon as I Hide the Bar from inside one of MainFrames - it gets hidden/removed from all mainframes
However, it seems that cmdLine.DeleteBar() - does the trick and seems to work.
Can you confirm this approach as ok to be used?
-žarko
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Hi Support,
To sum up my few last posts here for future readers.
The IUIX_CmdBar.Hide works, but if used: one must also call Inst.LockCmdCustomizationEvent and InstUI.CmdManager.LockAllPanesUpdates (and unlock when finished).
The "theBar.Line.DeleteBar(theBar.Line.GetBarIndex(theBar), true)" also works without the need to Lock/Unlock.
Obviously, pick the Hide approach if you want to Show the bar at a later time (since Delete deletes it).
Still, would like a confirmation (?) for:
"Inst.MainFrm[n].View.CmdBar2[myInfoSpanID]"
is ok to be used without the need to go for MainView's IUIX_ScrollContainer
?
-žarko
To sum up my few last posts here for future readers.
The IUIX_CmdBar.Hide works, but if used: one must also call Inst.LockCmdCustomizationEvent and InstUI.CmdManager.LockAllPanesUpdates (and unlock when finished).
The "theBar.Line.DeleteBar(theBar.Line.GetBarIndex(theBar), true)" also works without the need to Lock/Unlock.
Obviously, pick the Hide approach if you want to Show the bar at a later time (since Delete deletes it).
Still, would like a confirmation (?) for:
"Inst.MainFrm[n].View.CmdBar2[myInfoSpanID]"
is ok to be used without the need to go for MainView's IUIX_ScrollContainer
?
-žarko
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Seems you may use both 'shortcuts' to remove your own info-span from InfoBar:
infoSpanBar = Inst.MainFrm[0].View.CmdBar2[myInfoSpanID];
...
infoSpanBar.Line.DeleteBar(infoSpanBar.Line.GetBarIndex(infoSpanBar));
OR
infoSpanBar.Hide();
Unfortunately, but I was unable to reproduce your issue with simple Hide() using. For me it works fine, but I tried it just with a single MainFrame-object...
infoSpanBar = Inst.MainFrm[0].View.CmdBar2[myInfoSpanID];
...
infoSpanBar.Line.DeleteBar(infoSpanBar.Line.GetBarIndex(infoSpanBar));
OR
infoSpanBar.Hide();
Unfortunately, but I was unable to reproduce your issue with simple Hide() using. For me it works fine, but I tried it just with a single MainFrame-object...
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.
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.
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks SOLVED
Hi Vasyl,
Ok, thanks.
-žarko
Ok, thanks.
-žarko
- TrackerSupp-Daniel
- Site Admin
- Posts: 8592
- Joined: Wed Jan 03, 2018 6:52 pm
v8 vs v9 : IPXV_DocInfoBarCallbacks vs IPXV_InfoBarCallbacks
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com