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:
erwincoumans
2018-09-23 14:17:31 -07:00
parent b73b05e9fb
commit ab8f16961e
1773 changed files with 1081087 additions and 474249 deletions

View File

@@ -5,67 +5,63 @@ using namespace Gwen;
class ListBox : public GUnit
{
public:
GWEN_CONTROL_INLINE( ListBox, GUnit )
public:
GWEN_CONTROL_INLINE(ListBox, GUnit)
{
{
Gwen::Controls::ListBox* ctrl = new Gwen::Controls::ListBox( this );
ctrl->SetBounds( 10, 10, 100, 200 );
Gwen::Controls::ListBox* ctrl = new Gwen::Controls::ListBox(this);
ctrl->SetBounds(10, 10, 100, 200);
ctrl->AddItem( L"First" );
ctrl->AddItem( L"Blue" );
ctrl->AddItem( L"Yellow" );
ctrl->AddItem( L"Orange" );
ctrl->AddItem( L"Brown" );
ctrl->AddItem( L"Green" );
ctrl->AddItem( L"Dog" );
ctrl->AddItem( L"Cat" );
ctrl->AddItem( L"Shoes" );
ctrl->AddItem( L"Chair" );
ctrl->AddItem( L"Last" );
ctrl->AddItem(L"First");
ctrl->AddItem(L"Blue");
ctrl->AddItem(L"Yellow");
ctrl->AddItem(L"Orange");
ctrl->AddItem(L"Brown");
ctrl->AddItem(L"Green");
ctrl->AddItem(L"Dog");
ctrl->AddItem(L"Cat");
ctrl->AddItem(L"Shoes");
ctrl->AddItem(L"Chair");
ctrl->AddItem(L"Last");
ctrl->onRowSelected.Add( this, &ThisClass::RowSelected );
ctrl->onRowSelected.Add(this, &ThisClass::RowSelected);
}
{
Gwen::Controls::ListBox* ctrl = new Gwen::Controls::ListBox( this );
ctrl->SetBounds( 120, 10, 200, 200 );
ctrl->SetColumnCount( 3 );
ctrl->SetAllowMultiSelect( true );
ctrl->onRowSelected.Add( this, &ThisClass::RowSelected );
Gwen::Controls::ListBox* ctrl = new Gwen::Controls::ListBox(this);
ctrl->SetBounds(120, 10, 200, 200);
ctrl->SetColumnCount(3);
ctrl->SetAllowMultiSelect(true);
ctrl->onRowSelected.Add(this, &ThisClass::RowSelected);
{
Gwen::Controls::Layout::TableRow* pRow = ctrl->AddItem( L"Baked Beans" );
pRow->SetCellText( 1, L"Heinz" );
pRow->SetCellText( 2, L"£3.50" );
Gwen::Controls::Layout::TableRow* pRow = ctrl->AddItem(L"Baked Beans");
pRow->SetCellText(1, L"Heinz");
pRow->SetCellText(2, L"£3.50");
}
{
Gwen::Controls::Layout::TableRow* pRow = ctrl->AddItem( L"Bananas" );
pRow->SetCellText( 1, L"Trees" );
pRow->SetCellText( 2, L"£1.27" );
Gwen::Controls::Layout::TableRow* pRow = ctrl->AddItem(L"Bananas");
pRow->SetCellText(1, L"Trees");
pRow->SetCellText(2, L"£1.27");
}
{
Gwen::Controls::Layout::TableRow* pRow = ctrl->AddItem( L"Chicken" );
pRow->SetCellText( 1, L"\u5355\u5143\u6D4B\u8BD5" );
pRow->SetCellText( 2, L"£8.95" );
Gwen::Controls::Layout::TableRow* pRow = ctrl->AddItem(L"Chicken");
pRow->SetCellText(1, L"\u5355\u5143\u6D4B\u8BD5");
pRow->SetCellText(2, L"£8.95");
}
}
}
void RowSelected( Gwen::Controls::Base* pControl )
void RowSelected(Gwen::Controls::Base* pControl)
{
Gwen::Controls::ListBox* ctrl = (Gwen::Controls::ListBox*)pControl;
UnitPrint( Utility::Format( L"Listbox Item Selected: %s", ctrl->GetSelectedRow()->GetText( 0 ).c_str() ) );
UnitPrint(Utility::Format(L"Listbox Item Selected: %s", ctrl->GetSelectedRow()->GetText(0).c_str()));
}
Gwen::Font m_Font;
Gwen::Font m_Font;
};
DEFINE_UNIT_TEST( ListBox, L"ListBox" );
DEFINE_UNIT_TEST(ListBox, L"ListBox");