Skip to content
Permalink
Browse files

Clean up some includes

  • Loading branch information...
jhasse committed Sep 5, 2018
1 parent 1765781 commit 3412bb88256bb5bca53f572df72f8e7689c312b0
@@ -12,6 +12,5 @@ SortIncludes: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
SpaceBeforeParens: ControlStatements
SpacesInContainerLiterals: true
AllowShortBlocksOnASingleLine: true
Cpp11BracedListStyle: false
IndentCaseLabels: true
@@ -23,13 +23,10 @@
//
///////////////////////////////////////////////////////////////////////////////

#ifndef __COMPONENT_H__
#define __COMPONENT_H__
#pragma once


#include "wx/wx.h"
#include <wx/dynarray.h>
#include <wx/string.h>
#include "fontcontainer.h"

#define COMPONENT_TYPE_ABSTRACT 0
@@ -264,5 +261,3 @@ extern "C" WXEXPORT IComponentLibrary* GetComponentLibrary( IManager* manager )

#define ABSTRACT_COMPONENT( name, class ) \
_REGISTER_COMPONENT( name, class, COMPONENT_TYPE_ABSTRACT )

#endif //__COMPONENT_H__
@@ -23,11 +23,10 @@
//
///////////////////////////////////////////////////////////////////////////////

#ifndef __PLUGIN_H__
#define __PLUGIN_H__
#pragma once

#include "component.h"
#include "wx/wx.h"

#include <vector>
#include <map>

@@ -241,5 +240,3 @@ class ComponentBase : public IComponent
return m_type;
}
};

#endif // __PLUGIN_H__
@@ -23,7 +23,6 @@
//
///////////////////////////////////////////////////////////////////////////////

#include "wx/wx.h"
#include "component.h"

#define XRC_TYPE_TEXT 0
@@ -147,5 +146,3 @@ class XrcToXfbFilter

ticpp::Element *GetXrcProperty(const wxString &name);
};


@@ -23,15 +23,12 @@
//
///////////////////////////////////////////////////////////////////////////////

#ifndef __TYPES__
#define __TYPES__
#pragma once

#include <vector>
#include <wx/string.h>
#include <map>
#include <memory>

#include "wx/wx.h"
#include <vector>
#include <wx/wx.h>

class ObjectType;

@@ -213,6 +210,3 @@ class IntList
void SetList(wxString str);
wxString ToString();
};


#endif // __TYPES__
@@ -25,8 +25,8 @@

#include "bitmaps.h"

#include "../utils/typeconv.h"
#include "../utils/stringutils.h"
#include "../utils/typeconv.h"
#include "../utils/wxfbexception.h"

#include <default.xpm>
@@ -1,17 +1,15 @@
#include "filetocarray.h"

#include "../rad/appdata.h"
#include "../model/objectbase.h"
#include "../codegen/codewriter.h"
#include "../codegen/cppcg.h"
#include "typeconv.h"
#include "wxfbexception.h"
#include "filetocarray.h"

#include <wx/log.h>
#include <wx/filename.h>
#include <wx/image.h>

#include <fstream>
#include <iterator>

#define CASE_BITMAP_TYPE( x ) \
case x: \
@@ -72,37 +70,37 @@ wxString FileToCArray::Generate( const wxString& sourcePath )
return targetFullName;
}

PObjectBase project = AppData()->GetProjectData();

PObjectBase project = AppData()->GetProjectData();

// Get the output path
wxString outputPath;
wxString embeddedFilesOutputPath;
try
wxString outputPath;
wxString embeddedFilesOutputPath;
try
{
outputPath = AppData()->GetOutputPath();
embeddedFilesOutputPath = AppData()->GetEmbeddedFilesOutputPath();
}
catch ( wxFBException& ex )
{
wxLogWarning( ex.what() );
return targetFullName;
outputPath = AppData()->GetOutputPath();
embeddedFilesOutputPath = AppData()->GetEmbeddedFilesOutputPath();
}
catch ( wxFBException& ex )
{
wxLogWarning( ex.what() );
return targetFullName;
}

// Determin if Microsoft BOM should be used
bool useMicrosoftBOM = false;
// Determin if Microsoft BOM should be used
bool useMicrosoftBOM = false;
PProperty pUseMicrosoftBOM = project->GetProperty( wxT( "use_microsoft_bom" ) );
if ( pUseMicrosoftBOM )
{
useMicrosoftBOM = ( pUseMicrosoftBOM->GetValueAsInteger() != 0 );
if ( pUseMicrosoftBOM )
{
useMicrosoftBOM = ( pUseMicrosoftBOM->GetValueAsInteger() != 0 );
}

// Determine if Utf8 or Ansi is to be created
bool useUtf8 = false;
PProperty pUseUtf8 = project->GetProperty( _("encoding") );

if ( pUseUtf8 )
{
useUtf8 = ( pUseUtf8->GetValueAsString() != wxT("ANSI") );
// Determine if Utf8 or Ansi is to be created
bool useUtf8 = false;
PProperty pUseUtf8 = project->GetProperty( _("encoding") );

if ( pUseUtf8 )
{
useUtf8 = ( pUseUtf8->GetValueAsString() != wxT("ANSI") );
}

// setup output file
@@ -145,13 +143,13 @@ wxString FileToCArray::Generate( const wxString& sourcePath )
arrayCodeWriter->WriteLn( wxT("wxBitmap& ") + arrayName + wxT("_to_wx_bitmap()") );
arrayCodeWriter->WriteLn( wxT("{") );
arrayCodeWriter->Indent();
arrayCodeWriter->WriteLn( wxT("static wxMemoryInputStream memIStream( ") + arrayName + wxT(", sizeof( ") + arrayName + wxT(" ) );") );
arrayCodeWriter->WriteLn( wxT("static wxMemoryInputStream memIStream( ") + arrayName + wxT(", sizeof( ") + arrayName + wxT(" ) );") );
arrayCodeWriter->WriteLn( wxT("static wxImage image( memIStream, ") + GetBitmapType( sourceFileName ) + wxT(" );") );
arrayCodeWriter->WriteLn( wxT("static wxBitmap bmp( image );") );
arrayCodeWriter->WriteLn( wxT("return bmp;") );
arrayCodeWriter->Unindent();
arrayCodeWriter->WriteLn( wxT("};") );
arrayCodeWriter->WriteLn();
arrayCodeWriter->WriteLn();

arrayCodeWriter->WriteLn();
arrayCodeWriter->WriteLn( wxT("#endif //") + headerGuardName );

0 comments on commit 3412bb8

Please sign in to comment.
You can’t perform that action at this time.