Feature #1019

Add public setWindowIcon method to UDriver

Added by kervala over 8 years ago. Updated over 8 years ago.

Status:Closed Start date:07/14/2010
Priority:Normal Due date:
Assignee:kervala % Done:

100%

Category:NeL: General
Target version:Version 0.8.0

Description

Now we implemented setWindowIcon, we can add an interface to call it from NeL applications.


Related issues

blocked by Ryzom - Feature #1018: Implement setWindowIcon for Win32 Closed 07/14/2010
blocked by Ryzom - Feature #973: Add an internal method to set an icon for X11 window in O... Closed 06/10/2010

History

#1 Updated by kervala over 8 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Applied in changeset r478.

#2 Updated by kervala over 8 years ago

  • Target version set to Version 0.8.0

To use it :

 1        std::vector<NLMISC::CBitmap> bitmaps;
 2
 3        NLMISC::CIFile file;
 4
 5        std::string fileName;
 6
 7        fileName = "icon_small.png";
 8
 9        if (file.open(fileName))
10        {
11            NLMISC::CBitmap bitmap;
12            if (bitmap.load(file))
13                bitmaps.push_back(bitmap);
14        }
15
16        fileName = "icon_big.png";
17
18        if (file.open(fileName))
19        {
20            NLMISC::CBitmap bitmap;
21            if (bitmap.load(file))
22                bitmaps.push_back(bitmap);
23        }
24
25        Driver->setWindowIcon(bitmaps);
26

Basically, you can put as many icons you want, it will try to find icons with the exact size first (16x16 and 32x32 for Windows) or take bigger icons and resize them. Under Linux, it will take best icons.

#3 Updated by kervala over 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF