mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 07:38:14 +02:00
Rework of the ApplicationType property. atKeyPadDevice should be used instead of atSmartphone now
git-svn-id: trunk@22532 -
This commit is contained in:
parent
1103031807
commit
63f13ceb9c
@ -1080,9 +1080,8 @@ type
|
||||
TApplicationType = (
|
||||
atDefault,
|
||||
atDesktop,
|
||||
atHandheld,
|
||||
atPDA,
|
||||
atSmartphone
|
||||
atKeyPadDevice
|
||||
);
|
||||
|
||||
TApplicationShowGlyphs = (
|
||||
@ -1536,7 +1535,6 @@ const
|
||||
[biSystemMenu], // bsDialog
|
||||
[biSystemMenu, biMinimize], // bsToolWindow
|
||||
[biSystemMenu, biMinimize, biMaximize]); // bsSizeToolWin
|
||||
|
||||
|
||||
procedure CreateWidgetset(AWidgetsetClass: TWidgetsetClass);
|
||||
procedure FreeWidgetSet;
|
||||
|
@ -1078,7 +1078,7 @@ begin
|
||||
case Application.ApplicationType of
|
||||
{ Under Desktop or Handheld mode we get an application which
|
||||
looks similar to a desktop one, with sizable windows }
|
||||
atDesktop, atHandheld:
|
||||
atDesktop:
|
||||
begin
|
||||
case Style of
|
||||
bsSizeable, bsSizeToolWin:
|
||||
@ -1093,7 +1093,7 @@ begin
|
||||
end;
|
||||
{ Under PDA or Smartphone modes most windows are enlarged to fit the screen
|
||||
Dialogs and borderless windows are exceptions }
|
||||
atPDA, atSmartphone, atDefault:
|
||||
atPDA, atKeyPadDevice, atDefault:
|
||||
begin
|
||||
case Style of
|
||||
bsDialog:
|
||||
@ -1113,7 +1113,7 @@ begin
|
||||
|
||||
case Application.ApplicationType of
|
||||
|
||||
atDesktop, atHandheld:
|
||||
atDesktop:
|
||||
begin
|
||||
case Style of
|
||||
bsDialog:
|
||||
@ -1123,7 +1123,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
atPDA, atSmartphone, atDefault:
|
||||
atPDA, atKeyPadDevice, atDefault:
|
||||
begin
|
||||
{$ifdef WinCE}
|
||||
// Adds an "OK" close button to the title bar instead of the standard
|
||||
@ -1348,12 +1348,12 @@ begin
|
||||
if WideStrCmp(@buf, 'PocketPC') = 0 then
|
||||
Result := atPDA
|
||||
else if WideStrCmp(@buf, 'SmartPhone') = 0 then
|
||||
Result := atSmartphone
|
||||
Result := atKeyPadDevice
|
||||
else
|
||||
Result := atPDA;
|
||||
end
|
||||
else if GetLastError = ERROR_ACCESS_DENIED then
|
||||
Result := atSmartphone
|
||||
Result := atKeyPadDevice
|
||||
else
|
||||
Result := atPDA;
|
||||
end;
|
||||
|
@ -289,7 +289,7 @@ begin
|
||||
// Gets the work area
|
||||
Windows.SystemParametersInfo(SPI_GETWORKAREA, 0, @WR, 0);
|
||||
|
||||
if Application.ApplicationType in [atPDA, atSmartphone, atDefault] then
|
||||
if Application.ApplicationType in [atPDA, atKeyPadDevice, atDefault] then
|
||||
begin
|
||||
{ The position and size of common windows is ignored on PDA mode,
|
||||
and a position and size that covers the whole workarea excluding
|
||||
@ -383,7 +383,7 @@ begin
|
||||
BorderStyle := TCustomForm(AWinControl).BorderStyle;
|
||||
|
||||
{ Verifies if the size should be overriden, acording to the ApplicationType }
|
||||
if (Application.ApplicationType in [atPDA, atSmartphone, atDefault]) then
|
||||
if (Application.ApplicationType in [atPDA, atKeyPadDevice, atDefault]) then
|
||||
begin
|
||||
{ We should never move forms which are in full-screen mode }
|
||||
if (BorderStyle <> bsDialog) and (BorderStyle <> bsNone) then Exit;
|
||||
|
@ -193,7 +193,7 @@ begin
|
||||
//mbi.dwFlags := SHCMBF_HMENU;// This options ruins smartphone menu setting
|
||||
mbi.hInstRes := HINSTANCE;
|
||||
|
||||
// if (Application.ApplicationType = atSmartphone)
|
||||
// if (Application.ApplicationType = atKeyPadDevice)
|
||||
// and (LCLMenu <> nil) then
|
||||
|
||||
FillChar(mi, SizeOf(mi), 0);
|
||||
@ -247,7 +247,7 @@ begin
|
||||
mi.fMask:=MIIM_SUBMENU or MIIM_TYPE or MIIM_ID or MIIM_STATE;
|
||||
mi.dwTypeData:=@buf;
|
||||
|
||||
if (Application.ApplicationType = atSmartphone) then
|
||||
if (Application.ApplicationType = atKeyPadDevice) then
|
||||
begin
|
||||
if (Menu <> 0) and (LCLMenu <> nil) then
|
||||
begin
|
||||
@ -262,7 +262,7 @@ begin
|
||||
if LCLMenu.Items.Items[j].Checked then
|
||||
tbbi.fsState:=tbbi.fsState or TBSTATE_CHECKED;
|
||||
|
||||
if (Application.ApplicationType = atSmartphone) then
|
||||
if (Application.ApplicationType = atKeyPadDevice) then
|
||||
begin
|
||||
// Adds a top-level item (We cant really add it, so we find
|
||||
// and modify the existing top-level item)
|
||||
@ -302,7 +302,7 @@ begin
|
||||
Inc(i);
|
||||
end;
|
||||
|
||||
if (Application.ApplicationType = atSmartphone) and (i = 1) then
|
||||
if (Application.ApplicationType = atKeyPadDevice) and (i = 1) then
|
||||
begin
|
||||
tbbi.dwMask := TBIF_STATE;
|
||||
tbbi.fsState:=0;
|
||||
@ -342,8 +342,7 @@ begin
|
||||
SendMessage(mbi.hwndMB, TB_INSERTBUTTON, i, LPARAM(@tb));
|
||||
//MsgBox('i = ' + int2str(i),0);
|
||||
|
||||
// if (IsSmartphone) and (i < 2) then{Smartphones can have only 2 buttons!}
|
||||
if (Application.ApplicationType = atSmartphone) and (i < 2) then{Smartphones can have only 2 buttons!}
|
||||
if (Application.ApplicationType = atKeyPadDevice) and (i < 2) then{KeyPadDevices can have only 2 buttons!}
|
||||
begin
|
||||
case i of
|
||||
0: MenuBarRLID := MenuBarID_L;
|
||||
|
Loading…
Reference in New Issue
Block a user