Skip to content

Commit

Permalink
Format xrCore sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kovalenko committed Oct 12, 2014
1 parent 4aa9cd1 commit b0d13ca
Show file tree
Hide file tree
Showing 137 changed files with 19,847 additions and 18,534 deletions.
73 changes: 39 additions & 34 deletions src/xrCore/ChooseTypes.H
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef ChooseTypesH
#define ChooseTypesH

enum EChooseMode{
enum EChooseMode
{
smCustom = 0,
smSoundSource,
smSoundEnv,
Expand All @@ -25,50 +26,54 @@ enum EChooseMode{
smGameSMotions,
};

enum EChooseFlags{
cfMultiSelect = (1<<0),
cfAllowNone = (1<<1),
cfFullExpand = (1<<2),
enum EChooseFlags
{
cfMultiSelect = (1 << 0),
cfAllowNone = (1 << 1),
cfFullExpand = (1 << 2),
};

struct SChooseItem{
shared_str name;
shared_str hint;
SChooseItem (LPCSTR nm, LPCSTR ht):name(nm),hint(ht){}
struct SChooseItem
{
shared_str name;
shared_str hint;
SChooseItem(LPCSTR nm, LPCSTR ht) :name(nm), hint(ht) {}
};
DEFINE_VECTOR(SChooseItem,ChooseItemVec,ChooseItemVecIt);
DEFINE_VECTOR(SChooseItem, ChooseItemVec, ChooseItemVecIt);

// typedef
typedef fastdelegate::FastDelegate2<ChooseItemVec&,void*> TOnChooseFillItems;
typedef fastdelegate::FastDelegate2<SChooseItem*, PropItemVec&> TOnChooseSelectItem;
typedef fastdelegate::FastDelegate3<LPCSTR, HDC, const Irect&> TOnDrawThumbnail;
typedef fastdelegate::FastDelegate0<> TOnChooseClose;
typedef fastdelegate::FastDelegate2<ChooseItemVec&, void*> TOnChooseFillItems;
typedef fastdelegate::FastDelegate2<SChooseItem*, PropItemVec&> TOnChooseSelectItem;
typedef fastdelegate::FastDelegate3<LPCSTR, HDC, const Irect&> TOnDrawThumbnail;
typedef fastdelegate::FastDelegate0<> TOnChooseClose;

typedef void (*TOnChooseFillEvents)();
typedef void(*TOnChooseFillEvents)();

struct SChooseEvents{
enum{
flAnimated = (1<<0),
struct SChooseEvents
{
enum
{
flAnimated = (1 << 0),
};
shared_str caption;
TOnChooseFillItems on_fill;
TOnChooseSelectItem on_sel;
TOnDrawThumbnail on_thm;
TOnChooseClose on_close;
Flags32 flags;
SChooseEvents (){caption="Select Item";flags.zero();}
SChooseEvents (LPCSTR capt, TOnChooseFillItems f, TOnChooseSelectItem s, TOnDrawThumbnail t, TOnChooseClose c, u32 fl)
shared_str caption;
TOnChooseFillItems on_fill;
TOnChooseSelectItem on_sel;
TOnDrawThumbnail on_thm;
TOnChooseClose on_close;
Flags32 flags;
SChooseEvents() { caption = "Select Item"; flags.zero(); }
SChooseEvents(LPCSTR capt, TOnChooseFillItems f, TOnChooseSelectItem s, TOnDrawThumbnail t, TOnChooseClose c, u32 fl)
{
Set (capt,f,s,t,c,fl);
Set(capt, f, s, t, c, fl);
}
void Set (LPCSTR capt, TOnChooseFillItems f, TOnChooseSelectItem s, TOnDrawThumbnail t, TOnChooseClose c, u32 fl)
void Set(LPCSTR capt, TOnChooseFillItems f, TOnChooseSelectItem s, TOnDrawThumbnail t, TOnChooseClose c, u32 fl)
{
caption = capt;
on_fill = f;
on_sel = s;
on_thm = t;
on_close = c;
flags.assign (fl);
caption = capt;
on_fill = f;
on_sel = s;
on_thm = t;
on_close = c;
flags.assign(fl);
}
};

Expand Down
Loading

0 comments on commit b0d13ca

Please sign in to comment.