@ -48,7 +48,7 @@ const int UPDATE_DIST = 1; // update when x - last_x <= UPDATE_DIST
constintDEF_SMALL_SIZE=32;// default small icon size
constintDEF_BIG_SIZE=90;// default big icon size
constintDEF_DOCK_OPACITY=50;// default dock opacity
constintDEF_PRIORITY=5;
constintDEF_PRIORITY=5;// default priority
constintDEF_HIDDEN=1;// default hidden priority
constintANIM_TOTAL_STEP=6;// not in use yet
@ -66,44 +66,43 @@ class KoolDock : public TQWidget
KoolDock(TQWidget*parent=0,constchar*name=0);
/** destructor */
~KoolDock();
voidsetMainPath(constTQString&path);
voidsetMainPath(constTQString&path);// send run paramenters to the widget
voidsetArgs(constTQString¶m);
clip*clipw;
clip*clipw;// clipping window - makes kooldock's edge sticky
private:
TQTime*perf;
TQTime*perf;// variable used to control animation speed
// configuration variables
intfShowTaskbar;// show-taskbar flag
intfMinimizedOnly;// show only minimized icons flag
intfShowNotification;// show-notification flag
intfShowBorders;// show-borders flag
intfShowKMenu;// show the K menu
intfUseKBFX;
intfUseKBFX;// makes kooldock use KBFX insted of K menu
intfPriority;// "nice" priority
intfMouseTimer;// Mouse timer interval
intfClipping;//window area clippig
intfClipIcons;//icon area clipping
intfClipping;//window area clippig
intfClipIcons;//icon area clipping
longintfzoomSpeed,zoomStep,zoomStepB,zoomStepS,zoomVal;//speed of show/hide animation
intzoomTicksB,zoomTicksS;//counts timer ticks
intneededTicksB,neededTicksS;//sets how many ticks is necessary to calculate new speed
boolfSpeed;
boolfSpeed;// enables speed control
TQColorborderColor;
intfHidden;// hidden dockbar
intfStayBelow;
intfHidden;// determines dock's autohide
intfStayBelow;// makes dock stay below other windows while not focused
intfOrientation;//bottom/left/top/right
intfHideOnClick;
intfSteppy;
intfHideOnClick;// determines if kooldock should hide after clicking an icon
intfSteppy;// enables autocenter on icon
intfShowFrames;// frames to show the dock "growing from bottom"
intfGrowFrames;// frames to grow the icon when the mouse is over it.
intfHighLightTime;
boolfFirstRun;
boolfShowShot;
boolfGrouping;
intfRepaintInterval;
boolfFirstRun;// shows information box one time
boolfShowShot;// makes kooldock do screenshot of minimized window
boolfGrouping;// enables window grouping
intxinerama;//whether we want xinerama
inthideTimer;//user define time to show dock
intSolid;//whether using backgroung Image or not (for preference controls)
intSolid;//whether using background Image or not (for preference controls)
intfShowNav;//whether we want the navigation menu (clock + desktop chooser) in kooldocks main menu
intnumSystray;//for systray control
intfSystray;//whether we want the systray or not
@ -112,43 +111,38 @@ class KoolDock : public TQWidget
boolfirstTime;//to control certain things
TQStringcurTheme;//for the background theme (to preserve changes)
intleftRes;//Left monitor resolution
intXinDesiredHeight;
intXinDesiredHeight;// size of screen on which kooldock is visible in Xinerama
intXinPreviousWidth;
intfpercentPos;
intfpercentPos;// sets position of dock on screen
boolnoSet;
boolfirstInit;
boolreloadIcons;
boolinitialization;
intptPart;
boollockSetTab;// disables changing opened tab in preferences window
boolreloadIcons;// sets the need of reloading icons after changes in setting
boolinitialization;// blocks dock during loading settings
intptPart;// variable used in speed control as state data
boolmouseOnLauncher;
TQStringListlstDrop;
booluseList;
boolmouseOnLauncher;// determines if mouse is on laucher icon or on window icon
TQStringListlstDrop;// list of dropped elements
booluseList;// determines if dropped elements should be sent to selected application
Atomnet_system_tray_selection;
Atomnet_system_tray_opcode;
TQStringfLeftImg;
TQStringfLeftImg;//paths to background images
TQStringfRightImg;
TQStringfCenterImg;
boolfNWideBg;
boolscaleMax;
boolfNWideBg;// determines if background should not be wider than screen
boolscaleMax;// sets scaling mode of background corners
TQPixmapLeftImg;
TQPixmapRightImg;
TQPixmapCenterImg;
TQPixmapTempScaledCenter;
TQPixmapTestPix;
TQImageTestIm;
unsignedintoLeft,oRight;
TQPixmapTempScaledCenter;
intiwSmall;
intiwBig;
intiwBig2;
intiwSmall;// sizes of small and big icon
intiwBig;// size of current big icon - during animation its value is between iwSmall and iwBig2
intiwBig2;// size of base size of big icon
intfirstX,tmpw;
intfirstX,tmpw;// variables used in background positioning
intoldfirstX,oldtmpw;
intlastX;
@ -157,7 +151,7 @@ class KoolDock : public TQWidget
TQColorsepColor;// separator bar's color
intYbase;
intYbase;// sets position of dock, and how big part of dock is out of screen
// normal variables
TQStringprogPath;
@ -169,23 +163,22 @@ class KoolDock : public TQWidget
TQStringListignoreList;
NETWinInfo*info;
NETWinInfo*info;// window informations
KWinModule*wm;
SetupDialog*setupdlg;
intOffset;
intOffset;// scrolls dock if all icons are wider than screen
intnumLaunchers;// number of quick launcher items
intx,y,w,h,h0,h1,w0,x0,w1,x1;
intx,y,w,h,h0,h1,w0,x0,w1,x1;// positions *0 - small *1 big
intrx,ry,rw,rh,uw;//current position
intix,iy,iDist,iSpace;
intdw,dh,rdh;
intfuncW,funcH;
intii_first,ii_last;
intix,iy,iDist,iSpace;// sizes of dock's elements - icons, distance between small icon centres, space between them
intdw,dh,rdh;// real current position
intfuncW,funcH;// variables used to calculate zoomed icons sizes
intii_first,ii_last;// idexes of first and last zoomed icons
intsoffset,eoffset;//used in icon positioning
intsx,sw;
intadjust;
intfAmount;
intlast_mx;
intadjust;// offset of first zoomed icon
intfAmount;// amount of big icons
intlast_mx;// mouse position
intlast_ncx;
TQPtrList<Item>items;//currently visible items
@ -197,7 +190,7 @@ class KoolDock : public TQWidget
KRootPixmap*rootpix;
KPixmapbottomBg;
KPixmapbottomBgf;
KPixmapbottomBgf;// faded bottom background
TQPixmaptopBg;
TDEAboutDialog*aboutDlg;
@ -210,24 +203,23 @@ class KoolDock : public TQWidget
intanimStep;// animation step, not in use yet
intiOnClick;// index of the quick launcher being clicked
WIdcId;// id of the application (used in the right click menu over the taskbar)
TQStringcClass;
WIdCurrentFocus;
intonChangeAnimStep;
TDEPopupMenu*deskpopup;
TDEPopupMenu*appMenu;
TDEPopupMenu*godesk;
TDEPopupMenu*tasklist;
TDEPopupMenu*popup;
TDEPopupMenu*advMenu;
intmenuCount,currMenu;
boolallApps;
WIdCurrentFocus;// id of window that is currently active
TDEPopupMenu*deskpopup;// moving between desktops
TDEPopupMenu*appMenu;// list of windows in selected group
TDEPopupMenu*godesk;// sends window to another desktop
TDEPopupMenu*tasklist;// list of all windows
TDEPopupMenu*popup;// main popup
TDEPopupMenu*advMenu;// kicker like advanced menu of window icon
intmenuCount;// counts menus - disable dock hiding when popups are visible, and determines if user want to do some changes to specific window, or to all windows in group
intcurrMenu;// information to which window user apply changes
boolallApps;// sets if dock should apply changes to all windows
TQPtrList<TDEPopupMenu>popups;
booliGroup;
intdIndex,nDesks;
booliGroup;// menu of icon is connect with single window or with group of windows
intdIndex,nDesks;// index of desktop (0 for all), count of desktops
TQPtrList<dInfo>desks;
boolfExpanded;
booltrack2active;
boolfExpanded;// informs if kooldock is zoomed
booltrack2active;// checks if second tracking timer is active - to make kooldock open in proper time
/*Xosd Section */
TQStringnom;
TQStringaux;
@ -243,62 +235,62 @@ class KoolDock : public TQWidget
intxosdSize;
KURIFilterData*_filterData;
xosd*xosdw;
intanimValue;
intanimValue;// icon highlight
intanimState;
voidrun(constTQString&cmd);
intfunc(intx);
booldoRepaint;
intlastXPos;// postion of mouse - used in autocenter
intlastYPos;
voidrun(constTQString&cmd);// runs command, including data dropped of launcher
intfunc(intx);// function used in scaling zoomed icons
intfunc2(intx);
voiddoUpdateGeometry();
booladdTask(WIdid,intiFound=-1);
boolrmTask(WIdid,intiFound=-1);
voidrmwTask(intiFound);
voiddoUpdateGeometry();// updates kooldock dimentios, and icon positions
booladdTask(WIdid,intiFound=-1);// add window to dock
boolrmTask(WIdid,intiFound=-1);// remove window from dock
voidrmwTask(intiFound);// remove window from list (hidden, used for performance)
booladdwTask(WIdid);
voidmovetoback(WIdid);
voidmovetoback(WIdid);// send icon in group to end of list - used to determine order of windows in group
voidloadConf();
voidloadIgnore();
voidsaveConf();
voidloadMenu();
voidaddWindows();
intitemFromPoint(intx);
intxFromIndex(inti);
voidaddWindows();// refreshes list of windows (hidden list, and icons on dock)
intitemFromPoint(intx);// gets icon in specified point
intxFromIndex(inti);// gets position of icon from its index