Code-style consistency improvement:
Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files. make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type. This commit contains no other changes aside from adding and applying clang-format-all.sh
This commit is contained in:
@@ -15,73 +15,69 @@
|
||||
#include "Gwen/Controls/TextBox.h"
|
||||
#include "Gwen/Controls/Menu.h"
|
||||
|
||||
|
||||
namespace Gwen
|
||||
namespace Gwen
|
||||
{
|
||||
namespace Controls
|
||||
namespace Controls
|
||||
{
|
||||
class GWEN_EXPORT ComboBoxButton : public Button
|
||||
{
|
||||
GWEN_CONTROL_INLINE(ComboBoxButton, Button) {}
|
||||
|
||||
virtual void Render(Skin::Base* skin)
|
||||
{
|
||||
class GWEN_EXPORT ComboBoxButton : public Button
|
||||
{
|
||||
GWEN_CONTROL_INLINE( ComboBoxButton, Button ){}
|
||||
|
||||
virtual void Render( Skin::Base* skin )
|
||||
{
|
||||
skin->DrawComboBoxButton( this, m_bDepressed );
|
||||
}
|
||||
};
|
||||
|
||||
class GWEN_EXPORT ComboBox : public Button
|
||||
{
|
||||
public:
|
||||
|
||||
GWEN_CONTROL( ComboBox, Button );
|
||||
|
||||
virtual void Render( Skin::Base* skin );
|
||||
|
||||
virtual Gwen::Controls::Label* GetSelectedItem();
|
||||
|
||||
virtual void OnPress();
|
||||
void OpenButtonPressed( Controls::Base* /*pControl*/ );
|
||||
|
||||
virtual void OnItemSelected( Controls::Base* pControl );
|
||||
virtual void OpenList();
|
||||
virtual void CloseList();
|
||||
|
||||
virtual Controls::Base* GetControlAt( int x, int y )
|
||||
{
|
||||
if ( x < 0 || y < 0 || x >= Width() || y >= Height() )
|
||||
return NULL;
|
||||
|
||||
return this;
|
||||
}
|
||||
virtual bool IsMenuComponent()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void ClearItems();
|
||||
|
||||
virtual MenuItem* AddItem( const UnicodeString& strLabel, const String& strName = "", Gwen::Event::Handler* pHandler = NULL, Gwen::Event::Handler::Function fn = NULL );
|
||||
virtual bool OnKeyUp( bool bDown );
|
||||
virtual bool OnKeyDown( bool bDown );
|
||||
|
||||
virtual void RenderFocus( Gwen::Skin::Base* skin );
|
||||
virtual void OnLostKeyboardFocus();
|
||||
virtual void OnKeyboardFocus();
|
||||
|
||||
virtual bool IsMenuOpen();
|
||||
|
||||
Gwen::Event::Caller onSelection;
|
||||
|
||||
protected:
|
||||
|
||||
Menu* m_Menu;
|
||||
MenuItem* m_SelectedItem;
|
||||
|
||||
Controls::Base* m_Button;
|
||||
|
||||
};
|
||||
|
||||
skin->DrawComboBoxButton(this, m_bDepressed);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class GWEN_EXPORT ComboBox : public Button
|
||||
{
|
||||
public:
|
||||
GWEN_CONTROL(ComboBox, Button);
|
||||
|
||||
virtual void Render(Skin::Base* skin);
|
||||
|
||||
virtual Gwen::Controls::Label* GetSelectedItem();
|
||||
|
||||
virtual void OnPress();
|
||||
void OpenButtonPressed(Controls::Base* /*pControl*/);
|
||||
|
||||
virtual void OnItemSelected(Controls::Base* pControl);
|
||||
virtual void OpenList();
|
||||
virtual void CloseList();
|
||||
|
||||
virtual Controls::Base* GetControlAt(int x, int y)
|
||||
{
|
||||
if (x < 0 || y < 0 || x >= Width() || y >= Height())
|
||||
return NULL;
|
||||
|
||||
return this;
|
||||
}
|
||||
virtual bool IsMenuComponent()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void ClearItems();
|
||||
|
||||
virtual MenuItem* AddItem(const UnicodeString& strLabel, const String& strName = "", Gwen::Event::Handler* pHandler = NULL, Gwen::Event::Handler::Function fn = NULL);
|
||||
virtual bool OnKeyUp(bool bDown);
|
||||
virtual bool OnKeyDown(bool bDown);
|
||||
|
||||
virtual void RenderFocus(Gwen::Skin::Base* skin);
|
||||
virtual void OnLostKeyboardFocus();
|
||||
virtual void OnKeyboardFocus();
|
||||
|
||||
virtual bool IsMenuOpen();
|
||||
|
||||
Gwen::Event::Caller onSelection;
|
||||
|
||||
protected:
|
||||
Menu* m_Menu;
|
||||
MenuItem* m_SelectedItem;
|
||||
|
||||
Controls::Base* m_Button;
|
||||
};
|
||||
|
||||
} // namespace Controls
|
||||
} // namespace Gwen
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user