NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 20 21 22 23 24 … 93 Next »
WizTools - 1.x Plugin Development Toolkit

 
  • 0 Vote(s) - 0 Average
WizTools - 1.x Plugin Development Toolkit
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#31
2007-09-17, 05:41 AM
JavaWiz Wrote:The list control is simply a list. It has nothing to do with folders. The elements in the list can have skin definitions for normal, selected and selectedInactive. The list itself only has 1 background, and does not change whether the list has focus or not.

Hope this answers your question.

Thank you for your reply, and it does indeed.

I was hoping for a way to differentiate, on a listitem, if a particular item represented a folder, in much the same way the default Video Library does in a list view mode. That is, with a folder icon preceding the text.

However, I can see that would go beyond the scope of a simple list. Presumably, too, it is not possible to render an item with a user-supplied skin CompositeImage name.

Do you feel one could reasonably inherit from the list / listitem controls to add the functionality ? Or would it be more trouble than it it is worth and it would be less effort to start from scratch?
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#32
2007-09-17, 06:05 AM
Ommina Wrote:Thank you for your reply, and it does indeed.

I was hoping for a way to differentiate, on a listitem, if a particular item represented a folder, in much the same way the default Video Library does in a list view mode. That is, with a folder icon preceding the text.

However, I can see that would go beyond the scope of a simple list. Presumably, too, it is not possible to render an item with a user-supplied skin CompositeImage name.

Do you feel one could reasonably inherit from the list / listitem controls to add the functionality ? Or would it be more trouble than it it is worth and it would be less effort to start from scratch?
Actually, now that I think about it, you can display an image as part of the list item.

The list item object needs to be an object that implements the
SkinHelper2.GetImageCallback method. Then in the skin, you can have the list item with a drawimage node for example:

In the plugin code:
Code:
for (int i=0; i<totShows; i++)
{
    ShowInfo si = new ShowInfo();
    si.load(theShow[i]); // load the object

    WizUiList.WizListItem item = new WizUiList.WizListItem();
    item.AddProperty("@text", si.Title + " (" + si.NumShows + ")");
    item.AddProperty("@ShowItem", si);
    item.AddProperty("@thumbnail", si);
    programs.Add(item);
}

Where ShowInfo implements:

[SIZE=1][SIZE=2][COLOR=#000000]publicImage GetImage(Hashtable parameters, string name, int width, int height)[/COLOR][/SIZE]
[SIZE=1][COLOR=#000000]{[/COLOR][/SIZE]
[COLOR=#000000]  Image thumbnail = newBitmap(100, 100); [/COLOR]
[COLOR=#000000]  if (this.hasProgImage())[/COLOR]
[COLOR=#000000]      thumbnail = Image.FromFile(this.ProgImageName);[/COLOR]
[COLOR=#000000]  return thumbnail;[/COLOR]
[SIZE=1][COLOR=#000000]} [/COLOR][/SIZE]
[/SIZE]

and the associated Skin contains:
Code:
<CompositeImage name="ProgramsListNormal" size="70,4.0">
  <DrawCommonImage name="ListViewNormalItemBackground"/>
  <DrawText text="@text" loc="0,0" size="100,100" textStyle="GeneralTextStyle" align="Left" valign="Center"/>
[B] <DrawImage filename="@thumbnail" loc="90,0" size="10,100" />[/B]
[B]</CompositeImage>[/B]
<CompositeImage name="ProgramsListSelected" size="65,4.0">
  <DrawCommonImage name="ListViewSelectedItemBackground"/>
  <DrawText text="@text" loc="0,0" size="100,100" textStyle="GeneralTextStyle" align="Left" valign="Center"/>
[B] <DrawImage filename="@thumbnail" loc="90,0" size="10,100" />[/B]
[B]</CompositeImage>[/B]
<CompositeImage name="ProgramsListSelectedInactive" size="70,4.0">
  <DrawCommonImage name="ListViewSelectedInactiveItemBackground"/>
  <DrawText text="@text" loc="0,0" size="100,100" textStyle="GeneralTextStyle" align="Left" valign="Center"/>
[B] <DrawImage filename="@thumbnail" loc="90,0" size="10,100" />[/B]
[B]</CompositeImage>[/B]

In the SearchWizX2 plugin, this would display the show thumbnail image in each list item (if it exists).
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#33
2007-09-17, 06:19 AM
Woo, nifty! Many thanks - so much for going to bed! Although I should probably feed the dog.

As a bonus, this should also provide a means for me to display a small 'watched' indicator on certain files as well, an addition that I was ready to do without, but am glad to be able to leave in.

Thanks again!
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#34
2007-10-11, 12:44 PM (This post was last modified: 2007-10-11, 02:17 PM by McBainUK.)
WizUiList.CommandCallback.ActivateItem()

Doesn't seem to be firing from a ButtonList object.The demo plugin doesn't use it. Any tips?
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#35
2007-10-11, 03:41 PM
McBainUK Wrote:WizUiList.CommandCallback.ActivateItem()

Doesn't seem to be firing from a ButtonList object.The demo plugin doesn't use it. Any tips?
Does the ButtonList expose that method? If I recall, I don't think the button list exposes those call-backs. If you have a use for it, I can probably add it.

I'm at work now, I will take a look tonight when I get home.
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#36
2007-10-11, 03:44 PM
I don't think it does. At the moment I'm using fudging it using OnKeyDown() but would be nice to have a callback for it.

JavaWiz Wrote:If you have a use for it, I can probably add it.
How do you see people using it now?
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#37
2007-10-11, 03:54 PM
McBainUK Wrote:I don't think it does. At the moment I'm using fudging it using OnKeyDown() but would be nice to have a callback for it.


How do you see people using it now?

I use it like this which I probably copied from JavaWiz's demo.

privatebool Controls_OnKeyDown(KeyEventArgs e)
{
bool handled = false;

if (ctlMgr.CurrentControlName == cmdButtonList.PlacementName)
{
.
.
.
}
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#38
2007-10-12, 12:39 AM
Out of curiosity, is there a way, that I'm missing, to manually scroll the list to a certain position?

I would like to be able to recreate a particular list for the user. The setSelected methods will scroll it so the newly selected item is at the bottom, which is a start, but if the selection was in the middle before, I'd like it to remain in the middle when I redisplay it.

Any way to, perhaps, set the index of the first visible list item?

Thanks!
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#39
2007-10-12, 01:30 AM
Ommina Wrote:Out of curiosity, is there a way, that I'm missing, to manually scroll the list to a certain position?

I would like to be able to recreate a particular list for the user. The setSelected methods will scroll it so the newly selected item is at the bottom, which is a start, but if the selection was in the middle before, I'd like it to remain in the middle when I redisplay it.

Any way to, perhaps, set the index of the first visible list item?

Thanks!
I use something like this which sets the current index. Does that help?

filelist1.setCurrentIndex(index);
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#40
2007-10-12, 02:48 AM
Ommina Wrote:Out of curiosity, is there a way, that I'm missing, to manually scroll the list to a certain position?

I would like to be able to recreate a particular list for the user. The setSelected methods will scroll it so the newly selected item is at the bottom, which is a start, but if the selection was in the middle before, I'd like it to remain in the middle when I redisplay it.

Any way to, perhaps, set the index of the first visible list item?

Thanks!
Actually, I don't think there is a way to set the topmost visible item in the list. I may add a method to do that in next version (maybe .13).
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (31): « Previous 1 2 3 4 5 6 … 31 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 3,077 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,551 2020-11-14, 08:01 PM
Last Post: sub
  Test/Development environment for npvr.db3 scJohn 10 4,571 2020-09-04, 09:14 PM
Last Post: scJohn
  VIdeo playback from plugin mvallevand 5 3,632 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,997 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,863 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,319 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 2,025 2013-03-12, 06:48 AM
Last Post: psycik
  Integrated Development Environment (IDE) for plugins osx-addict 5 2,856 2012-10-18, 08:35 PM
Last Post: osx-addict
  Plugin problems with started from the command line mvallevand 11 5,229 2012-08-12, 07:56 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode