Renamed moreUTF8.h to utf8_functions.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17239 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3691c680c4
commit
93820f1ea7
@ -1,5 +1,9 @@
|
|||||||
#ifndef __MOREUTF8
|
/*
|
||||||
#define __MOREUTF8
|
* Copyright 2004-2006, Haiku, Inc.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
#ifndef _UTF8_FUNCTIONS_H
|
||||||
|
#define _UTF8_FUNCTIONS_H
|
||||||
|
|
||||||
|
|
||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
@ -205,4 +209,4 @@ UTF8ToLength(const char *bytes)
|
|||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __MOREUTF8
|
#endif // _UTF8_FUNCTIONS_H
|
@ -1,46 +1,30 @@
|
|||||||
//------------------------------------------------------------------------------
|
/*
|
||||||
// Copyright (c) 2003, OpenBeOS
|
* Copyright 2003-2006, Haiku, Inc.
|
||||||
//
|
* Distributed under the terms of the MIT License.
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
*
|
||||||
// copy of this software and associated documentation files (the "Software"),
|
* Authors:
|
||||||
// to deal in the Software without restriction, including without limitation
|
* Stefano Ceccherini (burton666@libero.it)
|
||||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
*/
|
||||||
// and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
// Software is furnished to do so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in
|
|
||||||
// all copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
// DEALINGS IN THE SOFTWARE.
|
|
||||||
//
|
|
||||||
// File Name: UndoBuffer.cpp
|
|
||||||
// Author: Stefano Ceccherini (burton666@libero.it)
|
|
||||||
// Description: _BUndoBuffer_ and its subclasses
|
|
||||||
// handle different types of Undo operations.
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Standard Includes -----------------------------------------------------------
|
//! _BUndoBuffer_ and its subclasses handle different types of Undo operations.
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstring>
|
#include "UndoBuffer.h"
|
||||||
|
#include "utf8_functions.h"
|
||||||
|
|
||||||
// System Includes -------------------------------------------------------------
|
|
||||||
#include <Clipboard.h>
|
#include <Clipboard.h>
|
||||||
|
|
||||||
// Local Includes --------------------------------------------------------------
|
#include <stdio.h>
|
||||||
#include "moreUTF8.h"
|
#include <stdlib.h>
|
||||||
#include "UndoBuffer.h"
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
// TODO: document properly this file
|
// TODO: properly document this file
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark - _BUndoBuffer_
|
||||||
|
|
||||||
|
|
||||||
// ******** _BUndoBuffer_ *******
|
|
||||||
_BUndoBuffer_::_BUndoBuffer_(BTextView *textView, undo_state state)
|
_BUndoBuffer_::_BUndoBuffer_(BTextView *textView, undo_state state)
|
||||||
:
|
:
|
||||||
fTextView(textView),
|
fTextView(textView),
|
||||||
@ -101,10 +85,11 @@ _BUndoBuffer_::RedoSelf(BClipboard *clipboard)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ******** _BCutUndoBuffer_ *******
|
// #pragma mark - _BCutUndoBuffer_
|
||||||
|
|
||||||
|
|
||||||
_BCutUndoBuffer_::_BCutUndoBuffer_(BTextView *textView)
|
_BCutUndoBuffer_::_BCutUndoBuffer_(BTextView *textView)
|
||||||
:
|
: _BUndoBuffer_(textView, B_UNDO_CUT)
|
||||||
_BUndoBuffer_(textView, B_UNDO_CUT)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,11 +120,12 @@ _BCutUndoBuffer_::RedoSelf(BClipboard *clipboard)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ******** _BPasteUndoBuffer_ *******
|
// #pragma mark - _BPasteUndoBuffer_
|
||||||
|
|
||||||
|
|
||||||
_BPasteUndoBuffer_::_BPasteUndoBuffer_(BTextView *textView, const char *text,
|
_BPasteUndoBuffer_::_BPasteUndoBuffer_(BTextView *textView, const char *text,
|
||||||
int32 textLen, text_run_array *runArray, int32 runArrayLen)
|
int32 textLen, text_run_array *runArray, int32 runArrayLen)
|
||||||
:
|
: _BUndoBuffer_(textView, B_UNDO_PASTE),
|
||||||
_BUndoBuffer_(textView, B_UNDO_PASTE),
|
|
||||||
fPasteText(NULL),
|
fPasteText(NULL),
|
||||||
fPasteTextLength(textLen),
|
fPasteTextLength(textLen),
|
||||||
fPasteRunArray(NULL),
|
fPasteRunArray(NULL),
|
||||||
@ -183,10 +169,11 @@ _BPasteUndoBuffer_::RedoSelf(BClipboard *clipboard)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ******** _BClearUndoBuffer_ *******
|
// #pragma mark - _BClearUndoBuffer_
|
||||||
|
|
||||||
|
|
||||||
_BClearUndoBuffer_::_BClearUndoBuffer_(BTextView *textView)
|
_BClearUndoBuffer_::_BClearUndoBuffer_(BTextView *textView)
|
||||||
:
|
: _BUndoBuffer_(textView, B_UNDO_CLEAR)
|
||||||
_BUndoBuffer_(textView, B_UNDO_CLEAR)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,12 +191,13 @@ _BClearUndoBuffer_::RedoSelf(BClipboard *clipboard)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ******** _BDropUndoBuffer_ ********
|
// #pragma mark - _BDropUndoBuffer_
|
||||||
_BDropUndoBuffer_::_BDropUndoBuffer_(BTextView *textView, char const *text, int32 textLen,
|
|
||||||
text_run_array *runArray, int32 runArrayLen, int32 location,
|
|
||||||
bool internalDrop)
|
_BDropUndoBuffer_::_BDropUndoBuffer_(BTextView *textView, char const *text,
|
||||||
:
|
int32 textLen, text_run_array *runArray, int32 runArrayLen,
|
||||||
_BUndoBuffer_(textView, B_UNDO_DROP),
|
int32 location, bool internalDrop)
|
||||||
|
: _BUndoBuffer_(textView, B_UNDO_DROP),
|
||||||
fDropText(NULL),
|
fDropText(NULL),
|
||||||
fDropTextLength(textLen),
|
fDropTextLength(textLen),
|
||||||
fDropRunArray(NULL)
|
fDropRunArray(NULL)
|
||||||
@ -264,10 +252,11 @@ _BDropUndoBuffer_::RedoSelf(BClipboard *)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ******** _BTypingUndoBuffer_ ********
|
// #pragma mark - _BTypingUndoBuffer_
|
||||||
|
|
||||||
|
|
||||||
_BTypingUndoBuffer_::_BTypingUndoBuffer_(BTextView *textView)
|
_BTypingUndoBuffer_::_BTypingUndoBuffer_(BTextView *textView)
|
||||||
:
|
: _BUndoBuffer_(textView, B_UNDO_TYPING),
|
||||||
_BUndoBuffer_(textView, B_UNDO_TYPING),
|
|
||||||
fTypedText(NULL),
|
fTypedText(NULL),
|
||||||
fTypedStart(fStart),
|
fTypedStart(fStart),
|
||||||
fTypedEnd(fEnd),
|
fTypedEnd(fEnd),
|
||||||
|
@ -1,47 +1,34 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2004 Haiku, Inc.
|
* Copyright 2003-2006, Haiku, Inc.
|
||||||
*
|
* Distributed under the terms of the MIT License.
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
|
||||||
* to deal in the Software without restriction, including without limitation
|
|
||||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
* and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
* Software is furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
* DEALINGS IN THE SOFTWARE.
|
|
||||||
*
|
*
|
||||||
* File: WidthBuffer.cpp
|
* Authors:
|
||||||
* Author: Stefano Ceccherini (burton666@libero.it)
|
* Stefano Ceccherini (burton666@libero.it)
|
||||||
* Description: Caches string widths in a hash table, to avoid a trip to
|
|
||||||
* the app server.
|
|
||||||
*/
|
*/
|
||||||
#include <Debug.h>
|
|
||||||
#include <Font.h>
|
|
||||||
|
|
||||||
#include "moreUTF8.h"
|
//! Caches string widths in a hash table, to avoid a trip to the app server.
|
||||||
|
|
||||||
|
|
||||||
|
#include "utf8_functions.h"
|
||||||
#include "TextGapBuffer.h"
|
#include "TextGapBuffer.h"
|
||||||
#include "WidthBuffer.h"
|
#include "WidthBuffer.h"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <Debug.h>
|
||||||
|
#include <Font.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
const static uint32 kTableCount = 128;
|
const static uint32 kTableCount = 128;
|
||||||
const static uint32 kInvalidCode = 0xFFFFFFFF;
|
const static uint32 kInvalidCode = 0xFFFFFFFF;
|
||||||
|
|
||||||
|
|
||||||
struct hashed_escapement
|
struct hashed_escapement {
|
||||||
{
|
|
||||||
uint32 code;
|
uint32 code;
|
||||||
float escapement;
|
float escapement;
|
||||||
hashed_escapement() {
|
|
||||||
|
hashed_escapement()
|
||||||
|
{
|
||||||
code = kInvalidCode;
|
code = kInvalidCode;
|
||||||
escapement = 0;
|
escapement = 0;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2005, Haiku, Inc.
|
* Copyright 2001-2006, Haiku, Inc.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@ -9,10 +9,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <new>
|
#include <AppServerLink.h>
|
||||||
|
#include <FontPrivate.h>
|
||||||
#include <stdio.h>
|
#include <ObjectList.h>
|
||||||
#include <stdlib.h>
|
#include <ServerProtocol.h>
|
||||||
|
#include <truncate_string.h>
|
||||||
|
#include <utf8_functions.h>
|
||||||
|
|
||||||
#include <Autolock.h>
|
#include <Autolock.h>
|
||||||
#include <Font.h>
|
#include <Font.h>
|
||||||
@ -20,15 +22,12 @@
|
|||||||
#include <Message.h>
|
#include <Message.h>
|
||||||
#include <PortLink.h>
|
#include <PortLink.h>
|
||||||
#include <Rect.h>
|
#include <Rect.h>
|
||||||
#include <ServerProtocol.h>
|
|
||||||
#include <Shape.h>
|
#include <Shape.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
|
||||||
#include <AppServerLink.h>
|
#include <new>
|
||||||
#include <moreUTF8.h>
|
#include <stdio.h>
|
||||||
#include <truncate_string.h>
|
#include <stdlib.h>
|
||||||
#include <FontPrivate.h>
|
|
||||||
#include <ObjectList.h>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
/** Global functions and variables for the Interface Kit */
|
/** Global functions and variables for the Interface Kit */
|
||||||
|
|
||||||
#include "moreUTF8.h"
|
|
||||||
#include "truncate_string.h"
|
#include "truncate_string.h"
|
||||||
|
#include "utf8_functions.h"
|
||||||
|
|
||||||
#include <ApplicationPrivate.h>
|
#include <ApplicationPrivate.h>
|
||||||
#include <AppServerLink.h>
|
#include <AppServerLink.h>
|
||||||
|
@ -9,20 +9,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <Shape.h>
|
#include "ServerFont.h"
|
||||||
#include <String.h>
|
|
||||||
#include <UTF8.h>
|
|
||||||
|
|
||||||
#include "Angle.h"
|
#include "Angle.h"
|
||||||
#include "FontManager.h"
|
#include "FontManager.h"
|
||||||
#include "moreUTF8.h"
|
|
||||||
#include "truncate_string.h"
|
#include "truncate_string.h"
|
||||||
|
#include "utf8_functions.h"
|
||||||
|
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
#include FT_GLYPH_H
|
#include FT_GLYPH_H
|
||||||
#include FT_OUTLINE_H
|
#include FT_OUTLINE_H
|
||||||
|
|
||||||
#include "ServerFont.h"
|
#include <Shape.h>
|
||||||
|
#include <String.h>
|
||||||
|
#include <UTF8.h>
|
||||||
|
|
||||||
|
|
||||||
// functions needed to convert a freetype vector graphics to a BShape
|
// functions needed to convert a freetype vector graphics to a BShape
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
#include "AGGTextRenderer.h"
|
#include "AGGTextRenderer.h"
|
||||||
|
|
||||||
#include "FontManager.h"
|
#include "FontManager.h"
|
||||||
#include "moreUTF8.h"
|
|
||||||
#include "ServerFont.h"
|
#include "ServerFont.h"
|
||||||
|
#include "utf8_functions.h"
|
||||||
|
|
||||||
#include <agg_basics.h>
|
#include <agg_basics.h>
|
||||||
#include <agg_bounding_rect.h>
|
#include <agg_bounding_rect.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user