summaryrefslogtreecommitdiff
path: root/utils/xbox/FontMaker/fontmaker.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/xbox/FontMaker/fontmaker.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/xbox/FontMaker/fontmaker.h')
-rw-r--r--utils/xbox/FontMaker/fontmaker.h145
1 files changed, 145 insertions, 0 deletions
diff --git a/utils/xbox/FontMaker/fontmaker.h b/utils/xbox/FontMaker/fontmaker.h
new file mode 100644
index 0000000..43526ad
--- /dev/null
+++ b/utils/xbox/FontMaker/fontmaker.h
@@ -0,0 +1,145 @@
+//-----------------------------------------------------------------------------
+// Name: FontMaker.h
+//
+// Desc: Defines the class behaviors for the application.
+//
+// Hist: 09.06.02 - Revised Fontmaker sample
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//-----------------------------------------------------------------------------
+#ifndef FONTMAKER_H
+#define FONTMAKER_H
+
+#include "resource.h"
+#include "BitmapFontFile.h"
+#include <math.h>
+#include "..\toollib\toollib.h"
+#include "..\toollib\scriplib.h"
+#include "..\toollib\piclib.h"
+
+//-----------------------------------------------------------------------------
+// Name: class CFontMakerView
+// Desc: The scroll view class for viewing the font texture image
+//-----------------------------------------------------------------------------
+class CFontMakerView : public CScrollView
+{
+protected:
+ CFontMakerView() {}
+ DECLARE_DYNCREATE(CFontMakerView)
+
+ CDC m_memDC;
+
+public:
+ VOID OnNewFontGlyphs();
+
+ virtual ~CFontMakerView();
+
+public:
+
+ // Overridden functions
+ //{{AFX_VIRTUAL(CFontMakerView)
+ public:
+ virtual void OnDraw(CDC* pDC);
+ virtual void OnInitialUpdate();
+ protected:
+ //}}AFX_VIRTUAL
+
+protected:
+ // Message map functions
+ //{{AFX_MSG(CFontMakerView)
+ afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
+ afx_msg BOOL OnEraseBkgnd(CDC* pDC);
+ afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+};
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: class CFontMakerFrameWnd
+// Desc: The main frame window class for the app, which contains the dialog bar
+// full of controls and the scroll view to view the font texture image.
+//-----------------------------------------------------------------------------
+class CFontMakerFrameWnd : public CFrameWnd
+{
+public:
+ CFontMakerFrameWnd() {}
+ virtual ~CFontMakerFrameWnd() {}
+
+ CDialogBar m_wndDialogBar;
+ CDialogBar* GetDialogBar() { return &m_wndDialogBar; }
+
+protected:
+ DECLARE_DYNCREATE(CFontMakerFrameWnd)
+
+ // Message map functions
+ //{{AFX_MSG(CFontMakerFrameWnd)
+ afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+};
+
+
+
+
+//-----------------------------------------------------------------------------
+// Name: class CFontMakerApp
+// Desc: The main app class
+//-----------------------------------------------------------------------------
+class CFontMakerApp : public CWinApp
+{
+ CDialogBar* m_pDialogBar;
+ CFontMakerView* m_pView;
+ HCURSOR m_hWaitCursor;
+
+public:
+ CFontMakerApp() {}
+ ~CFontMakerApp() {}
+
+ VOID UpdateSelectedGlyph( BOOL bGlyphSelected, int iSelectedGlyph = 0 );
+ HRESULT CalculateAndRenderGlyphs();
+ VOID InsertGlyph();
+
+ void SetTextureSize( int width, int height );
+
+ // Overrides
+ //{{AFX_VIRTUAL(CFontMakerApp)
+ public:
+ virtual BOOL InitInstance();
+ virtual int ExitInstance();
+ //}}AFX_VIRTUAL
+
+ // Implementation
+ //{{AFX_MSG(CFontMakerApp)
+ afx_msg void OnNewFontButton();
+ afx_msg void OnEffectsCheck();
+ afx_msg void OnGlyphsFromRangeRadio();
+ afx_msg void OnChangeGlpyhsRangeEdit();
+ afx_msg void OnGlyphsFromFileRadio();
+ afx_msg void OnChangeGlyphsFileEdit();
+ afx_msg void OnGlyphsFileSelectorButton();
+ afx_msg void OnTextureSizeButton();
+ afx_msg void OnMagnifyButton();
+ afx_msg void OnGlyphSpecial();
+ afx_msg void OnUpdateButton( CCmdUI* pCmdUI );
+ afx_msg void OnSaveButton();
+ afx_msg void OnExit();
+ afx_msg void OnAbout();
+ afx_msg void OnHelp();
+ afx_msg void OnGlyphsCustom();
+ afx_msg void OnLoadButton();
+ afx_msg void OnLoadCustomFontButton();
+ //}}AFX_MSG
+ DECLARE_MESSAGE_MAP()
+};
+
+
+
+// External reference to the unique application instance
+extern CFontMakerApp theApp;
+
+
+
+#endif // FONTMAKER_H