Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.9 KiB

/*
* BorderLayout
*/
#ifndef DUI_BORDERLAYOUT_H_INCLUDED
#define DUI_BORDERLAYOUT_H_INCLUDED
#pragma once
namespace DirectUI
{
// BorderLayout positions
#define BLP_Left 0
#define BLP_Top 1
#define BLP_Right 2
#define BLP_Bottom 3
#define BLP_Client 4
////////////////////////////////////////////////////////
// BorderLayout
class BorderLayout : public Layout
{
public:
static HRESULT Create(int dNumParams, int* pParams, OUT Value** ppValue); // For parser
static HRESULT Create(OUT Layout** ppLayout);
// Layout callbacks
virtual void DoLayout(Element* pec, int dWidth, int dHeight);
virtual SIZE UpdateDesiredSize(Element* pec, int dConstW, int dConstH, Surface* psrf);
virtual void OnAdd(Element* pec, Element** ppeAdd, UINT cCount);
virtual void OnRemove(Element* pec, Element** ppeRemove, UINT cCount);
virtual void OnLayoutPosChanged(Element* pec, Element* peChanged, int dOldLP, int dNewLP);
virtual Element* GetAdjacent(Element* pec, Element* peFrom, int iNavDir, NavReference const* pnr, bool bKeyableOnly);
BorderLayout() { }
void Initialize();
virtual ~BorderLayout() { }
Element* _peClientPos;
SIZE _sizeDesired;
SIZE GetMaxCenter(Element* pec, int x, int y, int cw, int ch, int mTop, int mLeft, int mRight, int mBottom, bool setValues, HDC hDC);
SIZE GetMaxLeftRight(Element* pec, int current, int x, int y, int cw, int ch, int mTop, int mLeft, int mRight, int mBottom, bool setValues, HDC hDC);
SIZE GetMaxTopBottom(Element* pec, int current, int x, int y, int cw, int ch, int mTop, int mLeft, int mRight, int mBottom, bool setValues, HDC hDC = NULL);
int NextChild(int i, Element* pec, Element** ppeCurrent, int* playoutPos);
private:
void SetClient(Element* pe);
};
} // namespace DirectUI
#endif // DUI_BORDERLAYOUT_H_INCLUDED