Jump to content

Stacks Docklet


Recommended Posts

  • Replies 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

@Sranshaft:

I took a look to the code you mention (for icons), I'll schedule some more tests for later.

Can you post/send me a screenshot of the glitch?

@alabanco:

Lucida Grande isn't included with Windows by default. Is there any "version" or variant of it? (must be free so as to include it with Stack Docklet)

Link to post

matonga,

i believe that the vast majority of people, who emulate Mac OS here have that font installed, if not you can find it in any Leopard WB skin or theme. So it is not a problem. But I see your point. So, I hope it will appear in the next releases when there will be an option to choose that.

Although I can try suggesting another way. What about two versions of it (for those who still do not have lucida grande and those who has it or even just put Lucida Grande in the zip file ?

Link to post

Matias,

take a look on this code (Delphi).

Maybe it can be helpfully.

I use it for 48x48 icons (SHIL_EXTRALARGE).

unit VirtualSystemImageLists;



// Version 1.3.0

//

// The contents of this file are subject to the Mozilla Public License

// Version 1.1 (the "License"); you may not use this file except in compliance

// with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

//

// Alternatively, you may redistribute this library, use and/or modify it under the terms of the

// GNU Lesser General Public License as published by the Free Software Foundation;

// either version 2.1 of the License, or (at your option) any later version.

// You may obtain a copy of the LGPL at http://www.gnu.org/copyleft/.

//

// Software distributed under the License is distributed on an "AS IS" basis,

// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the

// specific language governing rights and limitations under the License.

//

// The initial developer of this code is Jim Kueneman <[email protected]>

//

//----------------------------------------------------------------------------



interface



{$include Compilers.inc}

{$include ..IncludeVSToolsAddIns.inc}



uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,

Menus, Registry, ShlObj, ShellAPI, ActiveX, ImgList, CommCtrl;



const

SID_IImageList = '{46EB5926-582E-4017-9FDF-E8998DAA0950}';

IID_IImageList: TGUID = SID_IImageList;



type

IImageList = interface(IUnknown)

[SID_IImageList]

function Add(Image, Mask: HBITMAP; var Index: Integer): HRESULT; stdcall;

function ReplaceIcon(IndexToReplace: Integer; Icon: HICON; var Index: Integer): HRESULT; stdcall;

function SetOverlayImage(iImage: Integer; iOverlay: Integer): HRESULT; stdcall;

function Replace(Index: Integer; Image, Mask: HBITMAP): HRESULT; stdcall;

function AddMasked(Image: HBITMAP; MaskColor: COLORREF; var Index: Integer): HRESULT; stdcall;

function Draw(var DrawParams: TImageListDrawParams): HRESULT; stdcall;

function Remove(Index: Integer): HRESULT; stdcall;

function GetIcon(Index: Integer; Flags: UINT; var Icon: HICON): HRESULT; stdcall;

function GetImageInfo(Index: Integer; var ImageInfo: TImageInfo): HRESULT; stdcall;

function Copy(iDest: Integer; SourceList: IUnknown; iSource: Integer; Flags: UINT): HRESULT; stdcall;

function Merge(i1: Integer; List2: IUnknown; i2, dx, dy: Integer; ID: TGUID; out ppvOut): HRESULT; stdcall;

function Clone(ID: TGUID; out ppvOut): HRESULT; stdcall;

function GetImageRect(Index: Integer; var rc: TRect): HRESULT; stdcall;

function GetIconSize(var cx, cy: Integer): HRESULT; stdcall;

function SetIconSize(cx, cy: Integer): HRESULT; stdcall;

function GetImageCount(var Count: Integer): HRESULT; stdcall;

function SetImageCount(NewCount: UINT): HRESULT; stdcall;

function SetBkColor(BkColor: COLORREF; var OldColor: COLORREF): HRESULT; stdcall;

function GetBkColor(var BkColor: COLORREF): HRESULT; stdcall;

function BeginDrag(iTrack, dxHotSpot, dyHotSpot: Integer): HRESULT; stdcall;

function EndDrag: HRESULT; stdcall;

function DragEnter(hWndLock: HWND; x, y: Integer): HRESULT; stdcall;

function DragLieave(hWndLock: HWND): HRESULT; stdcall;

function DragMove(x, y: Integer): HRESULT; stdcall;

function SetDragCursorImage(Image: IUnknown; iDrag, dxHotSpot, dyHotSpot: Integer): HRESULT; stdcall;

function DragShowNoLock(fShow: BOOL): HRESULT; stdcall;

function GetDragImage(var CurrentPos, HotSpot: TPoint; ID: TGUID; out ppvOut): HRESULT; stdcall;

function GetImageFlags(i: Integer; dwFlags: DWORD): HRESULT; stdcall;

function GetOverlayImage(iOverlay: Integer; var iIndex: Integer): HRESULT; stdcall;

end;





const

{$EXTERNALSYM SHIL_LARGE}

SHIL_LARGE = 0; // normally 32x32

{$EXTERNALSYM SHIL_SMALL}

SHIL_SMALL = 1; // normally 16x16

{$EXTERNALSYM SHIL_EXTRALARGE}

SHIL_EXTRALARGE = 2; // normall 48x48

{$EXTERNALSYM SHIL_SYSSMALL}

SHIL_SYSSMALL = 3; // like SHIL_SMALL, but tracks system small icon metric correctly

{$EXTERNALSYM SHIL_LAST}

SHIL_LAST = SHIL_SYSSMALL;



type

TSHGetImageList = function(iImageList: Integer; const RefID: TGUID; out ImageList): HRESULT; stdcall;





type

TSysImageListSize = (

sisSmall, // Large System Images

sisLarge, // Small System Images

sisExtraLarge // Extra Large Images (48x48)

);



type

VirtualSysImages = class(TImageList)

private

FImageSize: TSysImageListSize;

FJumboImages: IImageList;

procedure SetImageSize(const Value: TSysImageListSize);

protected

procedure RecreateHandle;

procedure Flush;

property JumboImages: IImageList read FJumboImages;

public

constructor Create(AOwner: TComponent); override;

destructor Destroy; override;



property ImageSize: TSysImageListSize read FImageSize write SetImageSize;

end;



function ExtraLargeSysImages: VirtualSysImages;

function LargeSysImages: VirtualSysImages;

function SmallSysImages: VirtualSysImages;



procedure FlushImageLists;



implementation



var

FExtraLargeSysImages: VirtualSysImages = nil;

FLargeSysImages: VirtualSysImages = nil;

FSmallSysImages: VirtualSysImages = nil;

ShellDLL: HMODULE = 0;



procedure FlushImageLists;

begin

if Assigned(FSmallSysImages) then

FSmallSysImages.Flush;

if Assigned(FLargeSysImages) then

FLargeSysImages.Flush;

if Assigned(FExtraLargeSysImages) then

FExtraLargeSysImages.Flush

end;



function ExtraLargeSysImages: VirtualSysImages;

begin

if not Assigned(FExtraLargeSysImages) then

begin

FExtraLargeSysImages := VirtualSysImages.Create(nil);

FExtraLargeSysImages.ImageSize := sisExtraLarge;

end;

Result := FExtraLargeSysImages

end;



function LargeSysImages: VirtualSysImages;

begin

if not Assigned(FLargeSysImages) then

begin

FLargeSysImages := VirtualSysImages.Create(nil);

FLargeSysImages.ImageSize := sisLarge;

end;

Result := FLargeSysImages

end;



function SmallSysImages: VirtualSysImages;

begin

if not Assigned(FSmallSysImages) then

begin

FSmallSysImages := VirtualSysImages.Create(nil);

FSmallSysImages.ImageSize := sisSmall;

end;

Result := FSmallSysImages

end;



function SHGetImageList(iImageList: Integer; const RefID: TGUID; out ppvOut): HRESULT;

// Retrieves the system ImageList interface

var

ImageList: TSHGetImageList;

begin

Result := E_NOTIMPL;

if (Win32Platform = VER_PLATFORM_WIN32_NT) then

begin

ShellDLL := LoadLibrary(Shell32);

if ShellDLL <> 0 then

begin

ImageList := GetProcAddress(ShellDLL, PChar(727));

if (Assigned(ImageList)) then

Result := ImageList(iImageList, RefID, ppvOut);

end

end;

end;



{ VirtualSysImages }



constructor VirtualSysImages.Create(AOwner: TComponent);

begin

inherited;

ShareImages := True;

ImageSize := sisSmall;

DrawingStyle := dsTransparent

end;



destructor VirtualSysImages.Destroy;

begin

inherited;

end;



procedure VirtualSysImages.Flush;

begin

RecreateHandle

end;



procedure VirtualSysImages.RecreateHandle;

var

PIDL: PItemIDList;

Malloc: IMalloc;

FileInfo: TSHFileInfo;

Flags: Longword;

begin

Handle := 0;

if FImageSize = sisExtraLarge then

begin

if Succeeded(SHGetImageList(SHIL_EXTRALARGE, IImageList, FJumboImages)) then

Handle := THandle(FJumboImages)

else begin

Flags := SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_LARGEICON;

SHGetSpecialFolderLocation(0, CSIDL_DESKTOP, PIDL);

SHGetMalloc(Malloc);

Handle := SHGetFileInfo(PChar(PIDL), 0, FileInfo, SizeOf(FileInfo), Flags);

Malloc.Free(PIDL);

end

end else

begin

SHGetSpecialFolderLocation(0, CSIDL_DESKTOP, PIDL);

SHGetMalloc(Malloc);

if FImageSize = sisSmall then

Flags := SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_SMALLICON

else

Flags := SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_LARGEICON;

Handle := SHGetFileInfo(PChar(PIDL), 0, FileInfo, SizeOf(FileInfo), Flags);

Malloc.Free(PIDL);

end;

end;



procedure VirtualSysImages.SetImageSize(const Value: TSysImageListSize);

begin

FImageSize := Value;

RecreateHandle;

end;



initialization



finalization

FLargeSysImages.Free;

FSmallSysImages.Free;

FExtraLargeSysImages.Free;

if ShellDLL <> 0 then

FreeLibrary(ShellDLL)



end.

Link to post

I use RKLaucnher 0.41. Beta build 282 (the one that was issued here with KK menu stacks) http://www.aqua-soft.org/board/showthread....auncher+leopard.

downloaded again the latest version of stacks but it doesn't want to open any shortcuts. Files are okay. open in folder shortcut is also okay.

I just don't understand what the problem might be. I have tried different folders. Still no luck.

bSAYZ

which version of RKLauncher do you use.

Link to post

Okay. it looks like its all about my computer. It doesn't open shortcuts even if I add stacks in Rocket Dock. So it is my personal problem, But I have absolutely no idea what prevents it from opening. Tried to make a new shortcut to folder and app. Nione of them work.

Okay. It's time to kill myself. Farewell my friends, It seems like I don't know how to win in that battle against machines.

Link to post

Thank you for this long awaited marvel Matonga. This is a GEM it's working like a cham on Rocket dock. I have Objectdock installed on my laptop, I'll try it and let you know if it works smoothly.

One think I'm wondering : will it one day be possible to drag 'n' drop files onto it to copy them into the folder it points to ? (I thought the real stacks allowed it, maybe I'm wrong)

Anyway I love it. Thanks again

Link to post

Ok, this goes in response to posts above:

Fan view (implementing right now).

Yes, sort by Name, Date added, Date modified, Date created, and Kind (file extension probably) is scheduled for implementation.

Drag n' drop a file to the dock icon, to move the corresponding file to the folder.

Once in stack view, drag the file outside the stack (and drop it in explorer, desktop, or whatever). I don't know how to implement this, but is scheduled anyway ;)

Customization of font (this will be a global option to all stack docklets), so any one with Lucida Grande can get a more Mac look and feel.

I only have a question:

What is Samurize? I even visited the page (http://www.samurize.com/), saw the screenshots, and still don't understand what it is. Is it a dock?

Link to post

"Samurize is an advanced system monitoring and desktop enhancement engine for Windows 2000/XP/2003/Vista. IT professionals, overclockers, gamers and desktop modders alike use Samurize for system information, weather reports, news headlines and much much more. And best of all, Samurize is 100% free!"

Something like widgets engine.

Link to post

I find this to be kind of cool if your not one to fish through your start menu.

Bjorn: Actually I just installed it using RocketDock and I've got 3 Separate stacks running at the same time. I'm assuming because its a docklet, that you should be able to have more than one instance running similar to how kkmenu was able to. giving the different settings to each stack it should work fine.

Link to post
Dear matonga,just to inform you or maybe another request,is it possible to change the text/name that appears on the OB when it's activated as a "Finder" maybe,at the moment is something like "Form2",thank's,appreciated

Please see the attachment

There should be no need to trouble matonga to change that mate. Just open your OB_Mod.ini file in your objectbar directory and type in the name you need the stacks item listed as (you will see the others there - ie. Firefox2.exe=Safari, Explorer.exe=Finder etc. etc.).

I'm not sure if this will work with this app, but it should.

Sorry I have not had the chance to do your OB bars. Are you working with OB2 yet?

I am just too busy to do any skins at the moment.

Good Luck mate!

Link to post
There should be no need to trouble matonga to change that mate. Just open your OB_Mod.ini file in your objectbar directory and type in the name you need the stacks item listed as (you will see the others there - ie. Firefox2.exe=Safari, Explorer.exe=Finder etc. etc.).

I'm not sure if this will work with this app, but it should.

Sorry I have not had the chance to do your OB bars. Are you working with OB2 yet?

I am just too busy to do any skins at the moment.

Good Luck mate!

Hi,Raats,how are you ?

I couldn't find that kind of ini file in mine. OB2 ?,no,is it much better ?,thank's

Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...